田源
2023-12-14 6023b713ba3cf468b5fb43ec101ef3cfc383e9d9
Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -1,30 +1,37 @@
<template>
  <el-container>
<!--    <el-header class="businessHeader" style="height: 40px;padding:0 8px">-->
    <!--    <el-header class="businessHeader" style="height: 40px;padding:0 8px">-->
<!--    </el-header>-->
    <!--    </el-header>-->
    <el-container>
      <el-aside>
      <el-aside style="width: 20%">
        <basic-container class="businessTreeContainer">
          <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 v-if="permissionList.addBtn" plain size="mini" style="width: 60px" type="primary"
                         @click="businessAdd">
                新增
              </el-button>
              <el-button v-if="permissionList.editBtn"  size="mini" type="primary" @click="businessEdit" plain style="width: 60px">
              <el-button v-if="permissionList.editBtn" plain size="mini" style="width: 60px" type="primary"
                         @click="businessEdit">
                修改
              </el-button>
              <el-button v-if="permissionList.table"  size="mini" type="primary"
                         @click="selectFromTable" plain> 从已有中获取
              <el-button v-if="permissionList.table" plain size="mini"
                         type="primary" @click="selectFromTable"> 从已有中获取
              </el-button>
            </div>
            <avue-tree :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick">
            <span slot-scope="{ node, data }" class="el-tree-node__label">
              <span>
            <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 70.3vh"
                       @node-click="nodeClick">
              <template slot-scope="{ node, data }" class="el-tree-node__label">
                <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
                            open-delay="250"
                            placement="right-start">
                <span>
                <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i>
                {{ (node || {}).label }}
              </span>
            </span>
                </el-tooltip>
              </template>
            </avue-tree>
          </div>
@@ -87,17 +94,17 @@
                </template>
                {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : '' }}
              </el-descriptions-item>
<!--              <el-descriptions-item :contentStyle="descriptionOption.contentStyle"-->
<!--                                    :labelStyle="descriptionOption.labelStyle">-->
<!--                <template slot="label">-->
<!--                  <i :class="icons.view"></i>-->
<!--                  视图-->
<!--                </template>-->
<!--                <el-tag v-if="obj.viewText" size="small">-->
<!--                  {{ obj.viewText }}-->
<!--                </el-tag>-->
<!--                <span v-else></span>-->
<!--              </el-descriptions-item>-->
              <!--              <el-descriptions-item :contentStyle="descriptionOption.contentStyle"-->
              <!--                                    :labelStyle="descriptionOption.labelStyle">-->
              <!--                <template slot="label">-->
              <!--                  <i :class="icons.view"></i>-->
              <!--                  视图-->
              <!--                </template>-->
              <!--                <el-tag v-if="obj.viewText" size="small">-->
              <!--                  {{ obj.viewText }}-->
              <!--                </el-tag>-->
              <!--                <span v-else></span>-->
              <!--              </el-descriptions-item>-->
              <!-- <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-arrow-down"></i>
@@ -125,7 +132,8 @@
            </avue-crud>
          </basic-container>
        </el-main>
        <el-dialog :visible="ref.visible" append-to-body title="从数据库中添加" width="700px" @close="dialoghandelfalse" top="9vh">
        <el-dialog :visible="ref.visible" append-to-body title="从数据库中添加" top="9vh" width="700px"
                   @close="dialoghandelfalse">
          选择领域:
          <el-select v-model="domain" placeholder="请选择" size="small" @change="refOnLoad">
            <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value">
@@ -144,7 +152,7 @@
        </el-dialog>
      </el-container>
    </el-container>
    <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons"
    <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" :type="type"
                  @refreshTable="initTreeOnLoad">
    </business-add>
  </el-container>
@@ -163,6 +171,7 @@
  name: "Business",
  data() {
    return {
      type: "",
      //生命周期对话框状态
      packageLifeBox: false,
      //版本规则状态
@@ -171,7 +180,7 @@
      selectionList: [],
      treeData: [],
      treeOption: {
        defaultExpandAll: true,
        defaultExpandAll: false,
        title: '业务类型树',
        addBtn: false,
        menu: false,
@@ -186,8 +195,8 @@
        btmType: {},
      },
      loadOption: {
        height: 'auto',
        border: true,
        height: 478,
        editBtn: false,
        addBtn: false,
        menu: false,
@@ -362,6 +371,7 @@
    businessAdd() {
      this.$refs.btmAdd.showSubmitDialog = true;
      this.$refs.btmAdd.btmType = {};
      this.type = 'add';
      this.ifRefreshBtmAddRefresh();
    },
    businessEdit() {
@@ -372,6 +382,7 @@
      const json = JSON.stringify(this.obj);
      this.$refs.btmAdd.btmType = JSON.parse(json);
      this.$refs.btmAdd.showSubmitDialog = true;
      this.type = 'edit'
      this.ifRefreshBtmAddRefresh();
    },
    ifRefreshBtmAddRefresh() {
@@ -381,7 +392,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
@@ -393,22 +404,27 @@
.app {
  overflow: auto;
  height: calc(100vh - 150px);
  overflow-y: auto;
  height: 84.3vh;
}
.app::-webkit-scrollbar {
  height: 15px; // 纵向滚动条 必写
  background: white;
  border: white;
  width: 10px;
//
//.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;
//}
}
// 滚动条的滑块
.app::-webkit-scrollbar-thumb {
  background-color: #ececec;
  border-radius: 20px;
  border: #ececec;
}
</style>