Commit 28f5db39 by 李长胜

请选择产品

1 parent 6cc526c9
......@@ -203,10 +203,14 @@ export default {
return
}
this.roleRootRules = false
if (this.$refs.productFrom.getSelectInfo().length == 0 || this.$refs.productFrom.productTab === '') {
if (this.$refs.productFrom.getSelectInfo().length == 0) {
this.roleRootRules = true
return
}
if (this.$refs.productFrom.productTab === '') {
this.$message.error('请至少选择一项产品')
return
}
let accountTypes = JSON.stringify(this.$refs.productFrom.getSelectInfo())
let para = {
merchantId: merchantId,
......@@ -226,31 +230,39 @@ export default {
if (valid) {
let accountTypes = JSON.stringify(this.$refs.productFrom.getSelectInfo())
this.roleRootRules = false
if (this.$refs.productFrom.getSelectInfo().length == 0 || this.$refs.productFrom.productTab === '') {
if (this.$refs.productFrom.getSelectInfo().length == 0) {
this.roleRootRules = true
return
}
let para = {
merchantId: merchantId,
roleName: roleName,
roleDescription: roleDesc,
delFlag,
requestList: accountTypes
}
if (this.pageType == 'edit') {
para.id = this.editId
this.updateRole(para)
} else {
this.insertRole(para)
if (this.$refs.productFrom.productTab !== '') {
// this.$message.error('请至少选择一项产品')
// return
let para = {
merchantId: merchantId,
roleName: roleName,
roleDescription: roleDesc,
delFlag,
requestList: accountTypes
}
if (this.pageType == 'edit') {
para.id = this.editId
this.updateRole(para)
} else {
this.insertRole(para)
}
}
}
})
// console.log('外面', this.$refs.productFrom.getSelectInfo().length, this.$refs.productFrom.productTab)
this.roleRootRules = false
if (this.$refs.productFrom.getSelectInfo().length == 0 || this.$refs.productFrom.productTab === '') {
if (this.$refs.productFrom.getSelectInfo().length == 0) {
this.roleRootRules = true
return
}
if (this.$refs.productFrom.productTab === '') {
this.$message.error('请至少选择一项产品')
return
}
}
},
insertRole(para) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!