| | |
| | | prop="leavehospitaldistrictname" |
| | | width="150" |
| | | :show-overflow-tooltip="true" |
| | | :sort-method="sortChineseNumber" |
| | | /> |
| | | <el-table-column |
| | | label="科室" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="任务执行方式" |
| | | align="center" |
| | | key="preachform" |
| | | prop="preachform" |
| | | width="160" |
| | | :show-overflow-tooltip="true" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-for="item in scope.row.preachform" |
| | | >{{ item }}、 |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="visitTime" |
| | | align="center" |
| | | label="应随访时间" |
| | |
| | | allDeptCodes: [], |
| | | // 存储所有病区代码 |
| | | allWardCodes: [], |
| | | checkboxlist: [], |
| | | // 表单参数 |
| | | form: {}, |
| | | forms: { |
| | |
| | | created() { |
| | | this.getDeptTree(); |
| | | this.getList(); |
| | | this.checkboxlist = store.getters.checkboxlist; |
| | | this.orgname = localStorage.getItem("orgname"); |
| | | }, |
| | | |
| | |
| | | ? this.allDeptCodes |
| | | : this.queryParams.deptcodes, |
| | | }; |
| | | |
| | | this.loading = true; |
| | | // 移除可能存在的"all"值 |
| | | delete params.leavehospitaldistrictcodes.all; |
| | | delete params.deptcodes.all; |
| | | getSfStatistics(params).then((response) => { |
| | | console.log(response); |
| | | this.loading = false; |
| | | |
| | | // this.total = response.total; |
| | | this.userList = this.customSort(response.data); |
| | | }); |
| | | }, |
| | | sortChineseNumber(a, b) { |
| | | // 提取中文数字 |
| | | const chineseNumbers = [ |
| | | "一", |
| | | "二", |
| | | "三", |
| | | "四", |
| | | "五", |
| | | "六", |
| | | "七", |
| | | "八", |
| | | "九", |
| | | "十", |
| | | "十一", |
| | | "十二", |
| | | ]; |
| | | |
| | | // 从字符串中提取病区数字,如"四病区" -> "四" |
| | | const getNumberFromText = (text) => { |
| | | if (!text) return -1; |
| | | const match = text.match(/^([一二三四五六七八九十]+)/); |
| | | if (match && match[1]) { |
| | | return chineseNumbers.indexOf(match[1]); |
| | | } |
| | | return -1; |
| | | }; |
| | | |
| | | const numA = getNumberFromText(a); |
| | | const numB = getNumberFromText(b); |
| | | |
| | | if (numA === -1 && numB === -1) return 0; |
| | | if (numA === -1) return 1; // 无法解析的放到后面 |
| | | if (numB === -1) return -1; // 无法解析的放到后面 |
| | | |
| | | return numA - numB; |
| | | }, |
| | | // 搜索处理函数 |
| | | handleSearch() { |
| | |
| | | this.infotitleVisible = true; |
| | | this.infotitle = title; |
| | | this.infotitlelist = row; // 假设row就是需要展示的详细数组 |
| | | console.log(this.infotitlelist, "this.infotitlelist"); |
| | | |
| | | this.infotitlelist.forEach((item) => { |
| | | let idArray = null; |
| | | |
| | | if (item.preachform) { |
| | | if (item.endtime) { |
| | | item.preachformson = item.preachform; |
| | | idArray = item.preachform.split(","); |
| | | } |
| | | |
| | | item.preachform = idArray.map((value) => { |
| | | // 查找id对应的对象 |
| | | const item = this.checkboxlist.find((item) => item.value == value); |
| | | // 如果找到对应的id,返回label值,否则返回null |
| | | return item ? item.label : null; |
| | | }); |
| | | } |
| | | }); |
| | | // 初始化加载 |
| | | this.loadIndex = 0; |
| | | this.currentDisplayList = []; |
| | |
| | | |
| | | // 模拟异步加载,实际可能是直接切片本地数据 |
| | | setTimeout(() => { |
| | | console.log(this.infotitlelist, "this.infotitlelist"); |
| | | |
| | | const nextChunk = this.infotitlelist.slice( |
| | | this.loadIndex, |
| | | this.loadIndex + this.pageSize |