田源
2025-01-08 ff895d99ccc8cbff646c713cebe077d09f978ec5
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -11,7 +11,7 @@
            <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span>
              <i class="el-icon-s-promotion"></i>
              <icon-show :name="data.icon"></icon-show>
                {{ (node || {}).label }}
            </span>
          </span>
@@ -63,6 +63,7 @@
        ref="dialogCrud"
        :data="attrData"
        :option="dialogAttrOption"
        @select-all="selectAllHandler"
        @select="selectHandler">
      </avue-crud>
      <span slot="footer" class="dialog-footer">
@@ -218,6 +219,7 @@
        const data = res.data.data.map(item => {
          this.processChildren(item); // 处理每个节点
          item.attributes.label = item.attributes.id;
          item.attributes.icon = item.attributes.imageName;
          return item.attributes;
        });
        this.treeData = data;
@@ -231,6 +233,7 @@
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.label = child.attributes.id;
          child.attributes.icon = child.attributes.imageName;
          this.processChildren(child); // 递归处理每个子节点
          return child.attributes; // 只返回子节点的 attributes
        });
@@ -272,7 +275,10 @@
      })
    },
    selectHandler(selection, row){
      this.dialogSelectionRow=selection
      this.dialogSelectionRow = selection;
    },
    selectAllHandler(selection){
      this.dialogSelectionRow = selection;
    },
    changeTemp(data) {
      this.$refs.queryCrud.clearSelection();
@@ -326,6 +332,7 @@
          let abNames=this.dialogSelectionRow.map(item => {
            return item.id
          })
          if(abNames.length==0){
            this.$message.error('请选择查询属性');
            return false;