管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-08 e4c5bd13edea4cf6a1b0f4e825902344b5cb599e
src/views/datamanage/metadataManage.vue
@@ -5,12 +5,27 @@
        `${$t('dataManage.metadataManage')}`,
      ]"></My-bread>
    <el-divider />
    <div class="inquire">
    <div class="inquire subpage_Div">
      <el-form
        ref="queryForm"
        :model="queryForm"
        :inline="true"
      >
        <el-form-item>
          <el-cascader
            v-model="queryForm.depid"
            :show-all-levels="false"
            :options="companyOption1"
            @change="handleChange1"
            :props="{
              label: 'name',
              value: 'id',
              children: 'children',
              checkStrictly: true,
              emitPath: false,
            }"
          ></el-cascader>
        </el-form-item>
        <el-form-item>
          <el-cascader
            v-model="queryForm.dirid"
@@ -27,19 +42,19 @@
          ></el-cascader>
        </el-form-item>
        <el-form-item>
          <el-cascader
            v-model="queryForm.dirid"
            :show-all-levels="false"
            :options="companyOption1"
            @change="handleChange1"
            :props="{
              label: 'name',
              value: 'id',
              children: 'children',
              checkStrictly: true,
              emitPath: false,
            }"
          ></el-cascader>
          <el-select
            v-model="queryForm.verid"
            placeholder="请选择"
            @change="verHandleChange($event)"
          >
            <el-option
              v-for="item in verOptions"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item prop="name">
          <el-input
@@ -92,36 +107,25 @@
      </el-form>
    </div>
    <div class="bottom">
      <!-- <div class="leftTree">
           <el-tree
          ref="tree"
          :props="defaultProps"
          node-key="id"
          :data="optionCount"
          :default-expanded-keys="[1]"
         :current-node-key="1"
          :expand-on-click-node="false"
          :default-expand-all="false"
          draggable
          @node-click="handleNodeClick"
        >
          </span>
        </el-tree>
      </div> -->
      <div class="rightTable">
      <div class="rightTable subpage_Div">
        <div class="table_box">
          <el-table
            :data="tableData"
            style="width: 100%"
            @selection-change="handleSelectionChange"
            height="99%"
            height="95%"
          >
            <el-table-column
              type="selection"
              width="55"
            />
            <el-table-column
              :label="$t('dataManage.dictionaryManageObj.number')"
              type="index"
              width="50"
            >
            </el-table-column>
            <el-table-column
              prop="name"
              :label="$t('dataManage.vmobj.name')"
@@ -142,8 +146,12 @@
            <el-table-column
              prop="dirName"
              :label="$t('dataManage.vmobj.dirName')"
              width="200"
            />
            <el-table-column
              prop="verName"
              :label="$t('dataManage.vmobj.versionNumber')"
            />
            <el-table-column :label="$t('dataManage.dataUpObj.tableName')">
              <template slot-scope="scope">
                <a @click="detail(scope.row)">{{
@@ -152,14 +160,14 @@
              </template>
            </el-table-column>
            <el-table-column
              prop="gather"
              :label="$t('dataManage.vmobj.gather')"
            <!-- <el-table-column
              prop="tab"
              :label="$t('dataManage.vmobj.tab')"
              :formatter="formatData"
            />
            /> -->
            <el-table-column
              prop="describe"
              :label="$t('dataManage.vmobj.describe')"
              prop="rows"
              :label="$t('dataManage.vmobj.row')"
            />
            <el-table-column
              prop="uname"
@@ -182,6 +190,7 @@
                  $t('common.details')
                }}</el-link>
                <el-link
                  v-if="btnStatus.update"
                  @click="editInfo(scope.row)"
                  style="margin-left: 10px; color: white"
                >{{ $t('common.edit') }}</el-link>
@@ -190,7 +199,7 @@
          </el-table>
        </div>
        <div
          style="margin-top: 10px"
          style="margin-top: 0px"
          class="pagination_box"
        >
          <el-pagination
@@ -223,7 +232,10 @@
            <i class="el-icon-close"></i>
          </div>
        </div>
        <div class="contentBox">
        <div
          class="contentBox"
          style="padding:1%"
        >
          <p>{{ $t('dataManage.vmobj.name') }}:{{ itemdetail.name }}</p>
          <el-divider></el-divider>
          <p>{{ $t('dataManage.vmobj.format') }}:{{ itemdetail.type }}</p>
