From 31f6e0f62aa08bbbb312343d9bde5eed5ec609be Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Tue, 18 Apr 2023 16:15:39 +0800 Subject: [PATCH] 集团管理员账号管理 --- src/views/standard/setUp/account.vue | 76 +++++++++++++++++++++++++++++----------------------------------------------- 1 file changed, 29 insertions(+), 47 deletions(-) diff --git a/src/views/standard/setUp/account.vue b/src/views/standard/setUp/account.vue index 4ddbe70..e11d43a 100644 --- a/src/views/standard/setUp/account.vue +++ b/src/views/standard/setUp/account.vue @@ -52,7 +52,7 @@ class="sel" clearable placeholder="选择学校" - v-model="query.schoolId" + v-model="query.schoolIds" :options="schoolList" :props="props" :show-all-levels="false" @@ -82,9 +82,7 @@ { + let isAll = false; + query.schoolIds?.map((item) => { if (item.length == 1) { - if (!query.regionIds.includes(item[0])) { - query.regionIds.push(item[0]); - } - } else { - if (!query.schoolIds.includes(item[1])) { - query.schoolIds.push(item[1]); - } - if (query.regionIds.includes(item[0])) { - query.regionIds.remove(item[0]); - } + isAll = true; } }); - if (type == 2) { - this.query.realName = ""; - query.loginName = this.query.loginName; - } else if (type == 3) { - this.query.loginName = ""; - query.realName = this.query.realName; - } else { - query = { ...this.query }; - } + query.schoolIds = isAll + ? null + : query.schoolIds?.map((item) => { + return item[1]; + }); delete query.roleId; - }else{ - delete query.schoolId; + } else { + delete query.schoolIds; } return query; }, @@ -728,18 +713,15 @@ export default { let query = this.setQuery(type); this.loading = true; this.tableData = []; - const { data, status, info } = + let userPage = this.role != "ROLE_JITUAN" - ? await this.$request.userPage({ - ...query, - page: this.page, - size: this.size, - }) - : await this.$request.tenantUserPage({ - ...query, - page: this.page, - size: this.size, - }); + ? this.$request.userPage + : this.$request.tenantUserPage; + const { data, status, info } = await userPage({ + ...query, + page: this.page, + size: this.size, + }); this.loading = false; if (status === 0) { @@ -769,14 +751,14 @@ export default { .table-box { padding: 0 20px; } -.answer-header{ - .sel-box{ - .sel{ - margin-right:20px; +.answer-header { + .sel-box { + .sel { + margin-right: 20px; } } - :deep(.el-input-group__append){ - padding:0 20px 0 12px; + :deep(.el-input-group__append) { + padding: 0 20px 0 12px; } } \ No newline at end of file -- libgit2 0.21.4