Commit 90056617 by 无尘

fix: 修改分配

parent bd294695
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-14 09:20:59
* @LastEditTime: 2020-09-16 15:03:33
-->
<template>
<div class="customer-assign-wrap">
......@@ -281,9 +281,9 @@ export default {
async setParent(obj, copyData) {
const that = this;
for (let i = 0; i < copyData.length; i++) {
if (obj.parentGroupId == copyData[i].storeGroupId) {
if (obj.parentStoreGroupId == copyData[i].storeGroupId) {
copyData[i].expand = true;
if (copyData[i].parentGroupId != 0) {
if (copyData[i].parentStoreGroupId != 0) {
await that.setParent(copyData[i], copyData);
}
}
......@@ -304,9 +304,9 @@ export default {
// 重新组装树形部门
let copyData = JSON.parse(JSON.stringify(that.gicDataCopy));
for (let i = 0; i < copyData.length; i++) {
if (that.departObj.parentGroupId == copyData[i].storeGroupId) {
if (that.departObj.parentStoreGroupId == copyData[i].storeGroupId) {
copyData[i].expand = true;
if (copyData[i].parentGroupId != 0) {
if (copyData[i].parentStoreGroupId != 0) {
await that.setParent(copyData[i], copyData);
}
}
......@@ -501,7 +501,7 @@ export default {
let tree = data.filter(father => {
// 循环所有项
let branchArr = data.filter(child => {
return father.storeGroupId == child.parentGroupId; // 返回每一项的子级数组
return father.storeGroupId == child.parentStoreGroupId; // 返回每一项的子级数组
});
if (branchArr.length > 0) {
father.hasSonNode = true;
......@@ -510,7 +510,7 @@ export default {
father.hasSonNode = false;
father.children = [];
}
return father.parentGroupId == 0; // 返回第一层
return father.parentStoreGroupId == 0; // 返回第一层
});
return tree;
},
......@@ -532,7 +532,7 @@ export default {
ele.expand = false;
ele.children = [];
ele.label = ele.storeGroupName;
if (ele.parentGroupId == 0) {
if (ele.parentStoreGroupId == 0) {
ele.expand = true;
that.departObj = ele;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment