Browse Source

修复提示序号错误

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
9bb56d9509

+ 4 - 1
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/table/YzTable.vue

@@ -71,6 +71,7 @@ import {
   tempYzData,
   yiZhuData,
   associateOrders,
+  yzDataKeyAndIndex,
   clearAssociate
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {getFormatDatetime} from "@/utils/date";
@@ -94,7 +95,9 @@ const header = [
     width: 15, name: '#'
   },
   {
-    func: (val, index) => `${index + 1}`,
+    func: (val, index) => {
+      return `${index + 1}`
+    },
     width: 20
   },
   {code: 'orderGroup', name: '组', width: 10},

+ 3 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -130,7 +130,6 @@ getServerDateApi().then(res => {
 export const tempYzData = computed(() => {
     selectedData.value = []
     return yzData.value.filter((item, index) => {
-        yzDataKeyAndIndex.value[item.actOrderNo] = index
         item.tempCheckbox = false
         let flag = queryParam.value.displayRange === 0
         let frequFlag = queryParam.value.frequCode === 0
@@ -173,7 +172,9 @@ export const selectedData = ref([])
 export const yzDataKeyAndIndex = ref({})
 // 获取医嘱的下表
 export const getYzIndex = (key) => {
-    let temp = yzDataKeyAndIndex.value[key]
+    let temp = tempYzData.value.findIndex(item => {
+        return item.id === key
+    })
     if (typeof temp === 'undefined') {
         return '没有找到序号'
     } else {