供应商角色与内部角色错乱问题

ywj_dev
anthonywj 2 years ago
parent ed3dfd096c
commit 6eaebd3e92

@ -1,7 +1,7 @@
<template>
<div>
<el-card>
<el-tabs type="border-card" >
<el-tabs type="border-card">
<el-tab-pane>
<span slot="label">内部角色</span>
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch">
@ -33,78 +33,78 @@
</el-form-item>
</el-form>
<el-table v-loading="Adminloading" :data="AdminroleList"
@selection-change="handleSelectionChange"
style="width: 100%"
border highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150"/>-->
<!-- <el-table-column label="显示顺序" prop="roleSort" width="100"/>-->
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilterType">{{
scope.row.status | statusFilterName
}}
</el-tag>
</template>
</el-table-column>
<el-table v-loading="Adminloading" :data="AdminroleList"
@selection-change="handleSelectionChange"
style="width: 100%"
border highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150"/>-->
<!-- <el-table-column label="显示顺序" prop="roleSort" width="100"/>-->
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilterType">{{
scope.row.status | statusFilterName
}}
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="状态" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- v-model="scope.row.status"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- ></el-switch>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.roleId === 1"
type="text"
@click="handleUpdate(scope.row)"
>编辑
</el-button>
<el-button
type="text"
:disabled="scope.row.roleId === 1"
@click="handleDelete(scope.row)"
>删除
</el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"-->
<!-- >-->
<!-- <span class="el-dropdown-link">-->
<!-- <i class="el-icon-d-arrow-right el-icon&#45;&#45;right"></i>更多-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"-->
<!-- >数据权限-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item command="handleAuthUser" icon="el-icon-user"-->
<!-- >分配用户-->
<!-- </el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
<!-- <el-table-column label="状态" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- v-model="scope.row.status"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- ></el-switch>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.roleId === 1"
type="text"
@click="handleUpdate(scope.row)"
>编辑
</el-button>
<el-button
type="text"
:disabled="scope.row.roleId === 1"
@click="handleDelete(scope.row)"
>删除
</el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"-->
<!-- >-->
<!-- <span class="el-dropdown-link">-->
<!-- <i class="el-icon-d-arrow-right el-icon&#45;&#45;right"></i>更多-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"-->
<!-- >数据权限-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item command="handleAuthUser" icon="el-icon-user"-->
<!-- >分配用户-->
<!-- </el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="Admintotal>0"
:total="Admintotal"
:page.sync="AdminParams.page"
:limit.sync="AdminParams.limit"
@pagination="getList"
/>
<pagination
v-show="Admintotal>0"
:total="Admintotal"
:page.sync="AdminParams.page"
:limit.sync="AdminParams.limit"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane>
@ -213,8 +213,7 @@
</el-tab-pane>
</el-tabs>
</el-tabs>
<!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
@ -235,9 +234,9 @@
<el-input-number v-model="form.roleSort" controls-position="right" :min="0"/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status" >
<el-radio label="0" >正常</el-radio>
<el-radio label="1" >禁用</el-radio>
<el-radio-group v-model="form.status">
<el-radio label="0">正常</el-radio>
<el-radio label="1">禁用</el-radio>
</el-radio-group>
</el-form-item>
<!--<el-form-item label="供应商角色" prop="isCustomer">-->
@ -337,10 +336,10 @@ export default {
dicts: ['sys_normal_disable'],
data() {
return {
userStatus:null,
userStatus: null,
//
loading: true,
Adminloading:true,
Adminloading: true,
//
ids: [],
//
@ -351,9 +350,9 @@ export default {
showSearch: true,
//
total: 0,
Admintotal:0,
Admintotal: 0,
//
AdminroleList:[],
AdminroleList: [],
//
roleList: [],
//
@ -403,8 +402,8 @@ export default {
roleKey: undefined,
status: undefined
},
AdminParams:{},
Params:{},
AdminParams: {},
Params: {},
//
form: {},
defaultProps: {
@ -451,22 +450,22 @@ export default {
methods: {
/** 查询角色列表 */
getList() {
this.Adminloading =true;
this.AdminParams=this.queryParams
this.AdminParams.isCustomer=0;
this.Adminloading = true;
this.AdminParams = this.queryParams
this.AdminParams.isCustomer = 0;
listRole(this.addDateRange(this.AdminParams, this.dateRange)).then(response => {
this.AdminroleList=response.data.list
this.Admintotal = response.data.total;
this.Adminloading =false;
this.AdminroleList = response.data.list
this.Admintotal = response.data.total;
this.Adminloading = false;
}
);
},
getCustomerList() {
this.loading = true;
this.Params=this.queryParams
this.Params.isCustomer=1;
this.Params = this.queryParams
this.Params.isCustomer = 1;
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.roleList=response.data.list
this.roleList = response.data.list
this.total = response.data.total;
this.loading = false;
}
@ -619,11 +618,10 @@ export default {
},
/** 新增按钮操作 */
handleAdd(val) {
this.userStatus=val;
this.userStatus = val;
this.reset();
this.getMenuTreeselect();
this.open = true;
this.form.isCustomer=0;
this.title = "角色管理-新增";
},
/** 修改按钮操作 */
@ -680,10 +678,12 @@ export default {
// return
// }
debugger
if(this.userStatus == 0){
this.form.isCustomer=0;
}else{
this.form.isCustomer=1;
if(this.form.isCustomer == null){
if (this.userStatus == 0) {
this.form.isCustomer = 0;
} else {
this.form.isCustomer = 1;
}
}
this.$refs["form"].validate(valid => {
if (valid) {

Loading…
Cancel
Save