ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -3,16 +3,15 @@
    <el-aside>
      <basic-container>
        <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
          <!-- 左侧树 -->
          <div style="height:  calc(100vh - 190px);">
            <avue-tree ref="tree" v-loading="treeLoading" :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>
                {{ (node || {}).label }}
            </span>
          </span>
              <span slot-scope="{ node, data }" class="el-tree-node__label">
               <span>
                  <icon-show :name="data.icon"></icon-show>
                    {{ (node || {}).label }}
                </span>
              </span>
            </avue-tree>
          </div>
        </div>
@@ -21,38 +20,60 @@
    <el-main>
      <basic-container>
        <div>
          <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary"
                     @click="addClickHandler">创建
          <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary"
                     @click="addClickHandler">
            <icon-show :name="permissionList.addBtn.source"></icon-show>
            创建
          </el-button>
          <el-button v-if="permissionList.editBtn" icon="el-icon-edit" plain size="small" type="primary"
                     @click="editClickHandler">修改
          <el-button v-if="permissionList.editBtn" class="button-custom-icon" plain size="small" type="primary"
                     @click="editClickHandler">
            <icon-show :name="permissionList.editBtn.source"></icon-show>
            修改
          </el-button>
          <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger"
                     @click="deleteClickHandler">删除
          <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger"
                     @click="deleteClickHandler">
            <icon-show :name="permissionList.delBtn.source"></icon-show>
            删除
          </el-button>
          <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary"
                     @click="upLoadClickHandler">导入
          <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary"
                     @click="upLoadClickHandler">
            <icon-show :name="permissionList.importBtn.source"></icon-show>
            导入
          </el-button>
          <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary"
                     @click="exportClickHandler">导出
          <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary"
                     @click="exportClickHandler">
            <icon-show :name="permissionList.exportBtn.source"></icon-show>
            导出
          </el-button>
          <el-button v-if="permissionList.createViewBtn" icon="el-icon-circle-plus-outline" plain size="small"
                     type="primary" @click="createViewClickHandler">创建视图
          <el-button v-if="permissionList.createViewBtn" class="button-custom-icon" plain size="small"
                     type="primary" @click="createViewClickHandler">
            <icon-show :name="permissionList.createViewBtn.source"></icon-show>
            创建视图
          </el-button>
          <el-button v-if="permissionList.createIndexBtn" icon="el-icon-circle-plus-outline" plain size="small"
                     type="primary" @click="indexClickHandler">创建索引
          <el-button v-if="permissionList.createIndexBtn" class="button-custom-icon" plain size="small"
                     type="primary" @click="indexClickHandler">
            <icon-show :name="permissionList.createIndexBtn.source"></icon-show>
            创建索引
          </el-button>
          <el-button v-if="permissionList.consistencyCheckBtn" icon="el-icon-menu" plain size="small" type="primary"
                     @click="checkClickHandler">一致性检查
          <el-button v-if="permissionList.consistencyCheckBtn" class="button-custom-icon" plain size="small" type="primary"
                     @click="checkClickHandler">
            <icon-show :name="permissionList.consistencyCheckBtn.source"></icon-show>
            一致性检查
          </el-button>
          <el-button v-if="permissionList.deleteDataBtn" icon="el-icon-delete" plain size="small" type="danger"
                     @click="checkClickHandler">删除数据
          <el-button v-if="permissionList.deleteDataBtn" class="button-custom-icon" plain size="small" type="danger"
                     @click="checkClickHandler">
            <icon-show :name="permissionList.deleteDataBtn.source"></icon-show>
            删除数据
          </el-button>
          <el-button v-if="permissionList.deleteEveryTypeBtn" icon="el-icon-delete" plain size="small" type="danger"
                     @click="checkClickHandler">删除全部类型
          <el-button v-if="permissionList.deleteEveryTypeBtn" class="button-custom-icon" plain size="small" type="danger"
                     @click="checkClickHandler">
            <icon-show :name="permissionList.deleteEveryTypeBtn.source"></icon-show>
            删除全部类型
          </el-button>
          <el-button v-if="permissionList.viewTheScopeBtn" icon="el-icon-view" plain size="small" type="primary"
                     @click="checkViewClickHandler">查看使用范围
          <el-button v-if="permissionList.viewTheScopeBtn" class="button-custom-icon" plain size="small" type="primary"
                     @click="checkViewClickHandler">
            <icon-show :name="permissionList.viewTheScopeBtn.source"></icon-show>
            查看使用范围
          </el-button>
        </div>
        <div style="display: flex;justify-content:left;margin-top: 15px;">
