From 84b1240c742042e1aa3c8af78b38746d5a45725b Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Sun, 19 May 2024 18:13:03 +0800
Subject: [PATCH] dj
---
.../patientRegister/PatientRegisterEdit.vue | 22 +++++++-------
.../patientRegister/PatientRegisterList.vue | 7 +++--
src/utlis/proFunc.js | 29 ++++++++++++-------
3 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue
index 3d03b70..81de2fc 100644
--- a/src/components/patientRegister/PatientRegisterEdit.vue
+++ b/src/components/patientRegister/PatientRegisterEdit.vue
@@ -320,54 +320,54 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1383,7 +1383,7 @@ export default {
let body = deepCopy(this.form);
// // console.log('this.form',this.form)
- // console.log('body',this.form,body)
+ console.log('body',this.form,body)
if (this.form.birthDate) {
try {
body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue
index abdc647..7b5c1c1 100644
--- a/src/components/patientRegister/PatientRegisterList.vue
+++ b/src/components/patientRegister/PatientRegisterList.vue
@@ -23,6 +23,9 @@
{{ scope.row.isAudit == 'Y' ? "已审核" : dddw(dict.completeFlag, "id", scope.row.completeFlag,
"displayName") }}
+
+ {{ dddw(dict.qztlType, "id", scope.row.qztlType, "displayName") }}
+
@@ -1260,7 +1263,7 @@ export default {
],
BusinessCode: row.id
};
- console.log('this.$peisAPI.print',toOutShell)
+ console.log('this.$peisAPI.print', toOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
@@ -1298,7 +1301,7 @@ export default {
postapi(url, { patientRegisterId: row.id }).then(res => {
if (res.code > -1) {
this.$message.success({ showClose: true, message: '导入成功!' })
- }else{
+ } else {
this.$message.error({ showClose: true, message: res.message })
}
})
diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js
index 8f775dd..3e5ebed 100644
--- a/src/utlis/proFunc.js
+++ b/src/utlis/proFunc.js
@@ -29,18 +29,25 @@ function deepCopy(obj) {
if (obj == null || typeof obj != 'object') {
return obj;
}
- let copy;
- if (Array.isArray(obj)) {
- copy = [];
- for (let i = 0; i < obj.length; i++) {
- copy[i] = deepCopy(obj[i]);
- }
- } else {
- copy = {};
- for (let key in obj) {
- copy[key] = deepCopy(obj[key]);
+ let copy = null;
+ try {
+ // 日期数据直接返回
+ if(obj instanceof Date) return obj
+
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (let i = 0; i < obj.length; i++) {
+ copy[i] = deepCopy(obj[i]);
+ }
+ } else {
+ copy = {};
+ for (let key in obj) {
+ copy[key] = deepCopy(obj[key]);
+ }
}
- }
+ } catch (error) {
+ console.log('deepCopy',error)
+ }
return copy;
};
exports.deepCopy = deepCopy;