Browse Source

修改

master
mch 2 years ago
parent
commit
3b95ef762a
  1. 23
      src/components/unitGrouping/unitGroupCategory.vue
  2. 4
      src/components/unitGrouping/unitGroupingTable.vue

23
src/components/unitGrouping/unitGroupCategory.vue

@ -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.personnelUnit.nogroupselected.splice(i, 1);
if (
!this.rightselctedata.includes(this.rightselctedata[i].displayName)
) {
this.tabledata.push(this.rightselctedata[i]); 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,9 +213,15 @@ 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]);
if (
[...new Set(this.unselecteddata)]
) {
this.tabledata.splice(i, 1); this.tabledata.splice(i, 1);
this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); this.personnelUnit.nogroupselected.push(this.unselecteddata[i]);
} }
}
this.unselecteddata.forEach((item) => { this.unselecteddata.forEach((item) => {
this.addrulst.push({ this.addrulst.push({
asbitemId: item.id, asbitemId: item.id,

4
src/components/unitGrouping/unitGroupingTable.vue

@ -276,9 +276,9 @@ export default {
}); });
// //
getapi( getapi(
`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${this.personnelUnit.id}`
`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${this.personnelUnit.form.id}`
).then((res) => { ).then((res) => {
console.log(res.data,'当前列');
console.log(res.data, "当前列");
this.personnelUnit.nogroupselected = res.data; this.personnelUnit.nogroupselected = res.data;
console.log(this.personnelUnit.nogroupselected, "我是分组"); console.log(this.personnelUnit.nogroupselected, "我是分组");
}); });

Loading…
Cancel
Save