xiangpei
2024-12-10 843cd949b9e6482249014ec297544e1b9ad723be
流程设计:扩展属性重构
1个文件已修改
18 ■■■■ 已修改文件
src/components/Process/panel/PropertiesPanel.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) {