From 3dfa2583fb0e6df3b5724020ebb68621a10b7678 Mon Sep 17 00:00:00 2001
From: miaojiale <1123971748@qq.com>
Date: Mon, 6 Feb 2023 17:19:56 +0800
Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9=E5=88=87=E6=8D=A2?=
 =?UTF-8?q?=E7=AD=9B=E6=9F=A5=E6=8F=90=E7=A4=BA=E5=9B=BE=E7=89=87=202.=20?=
 =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=B4=E6=97=B6=E4=BF=9D=E5=AD=98=E6=8C=89?=
 =?UTF-8?q?=E9=92=AE=E4=BD=8D=E7=BD=AE=203.=20=E5=8E=BB=E9=99=A4=E6=8E=A5?=
 =?UTF-8?q?=E5=8F=A3=E6=89=80=E4=BC=A0=E7=9A=84formRecordId?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../FormComponents/CustomForm/index.vue       | 68 ++++++++++---------
 src/layouts/index.vue                         |  6 ++
 .../screening/components/ConfigForms.vue      | 22 +++---
 src/views/screening/components/FormTab.vue    |  6 +-
 4 files changed, 56 insertions(+), 46 deletions(-)

diff --git a/src/components/FormComponents/CustomForm/index.vue b/src/components/FormComponents/CustomForm/index.vue
index c360c6d..6c707c2 100644
--- a/src/components/FormComponents/CustomForm/index.vue
+++ b/src/components/FormComponents/CustomForm/index.vue
@@ -271,44 +271,45 @@ export default {
     },
     // 临时保存
     temporarySave() {
-      //? 只传数据
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          const data = {}
-          const form = this.deepClone(this.form)
-          Object.keys(form).forEach((k) => {
-            if (form[k] === undefined) {
-              data[k] = ""
-              return false
-            }
-            if (k === "YZZKJC") {
-              // 牙周表格
-              data[k] = JSON.stringify(form[k])
-            } else if (
-              Array.isArray(form[k]) &&
-              form[k][0] &&
-              isObject(form[k][0])
-            ) {
-              // 子表单 去除前端添加的显隐辅助数据($_)和 删除按钮辅助数据(showDelBtn)
-              data[k] = form[k].map((item) => {
-                for (let key in item) {
-                  if (["$_keyField", "$_hidden", "showDelBtn"].includes(key))
-                    delete item[key]
-                }
-                return item
-              })
-            } else {
-              data[k] = form[k]
+      //? 只传数据 获取当前步数,如果个人信息已经提交可以临时保存
+
+      // this.$refs.form.validate((valid) => {
+      //   if (valid) {
+      const data = {}
+      const form = this.deepClone(this.form)
+      Object.keys(form).forEach((k) => {
+        if (form[k] === undefined) {
+          data[k] = ""
+          return false
+        }
+        if (k === "YZZKJC") {
+          // 牙周表格
+          data[k] = JSON.stringify(form[k])
+        } else if (
+          Array.isArray(form[k]) &&
+          form[k][0] &&
+          isObject(form[k][0])
+        ) {
+          // 子表单 去除前端添加的显隐辅助数据($_)和 删除按钮辅助数据(showDelBtn)
+          data[k] = form[k].map((item) => {
+            for (let key in item) {
+              if (["$_keyField", "$_hidden", "showDelBtn"].includes(key))
+                delete item[key]
             }
-          })
-          this.$emit("temporaryConfirm", data, () => {
-            // 完成之后的回调
-            this.loading = false
+            return item
           })
         } else {
-          this.loading = false
+          data[k] = form[k]
         }
       })
+      this.$emit("temporaryConfirm", data, () => {
+        // 完成之后的回调
+        this.loading = false
+      })
+      // } else {
+      //   this.loading = false
+      // }
+      // })
     },
     handleConfirm() {
       this.loading = true
@@ -461,6 +462,7 @@ export default {
   }
   .form-footer {
     margin-top: 20px;
+    margin-bottom: 20px;
     text-align: center;
   }
 }
diff --git a/src/layouts/index.vue b/src/layouts/index.vue
index 6e6810e..36d1e53 100644
--- a/src/layouts/index.vue
+++ b/src/layouts/index.vue
@@ -569,12 +569,18 @@ export default {
       }
       .right {
         flex: 1;
+        .r_col_item:nth-child(4) {
+          img {
+            align-self: flex-start;
+          }
+        }
         .r_col_item {
           min-height: 72px;
           display: flex;
           justify-content: flex-start;
           align-items: center;
           padding: 20px 0 20px 20px;
+
           img {
             width: 26px;
             height: 26px;
diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue
index 403ebdc..4f0a780 100644
--- a/src/views/screening/components/ConfigForms.vue
+++ b/src/views/screening/components/ConfigForms.vue
@@ -1,15 +1,12 @@
 <template>
   <div
     id="publicContent"
-    :style="{
-      padding:
-        $route.path == '/screening/draft'
-          ? ' 10px 24px 60px;'
-          : ' 32px 24px 60px;',
-    }"
-    :class="activeName == 'index0' && formClass ? formClass : ''"
+    :class="[
+      activeName == 'index0' && formClass ? formClass : '',
+      $route.path === '/screening/draft' ? 'p_padding' : '',
+    ]"
   >
-    <div v-if="formTabs && formTabs.length > 0">
+    <div v-if="formTabs && formTabs.length > 0" style="position: relative">
       <el-button
         v-if="!disabled"
         class="draftButton"
@@ -31,6 +28,7 @@
           :key="form.id"
           :label="form.label"
           :name="'index' + index"
+          disabled
         >
           <!-- disabled -->
           <transition mode="out-in" name="fade-transform">
@@ -148,7 +146,7 @@ export default {
   watch: {
     activeName(val) {
       if (!this.disabled) {
-        if (!["index0"].includes(val)) {
+        if (!["index0", "index1"].includes(val)) {
           this.infoCompelete = true
         } else {
           this.infoCompelete = false
@@ -277,9 +275,10 @@ export default {
 <style lang="scss" scoped>
 #publicContent {
   position: relative;
+  padding: 32px 24px 32px;
   .draftButton {
     position: absolute;
-    top: 46px;
+    top: 0px;
     right: 40px;
     z-index: 999;
     border-radius: 4px;
@@ -293,6 +292,9 @@ export default {
     }
   }
 }
+#publicContent.p_padding {
+  padding: 10px 24px 32px;
+}
 ::v-deep .el-dialog__body {
   .title {
     font-size: 22px;
diff --git a/src/views/screening/components/FormTab.vue b/src/views/screening/components/FormTab.vue
index 4fa5f1b..9e64327 100644
--- a/src/views/screening/components/FormTab.vue
+++ b/src/views/screening/components/FormTab.vue
@@ -180,7 +180,7 @@ export default {
           data,
           formId: this.form.formId, // 每个大表单的id
           patientId: this.patientId || this.patientStandbyId,
-          formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
+          // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
           statusMap: {
             patient_from: this.$store.getters["table/selectedIndex"],
             is_draft: 1, //是否为草稿
@@ -204,7 +204,7 @@ export default {
           data,
           formId: this.form.formId, // 每个大表单的id
           patientId: this.patientId || this.patientStandbyId,
-          formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
+          // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
           statusMap: {
             patient_from: this.$store.getters["table/selectedIndex"],
             is_draft: 0, //是否为草稿
@@ -421,7 +421,7 @@ export default {
     z-index: 9;
   }
   .header {
-    height: 36px;
+    height: 5px;
     box-shadow: 0 5px 4px rgb(0 21 41 / 8%);
     padding-right: 20px;
     position: relative;
-- 
2.22.0