fix 编辑角色 不显示权限设置项
This commit is contained in:
parent
3a239ba326
commit
9b59058724
@ -336,7 +336,7 @@ const routes = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: '单位管理',
|
title: '单位管理',
|
||||||
icon: 'iconfont icon-a-shanghu_choose2x1',
|
icon: 'iconfont icon-a-shanghu_choose2x1',
|
||||||
roles: ['master', 'admin'],
|
roles: ['master', 'admin', 'editor'],
|
||||||
tapName: 'admin'
|
tapName: 'admin'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
@ -346,7 +346,7 @@ const routes = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: '单位设置',
|
title: '单位设置',
|
||||||
icon: 'iconfont icon-dianpuguanli',
|
icon: 'iconfont icon-dianpuguanli',
|
||||||
roles: ['master', 'admin'],
|
roles: ['master', 'admin', 'editor'],
|
||||||
tapName: 'admin'
|
tapName: 'admin'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -400,7 +400,7 @@ const routes = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: '账户编辑',
|
title: '账户编辑',
|
||||||
icon: 'iconfont icon-huizhi',
|
icon: 'iconfont icon-huizhi',
|
||||||
roles: ['master', 'admin'],
|
roles: ['master', 'admin', 'editor'],
|
||||||
tapName: 'admin',
|
tapName: 'admin',
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="权限设置">
|
<el-form-item v-if="$store.state.user.power !== 'editor'" label="权限设置">
|
||||||
<el-radio-group v-model="form.role">
|
<el-radio-group v-model="form.role">
|
||||||
<el-radio label="admin">管理员</el-radio>
|
<el-radio label="admin">管理员</el-radio>
|
||||||
<el-radio label="editor">编辑</el-radio>
|
<el-radio label="editor">编辑</el-radio>
|
||||||
@ -77,7 +77,7 @@ export default {
|
|||||||
upFile: '',
|
upFile: '',
|
||||||
oldFile: '',
|
oldFile: '',
|
||||||
pwd: '',
|
pwd: '',
|
||||||
role: 'admin'
|
role: ''
|
||||||
},
|
},
|
||||||
adminId: this.$route.params.id, // get参数 获取管理员id 没有为添加页面
|
adminId: this.$route.params.id, // get参数 获取管理员id 没有为添加页面
|
||||||
pageState: 'add', // 页面状态
|
pageState: 'add', // 页面状态
|
||||||
@ -121,6 +121,7 @@ export default {
|
|||||||
this.form.name = data.name
|
this.form.name = data.name
|
||||||
this.form.uname = data.uname
|
this.form.uname = data.uname
|
||||||
this.form.oldFile = data.oldFile
|
this.form.oldFile = data.oldFile
|
||||||
|
this.form.role = data.role
|
||||||
if (Object.keys(data).length === 0) {
|
if (Object.keys(data).length === 0) {
|
||||||
this.$message.warning('清空表单')
|
this.$message.warning('清空表单')
|
||||||
}
|
}
|
||||||
@ -136,7 +137,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
name: this.admin.name,
|
name: this.admin.name,
|
||||||
uname: this.admin.uname,
|
uname: this.admin.uname,
|
||||||
role: this.admin.role === 5 ? 'admin' : 'editor',
|
role: (Number(this.admin.role) === 5 || Number(this.admin.role) === 4) ? 'admin' : 'editor',
|
||||||
oldFile: this.admin.photo,
|
oldFile: this.admin.photo,
|
||||||
shop_id: this.admin.shop_id
|
shop_id: this.admin.shop_id
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user