管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-16 3c0bcd367dbc9aff25202d1a8ec2eb143f3e8261
src/views/datamanage/versionManage.vue
@@ -1,19 +1,21 @@
<template>
  <div class="verSionBox">
    <My-bread
      :list="[
    <My-bread :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.versionManage')}`,
      ]"
    ></My-bread>
      ]"></My-bread>
    <el-divider />
    <div class="verSionContent">
      <!-- <div class="verSion_leftTree">
        <ver-dir-tree></ver-dir-tree>
      </div> -->
      <div class="verSion_rightContent">
        <el-form ref="ruleForm" :model="ruleForm" :inline="true">
           <el-form-item>
        <el-form
          ref="ruleForm"
          :model="ruleForm"
          :inline="true"
        >
          <el-form-item>
            <el-cascader
              v-model="ruleForm.dirid"
              :show-all-levels="false"
@@ -28,7 +30,7 @@
            }"
            ></el-cascader>
          </el-form-item>
          <el-form-item  >
          <el-form-item>
            <el-input
              v-model="ruleForm.name"
              :placeholder="$t('common.pleaseInput')"
@@ -40,35 +42,40 @@
              icon="el-icon-search"
              size="small"
              class="primary"
              >{{ $t('common.iquery') }}</el-button
            >
            >{{ $t('common.iquery') }}</el-button>
            <el-button
              type="success"
              v-if="btnStatus.insert"
              @click="(InsertFormdialog = true), getSelectdirTab()"
              icon="el-icon-plus"
              size="small"
              >{{ $t('common.append') }}</el-button
            >
            >{{ $t('common.append') }}</el-button>
            <el-button
              type="info"
              @click="resetForm('ruleForm')"
              icon="el-icon-delete"
              size="small"
              >{{ $t('common.empty') }}</el-button
            >
            >{{ $t('common.empty') }}</el-button>
          </el-form-item>
        </el-form>
        <el-divider class="eldivider" />
        <div style="height: 73%">
          <el-table :data="tableData" style="width: 100%" height="99%">
          <el-table
            :data="tableData"
            style="width: 100%"
            height="99%"
          >
            <el-table-column
              align="center"
              type="index"
              :label="$t('dataManage.vmobj.index')"
              width="70px"
            />
            <el-table-column align="center" prop="id" v-if="false" />
            <el-table-column
              align="center"
              prop="id"
              v-if="false"
            />
            <el-table-column
              align="center"
              prop="name"
@@ -106,7 +113,10 @@
              :label="$t('dataManage.vmobj.updateontime')"
              :formatter="formatTime"
            />
            <el-table-column min-width="150" :label="$t('common.operate')">
            <el-table-column
              min-width="150"
              :label="$t('common.operate')"
            >
              <template slot-scope="scope">
                <el-button
                  v-if="btnStatus.update"
@@ -116,15 +126,13 @@
                  "
                  type="warning"
                  size="small"
                  >{{ $t('common.update') }}</el-button
                >
                >{{ $t('common.update') }}</el-button>
                <el-button
                  v-if="btnStatus.delete"
                  @click="handleDelete(scope.$index, scope.row)"
                  type="danger"
                  size="small"
                  >{{ $t('common.delete') }}</el-button
                >
                >{{ $t('common.delete') }}</el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -155,7 +163,10 @@
          :label="$t('dataManage.vmobj.name')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="upform.name" autocomplete="off"></el-input>
          <el-input
            v-model="upform.name"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.vmobj.catalogue')"
@@ -173,14 +184,28 @@
          :label="$t('dataManage.vmobj.describe')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="upform.descr" autocomplete="off"></el-input>
          <el-input
            v-model="upform.descr"
            autocomplete="off"
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" type="info" class="dialog-footer">
        <el-button @click="editFromDataClose">{{
      <div
        slot="footer"
        type="info"
        class="dialog-footer"
      >
        <el-button
          size="small"
          @click="editFromDataClose"
        >{{
          $t('common.close')
        }}</el-button>
        <el-button @click="editFromData" class="primary">{{
        <el-button
          size="small"
          @click="editFromData"
          class="primary"
        >{{
          $t('common.confirm')
        }}</el-button>
      </div>
@@ -226,11 +251,22 @@
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="insertFromDataClose" type="info">{{
      <div
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          @click="insertFromDataClose"
          type="info"
          size="small"
        >{{
          $t('common.close')
        }}</el-button>
        <el-button @click="insertFromData" class="primary">{{
        <el-button
          @click="insertFromData"
          class="primary"
          size="small"
        >{{
          $t('common.confirm')
        }}</el-button>
      </div>
@@ -349,7 +385,7 @@
      ruleForm: {},
      insertform: {},
      tableData: [],
      companyOption:[],
      companyOption: [],
      count: 0,
      rowFlag: null,
      listData: {
@@ -394,7 +430,7 @@
    upCatalogChange(val) {
      this.upform.dirid == val;
    },
     //目录列表获取
    //目录列表获取
    async getQueryDirTree() {
      const res = await selectdirTab();
      if (res.code != 200) {
@@ -402,13 +438,13 @@
        return;
      }
      this.companyOption = this.treeData(res.result);
      this.ruleForm.dirid= this.companyOption[0].id
      this.ruleForm.dirid = this.companyOption[0].id
    },
    handleChange(val){
  this.ruleForm.dirid=val;
  this.onSubmit();
    handleChange(val) {
      this.ruleForm.dirid = val;
      this.onSubmit();
    },
    //目录列表获取
    async getSelectdirTab() {
@@ -454,7 +490,7 @@
    },
    resetForm() {
      this.ruleForm = {};
         this.ruleForm.dirid= this.companyOption[0].id
      this.ruleForm.dirid = this.companyOption[0].id
      this.$store.state.verCateNode = {};
      this.$bus.$emit('clearTressLabel', true);
      this.getRoleTabelData();
@@ -589,7 +625,7 @@
  watch: {
    pathId: {
      immediate: true,
      handler(val) {},
      handler(val) { },
    },
  },
};