From 843cd949b9e6482249014ec297544e1b9ad723be Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 10 十二月 2024 14:04:31 +0800 Subject: [PATCH] 流程设计:扩展属性重构 --- src/components/Process/panel/PropertiesPanel.vue | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/Process/panel/PropertiesPanel.vue b/src/components/Process/panel/PropertiesPanel.vue index 5ecc92a..959fc1a 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> @@ -59,7 +57,7 @@ canConfigPropertyList: [ { name: '璇ヨ妭鐐规槸瀹℃壒鑺傜偣', - value: '鏄�', + value: false, vueType: 'switch', method: (name, value) => { this.propertyForm.name = name @@ -96,10 +94,20 @@ } 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 + } + + } + }) + console.log(this.canConfigPropertyList, "杩欐槸浠�涔堥") this.elementPropertyList = JSON.parse(JSON.stringify(this.bpmnElementPropertyList ?? [])); }, openAttributesForm(attr, index) { -- Gitblit v1.8.0