From 43c5f55acde13b7f8d79b2aeaa28dd7f0f800bde Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 10 十一月 2025 14:41:59 +0800
Subject: [PATCH] fix: bug

---
 src/views/ProtocolManage/EditTemplate.vue |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/views/ProtocolManage/EditTemplate.vue b/src/views/ProtocolManage/EditTemplate.vue
index 0154140..691ff38 100644
--- a/src/views/ProtocolManage/EditTemplate.vue
+++ b/src/views/ProtocolManage/EditTemplate.vue
@@ -181,6 +181,10 @@
         showDownloadBtn: false,
         formatter: (row: API.GetEnterpriseContractTemplatesQueryResultItem) => setOSSLink(row.file),
       },
+      isAutoSign: {
+        formatter: (row: API.GetEnterpriseContractTemplatesQueryResultItem) =>
+          row.isAutoSign ? '鏄�' : '鍚�',
+      },
     },
   }
 );
@@ -198,6 +202,10 @@
     isEnterpriseUserCreated: false,
     templateEditData: '',
     enterpriseId: '',
+    isAutoSign: false,
+    autoSignPowerAttorneyUrl: [] as UploadUserFile[],
+
+    customContents: [] as string[],
   },
   closeAfterConfirm: false,
 });
@@ -215,7 +223,11 @@
         access: row.access,
         isEnterpriseUserCreated: detail.isEnterpriseUserCreated,
         templateEditData: detail.templateEditData,
+        isAutoSign: detail.isAutoSign ?? false,
+        autoSignPowerAttorneyUrl: convertApi2FormUrlOnlyOne(detail.autoSignPowerAttorneyUrl),
         enterpriseId: enterpriseId,
+
+        customContents: detail.customContents.map((x) => x.name),
       });
     } else {
       handleAdd();
@@ -234,6 +246,7 @@
       code: editForm.code,
       access: editForm.access,
       templateId: editForm.templateId,
+      autoSignPowerAttorneyUrl: editForm.autoSignPowerAttorneyUrl?.[0]?.path ?? '',
       templateEditData: JSON.stringify(
         pdfToImage.map(
           (x) =>
@@ -244,7 +257,13 @@
             } as TemplateEditDataItem)
         )
       ),
+      customContents: editForm.customContents,
     };
+    if (editForm.access === EnumElectronSignAccess.BestSign) {
+      params.isAutoSign = editForm.isAutoSign;
+    } else {
+      params.isAutoSign = false;
+    }
     if (isEdit) {
       params.id = editForm.id;
     }

--
Gitblit v1.9.1