@@ -298,8 +319,8 @@
        </avue-crud>
      </div>
      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="addDialogSavaHandler">确 定</el-button>
         <el-button @click="addDialogClose">取 消</el-button>
         <el-button size="small" type="primary" @click="addDialogSavaHandler">确 定</el-button>
         <el-button size="small" @click="addDialogClose">取 消</el-button>
        </span>
    </el-dialog>
@@ -329,8 +350,8 @@
      >
      </avue-crud>
      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="dialogAttrAddClickHandler">确 定</el-button>
         <el-button @click="dialogAttrClose">取 消</el-button>
         <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">确 定</el-button>
         <el-button size="small" @click="dialogAttrClose">取 消</el-button>
        </span>
    </el-dialog>
@@ -373,8 +394,8 @@
        :table-loading="conCheckLoading">
      </avue-crud>
      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="repairClickHandler">修 复</el-button>
         <el-button @click="conCheckVisible = false">取 消</el-button>
         <el-button size="small" type="primary" @click="repairClickHandler">修 复</el-button>
         <el-button size="small" @click="conCheckVisible = false">取 消</el-button>
        </span>
    </el-dialog>
@@ -438,8 +459,8 @@
        </span>
      </el-dialog>
      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="indexClickAddHandler">保 存</el-button>
         <el-button @click="indexDialogClose">取 消</el-button>
         <el-button size="small" type="primary" @click="indexClickAddHandler">保 存</el-button>
         <el-button size="small" @click="indexDialogClose">取 消</el-button>
        </span>
    </el-dialog>
@@ -837,12 +858,12 @@
        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
        importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
        consistencyCheckBtn: this.vaildData(this.permission[this.$route.query.id].consistencyCheck, false),
        createIndexBtn: this.vaildData(this.permission[this.$route.query.id].createIndex, false),
        createViewBtn: this.vaildData(this.permission[this.$route.query.id].createView, false),
        deleteDataBtn: this.vaildData(this.permission[this.$route.query.id].deleteData, false),
        deleteEveryTypeBtn: this.vaildData(this.permission[this.$route.query.id].deleteEveryType, false),
        viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].viewTheScope, false),
        consistencyCheckBtn: this.vaildData(this.permission[this.$route.query.id].USE, false),
        createViewBtn: this.vaildData(this.permission[this.$route.query.id].ADD2, false),
        createIndexBtn: this.vaildData(this.permission[this.$route.query.id].ADD3, false),
        deleteDataBtn: this.vaildData(this.permission[this.$route.query.id].DELETE2, false),
        deleteEveryTypeBtn: this.vaildData(this.permission[this.$route.query.id].DELETE3, false),
        viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].SEARCH, false),
      };
    },
  },
@@ -867,6 +888,7 @@
        const data = res.data.data.map(item => {
          this.processChildren(item); // 处理每个节点
          item.attributes.TreeName = item.attributes.id;
          item.attributes.icon = item.attributes.imageName;
          return item.attributes; // 返回处理后的 attributes
        });
        this.treeData[0].children = data;
@@ -880,6 +902,7 @@
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.TreeName = child.attributes.id;
          child.attributes.icon = child.attributes.imageName;
          this.processChildren(child); // 递归处理每个子节点
          return child.attributes; // 只返回子节点的 attributes
        });
@@ -1060,7 +1083,7 @@
          this.attrLastIndex = newIndex;
        },
        () => {
          this.selectList = [];
          this.dialogAttrSelectList = [row];
        }
      );
    },