fuliqi
2025-02-14 1b1631a2f96f527d7191d1c7ad5b89e58aa299e8
扩展属性回显bug
1个文件已修改
10 ■■■■ 已修改文件
src/components/Process/panel/PropertiesPanel.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Process/panel/PropertiesPanel.vue
@@ -191,14 +191,20 @@
          return ex.$type === `flowable:Properties`;
        }) ?? [];
      // 保存所有的 扩展属性字段
      this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((pre, current) => pre.concat(current.values), []);
      console.log("bpmnElementPropertyList",this.bpmnElementPropertyList)
      this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((pre, current) => {
        // 检查 current.values 是否是数组,如果不是则使用空数组
        const values = current.values ? current.values : [];
        return pre.concat(values);
      }, []);
      console.log("bpmnElementProperties",this.bpmnElementProperties)
      // 回显
      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
          }else if (item.vueType === 'select') {
            item.value = find.value
          }
        } else {
          item.value = null