|
|
|
@ -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; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|