|
|
@@ -3,7 +3,8 @@
|
|
|
<el-row :gutter="20">
|
|
|
<!--机构数据-->
|
|
|
<el-col :span="4" :xs="24">
|
|
|
- <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange" @click="clickTreeNode"></org-tree>
|
|
|
+ <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
|
|
|
+ @click="clickTreeNode"></org-tree>
|
|
|
</el-col>
|
|
|
<!--用户数据-->
|
|
|
<el-col :span="20" :xs="24">
|
|
|
@@ -226,8 +227,8 @@
|
|
|
<el-col :span="14">
|
|
|
<el-form-item label="状态" v-if="!form.source">
|
|
|
<el-radio-group v-model="form.isLock">
|
|
|
- <el-radio v-for="dict in dict.type.sys_normal_disable" :key="`${dict.value}`"
|
|
|
- :label="dict.value">{{ dict.label }}</el-radio>
|
|
|
+ <el-radio v-for="dict in dict.type.sys_normal_disable" :key="`${dict.value}`" :label="dict.value">{{
|
|
|
+ dict.label }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -267,14 +268,14 @@
|
|
|
import OrgTree from '@/components/orgTree'
|
|
|
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
-import {deptTreeSelect} from "@/api/system/public";
|
|
|
+import { deptTreeSelect } from "@/api/system/public";
|
|
|
import tableList from "@/mixins/tableList";
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
|
dicts: ['sys_normal_disable', 'sys_user_sex'],
|
|
|
components: { OrgTree },
|
|
|
- mixins:[tableList],
|
|
|
+ mixins: [tableList],
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
@@ -291,6 +292,8 @@ export default {
|
|
|
total: 0,
|
|
|
// 用户表格数据
|
|
|
userList: null,
|
|
|
+ //是否是管理员
|
|
|
+ check: false,
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
@@ -360,7 +363,7 @@ export default {
|
|
|
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
|
|
|
],
|
|
|
orgId: [
|
|
|
- { required: true, message: "所属机构不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "所属机构不能为空", trigger: "blur" }
|
|
|
],
|
|
|
// email: [
|
|
|
// {
|
|
|
@@ -378,9 +381,9 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
//默认选中节点
|
|
|
- defaultKeys:null,
|
|
|
+ defaultKeys: null,
|
|
|
//修改新增中的机构树
|
|
|
- deptOptions:[],
|
|
|
+ deptOptions: [],
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -390,7 +393,7 @@ export default {
|
|
|
// this.initPassword = response.msg;
|
|
|
// });
|
|
|
},
|
|
|
- mounted(){
|
|
|
+ mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -422,16 +425,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
/** 查询列表 */
|
|
|
@@ -439,9 +442,10 @@ export default {
|
|
|
this.loading = true;
|
|
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
//兼容框架userId字段
|
|
|
- response.rows.forEach(v => { v.userId = v.id });
|
|
|
- this.userList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
+ response.data.rows.forEach(v => { v.userId = v.id });
|
|
|
+ this.userList = response.data.rows;
|
|
|
+ this.total = response.data.total;
|
|
|
+ this.check = response.check;
|
|
|
this.loading = false;
|
|
|
}
|
|
|
).catch(err => {
|
|
|
@@ -449,12 +453,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- getDefaultKey(key){
|
|
|
+ getDefaultKey(key) {
|
|
|
this.queryParams.orgId = key;
|
|
|
this.getList();
|
|
|
},
|
|
|
//单选框状态改变
|
|
|
- checkChange(state){
|
|
|
+ checkChange(state) {
|
|
|
this.queryParams.checkSub = state;
|
|
|
this.handleQuery();
|
|
|
},
|