소스 검색

修复多个病历结果复制问题

xiaochan 2 년 전
부모
커밋
ed0a137474

+ 7 - 0
src/components/zhu-yuan-yi-sheng/emr/EmrQualityControlRelieve/EmrDialog.vue

@@ -7,6 +7,13 @@
             @cancel="emits('closed')"
             @confirm="confirm">
         <el-form label-width="80" label-position="right">
+
+            <div style="color: red">
+                注意:
+                请医生备注需要整改的内容。所有病历整改,须在基于事实的基础上进行,不得篡改。所有修改均将留痕,各位务必严谨、谨慎对待。
+            </div>
+
+
             <el-form-item label="解除限制:">
                 <el-checkbox-group v-model="data.unlockArray">
                     <el-checkbox :label="item" v-for="(item,index) in limit "/>

+ 15 - 16
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTest.vue

@@ -104,9 +104,9 @@
                                   :expand-row-keys="expands">
                             <el-table-column label="选择" type="selection"/>
                             <el-table-column type="expand" width="20">
-                                <template #default="{row}">
+                                <template #default="{row,$index}">
                                     <el-table :data="row.bacteriaResults[0].antibioticResults"
-                                              ref="drugSensitivityRef"
+                                              :ref="(el) => setRefMap(el, $index)"
                                               @row-click="drugTable"
                                               v-if="row.bacteriaResults.length > 0">
                                         <el-table-column label="选择" type="selection"/>
@@ -163,6 +163,11 @@ const inspectionHeader = ref({
 })
 const dateRange = ref([])
 
+const refMap = {}
+const setRefMap = (el, item) => {
+    refMap[`drug${item}`] = el
+}
+
 const query = async () => {
     let {startTime, endTime} = getDateRangeFormatDate(dateRange.value)
     const param = {
@@ -212,26 +217,20 @@ const drugTable = (row) => {
 let copyStr = ''
 const appendCopy = () => {
     let temp = tableRef.value.getSelectionRows()
-    let drugSensitivity = []
-
-    try {
-        drugSensitivity = drugSensitivityRef.value.getSelectionRows()
-    } catch (e) {
-
-    }
-
-    if (temp.length === 0 && drugSensitivity.length === 0) {
-        xcMessage.error('请先选选择数据')
-    }
     let data = currentReportForm.aply_CTNT + ":"
 
     temp.forEach(item => {
         data += `${item.itm_NAME}${result(item)}${item.itm_UNIT}${getItemStr(item.itm_ALERT, item.itm_STR_VALUE, item.itm_VALUE)},`
     })
 
-    drugSensitivity.forEach(item => {
-        data += `${item.anti_NAME_CN}${item.anti_ABB}${item.anti_MIC}${item.anti_VALUE},`
-    })
+    for (let key in refMap) {
+        let item = refMap[key]
+        let tempList = item.getSelectionRows()
+        tempList.forEach(item => {
+            data += `${item.anti_NAME_CN}${item.anti_ABB}${item.anti_MIC}${item.anti_VALUE},`
+        })
+    }
+
     copyStr += '   ' + data
     xcMessage.success('追加成功。')
 }