From 93b8ceac34e2fbd5c57fe5ab4f5bac32c85408aa Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期五, 22 五月 2026 15:37:09 +0800
Subject: [PATCH] fix(hr): 修正岗位字段映射

---
 src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue |  103 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 99 insertions(+), 4 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue b/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue
index 5bc65dd..d094c13 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue
@@ -114,7 +114,13 @@
 
             <el-form-item label="妯℃澘鍚嶇О" prop="templateName">
 
-              <el-input v-model="form.templateName" placeholder="濡傦細椤圭洰绔嬮」瀹℃壒" maxlength="50" show-word-limit />
+              <el-input
+                v-model="form.templateName"
+                placeholder="濡傦細椤圭洰绔嬮」瀹℃壒"
+                maxlength="50"
+                show-word-limit
+                :disabled="isEditingBuiltin"
+              />
 
             </el-form-item>
 
@@ -124,7 +130,12 @@
 
             <el-form-item label="妯℃澘绫诲瀷" prop="businessType">
 
-              <el-select v-model="form.businessType" placeholder="璇烽�夋嫨" style="width: 100%">
+              <el-select
+                v-model="form.businessType"
+                placeholder="璇烽�夋嫨"
+                style="width: 100%"
+                :disabled="isEditingBuiltin"
+              >
 
                 <el-option
 
@@ -178,7 +189,12 @@
 
         <el-form-item label="濉姤閰嶇疆">
 
-          <FormConfigEditor v-model="form.formConfigData" />
+          <FormConfigEditor
+            v-model="form.formConfigData"
+            :exclude-template-id="form.id"
+            :disable-import="isEditingBuiltin"
+            :locked-field-uids="isEditingBuiltin ? form.lockedFormFieldUids : []"
+          />
 
           <p class="flow-tip">閰嶇疆鎻愪氦瀹℃壒鏃堕渶濉啓鐨勮〃鍗曢」锛屼繚瀛樺悗鍐欏叆 formConfig锛圝SON锛夈��</p>
 
@@ -193,6 +209,18 @@
             鎸夐『搴忔祦杞細鍙负姣忎釜鑺傜偣娣诲姞澶氬悕瀹℃壒浜猴紱浼氱闇�鍏ㄩ儴閫氳繃锛屾垨绛句换涓�浜洪�氳繃鍗冲彲杩涘叆涓嬩竴鑺傜偣銆�
 
           </p>
+
+        </el-form-item>
+
+        <el-form-item label="闄勪欢">
+
+          <div class="upload-block">
+
+            <FileUpload v-model:file-list="form.storageBlobDTOs" :limit="10" button-text="鐐瑰嚮閫夋嫨鏂囦欢" />
+
+          </div>
+
+          <p class="flow-tip">鍙笂浼犳ā鏉胯鏄庢枃妗c�佸埗搴︽枃浠剁瓑锛堥�夊~锛夈��</p>
 
         </el-form-item>
 
@@ -274,6 +302,16 @@
 
         </el-table-column>
 
+        <el-table-column label="閫夐」鏉ユ簮" width="100">
+
+          <template #default="{ row }">
+
+            {{ row.type === 'select' ? selectOptionSourceLabel(row.optionSource) : '鈥�' }}
+
+          </template>
+
+        </el-table-column>
+
         <el-table-column label="蹇呭~" width="70" align="center">
 
           <template #default="{ row }">{{ row.required !== false ? "鏄�" : "鍚�" }}</template>
@@ -338,6 +376,32 @@
 
       <el-empty v-else description="鏆傛棤娴佺▼鑺傜偣" :image-size="60" />
 
+      <el-divider content-position="left">闄勪欢锛坽{ detailAttachments.length }} 涓級</el-divider>
+
+      <template v-if="detailAttachments.length">
+
+        <el-tag
+
+          v-for="(f, i) in detailAttachments"
+
+          :key="i"
+
+          class="detail-attachment-tag"
+
+          type="info"
+
+          effect="plain"
+
+        >
+
+          {{ attachmentDisplayName(f) }}
+
+        </el-tag>
+
+      </template>
+
+      <el-empty v-else description="鏆傛棤闄勪欢" :image-size="48" />
+
       </div>
 
       <template #footer>
@@ -366,13 +430,16 @@
 
 import { userListNoPageByTenantId } from "@/api/system/user.js";
 
+import FileUpload from "@/components/AttachmentUpload/file/index.vue";
+
 import FormConfigEditor from "./components/FormConfigEditor.vue";
 
 import TemplateFlowEditor from "./components/TemplateFlowEditor.vue";
 
-import { formatDisplayTime } from "./approveTemplateConstants.js";
+import { formatDisplayTime, mapAttachmentsFromApi } from "./approveTemplateConstants.js";
 
 import { formatDefaultValueDisplay, formFieldTypeLabel, parseFormConfigToData } from "./formConfigUtils.js";
+import { selectOptionSourceLabel } from "./selectOptionSource.js";
 
 import { useApproveTemplate } from "./useApproveTemplate.js";
 
@@ -408,6 +475,8 @@
 
   formRules,
 
+  isEditingBuiltin,
+
   detailDialog,
 
   detailRow,
@@ -441,6 +510,20 @@
   parseFormConfigToData(detailRow.value?.formConfigData ?? detailRow.value?.formConfig)
 
 );
+
+
+
+const detailAttachments = computed(() => mapAttachmentsFromApi(detailRow.value));
+
+
+
+function attachmentDisplayName(file) {
+
+  if (!file) return "鏈懡鍚�";
+
+  return file.name || file.originalFilename || file.fileName || "鏈懡鍚�";
+
+}
 
 
 
@@ -706,6 +789,18 @@
 
 }
 
+.upload-block {
+
+  width: 100%;
+
+}
+
+.detail-attachment-tag {
+
+  margin: 0 8px 8px 0;
+
+}
+
 .text-muted {
 
   font-size: 12px;

--
Gitblit v1.9.3