From d2c276d37c5ad5eefa00eeebe6b30186bcce2d19 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 14 二月 2025 10:09:01 +0800
Subject: [PATCH] 流程推进详情表头调整

---
 src/components/Process/panel/PropertiesPanel.vue |   83 +++++++++++++++++++++++++++++++++++++----
 1 files changed, 74 insertions(+), 9 deletions(-)

diff --git a/src/components/Process/panel/PropertiesPanel.vue b/src/components/Process/panel/PropertiesPanel.vue
index 5ecc92a..c895056 100644
--- a/src/components/Process/panel/PropertiesPanel.vue
+++ b/src/components/Process/panel/PropertiesPanel.vue
@@ -6,8 +6,6 @@
       <el-table-column label="灞炴�у��" prop="value" min-width="100px" show-overflow-tooltip />
       <el-table-column label="鎿嶄綔" width="90px">
         <template slot-scope="{ row, $index }">
-          <el-button size="mini" type="text" @click="openAttributesForm(row, $index)">缂栬緫</el-button>
-          <el-divider direction="vertical" />
           <el-button size="mini" type="text" style="color: #ff4d4f" @click="removeAttributes(row, $index)">绉婚櫎</el-button>
         </template>
       </el-table-column>
@@ -16,8 +14,8 @@
       <el-button size="mini" type="primary" icon="el-icon-setting" @click="openAttributesForm(null, -1)">灞炴�ц缃�</el-button>
     </div>
 
-    <el-dialog :visible.sync="propertyFormModelVisible" title="灞炴�ч厤缃�" width="600px" append-to-body destroy-on-close>
-      <div v-for="item in canConfigPropertyList">
+    <el-dialog :visible.sync="propertyFormModelVisible" title="灞炴�ч厤缃�" width="600px" @close="closeProperty" append-to-body :destroy-on-close="true" :close-on-click-modal="false">
+      <div v-for="item in canConfigPropertyList" style="margin-bottom: 20px">
         <div v-if="item.vueType === 'switch'">
           <el-switch
               v-model="item.value"
@@ -37,7 +35,7 @@
 <!--        </el-form-item>-->
 <!--      </el-form>-->
       <template slot="footer">
-        <el-button size="mini" @click="propertyFormModelVisible = false">鍏� 闂�</el-button>
+        <el-button size="mini" @click="closeProperty">鍏� 闂�</el-button>
       </template>
     </el-dialog>
   </div>
@@ -58,8 +56,28 @@
     return {
       canConfigPropertyList: [
         {
-          name: '璇ヨ妭鐐规槸瀹℃壒鑺傜偣',
-          value: '鏄�',
+          name: '鏄惁瀹℃壒鑺傜偣',
+          value: false,
+          vueType: 'switch',
+          method: (name, value) => {
+            this.propertyForm.name = name
+            this.propertyForm.value = value
+            this.saveAttribute()
+          }
+        },
+        {
+          name: '鏄惁鍏佽璺宠繃',
+          value: false,
+          vueType: 'switch',
+          method: (name, value) => {
+            this.propertyForm.name = name
+            this.propertyForm.value = value
+            this.saveAttribute()
+          }
+        },
+        {
+          name: '鏄惁鍏佽瀹圭己',
+          value: false,
           vueType: 'switch',
           method: (name, value) => {
             this.propertyForm.name = name
@@ -86,6 +104,44 @@
     }
   },
   methods: {
+    closeProperty() {
+      this.propertyFormModelVisible = false
+      this.resetList()
+    },
+    resetList() {
+      this.canConfigPropertyList = [
+        {
+          name: '鏄惁瀹℃壒鑺傜偣',
+          value: false,
+          vueType: 'switch',
+          method: (name, value) => {
+            this.propertyForm.name = name
+            this.propertyForm.value = value
+            this.saveAttribute()
+          }
+        },
+        {
+          name: '鏄惁鍏佽璺宠繃',
+          value: false,
+          vueType: 'switch',
+          method: (name, value) => {
+            this.propertyForm.name = name
+            this.propertyForm.value = value
+            this.saveAttribute()
+          }
+        },
+        {
+          name: '鏄惁鍏佽瀹圭己',
+          value: false,
+          vueType: 'switch',
+          method: (name, value) => {
+            this.propertyForm.name = name
+            this.propertyForm.value = value
+            this.saveAttribute()
+          }
+        }
+      ]
+    },
     resetAttributesList() {
       this.bpmnElement = this.modelerStore.element;
       this.otherExtensionList = []; // 鍏朵粬鎵╁睍閰嶇疆
@@ -96,10 +152,19 @@
           }
           return ex.$type === `flowable:Properties`;
         }) ?? [];
-
       // 淇濆瓨鎵�鏈夌殑 鎵╁睍灞炴�у瓧娈�
       this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((pre, current) => pre.concat(current.values), []);
-      // 澶嶅埗 鏄剧ず
+
+      // 鍥炴樉
+      this.canConfigPropertyList.forEach(item => {
+        const find = this.bpmnElementPropertyList.find(el => el.name === item.name);
+        if (find) {
+          if (item.vueType === 'switch') {
+            item.value = find.value === '鏄�' ? true : false
+          }
+
+        }
+      })
       this.elementPropertyList = JSON.parse(JSON.stringify(this.bpmnElementPropertyList ?? []));
     },
     openAttributesForm(attr, index) {

--
Gitblit v1.8.0