Browse Source

fix: 提交

master
yinsiyu 3 weeks ago
parent
commit
35fe81259a
2 changed files with 23 additions and 17 deletions
  1. +10
    -6
      src/views/userManage/staffManage/staffList/components/StaffSelectorPopup/index.vue
  2. +13
    -11
      src/views/userManage/staffManage/staffList/index.vue

+ 10
- 6
src/views/userManage/staffManage/staffList/components/StaffSelectorPopup/index.vue View File

@@ -16,7 +16,7 @@
</el-form-item>
</el-form>
</el-card>
<div class="table" v-loading="loading">
<div v-loading="loading">
<el-table :data="tableList" border class="mt20" row-key="uniqueid">
<el-table-column
align="center"
@@ -32,9 +32,7 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<div v-if="addedIds.includes(scope.row.userId)">
<el-button size="mini" type="text" disabled>
已添加
</el-button>
<el-button size="mini" type="text" disabled>已添加</el-button>
</div>
<el-button
v-else-if="getCheckedStatus(scope.row)"
@@ -70,7 +68,11 @@
<script>
import Popup from "@/components/Popup";
import CrudPopup from "../CrudPopup";
import { getTrustDoctorInfos, batchAddStaff, getAllDoctorIdForClient } from '@/api/userManage/staff'
import {
getTrustDoctorInfos,
batchAddStaff,
getAllDoctorIdForClient,
} from "@/api/userManage/staff";
export default {
components: {
Popup,
@@ -97,7 +99,9 @@ export default {
pageSize: this.pageSize,
})
.then((res) => {
const { data: { list, page } } = res
const {
data: { list, page },
} = res;
this.tableList = list || [];
this.total = page?.total || 0;
})


+ 13
- 11
src/views/userManage/staffManage/staffList/index.vue View File

@@ -48,13 +48,12 @@
</el-col>
</el-row>

<el-table v-loading="loading" :data="pageList" border>
<el-table class="w-full" v-loading="loading" :data="pageList" border>
<el-table-column
align="center"
label="序号"
type="index"
:index="(index) => (queryParams.pageNum - 1) * queryParams.pageSize + index + 1"
width="120"
/>
<el-table-column align="center" label="院区" prop="wardName" :show-overflow-tooltip="true" />
<el-table-column
@@ -113,8 +112,8 @@ import StaffSelectorPopup from "./components/StaffSelectorPopup";
import CrudPopup from "./components/CrudPopup";
import TreeDept from "@/components/TreeDept";
import { getTreeHospDept } from "@/api/index";
import { staffPageList, editStaff, delStaff } from '@/api/userManage/staff'
import { getAllHospital } from '@/api/dictManage/hosp'
import { staffPageList, editStaff, delStaff } from "@/api/userManage/staff";
import { getAllHospital } from "@/api/dictManage/hosp";

export default {
name: "StaffManage",
@@ -142,11 +141,11 @@ export default {
roleKey: undefined,
status: "",
wardId: "", // 院区ID
deptId: []
deptId: [],
},
pageList: [],
wardIdList: [], // 院区列表
deptList: [] // 科室数据
deptList: [], // 科室数据
};
},
created() {
@@ -191,19 +190,22 @@ export default {
},
/*获取科室数据*/
async getDeptList(wardId) {
const res = await getTreeHospDept({ wardId : wardId });
const res = await getTreeHospDept({ wardId: wardId });
this.deptList = res.data || [];
},
/** 查询角色列表 */
getList() {
this.loading = true;
const params = JSON.parse(JSON.stringify(this.queryParams));
params.deptId = params.deptId?.length === 2 ?
params.deptId.slice(-1).toString() :
params.deptId?.length === 1 && params.deptId.slice(-1).toString() || '';
params.deptId =
params.deptId?.length === 2
? params.deptId.slice(-1).toString()
: (params.deptId?.length === 1 && params.deptId.slice(-1).toString()) || "";
staffPageList(this.addDateRange(params, this.dateRange))
.then((res) => {
const { data: { list, page } } = res
const {
data: { list, page },
} = res;
this.pageList = list || [];
this.total = page?.total || 0;
})


Loading…
Cancel
Save