Browse Source

修改团检

master
mch 2 years ago
parent
commit
13c3a5e8b6
  1. 20
      src/components/unitGrouping/unitGroupCategory.vue
  2. 3
      src/components/unitGrouping/unitGroupingTable.vue
  3. 1
      src/store/index.js

20
src/components/unitGrouping/unitGroupCategory.vue

@ -7,6 +7,7 @@
placeholder="请选择"
style="margin-left: 20px"
@change="getprojectgroups"
clearable
>
<el-option
v-for="item in options"
@ -45,12 +46,17 @@
>移去 <i class="el-icon-arrow-right"></i
></el-button>
</div>
<div>
<el-button style="margin-top: 10px" :disabled="saveornot"
>保存
</el-button>
</div>
</div>
<!-- -->
<div class="mainarearightbox">
<el-table
:header-cell-style="{ background: '#eef1f6' }"
:data="selecteddata"
:data="personnelUnit.nogroupselected"
@selection-change="selecteditems"
>
<el-table-column type="selection"></el-table-column>
@ -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;
});
}
},

3
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,'我是分组');
})
},
//

1
src/store/index.js

@ -24,6 +24,7 @@ export default new Vuex.Store({
personnelgrouping:[], //人员分组
id:'',//根据Id选择的数据
form:'',//列表每一项
nogroupselected:[],//已选分组
},
patientRegister:{//人员登记

Loading…
Cancel
Save