This commit is contained in:
cun-nan 2024-03-29 13:40:45 +08:00
parent 60b52b53b3
commit 7bf9f0274f

View File

@ -546,14 +546,14 @@
:data="dutyList"> :data="dutyList">
<el-table-column label="序号" align="center" type="index" width="50"></el-table-column> <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
<el-table-column label="角色名称" align="center" prop="dutyName" /> <el-table-column label="角色名称" align="center" prop="dutyName" />
<el-table-column label="角色类型" align="center" prop="dutyType" > <!-- <el-table-column label="角色类型" align="center" prop="dutyType" >-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span v-if="scope.row.dutyType=='1'">超级管理员</span> <!-- <span v-if="scope.row.dutyType=='1'">超级管理员</span>-->
<span v-if="scope.row.dutyType=='2'">普通管理员</span> <!-- <span v-if="scope.row.dutyType=='2'">普通管理员</span>-->
<span v-if="scope.row.dutyType=='3'">油站角色</span> <!-- <span v-if="scope.row.dutyType=='3'">油站角色</span>-->
<span v-if="scope.row.dutyType=='4'">公司角色</span> <!-- <span v-if="scope.row.dutyType=='4'">公司角色</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="所属机构" align="center" prop="deptName" /> <el-table-column label="所属机构" align="center" prop="deptName" />
<el-table-column label="角色状态" align="center" prop="status" > <el-table-column label="角色状态" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -720,6 +720,7 @@
ref="menu" ref="menu"
node-key="id" node-key="id"
:check-strictly="!form1.menuCheckStrictly" :check-strictly="!form1.menuCheckStrictly"
:default-checked-keys="form1.checkedKeys"
empty-text="加载中,请稍候" empty-text="加载中,请稍候"
:props="defaultProps1" :props="defaultProps1"
></el-tree> ></el-tree>
@ -1203,6 +1204,7 @@ export default {
// if (data.dutyType == '4') val = 2; // if (data.dutyType == '4') val = 2;
// const roleMenu = this.getMenuTreeselect(val); // const roleMenu = this.getMenuTreeselect(val);
const roleId = data.dutyId const roleId = data.dutyId
this.form1.menuCheckStrictly = false
getRole(roleId).then(response => { getRole(roleId).then(response => {
this.form1.roleName = response.data.roleInfo.name; this.form1.roleName = response.data.roleInfo.name;
this.form1.roleType = response.data.roleInfo.type; this.form1.roleType = response.data.roleInfo.type;
@ -1212,7 +1214,8 @@ export default {
this.openDuty = true; this.openDuty = true;
this.title = "修改角色"; this.title = "修改角色";
let checkedKeys = response.data.checkedKeys let checkedKeys = response.data.checkedKeys
this.form1.checkedKeys = checkedKeys
this.getMenuTreeselect(response.data.roleInfo.type)
// this.$nextTick(() => { // this.$nextTick(() => {
// roleMenu.then(res => { // roleMenu.then(res => {
// checkedKeys.forEach((v) => { // checkedKeys.forEach((v) => {