@@ -233,13 +245,21 @@
          <p>{{ $t('dataManage.vmobj.depName') }}:{{ itemdetail.depName }}</p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.gather') }}:{{
              setInfoBoxTime(itemdetail.gather)
            {{ $t('dataManage.vmobj.dirName') }}:{{
              itemdetail.dirName
            }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.describe') }}:{{ itemdetail.describe }}
            {{ $t('dataManage.vmobj.versionNumber') }}:{{ itemdetail.verName }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.tab') }}:{{ itemdetail.tab }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.row') }}:{{ itemdetail.row }}
          </p>
          <el-divider></el-divider>
          <p>
@@ -354,13 +374,13 @@
        class="dialog-footer"
      >
        <el-button
          size="medium"
          size="small"
          @click="cancelEdit()"
        >{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          size="small"
          type="primary"
          @click="sendEdit('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
@@ -372,13 +392,13 @@
        class="dialog-footer"
      >
        <el-button
          size="medium"
          size="small"
          @click="cancelAdd('editForm')"
        >{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          size="small"
          type="primary"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
@@ -501,7 +521,8 @@
  sign_getPublicKey,
  meta_selectDownloadFile,
  meta_selectFields,
  meta_selectByPageForUpload
  meta_selectByPageForUpload,
  meta_selectVerByDirid
} from '../../api/api';
import MyBread from '../../components/MyBread.vue';
@@ -530,6 +551,7 @@
      }
    };
    return {
      verOptions: [],
      defaultProps: {
        children: 'children',
        label: 'name',
@@ -551,7 +573,8 @@
      queryForm: {
        name: '',
        dirid: '',
        depid: ''
        depid: '',
        verid: ''
      },
      behavior: '',
      initialForm: '',
@@ -606,11 +629,12 @@
  },
  created() {
    this.getSelectDictTab();
    // this.getSelectDictTab();
    this.showPermsBtn();
    this.getQueryDepTree();
    this.getQueryDirTree();
    this.signGetPublicKey();
  },
  methods: {
@@ -645,7 +669,7 @@
        this.$message.error('字段列表调用失败');
        return
      }
      debugger
      var option = data1.result;
      for (var i in option) {
        option[i].dirid = option[i].dirName;
@@ -689,8 +713,12 @@
        return;
      }
      this.companyOption1 = this.treeData(res.result);
      this.queryForm.dirid = this.companyOption1[0].id
      this.queryForm.depid = this.companyOption1[0].id
      this.getQueryDirTree();
    },
    async getQueryDirTree() {
      const res = await selectdirTab();
      if (res.code != 200) {
@@ -699,12 +727,30 @@
      }
      this.companyOption = this.treeData(res.result);
      this.queryForm.dirid = this.companyOption[0].id
      this.getQueryVerList();
    },
    async getQueryVerList() {
      const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid })
      if (data.code != 200) {
        this.$message.error('版本列表获取失败');
        return;
      }
      this.verOptions = data.result;
      this.queryForm.verid = data.result[0].id;
      this.getMetaData();
    },
    verHandleChange(val) {
      this.queryForm.verid = val;
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.getMetaData();
    },
    handleChange(value) {
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.queryForm.dirid = value;
      this.getMetaData();
      this.getQueryVerList()
    },
    handleChange1(value) {
      this.listData.pageSize = 10;
@@ -779,7 +825,7 @@
      this.optionCount = this.treeData(res.result);
      this.dirComPanyOption = this.treeData(res.result);
      this.listData.dirid = this.optionCount[0].id;
      this.getMetaData();
    },
    handleNodeClick(data) {
      this.listData.pageSize = 10;
@@ -833,7 +879,11 @@
    // 请求数据内容
    getMetaData() {
      this.listData.depid = this.queryForm.depid;
      this.listData.dirid = this.listData.dirid
      this.listData.dirid = this.queryForm.dirid;
      this.listData.verid = this.queryForm.verid;
      // this.listData.dirid = 57
      select_meta_ByPageAndCount(this.listData).then((res) => {
        this.tableData = res.result;
@@ -854,7 +904,8 @@
      this.listData.pageIndex = 1;
      this.listData.name = null;
      this.queryForm.dirid = this.companyOption[0].id;
      this.queryForm.depid = this.companyOption1[0].id
      this.queryForm.depid = this.companyOption1[0].id;
      this.getQueryVerList();
      this.getMetaData();
    },
    //新增按钮
@@ -1074,16 +1125,15 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.authorityManagement_box {
  height: 81%;
  width: 97%;
  position: absolute;
  box-sizing: border-box;
  height: 98%;
  width: 98%;
  padding: 1%;
  .inquire {
    position: relative;
    overflow: auto;
    padding-bottom: 8px;
    border: 1px solid white;
    border-radius: 5px;
    padding: 1%;
    .el-form-item {
@@ -1096,31 +1146,10 @@
    height: 74%;
    display: flex;
    justify-content: space-between;
    .leftTree {
      width: 15%;
      height: 100%;
      border: 1px solid white;
      border-radius: 5px;
      padding: 1%;
      max-height: 670px;
      overflow-y: auto;
      li {
        color: white;
        border-bottom: 1px solid white;
        line-height: 30px;
        text-align: center;
      }
      li:hover {
        background: rgba(255, 255, 255, 0.3);
      }
      .active {
        color: #409eff;
      }
    }
    .rightTable {
      width: 98%;
      height: 100%;
      border: 1px solid white;
      height: 92%;
      border-radius: 5px;
      padding: 1%;
@@ -1129,34 +1158,6 @@
        height: 93%;
        margin: 0 auto;
        overflow: auto;
      }
    }
  }
  .infoBox {
    width: 500px;
    position: absolute;
    z-index: 100;
    top: 10%;
    right: 25%;
    background: #303030;
    color: #fff;
    .el-card {
      background-color: transparent;
      color: #fff;
      span {
        color: #fff;
        font-size: 16px;
        font-weight: 600;
      }
    }
    .contentBox {
      margin: 0 aotu 10px;
      height: 500px;
      overflow: auto;
      p {
        // background-color: #bfa;
        // margin-bottom: 10px;
        font-size: 14px;
      }
    }
  }
@@ -1173,142 +1174,10 @@
    top: 20%;
    left: 40%;
    padding: 20px;
    background: #303030;
    width: 30%;
    border: 1px solid gray;
    border-radius: 10px;
    color: white;
  }
  /*修改table 表体的背景颜色和文字颜色*/
  /deep/ .el-table {
    background-color: transparent;
    th,
    td {
      background-color: transparent;
    }
    .el-table__expanded-cell {
      background-color: transparent !important;
    }
    // 表头背景色
    th.el-table__cell {
      background-color: #303030;
      color: #fff;
    }
    tr > td {
      background-color: #303030;
      color: #fff;
    }
    // hover效果
    tr:hover > td {
      background-color: rgba(255, 255, 255, 0.3) !important;
    }
    tbody tr:hover {
      background-color: rgba(255, 255, 255, 0.3) !important;
      // text-align: center;
    }
    // 滚动条宽高
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      /*滚动条宽度*/
      height: 5px;
      /*滚动条高度*/
    }
    /*定义滚动条轨道 内阴影+圆角*/
    .el-table__body-wrapper::-webkit-scrollbar-track {
      box-shadow: 0px 1px 3px #216fe6 inset;
      /*滚动条的背景区域的内阴影*/
      border-radius: 10px;
    }
    /*定义滑块 内阴影+圆角*/
    .el-table__body-wrapper::-webkit-scrollbar-thumb {
      box-shadow: 0px 1px 3px #216fe6 inset;
      border-radius: 6px;
      background-color: #216fe6;
    }
  }
  /deep/.el-form-item__label {
    color: white;
  }
  // 设置输入框的背景色、字体颜色、边框属性设置;
  /deep/.el-input__inner {
    background-color: transparent !important ;
    color: #fff;
    border: 1px solid;
  }
  /deep/ .el-dialog {
    background: #303030;
  }
  /deep/.el-range-editor.is-active,
  .el-range-editor.is-active:hover,
  .el-select .el-input.is-focus .el-input__inner {
    border: 1px solid;
  }
  /deep/.el-dialog__title {
    color: white;
  }
  /deep/ .el-select .el-input__inner {
    border-color: #fff !important;
  }
  .pagination_box {
    margin-top: 20px;
    /deep/.el-input__inner {
      background-color: transparent !important;
      border: 1px solid;
      color: white;
    }
    /deep/.el-pagination__total {
      color: white;
    }
    /deep/.el-pagination__jump {
      color: white;
    }
    /deep/.el-pager li.active {
      color: #409eff;
    }
    /deep/.el-pager li {
      color: white;
      background: transparent;
    }
    /deep/.el-pager li {
      color: white;
    }
    /deep/.btn-prev {
      background: transparent;
    }
    /deep/.btn-next {
      background: transparent;
    }
    /deep/.btn-next i {
      color: white;
    }
    /deep/.btn-prev i {
      color: white;
    }
  }
  .primary {
    background: #409eff;
    border: #409eff;
    color: white;
  }
}
 /deep/ .el-select .el-input__inner {
    border-color: #fff !important;
  }
  /deep/.el-input__inner {
  background-color: transparent !important ;
  color: #fff;
  border: 1px solid white !important;
}
</style>