xiejun
2023-12-07 05d45bd440ffc92e14e6c8728ac8956a0488c0ab
Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -1,30 +1,33 @@
<template>
  <el-container>
    <el-header class="businessHeader" style="height: 40px;padding:0 8px">
      <div>
        <el-button v-if="permissionList.addBtn" icon="el-icon-plus" size="small" type="primary" @click="businessAdd">
          新增
        </el-button>
        <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="primary" @click="businessEdit">
          修改
        </el-button>
        <el-button v-if="permissionList.table" icon="el-icon-thumb" size="small" type="primary"
                   @click="selectFromTable"> 从已有中获取
        </el-button>
      </div>
    </el-header>
<!--    <el-header class="businessHeader" style="height: 40px;padding:0 8px">-->
<!--    </el-header>-->
    <el-container>
      <el-aside width="240px">
      <el-aside style="width: 20%">
        <basic-container class="businessTreeContainer">
          <p style="margin-top: 10px;font-weight: 570;font-size: 19px">{{ treeOption.title }}</p>
          <avue-tree id="basic" :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick">
            <span slot-scope="{ node, data }" class="el-tree-node__label">
          <div class="app">
            <div style="display: flex;margin-bottom: 10px;justify-content: space-around;">
              <el-button v-if="permissionList.addBtn"  size="mini" type="primary" @click="businessAdd" plain style="width: 60px">
                新增
              </el-button>
              <el-button v-if="permissionList.editBtn"  size="mini" type="primary" @click="businessEdit" plain style="width: 60px">
                修改
              </el-button>
              <el-button v-if="permissionList.table"  size="mini" type="primary"
                         @click="selectFromTable" plain> 从已有中获取
              </el-button>
            </div>
            <avue-tree :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick" style="width: fit-content;">
            <template slot-scope="{ node, data }" class="el-tree-node__label">
              <span>
                <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i>
                {{ (node || {}).label }}
              </span>
            </span>
          </avue-tree>
            </template>
            </avue-tree>
          </div>
        </basic-container>
      </el-aside>
      <el-container>
@@ -168,7 +171,7 @@
      selectionList: [],
      treeData: [],
      treeOption: {
        defaultExpandAll: true,
        defaultExpandAll: false,
        title: '业务类型树',
        addBtn: false,
        menu: false,
@@ -183,8 +186,8 @@
        btmType: {},
      },
      loadOption: {
        height:'auto',
        border: true,
        height: 478,
        editBtn: false,
        addBtn: false,
        menu: false,
@@ -378,11 +381,7 @@
}
</script>
<style lang="scss">
#basic {
  height: 770px;
  border-radius: 10px;
}
<style lang="scss" scoped>
.businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
@@ -392,6 +391,28 @@
  display: none !important;
}
.businessTreeContainer > .el-card > .el-card__body {
  height: 775px;
}</style>
.app {
  overflow: auto;
  height: 84.3vh;
}
.app::-webkit-scrollbar {
  height: 15px; // 纵向滚动条 必写
  background: white;
  border: white;
  width: 10px;
}
// 滚动条的滑块
.app::-webkit-scrollbar-thumb {
  width: 10px;
  height: 10px;
  background-color: #ececec;
  border-radius: 20px;
  border: #ececec;
}
</style>