Browse Source

bi大数据

newStyle
风继续吹 1 year ago
parent
commit
9294440428
1 changed files with 18 additions and 10 deletions
  1. +18
    -10
      src/views/admin/user/index.vue

+ 18
- 10
src/views/admin/user/index.vue View File

@@ -650,6 +650,7 @@
v-model="formTwo.deptId" v-model="formTwo.deptId"
filterable filterable
clearable clearable
multiple
value-key="key" value-key="key"
style="width: 370px" style="width: 370px"
placeholder="请选择部门" placeholder="请选择部门"
@@ -1158,7 +1159,7 @@ export default {
formTwo: { formTwo: {
username: "", //手机号 username: "", //手机号
userRoleType: "", //身份 userRoleType: "", //身份
deptId: "", //部门
deptId: [], //部门
roleId: "", //角色 roleId: "", //角色
newRoleId: "", newRoleId: "",
showPhoneStatus: 0, //手机号显隐 showPhoneStatus: 0, //手机号显隐
@@ -1302,7 +1303,7 @@ export default {
}, },
}, },
created() { created() {
this.addOperatingLog()
this.addOperatingLog();
// 获取显隐的列表 // 获取显隐的列表
this.setTableOption(); this.setTableOption();
this.setTableOptions(); this.setTableOptions();
@@ -1350,14 +1351,16 @@ export default {
methods: { methods: {
// 添加日志 // 添加日志
addOperatingLog() { addOperatingLog() {
this.$api.http.addOperatingLog({logType: 1})
this.$api.http.addOperatingLog({ logType: 1 });
}, },


// 重设配置项 // 重设配置项
resetAdminUserIndexsOptions() { resetAdminUserIndexsOptions() {
this.showColumns = this.$tableOption.adminUserIndexs.column.map(item => {
return item.prop
})
this.showColumns = this.$tableOption.adminUserIndexs.column.map(
(item) => {
return item.prop;
}
);
}, },
// 检测是否可以展示某些字段 // 检测是否可以展示某些字段
checkOption() { checkOption() {
@@ -1403,7 +1406,7 @@ export default {
exportMethodPost("admin/user/orgUserListExport", "组织用户", obj); exportMethodPost("admin/user/orgUserListExport", "组织用户", obj);
}, },
cleartap() { cleartap() {
this.formTwo.deptId = "";
this.formTwo.deptId = [];
console.log(this.formTwo); console.log(this.formTwo);
}, },
// 区域改变 // 区域改变
@@ -2385,7 +2388,9 @@ export default {
this.formTwo.orgType = row.orgType; this.formTwo.orgType = row.orgType;
this.formTwo.houseId = row.houseId; this.formTwo.houseId = row.houseId;
this.formTwo.newRoleId = row.roleId; this.formTwo.newRoleId = row.roleId;
this.formTwo.deptId = row.deptId;
if (row.deptId) {
this.formTwo.deptId = row.deptId.split(",") || [];
}
this.formTwo.userRoleType = row.userRoleType + ""; this.formTwo.userRoleType = row.userRoleType + "";
console.log(this.formTwo); console.log(this.formTwo);
// 获取角色列表 // 获取角色列表
@@ -2405,8 +2410,11 @@ export default {
editSureTwo() { editSureTwo() {
this.$refs.formTwo.validate((valid) => { this.$refs.formTwo.validate((valid) => {
if (valid) { if (valid) {
console.log(this.formTwo);
this.$api.api.editRoleAndDept(this.formTwo).then((res) => {
const params = {
...this.formTwo,
deptId: this.formTwo.deptId.join(',')
}
this.$api.api.editRoleAndDept(params).then((res) => {
this.$message.success("修改成功"); this.$message.success("修改成功");
this.dialogFormVisibleTwo = false; this.dialogFormVisibleTwo = false;
this.roleList(); this.roleList();


Loading…
Cancel
Save