| | |
| | | import QRCode from "qrcode"; |
| | | export default { |
| | | name: "Tasklist", |
| | | dicts: ["sys_normal_disable", "sys_user_sex", "task_status"], |
| | | // 页面只用到 task_status,去掉未使用的字典可少发 2 个请求 |
| | | dicts: ["task_status"], |
| | | components: { Treeselect, PatientSelection }, |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 首次挂载时 created 已经查过,跳过紧接着触发的 activated,避免重复请求 |
| | | activatedOnce: false, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | |
| | | this.checkboxlist = store.getters.checkboxlist; |
| | | }, |
| | | activated() { |
| | | // 首次挂载时 created 已经请求过,避免重复请求 |
| | | if (!this.activatedOnce) { |
| | | this.activatedOnce = true; |
| | | return; |
| | | } |
| | | this.getList(); |
| | | }, |
| | | // 搜索 |
| | |
| | | getTasklist(this.topqueryParams).then((response) => { |
| | | this.userList = response.rows; |
| | | this.total = response.total; |
| | | this.$forceUpdate(); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | |
| | | // 1. 构造请求参数 |
| | | const params = { |
| | | taskId: row.taskid, |
| | | deptcode: row.deptcode || "", // 当前用户部门编码,请确保 store 中有该 getter |
| | | deptcode: row.leaveldeptcode || "", // 出院科室编码(子任务字段已由 deptcode 改名为 leaveldeptcode) |
| | | leavehospitaldistrictcode: row.leavehospitaldistrictcode || "", // 转为逗号分隔字符串,视接口需求 |
| | | // 如果有其他参数如 hospitalDistrictCode 也可补充 |
| | | }; |