Commit fe1adbde by 杨北旺

Merge branch 'master' of 192.168.3.233:yangming/scrm-micro-config

2 parents 96b3f575 056db7f3
......@@ -85,7 +85,9 @@ export default {
// 设置全选
var arr = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab).merchantProTreeResponses
this.$refs[`tree_${tabName}_${productTab}`][0].setCheckedKeys(this.getAllId(arr))
console.log(tabMenu)
this.$nextTick(() => {
this.addStyle()
})
},
productClick(productId) {
this.productTab = productId
......@@ -156,7 +158,6 @@ export default {
id
}
this.$apis.store.findPermissionsByMerId(params).then(res => {
this.loading = false
this.tabMenu_x = util.deepClone(res)
res.forEach(item => {
console.log(item)
......@@ -178,6 +179,7 @@ export default {
}
})
})
this.loading = false
this.tabName = this.tabMenu[0].accounttypeId
this.productTab = this.tabMenu[0].productsArr[0].productId
// const arr = res.map(i => i.accounttypeId)
......
......@@ -33,6 +33,7 @@
<el-select
size="small"
v-model="searchForm.accountOrPhone"
@change="searchForm.merchantLoginAccount = '';searchForm.merchantLegalPersonPhone = ''"
slot="prepend"
placeholder="请选择"
>
......@@ -50,6 +51,7 @@
size="small"
v-model="searchForm.accountOrPhone"
slot="prepend"
@change="searchForm.merchantLoginAccount = '';searchForm.merchantLegalPersonPhone = ''"
placeholder="请选择"
>
<el-option label="登录账户名" :value="1"></el-option>
......
......@@ -98,7 +98,7 @@ export default {
// 设置全选
var arr = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab).merchantProTreeResponses
this.$refs[`tree_${tabName}_${productTab}`] ? this.$refs[`tree_${tabName}_${productTab}`][0].setCheckedKeys(this.getAllId(arr)) : ''
this.$nextTick(() => {
this.$nextTick(() => {
this.addStyle()
})
},
......@@ -116,8 +116,11 @@ export default {
})
if (status) {
this.$set(this.tabMenu, index, menu[0])
this.tabName = this.tabMenu[index].accounttypeId
} else {
this.$set(this.tabMenu, index, '')
let accounttypeId = this.tabMenu.find(item => item)
this.tabName = accounttypeId && accounttypeId.length > 0 ? accounttypeId[0].accounttypeId : ''
}
},
// 获取当前的所有权限
......@@ -208,7 +211,7 @@ export default {
if (i.productId == j.productId) {
itm.productsArr.push(j)
this.$nextTick(() => {
this.addStyle()
this.addStyle()
this.$refs[`tree_${itm.accounttypeId}_${j.productId}`] ? this.$refs[`tree_${itm.accounttypeId}_${j.productId}`][0].setCheckedKeys(i.menuIds) : ''
})
}
......
......@@ -256,9 +256,11 @@ export default {
this.roleRootRules = true
return
}
// if (this.$refs.productFrom.productTab !== '') {
// this.$message.error('请至少选择一项产品')
// return
let product = this.$refs.productFrom.getSelectInfo()
if (product && product.every(item => item.productList.length == 0)) {
this.$message.error('请选择产品')
return
}
let para = {
merchantId: merchantId,
roleName: roleName,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!