diff --git a/src/components/unitGrouping/unitGroupCategory.vue b/src/components/unitGrouping/unitGroupCategory.vue index e919967..e14e291 100644 --- a/src/components/unitGrouping/unitGroupCategory.vue +++ b/src/components/unitGrouping/unitGroupCategory.vue @@ -7,6 +7,7 @@ placeholder="请选择" style="margin-left: 20px" @change="getprojectgroups" + clearable > 移去 +
+ 保存 + +
@@ -131,6 +137,7 @@ import { mapState } from "vuex"; export default { data() { return { + saveornot:true,//保存按钮 selecteddata: [], //已选数据 unselecteddata: [], //未选数据 unselecteddata: [], //右边勾选中 @@ -175,12 +182,19 @@ export default { if (this.unselecteddata.length == 0) { this.$message.warning("未选数据为空无法移动"); } else { + this.saveornot=false let count = this.unselecteddata.length - 1; for (var i = count; i >= 0; i--) { this.tabledata.splice(i, 1); - this.selecteddata.push(this.unselecteddata[i]); + this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); } // this.selecteddata = this.unselecteddata; + // 复制 + // let count = this.unselecteddata.length - 1; + // for (var i = count; i >= 0; i--) { + // this.tabledata.splice(i, 1); + // this.selecteddata.push(this.unselecteddata[i]); + // } } }, // 左侧未选 @@ -197,6 +211,7 @@ export default { }, //项目类别选择 getprojectgroups(v) { + this.getportfolioitems(); getapi(`/api/app/asbitem/in-item-type/${v}`).then((res) => { this.tabledata = res.data; console.log(res); @@ -212,6 +227,7 @@ export default { `/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${this.personnelUnit.form.id}` ).then((res) => { console.log(res); + this.personnelUnit.form = res.data; }); } }, diff --git a/src/components/unitGrouping/unitGroupingTable.vue b/src/components/unitGrouping/unitGroupingTable.vue index 362cf02..06c3427 100644 --- a/src/components/unitGrouping/unitGroupingTable.vue +++ b/src/components/unitGrouping/unitGroupingTable.vue @@ -277,7 +277,8 @@ export default { // getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${this.personnelUnit.id}`).then(res=>{ - console.log(res,'我是分组'); + this.personnelUnit.nogroupselected=res.data + console.log(res,'我是分组'); }) }, //编辑弹框 diff --git a/src/store/index.js b/src/store/index.js index 060199e..aee8aec 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -24,6 +24,7 @@ export default new Vuex.Store({ personnelgrouping:[], //人员分组 id:'',//根据Id选择的数据 form:'',//列表每一项 + nogroupselected:[],//已选分组 }, patientRegister:{//人员登记