|
|
@@ -451,27 +451,40 @@ export default {
|
|
|
})
|
|
|
|
|
|
const { role = [] } = this.$store.getters.userInfo || {}
|
|
|
- const roleList = ['xtgljs', 'xxglxzfzr', 'wjglzzc', 'syszr']
|
|
|
- // 系统管理角色、信息管理负责人、检验科主任添加删除按钮
|
|
|
- const hasRole = role.some((item) => roleList.includes(item.alias))
|
|
|
- this.listConfig.toolbars.push({
|
|
|
- key: 'detail',
|
|
|
- label: '详情',
|
|
|
- type: 'info'
|
|
|
- })
|
|
|
- if (hasRole) {
|
|
|
- // 系统管理角色不做分类过滤
|
|
|
- // this.hasPermission = false
|
|
|
- const btn = [
|
|
|
- {
|
|
|
- key: 'remove',
|
|
|
- label: '删除',
|
|
|
- type: 'danger'
|
|
|
+ this.$common
|
|
|
+ .request('query', {
|
|
|
+ key: 'getModifyRole',
|
|
|
+ params: [null]
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ const configList = res.variables.data
|
|
|
+ if (configList) {
|
|
|
+ const roleList =
|
|
|
+ configList.length > 0
|
|
|
+ ? configList[0].kai_fang_gang_wei.split(',')
|
|
|
+ : ['xtgljs', 'xxglxzfzr', 'wjglzzc', 'syszr']
|
|
|
+ // 系统管理角色、信息管理负责人、检验科主任添加删除按钮
|
|
|
+ const hasRole = role.some((item) => roleList.includes(item.alias))
|
|
|
+ this.listConfig.toolbars.push({
|
|
|
+ key: 'detail',
|
|
|
+ label: '详情',
|
|
|
+ type: 'info'
|
|
|
+ })
|
|
|
+ if (hasRole) {
|
|
|
+ // 系统管理角色不做分类过滤
|
|
|
+ // this.hasPermission = false
|
|
|
+ const btn = [
|
|
|
+ {
|
|
|
+ key: 'remove',
|
|
|
+ label: '删除',
|
|
|
+ type: 'danger'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.listConfig.toolbars.push(...btn)
|
|
|
+ this.selection = true
|
|
|
+ }
|
|
|
}
|
|
|
- ]
|
|
|
- this.listConfig.toolbars.push(...btn)
|
|
|
- this.selection = true
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
replaceFormName(row, column, cellValue, index) {
|