From f00c166915b1d458a2e90832507a3ec639ef2c86 Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Tue, 30 Apr 2024 02:49:29 +0800
Subject: [PATCH] dj
---
src/components/patientRegister/PatientLis.vue | 7 ++-
.../patientRegister/PatientLisRequest.vue | 44 +++++++++++++++----
.../patientRegister/PatientRegisterEdit.vue | 3 +-
.../patientRegisterAsbItem.vue | 6 ++-
.../patientRegister/patientRegisterQuery.vue | 4 ++
5 files changed, 51 insertions(+), 13 deletions(-)
diff --git a/src/components/patientRegister/PatientLis.vue b/src/components/patientRegister/PatientLis.vue
index 6cd5a06..2939531 100644
--- a/src/components/patientRegister/PatientLis.vue
+++ b/src/components/patientRegister/PatientLis.vue
@@ -395,9 +395,14 @@ export default {
})
//如果 有选中 记录,则刷新其对应的组合项目
- if (this.dataTransOpts.tableS.patient_register.id) {
+ if(this.tableData.length == 1){
+ this.dataTransOpts.tableS.patient_register = deepCopy(this.tableData[0])
this.dataTransOpts.refresh.register_check_asbitem.M++
+ this.dataTransOpts.refresh.lis_request.M++
}
+ // if (this.dataTransOpts.tableS.patient_register.id) {
+ // this.dataTransOpts.refresh.register_check_asbitem.M++
+ // }
}
})
diff --git a/src/components/patientRegister/PatientLisRequest.vue b/src/components/patientRegister/PatientLisRequest.vue
index 4f910ea..dd29b0c 100644
--- a/src/components/patientRegister/PatientLisRequest.vue
+++ b/src/components/patientRegister/PatientLisRequest.vue
@@ -3,7 +3,7 @@
+ highlight-current-row ref="lis_request" :row-class-name="handleRowClassName">
@@ -90,7 +90,9 @@ export default {
},
//挂载完成
- mounted() { },
+ mounted() {
+ this.retrieve_lis_request(this.dataTransOpts.tableS.patient_register.id)
+ },
computed: {
...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
@@ -98,6 +100,18 @@ export default {
methods: {
dddw, moment, checkPagePriv,
+ // 扩展定义表格行样式
+ handleRowClassName({ row, rowIndex }) {
+ // highLightBg 为 'selected'的高亮
+ //console.log(rowIndex, row)
+ //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
+ if (row.choosed) {
+ return "current-row";
+ } else {
+ return "";
+ }
+ },
+
//颜色转换
colorTrans(intDataColor) {
let tempColor = '000000' + Number(intDataColor).toString(16)
@@ -106,21 +120,31 @@ export default {
},
// 选中行
- rowClick(row) {
+ rowClick(row) {
+ this.btnChoose(false)
this.chooseRows = [row]
+ this.$refs['lis_request'].setCurrentRow(row);
},
// 全选 / 取消全选
btnChoose(isChooseAll) {
if (isChooseAll) {
- this.chooseRows = deepCopy(this.dataTransOpts.tableM.lis_request)
+ this.chooseRows = deepCopy(this.dataTransOpts.tableM.lis_request)
this.dataTransOpts.tableM.lis_request.forEach(e => {
+ e.choosed = true;
this.$refs['lis_request'].setCurrentRow(e);
});
} else {
this.chooseRows = []
+ this.dataTransOpts.tableM.lis_request.forEach(e => {
+ e.choosed = false;
+ });
this.$refs['lis_request'].setCurrentRow();
}
+ this.$nextTick(() => {
+ this.$refs['lis_request'].doLayout()
+ })
+
},
//检验申请
@@ -134,14 +158,14 @@ export default {
// 打印或预览
async btnLisPrint(isPreview) {
- if (!this.$peisAPI) {
- this.$message.warning({ showClose: true, message: "此功能需要在壳客户端中方可运行!" })
- return
- }
if (this.chooseRows.length == 0) {
this.$message.warning({ showClose: true, message: "请先选择要操作的条码记录!" })
return
}
+ if (!this.$peisAPI) {
+ this.$message.warning({ showClose: true, message: "此功能需要在壳客户端中方可运行!" })
+ return
+ }
if (isPreview) {
this.lisPrint(this.chooseRows[0].lisRequestId,"0002",isPreview)
@@ -229,6 +253,7 @@ export default {
.then(res => {
if (res.code > -1) {
this.dataTransOpts.tableM.lis_request = res.data
+ this.btnChoose(true)
}
})
},
@@ -241,7 +266,7 @@ export default {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
- this.retrieve_lis_request(this.dataTransOpts.tableS.patient_register.id)
+ if(newVal != oldVal) this.retrieve_lis_request(this.dataTransOpts.tableS.patient_register.id)
}
},
}
@@ -249,6 +274,7 @@ export default {