From b657ad66ea2cf350e200be46fbcce29e665036af Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 14 二月 2025 14:55:17 +0800
Subject: [PATCH] 扩展属性新增流程阶段+bug调整
---
src/components/Process/panel/PropertiesPanel.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/src/components/Process/panel/PropertiesPanel.vue b/src/components/Process/panel/PropertiesPanel.vue
index c895056..1b1af02 100644
--- a/src/components/Process/panel/PropertiesPanel.vue
+++ b/src/components/Process/panel/PropertiesPanel.vue
@@ -15,15 +15,37 @@
</div>
<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
+ <div v-for="item in canConfigPropertyList" style="margin-bottom: 20px; display: flex; align-items: center;">
+ <!-- Name -->
+ <span style="flex: 0 0 100px; text-align: right; margin-right: 20px;">{{ item.name }}</span>
+ <!-- 缁勪欢 -->
+ <div >
+ <!-- Switch -->
+ <div v-if="item.vueType === 'switch'">
+ <el-switch
v-model="item.value"
- :inactive-text="item.name"
@change="(val) => item.method(item.name, val === true ? '鏄�' : '鍚�')"
active-color="#13ce66"
- inactive-color="#ff4949">
- </el-switch>
+ inactive-color="#ff4949"
+ >
+ </el-switch>
+ </div>
+ <!-- Select -->
+ <div v-if="item.vueType === 'select'">
+ <el-select
+ v-model="item.value"
+ @change="(val) => item.method(item.name, val)"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="option in item.options"
+ :key="option.value"
+ :label="option.label"
+ :value="option.value"
+ >
+ </el-option>
+ </el-select>
+ </div>
</div>
</div>
<!-- <el-form :model="propertyForm" label-width="80px" size="mini" ref="attributeFormRef" @submit.native.prevent>-->
@@ -84,6 +106,22 @@
this.propertyForm.value = value
this.saveAttribute()
}
+ },
+ {
+ name: '娴佺▼闃舵',
+ value: null,
+ vueType: 'select',
+ options: [
+ {label: '鍌ㄥ瑙勫垝闃舵',value: '鍌ㄥ瑙勫垝闃舵'},
+ {label: '椤圭洰鍓嶆湡闃舵',value: '椤圭洰鍓嶆湡闃舵'},
+ {label: '瀹炴柦闃舵',value: '瀹炴柦闃舵'},
+ {label: '绔e伐鎶曠敤闃舵',value: '绔e伐鎶曠敤闃舵'}
+ ],
+ method: (name, value) => {
+ this.propertyForm.name = name
+ this.propertyForm.value = value
+ this.saveAttribute()
+ }
}
], // 鍙互閰嶇疆鐨勫睘鎬у垪琛�
elementPropertyList: [], // 鎵╁睍灞炴�у垪琛�
@@ -106,7 +144,7 @@
methods: {
closeProperty() {
this.propertyFormModelVisible = false
- this.resetList()
+ // this.resetList()
},
resetList() {
this.canConfigPropertyList = [
@@ -154,7 +192,7 @@
}) ?? [];
// 淇濆瓨鎵�鏈夌殑 鎵╁睍灞炴�у瓧娈�
this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((pre, current) => pre.concat(current.values), []);
-
+ console.log("bpmnElementPropertyList",this.bpmnElementPropertyList)
// 鍥炴樉
this.canConfigPropertyList.forEach(item => {
const find = this.bpmnElementPropertyList.find(el => el.name === item.name);
@@ -162,7 +200,8 @@
if (item.vueType === 'switch') {
item.value = find.value === '鏄�' ? true : false
}
-
+ } else {
+ item.value = null
}
})
this.elementPropertyList = JSON.parse(JSON.stringify(this.bpmnElementPropertyList ?? []));
--
Gitblit v1.8.0