品牌管理员权限相关问题

This commit is contained in:
zyx.net
2022-12-27 09:54:47 +08:00
parent 3692444a99
commit fb044bbd88
5 changed files with 89 additions and 6 deletions
@@ -80,11 +80,19 @@
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-item>
<a-form-item v-if='viewshow' :label="$t('brand')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-multi-select-tag v-model="brands"
:placeholder="$t('PleaseSelect')+$t('brand')"
:type="'select'"
:triggerChange="false" :dictCode="'brand'"/>
<a-form-item v-if='viewshowbrand' :label="$t('brand')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <j-multi-select-tag v-model="brands"-->
<!-- :placeholder="$t('PleaseSelect')+$t('brand')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'brand'"/>-->
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
v-model="brands">
<a-select-option v-for="(item, key) in brandsList" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.text || item.label ">
{{ item.text || item.label }}
</span>
</a-select-option>
</a-select>
</a-form-item>
@@ -230,7 +238,9 @@
modaltoggleFlag: true,
confirmDirty: false,
viewshow: false,
viewshowbrand: false,
selectedDepartKeys: [], //保存用户选择部门id
brandsList: [], //保存用户选择部门id
checkedDepartKeys: [],
checkedDepartNames: [], // 保存部门的名称 =>title
checkedDepartNameString: '', // 保存部门的名称 =>title
@@ -360,8 +370,16 @@
}
})
},
barndslist(){
getAction('/sys/dict/getBrandDict', {}).then((res) => {
if (res.success) {
this.brandsList = res.result
} else {
this.brandsList = []
}
})
},
loadUserRoles(userid) {
console.log(11)
queryUserRole({ userid: userid }).then((res) => {
if (res.success) {
this.selectedRole = res.result
@@ -370,10 +388,17 @@
if(val.roleCode == 'Viewer' && item == val.id){
this.$nextTick(() => {
this.viewshow = true
this.viewshowbrand = true
})
return
} else if(val.roleCode == 'BrandAdministrator' && item == val.id) {
this.$nextTick(() => {
this.viewshowbrand = true
})
return
}else{
this.viewshow = false
this.viewshowbrand = false
}
})
})
@@ -398,10 +423,17 @@
if(val.roleCode == 'Viewer' && item == val.id){
this.$nextTick(() => {
this.viewshow = true
this.viewshowbrand = true
})
return
} else if(val.roleCode == 'BrandAdministrator' && item == val.id) {
this.$nextTick(() => {
this.viewshowbrand = true
})
return
}else{
this.viewshow = false
this.viewshowbrand = false
}
})
})
@@ -465,6 +497,7 @@
let that = this
this.disabled = false
that.initialRoleList()
that.barndslist()
if (record.activitiSync) {
this.disabled = true
}