Commit 5e7f66a6 by 杨北旺

修改部门不能选择问题

1 parent b3dbd7fd
......@@ -127,12 +127,12 @@ export default {
},
getDepartmentList() {
getDepartment({ id: 1 }).then(res => {
this.departmentList = this.traverse(res, 'relevanceMerchant')
this.departmentList = this.traverse(1,res, 'relevanceMerchant')
})
},
getMerchantList() {
getMerchantTree().then(res => {
this.shopList = this.traverse(res, 'entmicroName', 'merchantAccountLevel')
this.shopList = this.traverse(2,res, 'entmicroName', 'merchantAccountLevel')
})
},
// 关联当前选择的
......@@ -255,10 +255,10 @@ export default {
})
})
},
// 递归:处理层级数组
traverse(arr, string1, string2, arr1 = []) {
// 递归:处理层级数组 type = 1 部门 2商户
traverse(type,arr, string1, string2, arr1 = []) {
arr.map(item => {
if (item[string1] || item[string2] != 4) {
if (item[string1] || (item[string2] != 4&&type==2)) {
item.disabled = true
} else {
item.disabled = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!