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