| | |
| | | @change="handleChange" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="点位" prop="pointLocations" v-if="isTongdeCampus"> |
| | | <el-select |
| | | v-model="topqueryParams.pointLocations" |
| | | multiple |
| | | filterable |
| | | clearable |
| | | placeholder="请选择点位" |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="item in pointOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-form-item label="服务状态" prop="status"> |
| | | <el-select |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="isTongdeCampus" |
| | | label="点位编码" |
| | | label="点位" |
| | | width="120" |
| | | align="center" |
| | | key="pointLocation" |
| | | prop="pointLocation" |
| | | /> |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ pointNameOf(scope.row) }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="处理人员" |
| | |
| | | updateUser, |
| | | resetUserPwd, |
| | | changeUserStatus, |
| | | deptTreeSelect, |
| | | } from "@/api/system/user"; |
| | | import { |
| | | getTaskservelist, |
| | |
| | | scopetype: [], |
| | | leaveldeptcodes: [], |
| | | leavehospitaldistrictcodes: [], |
| | | pointLocations: [], |
| | | }, |
| | | propss: { multiple: true }, |
| | | options: [], |
| | |
| | | leavehospitaldistrictcode: "", |
| | | serviceState: [], |
| | | checkboxlist: [], |
| | | // 点位列表(同德院区,deptType=3) |
| | | pointOptions: [], |
| | | // 表单校验 |
| | | rules: {}, |
| | | }; |
| | |
| | | } else { |
| | | this.getList(1); |
| | | } |
| | | this.getPointOptions(); |
| | | this.getConfigKey("sys.user.initPassword").then((response) => { |
| | | this.initPassword = response.msg; |
| | | }); |
| | |
| | | ); |
| | | console.log(this.topqueryParams.leavehospitaldistrictcodes, "11"); |
| | | } |
| | | |
| | | const queryParams = this.buildQueryParams(); |
| | | |
| | | this.loading = true; |
| | | if ( |
| | | this.topqueryParams.leavehospitaldistrictcodes[0] && |
| | | this.topqueryParams.leaveldeptcodes[0] |
| | | queryParams.leavehospitaldistrictcodes && |
| | | queryParams.leavehospitaldistrictcodes[0] && |
| | | queryParams.leaveldeptcodes && |
| | | queryParams.leaveldeptcodes[0] |
| | | ) { |
| | | this.topqueryParams.deptOrDistrict = 2; |
| | | queryParams.deptOrDistrict = 2; |
| | | } else { |
| | | this.topqueryParams.deptOrDistrict = 1; |
| | | queryParams.deptOrDistrict = 1; |
| | | } |
| | | |
| | | if (!this.followupAuthority()) { |
| | | this.$message.warning("未配置科室/病区相关权限不可查询"); |
| | | return Promise.reject(new Error("无权限查询")); |
| | | } |
| | | getTaskservelist(this.topqueryParams).then((response) => { |
| | | getTaskservelist(queryParams).then((response) => { |
| | | this.userList = response.rows[0].serviceSubtaskList; |
| | | this.total = response.total; |
| | | if (refresh) { |
| | |
| | | getCurrentDate() { |
| | | const now = new Date(); |
| | | return now.toISOString().slice(0, 10); // 截取前10个字符,即 YYYY-MM-DD |
| | | }, |
| | | |
| | | // 点位列表(同德院区,deptType=3) |
| | | getPointOptions() { |
| | | if (!this.isTongdeCampus) return; |
| | | deptTreeSelect(3).then((response) => { |
| | | const flat = []; |
| | | const walk = (nodes) => { |
| | | (Array.isArray(nodes) ? nodes : []).forEach((n) => { |
| | | if (n.label && n.deptCode) { |
| | | flat.push({ label: n.label, value: String(n.deptCode) }); |
| | | } |
| | | if (n.children && n.children.length) walk(n.children); |
| | | }); |
| | | }; |
| | | walk(response && response.data); |
| | | this.pointOptions = flat; |
| | | }); |
| | | }, |
| | | |
| | | // 点位名称:将 pointLocation 编码映射为点位名称 |
| | | pointNameOf(row) { |
| | | if ( |
| | | !row || |
| | | row.pointLocation === undefined || |
| | | row.pointLocation === null || |
| | | row.pointLocation === "" |
| | | ) { |
| | | return ""; |
| | | } |
| | | const found = this.pointOptions.find( |
| | | (p) => String(p.value) === String(row.pointLocation) |
| | | ); |
| | | return found ? found.label : row.pointLocation; |
| | | }, |
| | | buidegetTasklist(type) { |
| | | // 用户权限下所有待随访任务:传递全部科室和病区 |
| | |
| | | |
| | | this.getList(refresh); |
| | | }, |
| | | // 构造查询/导出参数:选择点位时科室/病区传 null,否则保持原值 |
| | | buildQueryParams() { |
| | | const params = { ...this.topqueryParams }; |
| | | if ( |
| | | this.topqueryParams.pointLocations && |
| | | this.topqueryParams.pointLocations.length > 0 |
| | | ) { |
| | | params.leaveldeptcodes = null; |
| | | params.leavehospitaldistrictcodes = null; |
| | | } |
| | | return params; |
| | | }, |
| | | // 患者范围处理 |
| | | handleChange(value) { |
| | | let type = value[0]; |
| | |
| | | scopetype: [], |
| | | leaveldeptcodes: [], |
| | | leavehospitaldistrictcodes: [], |
| | | pointLocations: [], |
| | | }; |
| | | this.handleQuery(1); |
| | | }, |
| | |
| | | this.download( |
| | | "smartor/serviceSubtask/patItemExport", |
| | | { |
| | | ...this.topqueryParams, |
| | | ...this.buildQueryParams(), |
| | | }, |
| | | `user_${new Date().getTime()}.xlsx` |
| | | ).finally(() => { |