diff --git a/src/components/TabComponents/index.vue b/src/components/TabComponents/index.vue index 6ac7aed2b24ccc3345903b7011af9e4d238e795b..4bd450448ec4787784dc5b28663d7213484ca51d 100644 --- a/src/components/TabComponents/index.vue +++ b/src/components/TabComponents/index.vue @@ -795,6 +795,7 @@ export default { }, ...mapGetters({ fontSize: "table/fontSize", + roles: "user/roles", }), }, methods: { @@ -864,6 +865,9 @@ export default { remoteMethod(val) { this.$emit("remoteMethod", val) }, + clearSort() { + this.$refs.selftab.clearSort() + }, }, } diff --git a/src/views/audit-detail/index.vue b/src/views/audit-detail/index.vue index e23e5667273778a3dd662192d9e9f0d070c85efd..ee54d06336e9b69d5ad3fdf4d4e3c91604813841 100644 --- a/src/views/audit-detail/index.vue +++ b/src/views/audit-detail/index.vue @@ -6,7 +6,7 @@ 当前审核 【{{ curUnion }}】【剩余{{ auditNum }}】【剩余{{ auditNum }}】 @@ -17,7 +17,7 @@ v-if="patientId && !isEmpty && !editStatus" >修改 - 返回 + 返回 @@ -164,6 +164,8 @@ ? curBtn == 1 ? "好的" : "提交" + : inPatientId + ? "确认并返回" : "确认并进入下一例审核" }} @@ -232,6 +234,8 @@ ? curBtn == 1 ? "好的" : "提交" + : inPatientId + ? "确认并返回" : "确认并进入下一例审核" }} @@ -300,6 +304,11 @@ export default { confirmStatus: false, } }, + props: { + formId: String, + inPatientId: String, + inUnionName: String, + }, computed: { showClose() { return this.curBtn == 1 ? false : true @@ -310,7 +319,11 @@ export default { mounted() { let unionId = this.$route.query.unionId let patientId = this.$route.query.patientId - if (unionId && !patientId) { + if (this.inPatientId) { + // 组件使用 + this.patientId = this.inPatientId + this.curUnion = this.inUnionName + } else if (unionId && !patientId) { this.editStatus = false this.getUser(unionId) } else if (patientId) { @@ -324,6 +337,13 @@ export default { // this.$refs.publicDialog.dialogVisible = true }, methods: { + backEvents() { + if (this.inPatientId) { + this.$emit("changeIsAudit") + } else { + this.$router.go(-1) + } + }, refresh() { this.$refs["screen"].getPatientDetail() }, @@ -462,7 +482,7 @@ export default { } } }, - // 不合格提交 + // 提交 onSubmit() { this.loading = true // 切换文本 @@ -530,7 +550,10 @@ export default { nextExample() { // ! this.$store.commit("user/setGetMessageFlag", true) - if (this.editStatus) { + if (this.inPatientId) { + this.onCancel() + this.$emit("submitAudit") + } else if (this.editStatus) { this.loading = false this.onCancel() } else { diff --git a/src/views/audit-qualitycontrol/index.vue b/src/views/audit-qualitycontrol/index.vue index 671fb9ddabf7c8fee39e0f3f95526537358a2afc..35316a352ecadfd7b5b572c167aca43264797c44 100644 --- a/src/views/audit-qualitycontrol/index.vue +++ b/src/views/audit-qualitycontrol/index.vue @@ -30,6 +30,7 @@ :page-size="pageSize" @pageSizeChange="handleSizeChange" @currentPageChange="handleCurrentChange" + :sortChange="handleSort" :showSummary="auditStatus === '0'" :getSummaries="getSummaries" /> @@ -101,6 +102,7 @@ export default { label: "待审核(例)备份", minWidth: 120, value: "unCheckNums", + // sortable: "custom", }, { label: "最新上报时间", @@ -213,6 +215,13 @@ export default { this.handleClick() }, methods: { + handleSort(val) { + console.log(val) + const { prop, order } = val + this.pageIndex = 1 + this.handleSearch({ unCheckNums: order }) + // order "descending" prop "unCheckNums" + }, getSummaries() { return [ "总计", @@ -229,6 +238,7 @@ export default { } this.pageIndex = 1 this.handleSearch() + this.$refs.table.clearSort() }, auditHandle(data, i) { if (this.type == "1") { @@ -271,12 +281,16 @@ export default { } } }, - async handleSearch() { + async handleSearch(obj) { this.listLoading = true let params = { pageSize: this.pageSize, pageNum: this.pageIndex, + ...obj, } + // if (this.type==0) { + + // } let res switch (this.auditStatus) { case "0": diff --git a/src/views/screening/index.vue b/src/views/screening/index.vue index 52d13b659f8f2486d79f8841e359e9ffcc2a44e2..f8a2840306a8371feaf9aacb3b05040e7bc5cedc 100644 --- a/src/views/screening/index.vue +++ b/src/views/screening/index.vue @@ -1,6 +1,6 @@ @@ -46,13 +54,26 @@ import paginationMixin from "@/components/TabComponents/mixin" import { getPatientPage, deletePatient } from "@/api/patient.js" import ConfigForms from "./components/ConfigForms.vue" +import audit from "@/views/audit-detail/index.vue" import { mapGetters } from "vuex" export default { name: "ScreeningIndex", - components: { ConfigForms }, + components: { ConfigForms, audit }, mixins: [paginationMixin], + computed: { + ...mapGetters({ + selectedIndex: "table/selectedIndex", + refreshFlag: "table/refreshFlag", + roles: "user/roles", + }), + initCheckStatus() { + return this.$route.query.checkStatus + }, + }, data() { return { + isAudit: false, //控制审核详情 + curAuditDetail: {}, isDetail: false, //! 控制详情显隐 listLoading: false, disabled: false, @@ -117,175 +138,7 @@ export default { value: "查询", }, ], - columns: [ - { - label: "医联体", - minWidth: 120, - value: "unionName", - formatter: (row) => { - return row.unionName ? row.unionName : "--" - }, - sortable: "custom", - }, - { - label: "姓名", - minWidth: 120, - formatter: (row) => { - return row.name ? row.name : "--" - }, - value: "name", - sortable: "custom", - }, - { - label: "性别", - minWidth: 80, - value: "sex", - formatter: (row) => { - return row.sex - ? this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "") - : "--" - }, - sortable: "custom", - }, - // { - // label: "身份证", - // minWidth: 120, - // value: "idCard", - // formatter: (row) => { - // return row.idCard ? row.idCard : "--" - // }, - // }, - { - label: "年龄", - minWidth: 120, - value: "age", - formatter: (row) => { - return row.age ? row.age : "--" - }, - sortable: "custom", - }, - { - label: "筛查时间", - minWidth: 180, - value: "createTime", - formatter: (row) => { - return row.createTime ? row.createTime : "--" - }, - sortable: "custom", - }, - { - label: "风险评估结果", - minWidth: 120, - value: "riskRank", - formatter: (row) => { - let riskRank = { - low: "低危", - medium: "中危", - high: "高危", - } - return row.riskRank ? riskRank[row.riskRank] : "--" - }, - sortable: "custom", - }, - { - label: "是否内镜", - minWidth: 120, - value: "isInnerCheck", - sortable: "custom", - formatter: (row) => { - let arr = [ - { label: "否", value: "0" }, - { label: "是", value: "1" }, - ] - let label - if (String(row.isInnerCheck)) { - label = arr.filter((e) => e.value == row.isInnerCheck)[0].label - } else { - label = "--" - } - return label - }, - }, - { - label: "筛查审核状态", - minWidth: 120, - value: "checkStatus", - formatter: (row) => { - let arr = [ - { label: "待审核", value: "1" }, - { label: "驳回修改", value: "2" }, - { label: "合格", value: "3" }, - { label: "不合格", value: "4" }, - ] - let label - if (row.checkStatus) { - label = arr.filter((e) => e.value == row.checkStatus)[0].label - } else { - label = "--" - } - return label - }, - sortable: "custom", - }, - { - label: "操作", - width: 180, - fixed: "right", - operType: "button", - operations: [ - { - func: this.handleView, - formatter(row) { - if (row.checkStatus != 2) { - return { - label: "查看", - type: "text", - } - } else { - return { - label: "", - type: "none", - style: { - display: "none", - }, - } - } - }, - }, - { - func: this.handleAdd, - formatter(row) { - if (row.checkStatus != 3 && row.checkStatus != 4) { - return { - label: "修改", - type: "text", - } - } else { - return { - label: "", - type: "none", - style: { - display: "none", - }, - } - } - }, - }, - { - func: this.deletePatient, - formatter(row) { - return { - label: "删除", - type: "text", - } - }, - style: { - color: "#FA6400", - }, - }, - ], - }, - ], + columns: [], searchForm: {}, initForm: {}, } @@ -330,6 +183,22 @@ export default { checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : "" this.note = status ? status + ":" + checkNote : "" }, + changeIsAudit() { + this.isAudit = false + this.curAuditDetail = {} + }, + handleAudit(row) { + console.log(row) + this.curAuditDetail = row + this.isAudit = true + }, + submitAudit() { + this.isAudit = false + if (this.tableData.length == 1 && this.pageIndex != 1) { + this.pageIndex-- + } + this.handleSearch(this.searchForm) + }, deletePatient(row) { this.$confirm(`是否删除【${row.name}】?`, "提示", { confirmButtonText: "确定", @@ -395,15 +264,7 @@ export default { }) }, }, - computed: { - ...mapGetters({ - selectedIndex: "table/selectedIndex", - refreshFlag: "table/refreshFlag", - }), - initCheckStatus() { - return this.$route.query.checkStatus - }, - }, + watch: { selectedIndex(v) { this.handleFormSearch(this.searchForm) @@ -459,7 +320,201 @@ export default { } }, mounted() { + let roleList = this.roles.map((e) => e.roleCode) // console.log(this.$route.query.checkStatus) + this.columns = [ + { + label: "医联体", + minWidth: 120, + value: "unionName", + formatter: (row) => { + return row.unionName ? row.unionName : "--" + }, + sortable: "custom", + }, + { + label: "姓名", + minWidth: 120, + formatter: (row) => { + return row.name ? row.name : "--" + }, + value: "name", + sortable: "custom", + }, + { + label: "性别", + minWidth: 80, + value: "sex", + formatter: (row) => { + return row.sex + ? this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "") + : "--" + }, + sortable: "custom", + }, + // { + // label: "身份证", + // minWidth: 120, + // value: "idCard", + // formatter: (row) => { + // return row.idCard ? row.idCard : "--" + // }, + // }, + { + label: "年龄", + minWidth: 120, + value: "age", + formatter: (row) => { + return row.age ? row.age : "--" + }, + sortable: "custom", + }, + { + label: "筛查时间", + minWidth: 180, + value: "createTime", + formatter: (row) => { + return row.createTime ? row.createTime : "--" + }, + sortable: "custom", + }, + { + label: "风险评估结果", + minWidth: 120, + value: "riskRank", + formatter: (row) => { + let riskRank = { + low: "低危", + medium: "中危", + high: "高危", + } + return row.riskRank ? riskRank[row.riskRank] : "--" + }, + sortable: "custom", + }, + { + label: "是否内镜", + minWidth: 120, + value: "isInnerCheck", + sortable: "custom", + formatter: (row) => { + let arr = [ + { label: "否", value: "0" }, + { label: "是", value: "1" }, + ] + let label + if (String(row.isInnerCheck)) { + label = arr.filter((e) => e.value == row.isInnerCheck)[0].label + } else { + label = "--" + } + return label + }, + }, + { + label: "筛查审核状态", + minWidth: 120, + value: "checkStatus", + formatter: (row) => { + let arr = [ + { label: "待审核", value: "1" }, + { label: "驳回修改", value: "2" }, + { label: "合格", value: "3" }, + { label: "不合格", value: "4" }, + ] + let label + if (row.checkStatus) { + label = arr.filter((e) => e.value == row.checkStatus)[0].label + } else { + label = "--" + } + return label + }, + sortable: "custom", + }, + { + label: "操作", + width: 180, + fixed: "right", + operType: "button", + operations: [ + { + func: this.handleView, + formatter(row) { + if (row.checkStatus != 2) { + return { + label: "查看", + type: "text", + } + } else { + return { + label: "", + type: "none", + style: { + display: "none", + }, + } + } + }, + }, + { + func: this.handleAdd, + formatter(row) { + if (row.checkStatus != 3 && row.checkStatus != 4) { + return { + label: "修改", + type: "text", + } + } else { + return { + label: "", + type: "none", + style: { + display: "none", + }, + } + } + }, + }, + { + func: this.handleAudit, + isHidden() { + return !( + roleList.includes("admin") || roleList.includes("auditer") + ) + }, + formatter(row) { + if (row.checkStatus == 1) { + return { + label: "审核", + type: "text", + } + } else { + return { + label: "", + type: "none", + style: { + display: "none", + }, + } + } + }, + }, + { + func: this.deletePatient, + formatter(row) { + return { + label: "删除", + type: "text", + } + }, + style: { + color: "#FA6400", + }, + }, + ], + }, + ] }, }