xiaochan 1 gadu atpakaļ
vecāks
revīzija
6f0aced8de

+ 3 - 1
src/types/global.d.ts

@@ -32,7 +32,9 @@ declare module "xe-utils/ctor.d.ts" {
          */
         eachAndReturnList<T = any>(list: T[] | Ref<T[]> | number, iteration: (item: T, index: number) => any): any[];
 
-        noop: () => void
+        noop: () => void,
+
+        cloneDeep<T>(value: T): T;
     }
 }
 

+ 4 - 1
src/utils/xe-utils-enhance/vxe-formatter.ts

@@ -57,7 +57,10 @@ function addVxeUtils() {
             return temp;
         },
         noop: () => {
-        }
+        },
+        cloneDeep(value: any) {
+            return XEUtils.clone(value, true)
+        },
     })
 }
 

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

@@ -807,8 +807,8 @@ export const clickOnThePatient = async (patNo: string) => {
     clearAssociate();
     getAncillaryInformation(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes).then(temp => {
         if (temp !== null) {
-            jcExtraInformation.value = XEUtils.clone(temp, true);
-            jyExtraInformation.value = XEUtils.clone(temp, true);
+            jcExtraInformation.value = XEUtils.cloneDeep(temp);
+            jyExtraInformation.value = XEUtils.cloneDeep(temp);
         } else {
             jcExtraInformation.value = defaultExtraInformation();
             jyExtraInformation.value = defaultExtraInformation();