|
|
@@ -114,7 +114,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table height="500" border v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table height="500" border v-loading="loading" :data="filteredUserList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
<el-table-column label="ID" align="center" prop="userId" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="员工后台账号" align="center" prop="userName" :show-overflow-tooltip="true" width="100" />
|
|
|
@@ -645,9 +645,23 @@ import { getConfigByKey } from "@/api/company/companyConfig";
|
|
|
import axios from "axios";
|
|
|
import {addCodeUrl} from "../../../api/company/companyUser";
|
|
|
import selectDoctor from "@/views/qw/user/selectDoctor.vue";
|
|
|
+import { mapGetters } from 'vuex';
|
|
|
export default {
|
|
|
name: "User",
|
|
|
components: {selectDoctor, Treeselect ,selectUser},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({ currentUser: 'user' }),
|
|
|
+ // 过滤后的用户列表
|
|
|
+ filteredUserList() {
|
|
|
+ if (!this.userList) return [];
|
|
|
+ // 如果当前用户是管理员(userType='00'),显示所有数据
|
|
|
+ if (this.currentUser && this.currentUser.userType === '00') {
|
|
|
+ return this.userList;
|
|
|
+ }
|
|
|
+ // 如果不是管理员,过滤掉 userType='00' 的数据
|
|
|
+ return this.userList.filter(item => item.userType !== '00');
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
doctor: {
|