|
@@ -4,7 +4,7 @@
|
|
<el-form label-width="84px" inline="true">
|
|
<el-form label-width="84px" inline="true">
|
|
<el-form-item label="角色名称:">
|
|
<el-form-item label="角色名称:">
|
|
<el-input
|
|
<el-input
|
|
- v-model="search.state.nickName"
|
|
|
|
|
|
+ v-model="search.state.searchKey"
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -20,7 +20,7 @@
|
|
|
|
|
|
<div class="body-layer" style="padding-top: 8px">
|
|
<div class="body-layer" style="padding-top: 8px">
|
|
<div class="body-but">
|
|
<div class="body-but">
|
|
- <el-button type="primary" @click="newAddclick">新增角色</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="()=>{newAddclick(null,'新增')}">新增角色</el-button>
|
|
<!-- <h3 style="visibility: hidden;">用户列表</h3> -->
|
|
<!-- <h3 style="visibility: hidden;">用户列表</h3> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -37,22 +37,23 @@
|
|
{{ pag.state.size * (pag.state.currPage - 1) + $index + 1 }}
|
|
{{ pag.state.size * (pag.state.currPage - 1) + $index + 1 }}
|
|
</div>
|
|
</div>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="角色名称" prop="userName"></el-table-column>
|
|
|
|
- <el-table-column label="角色类型" prop="nickName"></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="所属架构"
|
|
|
|
- prop="departmentName"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column label="创建人" prop="roleName"></el-table-column>
|
|
|
|
- <el-table-column label="创建时间" prop="roleName"></el-table-column>
|
|
|
|
|
|
+ <el-table-column label="角色名称" prop="roleName"></el-table-column>
|
|
|
|
+ <el-table-column label="角色类型" prop="type">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{ scope.row.type==0?'预设':'自定义' }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="所属架构" prop="deptName" ></el-table-column>
|
|
|
|
+ <el-table-column label="创建人" prop="nickName"></el-table-column>
|
|
|
|
+ <el-table-column label="创建时间" prop="createTime"></el-table-column>
|
|
<el-table-column label="操作" v-slot:default="{ row }">
|
|
<el-table-column label="操作" v-slot:default="{ row }">
|
|
<!-- v-if="auth.update || auth.updatePwd || auth.delete" v-if="auth.update"-->
|
|
<!-- v-if="auth.update || auth.updatePwd || auth.delete" v-if="auth.update"-->
|
|
<!-- row.roleKey == roleKey[user.roleKey] -->
|
|
<!-- row.roleKey == roleKey[user.roleKey] -->
|
|
<template v-if="user.roleKey !== 'admin-ordinary'">
|
|
<template v-if="user.roleKey !== 'admin-ordinary'">
|
|
- <span class="oper-span" @click="delInfo(row)" v-power="'view'"
|
|
|
|
|
|
+ <span class="oper-span" @click="()=>{newAddclick(row.id,'查看')}" v-power="'view'"
|
|
>查看</span
|
|
>查看</span
|
|
>
|
|
>
|
|
- <span class="oper-span" @click="updateInfo(row)" v-power="'edit'"
|
|
|
|
|
|
+ <span class="oper-span" @click="()=>{newAddclick(row.id,'编辑')}" v-power="'edit'"
|
|
>编辑</span
|
|
>编辑</span
|
|
>
|
|
>
|
|
<!-- v-if="auth.delete" -->
|
|
<!-- v-if="auth.delete" -->
|
|
@@ -72,34 +73,20 @@
|
|
:current-page="pag.state.currPage"
|
|
:current-page="pag.state.currPage"
|
|
:page-size="pag.state.size"
|
|
:page-size="pag.state.size"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
- :total="pag.state.total"
|
|
|
|
|
|
+ :total="pag.state.total || 0"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<com-dialog
|
|
<com-dialog
|
|
- title="编辑用户"
|
|
|
|
- v-model:show="oper.state.show"
|
|
|
|
- @submit="operItem"
|
|
|
|
- width="540"
|
|
|
|
- >
|
|
|
|
- <el-form ref="form" :model="form" label-width="90px" class="user-from">
|
|
|
|
- <el-form-item label="用户姓名" class="mandatory">
|
|
|
|
- <el-input
|
|
|
|
- v-model.trim="editName"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="15"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- </com-dialog>
|
|
|
|
-
|
|
|
|
- <com-dialog
|
|
|
|
- title="新增角色"
|
|
|
|
|
|
+ :title="`${operateType}角色`"
|
|
@quit="
|
|
@quit="
|
|
newData = {};
|
|
newData = {};
|
|
deptIdList = [];
|
|
deptIdList = [];
|
|
"
|
|
"
|
|
v-model:show="newShow"
|
|
v-model:show="newShow"
|
|
|
|
+ :showClose="operateType != '查看'"
|
|
|
|
+ :enterText="operateType == '查看'?'确定':false"
|
|
|
|
+ :cornerClose="operateType == '查看'"
|
|
@submit="newSubmit"
|
|
@submit="newSubmit"
|
|
width="540"
|
|
width="540"
|
|
>
|
|
>
|
|
@@ -107,7 +94,8 @@
|
|
<el-form-item label="角色名称:" class="mandatory">
|
|
<el-form-item label="角色名称:" class="mandatory">
|
|
<el-input
|
|
<el-input
|
|
maxlength="15"
|
|
maxlength="15"
|
|
- v-model="newData.nickName"
|
|
|
|
|
|
+ v-model="newData.roleName"
|
|
|
|
+ :disabled="operateType == '查看'"
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -117,8 +105,8 @@
|
|
>
|
|
>
|
|
<el-input
|
|
<el-input
|
|
maxlength="15"
|
|
maxlength="15"
|
|
- disabled="true"
|
|
|
|
- v-model="newData.userRokename"
|
|
|
|
|
|
+ :disabled="true"
|
|
|
|
+ v-model="newData.deptName"
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -133,9 +121,10 @@
|
|
show-checkbox
|
|
show-checkbox
|
|
:current-node-key="nodekey"
|
|
:current-node-key="nodekey"
|
|
node-key="id"
|
|
node-key="id"
|
|
|
|
+ :default-checked-keys="Object.keys(radioData)"
|
|
@check="handleClick"
|
|
@check="handleClick"
|
|
@node-click="handClick"
|
|
@node-click="handClick"
|
|
- :props="{ children: 'children', label: 'label' }"
|
|
|
|
|
|
+ :props="{ children: 'children', label: 'name',disabled:'disabled' }"
|
|
/>
|
|
/>
|
|
<!-- @current-change="handcurrentChange"
|
|
<!-- @current-change="handcurrentChange"
|
|
@check-change="handcheckchange"-->
|
|
@check-change="handcheckchange"-->
|
|
@@ -148,6 +137,7 @@
|
|
v-if="selectShow"
|
|
v-if="selectShow"
|
|
v-model="radio"
|
|
v-model="radio"
|
|
@change="radioChange"
|
|
@change="radioChange"
|
|
|
|
+ :disabled="operateType == '查看'"
|
|
>
|
|
>
|
|
<el-radio
|
|
<el-radio
|
|
style="line-height:28px"
|
|
style="line-height:28px"
|
|
@@ -173,22 +163,18 @@ import comDialog from "@/components/dialog";
|
|
import comHead from "@/components/head";
|
|
import comHead from "@/components/head";
|
|
import comCompany from "@/components/company-select";
|
|
import comCompany from "@/components/company-select";
|
|
import comPagination from "@/components/pagination";
|
|
import comPagination from "@/components/pagination";
|
|
-// import roleCompany from "@/components/role-select";
|
|
|
|
-// import comSelect from "@/components/company-select";
|
|
|
|
import auth from "@/state/viewAuth";
|
|
import auth from "@/state/viewAuth";
|
|
import user from "@/state/user";
|
|
import user from "@/state/user";
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
-// import { encryption } from "@/util";
|
|
|
|
-import { PHONE, EPSW } from "@/constant/REG";
|
|
|
|
import { ADMIN_USER_ID } from "@/constant";
|
|
import { ADMIN_USER_ID } from "@/constant";
|
|
-
|
|
|
|
import {
|
|
import {
|
|
getTreeselect,
|
|
getTreeselect,
|
|
- getUserList,
|
|
|
|
- updateUser,
|
|
|
|
- deleUser,
|
|
|
|
|
|
+ getRoleTree,
|
|
|
|
+ detailRole,
|
|
|
|
+ getPageList,
|
|
|
|
+ updateRole,
|
|
|
|
+ removeRole,
|
|
changeUserStatus,
|
|
changeUserStatus,
|
|
- userAdd,
|
|
|
|
userEdit,
|
|
userEdit,
|
|
} from "@/request/config";
|
|
} from "@/request/config";
|
|
import { getApp } from "../../app";
|
|
import { getApp } from "../../app";
|
|
@@ -198,10 +184,10 @@ export default {
|
|
setup() {
|
|
setup() {
|
|
const flag = ref(true);
|
|
const flag = ref(true);
|
|
const state = getTableState({
|
|
const state = getTableState({
|
|
- getUrl: getUserList,
|
|
|
|
- updateUrl: updateUser,
|
|
|
|
|
|
+ getUrl: getPageList,
|
|
|
|
+ updateUrl: updateRole,
|
|
operAttr: {
|
|
operAttr: {
|
|
- nickName: "",
|
|
|
|
|
|
+ roleName: "",
|
|
userName: "",
|
|
userName: "",
|
|
deptId: "",
|
|
deptId: "",
|
|
password: "",
|
|
password: "",
|
|
@@ -209,7 +195,7 @@ export default {
|
|
roleId: "",
|
|
roleId: "",
|
|
maxlevel: 1,
|
|
maxlevel: 1,
|
|
},
|
|
},
|
|
- searchAttr: { nickName: "", status: "", deptId: "" },
|
|
|
|
|
|
+ searchAttr: { roleName: "", status: "", deptId: "",searchKey:'' },
|
|
});
|
|
});
|
|
const headList = ref([{ name: "角色管理", value: 2 }]);
|
|
const headList = ref([{ name: "角色管理", value: 2 }]);
|
|
const roleKey = ref({
|
|
const roleKey = ref({
|
|
@@ -217,21 +203,13 @@ export default {
|
|
"admin-dept": "admin-ordinary",
|
|
"admin-dept": "admin-ordinary",
|
|
});
|
|
});
|
|
const operRoleId = ref("");
|
|
const operRoleId = ref("");
|
|
- const updateInfo = (row) => {
|
|
|
|
- if (!row.status) {
|
|
|
|
- return getApp().$message.error("请先启用用户", "提示");
|
|
|
|
- }
|
|
|
|
- data.editName = row.nickName;
|
|
|
|
- operRoleId.value = row.roleId;
|
|
|
|
- state.oper.value.readyUpdate(row);
|
|
|
|
- };
|
|
|
|
const delInfo = async (row) => {
|
|
const delInfo = async (row) => {
|
|
let isOk = await getApp().$confirm(
|
|
let isOk = await getApp().$confirm(
|
|
- "用户被删除后,无法登陆使用,无法编辑场景(可将该用户关联的相机绑定到其他管理员),确认要删除组织吗?",
|
|
|
|
|
|
+ "删除角色后,相关用户需重新配置角色,确认要删除组织吗?",
|
|
"删除"
|
|
"删除"
|
|
);
|
|
);
|
|
if (isOk) {
|
|
if (isOk) {
|
|
- await axios.post(deleUser, { id: row.id });
|
|
|
|
|
|
+ await axios.post(removeRole+row.id , { id: row.id });
|
|
getApp().$message({ message: "操作成功", type: "success" });
|
|
getApp().$message({ message: "操作成功", type: "success" });
|
|
state.search.value.submit();
|
|
state.search.value.submit();
|
|
}
|
|
}
|
|
@@ -239,15 +217,38 @@ export default {
|
|
const getTreedata = async () => {
|
|
const getTreedata = async () => {
|
|
let res = await axios.get(getTreeselect, {});
|
|
let res = await axios.get(getTreeselect, {});
|
|
data.treedata = res.data;
|
|
data.treedata = res.data;
|
|
- console.log("data.treedata", data.treedata);
|
|
|
|
- // getApp().$ref.treeBox.setCurrentKey(user.info.id)
|
|
|
|
};
|
|
};
|
|
- const newAddclick = () => {
|
|
|
|
|
|
+ const newAddclick = async (id,type) => {
|
|
|
|
+ let reqApi = getRoleTree;//id?getTreeByRole+id:getRoleTree
|
|
|
|
+ let treeRes = await axios.get(reqApi, {roleId:id});
|
|
|
|
+ data.selectId = id
|
|
|
|
+ if(type != '新增'){
|
|
|
|
+ let res = await axios.get(detailRole+id, {roleId:id});
|
|
|
|
+ let { roleName,perm,deptName} = res.data
|
|
|
|
+ data.radioData = perm
|
|
|
|
+ data.newData = {
|
|
|
|
+ ...data.newData,
|
|
|
|
+ roleName,
|
|
|
|
+ deptName,
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ data.newData.deptName = user.deptName
|
|
|
|
+ data.radioData = {}
|
|
|
|
+ }
|
|
|
|
+ data.roledata = type == '查看'?(treeRes.data.map(ele => {
|
|
|
|
+ ele.disabled = true
|
|
|
|
+ ele.children && ele.children.map(item => item.disabled = true)
|
|
|
|
+ return ele
|
|
|
|
+ })):treeRes.data || [];
|
|
|
|
+ data.operateType = type || '新增'
|
|
data.newShow = true;
|
|
data.newShow = true;
|
|
|
|
+
|
|
};
|
|
};
|
|
const data = reactive({
|
|
const data = reactive({
|
|
newShow: false,
|
|
newShow: false,
|
|
editName: "", //修改编辑用户名称
|
|
editName: "", //修改编辑用户名称
|
|
|
|
+ selectId:'',
|
|
|
|
+ operateType:'新增',
|
|
deptIdList: [],
|
|
deptIdList: [],
|
|
radio: 1,
|
|
radio: 1,
|
|
radioData: {},
|
|
radioData: {},
|
|
@@ -255,67 +256,24 @@ export default {
|
|
selectShow: false,
|
|
selectShow: false,
|
|
roleSelct: [
|
|
roleSelct: [
|
|
{ id: 1, value: "全部数据" },
|
|
{ id: 1, value: "全部数据" },
|
|
- { id: 2, value: "所属组织及下级组织数据" },
|
|
|
|
- { id: 3, value: "所属组织内部数据" },
|
|
|
|
- { id: 4, value: "个人创建数据" },
|
|
|
|
|
|
+ { id: 3, value: "所属组织及下级组织数据" },
|
|
|
|
+ { id: 4, value: "所属组织内部数据" },
|
|
|
|
+ { id: 5, value: "个人创建数据" },
|
|
],
|
|
],
|
|
|
|
+ checkedList:[],//tree 选中树
|
|
selectData: {},
|
|
selectData: {},
|
|
- roledata: [
|
|
|
|
- {
|
|
|
|
- id: 1,
|
|
|
|
- label: "场景管理",
|
|
|
|
- value: true,
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- id: 14,
|
|
|
|
- label: "查看",
|
|
|
|
- value: false,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 19,
|
|
|
|
- label: "删除",
|
|
|
|
- value: false,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 10,
|
|
|
|
- label: "编辑",
|
|
|
|
- value: false,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 2,
|
|
|
|
- label: "火调管理",
|
|
|
|
- value: true,
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- id: 24,
|
|
|
|
- label: "查看",
|
|
|
|
- value: false,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 29,
|
|
|
|
- label: "删除",
|
|
|
|
- value: false,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 20,
|
|
|
|
- label: "编辑",
|
|
|
|
- value: false,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ roledata: [],
|
|
treedata: [],
|
|
treedata: [],
|
|
newData: {
|
|
newData: {
|
|
userName: "",
|
|
userName: "",
|
|
userId: "",
|
|
userId: "",
|
|
- userRokename: "全部数据",
|
|
|
|
|
|
+ deptName: user.deptName,
|
|
password: "",
|
|
password: "",
|
|
userRole: "",
|
|
userRole: "",
|
|
},
|
|
},
|
|
});
|
|
});
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
|
+
|
|
getTreedata();
|
|
getTreedata();
|
|
});
|
|
});
|
|
return {
|
|
return {
|
|
@@ -325,7 +283,6 @@ export default {
|
|
getTreedata,
|
|
getTreedata,
|
|
headList,
|
|
headList,
|
|
delInfo,
|
|
delInfo,
|
|
- updateInfo,
|
|
|
|
auth,
|
|
auth,
|
|
user,
|
|
user,
|
|
operRoleId,
|
|
operRoleId,
|
|
@@ -339,12 +296,13 @@ export default {
|
|
handleClick(data, checked) {
|
|
handleClick(data, checked) {
|
|
console.log(checked);
|
|
console.log(checked);
|
|
console.log(data);
|
|
console.log(data);
|
|
|
|
+ this.checkedList = checked.checkedKeys
|
|
let CurrentKey = this.$refs.tree.getCurrentKey();
|
|
let CurrentKey = this.$refs.tree.getCurrentKey();
|
|
if (
|
|
if (
|
|
checked.checkedKeys.includes(data.id) &&
|
|
checked.checkedKeys.includes(data.id) &&
|
|
- !data.value &&
|
|
|
|
|
|
+ data.type == 'button' &&
|
|
CurrentKey == data.id
|
|
CurrentKey == data.id
|
|
- ) {
|
|
|
|
|
|
+ ) { //找到高亮且勾选的item
|
|
this.setselectShow(data, data.id);
|
|
this.setselectShow(data, data.id);
|
|
} else {
|
|
} else {
|
|
this.selectShow = null;
|
|
this.selectShow = null;
|
|
@@ -353,54 +311,54 @@ export default {
|
|
radioChange(val) {
|
|
radioChange(val) {
|
|
let id = this.selectShow.id;
|
|
let id = this.selectShow.id;
|
|
this.radioData[id] = val;
|
|
this.radioData[id] = val;
|
|
- console.log("radioChange", val);
|
|
|
|
|
|
+ console.log("radioChange", this.radioData);
|
|
},
|
|
},
|
|
handClick(data) {
|
|
handClick(data) {
|
|
let checkedNodes = this.$refs.tree.getCheckedNodes();
|
|
let checkedNodes = this.$refs.tree.getCheckedNodes();
|
|
let selectShow = checkedNodes.find((ele) => data.id == ele.id) || null;
|
|
let selectShow = checkedNodes.find((ele) => data.id == ele.id) || null;
|
|
- if (!data.value) {
|
|
|
|
|
|
+ if (data.type == 'button'&& this.operateType !== '查看') {
|
|
this.setselectShow(selectShow, data.id);
|
|
this.setselectShow(selectShow, data.id);
|
|
}
|
|
}
|
|
- console.log("handClick", this.selectShow);
|
|
|
|
|
|
+ console.log("handClick",data);
|
|
},
|
|
},
|
|
setselectShow(selectShow, id) {
|
|
setselectShow(selectShow, id) {
|
|
this.selectShow = selectShow;
|
|
this.selectShow = selectShow;
|
|
- this.radio = this.radioData[id] || 1;
|
|
|
|
|
|
+ this.radio = parseInt(this.radioData[id] || 1)
|
|
|
|
+ if(!this.radioData[id])this.radioData[id] = 1
|
|
},
|
|
},
|
|
handcurrentChange(a, b) {
|
|
handcurrentChange(a, b) {
|
|
console.log("handcurrentChange", a, b);
|
|
console.log("handcurrentChange", a, b);
|
|
console.log("ref", this.selectShow);
|
|
console.log("ref", this.selectShow);
|
|
},
|
|
},
|
|
- changeDeptId(val) {
|
|
|
|
- this.newData.deptId = val && val[val.length - 1];
|
|
|
|
|
|
+ assembleData(val) {
|
|
|
|
+ let data = val.map(ele => {
|
|
|
|
+ ele.children && ele.children(ele => ele.disabled = true)
|
|
|
|
+ return ele
|
|
|
|
+ })
|
|
|
|
+ console.log('assembleData',data);
|
|
|
|
+ return data
|
|
},
|
|
},
|
|
async newSubmit() {
|
|
async newSubmit() {
|
|
- console.log("newSubmit", this.user, this.newData);
|
|
|
|
- if (!this.newData.nickName) {
|
|
|
|
- return this.$message.error("请输入用户姓名", "提示");
|
|
|
|
- }
|
|
|
|
- if (!this.newData.roleId) {
|
|
|
|
- return this.$message.error("请选择用户角色", "提示");
|
|
|
|
|
|
+ if(this.operateType == '查看'){
|
|
|
|
+ return this.newShow = false;
|
|
}
|
|
}
|
|
- console.log(PHONE.REG.test(this.newData.userName), this.newData.userName);
|
|
|
|
- if (!this.newData.userName) {
|
|
|
|
- return this.$message.error("请选择用户账户", "提示");
|
|
|
|
- } else if (!PHONE.REG.test(this.newData.userName)) {
|
|
|
|
- return this.$message.error(PHONE.tip, "提示");
|
|
|
|
- }
|
|
|
|
- if (!this.newData.psw) {
|
|
|
|
- return this.$message.error("请输入登录密码", "提示");
|
|
|
|
- } else if (!EPSW.REG.test(this.newData.psw)) {
|
|
|
|
- return this.$message.error(EPSW.tip, "提示");
|
|
|
|
|
|
+ if (!this.newData.roleName) {
|
|
|
|
+ return this.$message.error("请输入用户姓名", "提示");
|
|
}
|
|
}
|
|
- let apiinfo = await axios.post(userAdd, {
|
|
|
|
- nickName: this.newData.nickName,
|
|
|
|
- password: this.newData.psw,
|
|
|
|
- userName: this.newData.userName,
|
|
|
|
- roleId: this.newData.roleId,
|
|
|
|
- deptId: this.newData.deptId,
|
|
|
|
- // ...this.newData
|
|
|
|
|
|
+ let perm = {}
|
|
|
|
+ this.checkedList.map(ele =>{
|
|
|
|
+ perm[ele] = 1
|
|
|
|
+ })
|
|
|
|
+ let id = this.selectId
|
|
|
|
+ let apiinfo = await axios.post(updateRole, { //新增修改角色
|
|
|
|
+ "id": id || '',
|
|
|
|
+ "perm": {
|
|
|
|
+ ...perm,
|
|
|
|
+ ...this.radioData,
|
|
|
|
+ },
|
|
|
|
+ "roleName": this.newData.roleName
|
|
});
|
|
});
|
|
|
|
+ console.log("newSubmit", apiinfo);
|
|
this.$message({ message: apiinfo.msg || "成功", type: "success" });
|
|
this.$message({ message: apiinfo.msg || "成功", type: "success" });
|
|
// await this.$confirm('每个组织只能创建一个总管理员~', '新增用户')
|
|
// await this.$confirm('每个组织只能创建一个总管理员~', '新增用户')
|
|
this.newData = {};
|
|
this.newData = {};
|
|
@@ -415,7 +373,7 @@ export default {
|
|
console.log("state.oper", this.oper);
|
|
console.log("state.oper", this.oper);
|
|
await axios.post(userEdit, {
|
|
await axios.post(userEdit, {
|
|
id: this.oper.state.id,
|
|
id: this.oper.state.id,
|
|
- nickName: this.editName,
|
|
|
|
|
|
+ roleName: this.editName,
|
|
});
|
|
});
|
|
this.$message({ message: "编辑成功", type: "success" });
|
|
this.$message({ message: "编辑成功", type: "success" });
|
|
this.oper.reset();
|
|
this.oper.reset();
|