田源
2024-11-20 7528d44d20d12b0b3044fb19e58c2f68c1cebf94
系统模块配置修改树节点图标
已修改3个文件
42 ■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
@@ -613,7 +613,8 @@
                  :show-header="false"
                  border
                  stripe
                  style="width: 100%">
                  style="width: 100%"
                  @row-click="customOptionTableClick">
                  <el-table-column
                    align="center"
                    label="名称"
@@ -636,7 +637,9 @@
                <el-button plain size="mini" style="margin-right: 5px" type="success"
                           @click="optionAddClickHandler('dialog')">添加
                </el-button>
                <el-button plain size="mini" style="margin-left: 5px" type="danger">删除</el-button>
                <el-button plain size="mini" style="margin-left: 5px" type="danger"
                           @click="optionDeleteClickHandler('dialog')">删除
                </el-button>
              </div>
            </el-form-item>
          </el-col>
@@ -1050,7 +1053,11 @@
          children: 'children',
        },
      },
      treeData: []
      treeData: [],
      optionRow: {},
      customOptionRow: {},
      optionCurrentIndex: 0,
      customOptionCurrentIndex: 0
    }
  },
  computed: {
@@ -1120,7 +1127,6 @@
        itemIsEditable:"0",
        itemIsRequired:"0",
      }
      console.log(data);
      const isDuplicate = this.formList.some(item => item.text === data.text);
      if (isDuplicate) {
@@ -1137,7 +1143,6 @@
      this.form = {...item};
      this.topForm.position = index += 1;
      // this.$forceUpdate();
      console.log(this.form);
    },
    // 设置显示行数
@@ -1239,7 +1244,12 @@
    // 选项表格行点击
    optionTableClick(row) {
      this.optionRow = row;
      console.log(row);
    },
    customOptionTableClick(row) {
      this.customOptionRow = row;
    },
    // 选项添加
@@ -1270,15 +1280,21 @@
      const params = {
        key: optionObj.optionName,
        value: optionObj.optionValue
        value: optionObj.optionValue,
        index: val === 'dialog' ? this.customOptionCurrentIndex++ : this.optionCurrentIndex++
      };
      itemKeyValueList.push(params);
    },
    // 选项删除
    optionDeleteClickHandler() {
    optionDeleteClickHandler(val) {
      // console.log(this.optionRow);
      if (val === 'dialog') {
        this.customForm.itemKeyValueList.splice(this.customOptionRow.index,1);
      } else {
        this.form.itemKeyValueList.splice(this.optionRow.index,1);
      }
    },
    // 添加自定义组件
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
@@ -6,7 +6,7 @@
          <avue-tree :key="refresh" node-key="id" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
              <i class="el-icon-s-promotion"></i>
              <i :class="data.icon"></i>
                {{ (node || {}).label }}
            </span>
          </span>
@@ -249,7 +249,8 @@
                ...item,
                id: item.id,
                name: item.name,
                leaf: !item.hasChildren
                leaf: !item.hasChildren,
                icon: item.source || 'iconfont iconicon_work'
              }
            }))
          })
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
@@ -7,7 +7,7 @@
                     @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
              <i class="el-icon-s-promotion"></i>
              <i :class="data.icon"></i>
                {{ (node || {}).label }}
            </span>
          </span>
@@ -252,7 +252,8 @@
                ...item,
                id: item.id,
                name: item.name,
                leaf: !item.hasChildren
                leaf: !item.hasChildren,
                icon: item.source || 'iconfont iconicon_work'
              }
            }))
          })