|
|
@ -167,9 +167,9 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
//保存按钮 |
|
|
//保存按钮 |
|
|
Onsubmit() { |
|
|
Onsubmit() { |
|
|
console.log(this.personnelUnit.form.id); |
|
|
|
|
|
if (this.personnelUnit.form.id === "") { |
|
|
|
|
|
this.$message.success("请选择单位分组"); |
|
|
|
|
|
|
|
|
console.log(this.personnelUnit.id); |
|
|
|
|
|
if (this.personnelUnit.id === "") { |
|
|
|
|
|
this.$message.warning("请先选择单位分组"); |
|
|
} else { |
|
|
} else { |
|
|
postapi("/api/app/customer-org-group-detail/many", this.addrulst).then( |
|
|
postapi("/api/app/customer-org-group-detail/many", this.addrulst).then( |
|
|
(res) => { |
|
|
(res) => { |
|
|
@ -181,15 +181,22 @@ export default { |
|
|
//移除按钮 |
|
|
//移除按钮 |
|
|
addselecteditems() { |
|
|
addselecteditems() { |
|
|
//personnelUnit.nogroupselected |
|
|
//personnelUnit.nogroupselected |
|
|
|
|
|
|
|
|
if (this.rightselctedata.length == 0) { |
|
|
if (this.rightselctedata.length == 0) { |
|
|
this.$message.warning("已选数据为空无法移动"); |
|
|
this.$message.warning("已选数据为空无法移动"); |
|
|
} else { |
|
|
} else { |
|
|
let count = this.rightselctedata.length - 1; |
|
|
let count = this.rightselctedata.length - 1; |
|
|
for (var i = count; i >= 0; i--) { |
|
|
for (var i = count; i >= 0; i--) { |
|
|
this.personnelUnit.nogroupselected.splice(i, 1); |
|
|
|
|
|
this.tabledata.push(this.rightselctedata[i]); |
|
|
|
|
|
|
|
|
// this.personnelUnit.nogroupselected.splice(i, 1); |
|
|
|
|
|
if ( |
|
|
|
|
|
!this.rightselctedata.includes(this.rightselctedata[i].displayName) |
|
|
|
|
|
) { |
|
|
|
|
|
this.tabledata.push(this.rightselctedata[i]); |
|
|
|
|
|
this.personnelUnit.nogroupselected.splice(i, 1); |
|
|
|
|
|
console.log(this.rightselctedata[i]); |
|
|
|
|
|
} |
|
|
|
|
|
// this.tabledata.push(this.rightselctedata[i]); |
|
|
} |
|
|
} |
|
|
|
|
|
// this. |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//右侧勾选按钮 |
|
|
//右侧勾选按钮 |
|
|
@ -206,8 +213,14 @@ export default { |
|
|
this.saveornot = false; |
|
|
this.saveornot = false; |
|
|
let count = this.unselecteddata.length - 1; |
|
|
let count = this.unselecteddata.length - 1; |
|
|
for (var i = count; i >= 0; i--) { |
|
|
for (var i = count; i >= 0; i--) { |
|
|
this.tabledata.splice(i, 1); |
|
|
|
|
|
this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); |
|
|
|
|
|
|
|
|
// this.tabledata.splice(i, 1); |
|
|
|
|
|
// this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); |
|
|
|
|
|
if ( |
|
|
|
|
|
[...new Set(this.unselecteddata)] |
|
|
|
|
|
) { |
|
|
|
|
|
this.tabledata.splice(i, 1); |
|
|
|
|
|
this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.unselecteddata.forEach((item) => { |
|
|
this.unselecteddata.forEach((item) => { |
|
|
this.addrulst.push({ |
|
|
this.addrulst.push({ |
|
|
|