管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-02-20 fda6fcfc6598c4349d486ca71d57c74e33043d76
src/views/datamanage/metadataManage.vue
@@ -1,36 +1,36 @@
<template>
  <div class="authorityManagement_box">
    <My-bread :list="[
    <My-bread
      :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.metadataManage')}`,
      ]"></My-bread>
      ]"
    ></My-bread>
    <el-divider />
    <div class="inquire subpage_Div">
      <el-form
        ref="queryForm"
        :model="queryForm"
        :inline="true"
      >
        <el-form-item>
          <el-select
            :popper-append-to-body="false"
            v-model="queryForm.depName"
          >
            <el-option
              :value="queryForm.depid"
              :label="queryForm.depName"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="companyOption1"
                node-key="id"
                :props="cascader"
                @node-click="handleChange1"
              />
            </el-option>
          </el-select>
          <!-- <el-cascader
    <div class="inquire subpage_Div" ref="container">
      <el-form ref="queryForm" :model="queryForm" :inline="true">
        <div class="flex_box">
          <div style="margin-right: auto">
            <el-form-item>
              <el-select
                :popper-append-to-body="false"
                v-model="queryForm.depName"
              >
                <el-option
                  :value="queryForm.depid"
                  :label="queryForm.depName"
                  style="height: auto"
                >
                  <el-tree
                    ref="tree"
                    :data="companyOption1"
                    node-key="id"
                    :props="cascader"
                    @node-click="handleChange1"
                  />
                </el-option>
              </el-select>
              <!-- <el-cascader
            v-model="queryForm.depid"
            :show-all-levels="false"
            :options="companyOption1"
@@ -43,27 +43,27 @@
              emitPath: false,
            }"
          ></el-cascader> -->
        </el-form-item>
        <el-form-item>
          <el-select
            :popper-append-to-body="false"
            v-model="queryForm.dirName"
          >
            <el-option
              :value="queryForm.dirid"
              :label="queryForm.dirName"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="companyOption"
                node-key="id"
                :props="cascader"
                @node-click="handleChange"
              />
            </el-option>
          </el-select>
          <!-- <el-cascader
            </el-form-item>
            <el-form-item>
              <el-select
                :popper-append-to-body="false"
                v-model="queryForm.dirName"
              >
                <el-option
                  :value="queryForm.dirid"
                  :label="queryForm.dirName"
                  style="height: auto"
                >
                  <el-tree
                    ref="tree"
                    :data="companyOption"
                    node-key="id"
                    :props="cascader"
                    @node-click="handleChange"
                  />
                </el-option>
              </el-select>
              <!-- <el-cascader
            v-model="queryForm.dirid"
            :show-all-levels="false"
            :options="companyOption"
@@ -76,30 +76,71 @@
              emitPath: false,
            }"
          ></el-cascader> -->
        </el-form-item>
        <el-form-item>
          <el-select
            :popper-append-to-body="false"
            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
            v-model="queryForm.name"
            :placeholder="$t('common.pleaseInput')"
            style="width:200px"
          />
        </el-form-item>
            </el-form-item>
            <el-form-item>
              <el-select
                :popper-append-to-body="false"
                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
                v-model="queryForm.name"
                :placeholder="$t('common.pleaseInput')"
                style="width: 200px"
              />
            </el-form-item>
          </div>
          <div>
            <el-form-item>
              <el-button
                @click="resetInfo('queryForm')"
                icon="el-icon-refresh"
                type="info"
                size="small"
                >{{ $t("common.reset") }}</el-button
              >
            </el-form-item>
            <el-form-item>
              <el-button
                @click="queryInfo()"
                icon="el-icon-search"
                class="primary"
                size="small"
                >{{ $t("common.iquery") }}</el-button
              >
            </el-form-item>
            <el-form-item v-if="btnStatus.delete">
              <el-button
                type="danger"
                size="small"
                @click="deleteMetaInfo"
                icon="el-icon-delete"
                >{{ $t("common.delete") }}</el-button
              >
            </el-form-item>
            <el-form-item v-if="btnStatus.download">
              <el-button
                @click="downFormData"
                icon="el-icon-download"
                type="success"
                size="small"
                >{{ $t("common.download") }}</el-button
              >
            </el-form-item>
          </div>
        </div>
        <!-- <el-form-item style="float:right">
          <el-button
            @click="queryInfo()"
@@ -142,133 +183,79 @@
            size="small"
          >{{ $t('common.download') }}</el-button>
        </el-form-item> -->
        <el-form-item style="float:right">
          <el-button
            @click="resetInfo('queryForm')"
            icon="el-icon-refresh"
            type="info"
            size="small"
          >{{ $t('common.reset') }}</el-button>
        </el-form-item>
        <el-form-item style="float:right">
          <el-button
            @click="queryInfo()"
            icon="el-icon-search"
            class="primary"
            size="small"
          >{{ $t('common.iquery') }}</el-button>
        </el-form-item>
        <el-form-item v-if="btnStatus.delete" style="float:right">
          <el-button
            type="danger"
            size="small"
            @click="deleteMetaInfo"
            icon="el-icon-delete"
          >{{ $t('common.delete') }}</el-button>
        </el-form-item>
        <el-form-item v-if="btnStatus.download" style="float:right">
          <el-button
            @click="downFormData"
            icon="el-icon-download"
            type="success"
            size="small"
          >{{ $t('common.download') }}</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="bottom">
      <div class="rightTable subpage_Div">
        <div class="table_box">
          <el-table
            :data="tableData"
            style="width: 100%"
            @selection-change="handleSelectionChange"
            height="95%"
      <div class="table_box subpage_Div" :style="styleVar">
        <el-table
          :data="tableData"
          style="width: 100%"
          @selection-change="handleSelectionChange"
          height="calc(100% - 57px)"
        >
          <el-table-column type="selection" width="55" />
          <el-table-column
            :label="$t('dataManage.dictionaryManageObj.number')"
            type="index"
            width="50"
          >
            <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')"
            />
            <el-table-column
              prop="type"
              :label="$t('dataManage.vmobj.format')"
            />
            <el-table-column
              prop="sizes"
              :label="$t('dataManage.vmobj.size')"
              :formatter="stateFormatSizes"
            />
            <el-table-column
              prop="depName"
              :label="$t('dataManage.vmobj.depName')"
            />
            <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)">{{
          scope.row.tab
        }}</a>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column prop="name" :label="$t('dataManage.vmobj.name')" />
          <el-table-column prop="type" :label="$t('dataManage.vmobj.format')" />
          <el-table-column
            prop="sizes"
            :label="$t('dataManage.vmobj.size')"
            :formatter="stateFormatSizes"
          />
          <el-table-column
            prop="depName"
            :label="$t('dataManage.vmobj.depName')"
          />
          <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)">{{ scope.row.tab }}</a>
            </template>
          </el-table-column>
            <!-- <el-table-column
          <!-- <el-table-column
              prop="tab"
              :label="$t('dataManage.vmobj.tab')"
              :formatter="formatData"
            /> -->
            <el-table-column
              prop="rows"
              :label="$t('dataManage.vmobj.row')"
            />
            <el-table-column
              prop="uname"
              :label="$t('dataManage.vmobj.createonuser')"
            />
            <el-table-column
              prop="createTime"
              :label="$t('dataManage.vmobj.createontime')"
              :formatter="formatData"
            />
            <el-table-column
              min-width="100"
              :label="$t('common.operate')"
            >
              <template slot-scope="scope">
                <el-link @click="showDetail(scope.row)">{{
                  $t('common.details')
                }}</el-link>
                <el-link
                  v-if="btnStatus.update"
                  @click="editInfo(scope.row)"
                  style="margin-left: 10px; "
                >{{ $t('common.edit') }}</el-link>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div
          style="margin-top: 0px"
          class="pagination_box"
        >
          <el-table-column prop="rows" :label="$t('dataManage.vmobj.row')" />
          <el-table-column
            prop="uname"
            :label="$t('dataManage.vmobj.createonuser')"
          />
          <el-table-column
            prop="createTime"
            :label="$t('dataManage.vmobj.createontime')"
            :formatter="formatData"
          />
          <el-table-column min-width="100" :label="$t('common.operate')">
            <template slot-scope="scope">
              <el-link @click="showDetail(scope.row)">{{
                $t("common.details")
              }}</el-link>
              <el-link
                v-if="btnStatus.update"
                @click="editInfo(scope.row)"
                style="margin-left: 10px"
                >{{ $t("common.edit") }}</el-link
              >
            </template>
          </el-table-column>
        </el-table>
        <div class="pagination_box">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
@@ -281,72 +268,52 @@
          </el-pagination>
        </div>
      </div>
    </div>
    <div
      class="infoBox"
      v-show="showinfoBox"
    >
    <div class="infoBox" v-show="showinfoBox">
      <el-card class="box-card">
        <div
          slot="header"
          class="clearfix"
        >
          <span>{{ $t('common.details') }}</span>
          <div
            style="float: right; cursor: pointer"
            @click="closeDetial"
          >
        <div slot="header" class="clearfix">
          <span>{{ $t("common.details") }}</span>
          <div style="float: right; cursor: pointer" @click="closeDetial">
            <i class="el-icon-close"></i>
          </div>
        </div>
        <div
          class="contentBox"
          style="padding:1%"
        >
          <p>{{ $t('dataManage.vmobj.name') }}:{{ itemdetail.name }}</p>
        <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>
          <p>{{ $t("dataManage.vmobj.format") }}:{{ itemdetail.type }}</p>
          <el-divider></el-divider>
          <p>{{ $t('common.size') }}:{{ setInfoBoxSize(itemdetail.sizes) }}</p>
          <p>{{ $t("common.size") }}:{{ setInfoBoxSize(itemdetail.sizes) }}</p>
          <el-divider></el-divider>
          <p>{{ $t('dataManage.vmobj.depName') }}:{{ itemdetail.depName }}</p>
          <p>{{ $t("dataManage.vmobj.depName") }}:{{ itemdetail.depName }}</p>
          <el-divider></el-divider>
          <p>{{ $t("dataManage.vmobj.dirName") }}:{{ itemdetail.dirName }}</p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.dirName') }}:{{
              itemdetail.dirName
            }}
            {{ $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>
            {{ $t("dataManage.vmobj.createonuser") }}:{{ itemdetail.uname }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $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>
            {{ $t('dataManage.vmobj.createonuser') }}:{{ itemdetail.uname }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.createontime') }}:{{
            {{ $t("dataManage.vmobj.createontime") }}:{{
              setInfoBoxTime(itemdetail.createTime)
            }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.updateonuser') }}:{{
            {{ $t("dataManage.vmobj.updateonuser") }}:{{
              itemdetail.updateUser
            }}
          </p>
          <el-divider></el-divider>
          <p>
            {{ $t('dataManage.vmobj.updateontime') }}:{{
            {{ $t("dataManage.vmobj.updateontime") }}:{{
              setInfoBoxTime(itemdetail.updateTime)
            }}
          </p>
@@ -364,50 +331,38 @@
      :visible.sync="dialogFormVisible"
      :before-close="handleClose"
    >
      <el-form
        :model="editForm"
        ref="editForm"
      >
      <el-form :model="editForm" ref="editForm">
        <el-form-item
          :label="$t('dataManage.vmobj.name')"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="editForm.name"
            autocomplete="off"
          ></el-input>
          <el-input v-model="editForm.name" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.vmobj.format')"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="editForm.type"
            autocomplete="off"
          ></el-input>
          <el-input v-model="editForm.type" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.vmobj.size')"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="editForm.sizes"
            autocomplete="off"
          ></el-input>
          <el-input v-model="editForm.sizes" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.vmobj.depName')"
          :label-width="formLabelWidth"
        >
          <el-select
            style="width:100%"
            style="width: 100%"
            :popper-append-to-body="false"
            v-model="editForm.depName"
          >
            <el-option
              :value="editForm.depid"
              :label="editForm.depName"
              style=" height:auto"
              style="height: auto"
            >
              <el-tree
                ref="tree"
@@ -430,14 +385,14 @@
          :label-width="formLabelWidth"
        >
          <el-select
            style="width:100%"
            style="width: 100%"
            :popper-append-to-body="false"
            v-model="editForm.dirName"
          >
            <el-option
              :value="editForm.dirid"
              :label="editForm.dirName"
              style=" height:auto"
              style="height: auto"
            >
              <el-tree
                ref="tree"
@@ -459,10 +414,7 @@
          :label="$t('dataManage.vmobj.describe')"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="editForm.describe"
            autocomplete="off"
          ></el-input>
          <el-input v-model="editForm.describe" autocomplete="off"></el-input>
        </el-form-item>
        <!-- <el-form-item
          :label="$t('dataManage.vmobj.gather')"
@@ -471,41 +423,29 @@
          <el-input v-model="editForm.gather" autocomplete="off"></el-input>
        </el-form-item> -->
      </el-form>
      <div
        v-if="behavior == '修改信息'"
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          size="small"
          @click="cancelEdit()"
        >{{
          $t('common.reset')
      <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer">
        <el-button size="small" @click="cancelEdit()">{{
          $t("common.reset")
        }}</el-button>
        <el-button
          size="small"
          type="primary"
          @click="sendEdit('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
        >{{ $t('common.submit') }}</el-button>
          >{{ $t("common.submit") }}</el-button
        >
      </div>
      <div
        v-else
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          size="small"
          @click="cancelAdd('editForm')"
        >{{
          $t('common.reset')
      <div v-else slot="footer" class="dialog-footer">
        <el-button size="small" @click="cancelAdd('editForm')">{{
          $t("common.reset")
        }}</el-button>
        <el-button
          size="small"
          type="primary"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
        >{{ $t('common.submit') }}</el-button>
          >{{ $t("common.submit") }}</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
@@ -513,7 +453,7 @@
      :visible.sync="dialogVisible"
      width="70%"
    >
      <div style="height:600px">
      <div style="height: 600px">
        <el-table
          ref="filterTable"
          :data="dbTableData"
@@ -536,10 +476,7 @@
            align="center"
          ></el-table-column>
        </el-table>
        <div
          style="margin-top: 10px"
          class="pagination_box"
        >
        <div style="margin-top: 10px" class="pagination_box">
          <el-pagination
            @size-change="handleLoaderSizeChange"
            @current-change="handleLoaderCurrentChange"
@@ -552,13 +489,9 @@
          </el-pagination>
        </div>
      </div>
    </el-dialog>
    <div
      class="downloadBox box_div  subpage_Div"
      v-if="showCodeBox"
    >
      <h4 style="padding: 20px">{{$t('common.passworld')}}</h4>
    <div class="downloadBox box_div subpage_Div" v-if="showCodeBox">
      <h4 style="padding: 20px">{{ $t("common.passworld") }}</h4>
      <el-form
        :model="codeForm"
        :rules="rules"
@@ -566,20 +499,14 @@
        label-width="100px"
        class="codeForm"
      >
        <el-form-item
          :label="$t('common.passworld')"
          prop="password"
        >
        <el-form-item :label="$t('common.passworld')" prop="password">
          <el-input
            type="password"
            v-model="codeForm.password"
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('common.SPassword')"
          prop="repassword"
        >
        <el-form-item :label="$t('common.SPassword')" prop="repassword">
          <el-input
            type="password"
            v-model="codeForm.repassword"
@@ -591,12 +518,11 @@
            class="primary"
            size="small"
            @click="download('codeForm')"
          >{{$t('common.confirm')}}</el-button>
          <el-button
            type="info"
            size="small"
            @click="closeDown('codeForm')"
          >{{$t('common.cancel')}}</el-button>
            >{{ $t("common.confirm") }}</el-button
          >
          <el-button type="info" size="small" @click="closeDown('codeForm')">{{
            $t("common.cancel")
          }}</el-button>
        </el-form-item>
      </el-form>
    </div>
@@ -609,8 +535,8 @@
</template>
<script>
import $ from 'jquery'
import { getToken } from '@/utils/auth';
import $ from "jquery";
import { getToken } from "@/utils/auth";
import {
  select_meta_ByPageAndCount,
  // queryDataCount,
@@ -625,19 +551,19 @@
  meta_selectDownloadFile,
  meta_selectFields,
  meta_selectByPageForUpload,
  meta_selectVerByDirid
} from '../../api/api';
  meta_selectVerByDirid,
} from "../../api/api";
import MyBread from '../../components/MyBread.vue';
import MyBread from "../../components/MyBread.vue";
export default {
  name: 'metadataManage',
  name: "metadataManage",
  components: { MyBread },
  data() {
    var repasswordValidator = (rule, value, callback) => {
      if (value === '') {
        callback(new Error('请再次输入密码'));
      if (value === "") {
        callback(new Error("请再次输入密码"));
      } else if (value !== this.codeForm.password) {
        callback(new Error('两次输入密码不一致!'));
        callback(new Error("两次输入密码不一致!"));
      } else {
        callback();
      }
@@ -646,9 +572,7 @@
      var passwordreg =
        /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/;
      if (!passwordreg.test(value)) {
        callback(
          new Error('密码必须由数字、字母、特殊字符组合,请输入13-20位')
        );
        callback(new Error("密码必须由数字、字母、特殊字符组合,请输入13-20位"));
      } else {
        callback();
      }
@@ -656,40 +580,43 @@
    return {
      verOptions: [],
      defaultProps: {
        children: 'children',
        label: 'name',
        children: "children",
        label: "name",
      },
      dirComPanyOption: [],
      companyOption: [],
      companyOption1: [],
      activeName: '',
      activeName: "",
      optionCount: [],
      showCodeBox: false,
      value: true,
      multipleSelection: [],
      formLabelWidth: '120px',
      formLabelWidth: "120px",
      dialogFormVisible: false,
      editForm: {},
      showinfoBox: false,
      fullscreenLoading: false,
      itemdetail: {},
      queryForm: {
        name: '',
        dirid: '',
        depid: '',
        verid: ''
        name: "",
        dirid: "",
        depid: "",
        verid: "",
      },
      behavior: '',
      initialForm: '',
      behavior: "",
      initialForm: "",
      codeForm: {
        password: '',
        repassword: '',
        password: "",
        repassword: "",
      },
      rules: {
        password: [{ required: true, message: '请输入密码', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }],
        password: [
          { required: true, message: "请输入密码", trigger: "blur" },
          { validator: passwordValidator, trigger: "blur" },
        ],
        repassword: [
          { required: true, message: '请输入确认密码', trigger: 'blur' },
          { validator: repasswordValidator, trigger: 'blur' },
          { required: true, message: "请输入确认密码", trigger: "blur" },
          { validator: repasswordValidator, trigger: "blur" },
        ],
      },
      tableData: [],
@@ -711,12 +638,12 @@
        pageIndex: 1,
        name: null,
        dirid: null,
        depid: null
        depid: null,
      },
      cascader: {
        label: 'name',
        value: 'id',
        children: 'children',
        label: "name",
        value: "id",
        children: "children",
        checkStrictly: true,
        emitPath: false,
      },
@@ -728,33 +655,55 @@
      },
      count1: 0,
      attributeData: [],
      tableHeight: 0,
      timer: 0,
      styleVar: {
        height: "calc(100% - 109px)",
      },
    };
  },
  created() {
    // this.getSelectDictTab();
    this.showPermsBtn();
    this.getQueryDepTree();
    this.signGetPublicKey();
  },
  beforeDestroy() {
    this.timer && clearTimeout(this.timer);
    window.removeEventListener("resize", this.onResize);
  },
  mounted() {
    window.addEventListener("resize", this.onResize);
    this.calHeight();
  },
  methods: {
    onResize() {
      this.timer && clearTimeout(this.timer);
      this.timer = setTimeout(() => {
        this.calHeight();
      }, 500);
    },
    calHeight() {
      this.$nextTick(() => {
        const rect = this.$refs.container.getBoundingClientRect();
        this.tableHeight = `${rect.height + 97}px`;
        this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`;
      });
    },
    async detail(res) {
      var val = res.tab.split(".");
      const data = await meta_selectFields({
        ns: val[0],
        tab: val[1]
      })
        tab: val[1],
      });
      if (data.code != 200) {
        this.$message.error('字段列表调用失败');
        return
        this.$message.error("字段列表调用失败");
        return;
      }
      this.dialogVisible = true;
      this.attributeData = data.result;
@@ -762,15 +711,15 @@
        id: res.id,
        pageIndex: 1,
        pageSize: 10,
      }
      };
      this.getDataLoaderSelectDbData();
    },
    async getDataLoaderSelectDbData() {
      const data1 = await meta_selectByPageForUpload(this.listLoader);
      if (data1.code != 200) {
        this.$message.error('字段列表调用失败');
        return
        this.$message.error("字段列表调用失败");
        return;
      }
      var option = data1.result;
@@ -781,12 +730,11 @@
        option[i].updateuser = option[i].updateName;
        option[i].verid = option[i].verName;
        if (option[i].createtime != null) {
          option[i].createtime = this.setInfoBoxTime(option[i].createtime)
          option[i].createtime = this.setInfoBoxTime(option[i].createtime);
        }
        if (option[i].updatetime != null) {
          option[i].updatetime = this.setInfoBoxTime(option[i].updatetime)
          option[i].updatetime = this.setInfoBoxTime(option[i].updatetime);
        }
      }
      this.dbTableData = data1.result;
      this.count1 = data1.count;
@@ -812,32 +760,31 @@
    async getQueryDepTree() {
      const res = await selectdepTab();
      if (res.code != 200) {
        this.$message.error('单位列表获取失败');
        this.$message.error("单位列表获取失败");
        return;
      }
      this.companyOption1 = this.treeData(res.result);
      this.queryForm.depid = this.companyOption1[0].id
      this.queryForm.depName = this.companyOption1[0].name
      this.queryForm.depid = this.companyOption1[0].id;
      this.queryForm.depName = this.companyOption1[0].name;
      this.getQueryDirTree();
    },
    async getQueryDirTree() {
      const res = await selectdirTab();
      if (res.code != 200) {
        this.$message.error('单位列表获取失败');
        this.$message.error("单位列表获取失败");
        return;
      }
      this.companyOption = this.treeData(res.result);
      this.queryForm.dirid = this.companyOption[0].id
      this.queryForm.dirName = this.companyOption[0].name
      this.queryForm.dirid = this.companyOption[0].id;
      this.queryForm.dirName = this.companyOption[0].name;
      this.getQueryVerList();
    },
    async getQueryVerList() {
      const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid })
      const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid });
      if (data.code != 200) {
        this.$message.error('版本列表获取失败');
        this.$message.error("版本列表获取失败");
        return;
      }
      this.verOptions = data.result;
@@ -854,27 +801,23 @@
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.queryForm.dirid = data.id;
      this.queryForm.dirName = data.name
      this.getQueryVerList()
      this.queryForm.dirName = data.name;
      this.getQueryVerList();
    },
    handleChange1(data, node, nodeData) {
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.queryForm.depid = data.id;
      this.queryForm.depName = data.name
      this.queryForm.depName = data.name;
      this.getMetaData();
    },
    handleChange2(data, node, nodeData) {
      this.editForm.depid = data.id;
      this.editForm.depName = data.name
      this.editForm.depName = data.name;
    },
    handleChange3(data, node, nodeData) {
      this.editForm.dirid = data.id;
      this.editForm.dirName = data.name
      this.editForm.dirName = data.name;
    },
    //格式化列表
    formatData(row, column) {
@@ -892,9 +835,9 @@
    },
    setInfoBoxSize(res) {
      if (res >= 1024) {
        return parseFloat(res / 1024).toFixed(3) + ' GB';
        return parseFloat(res / 1024).toFixed(3) + " GB";
      } else {
        return res + ' MB';
        return res + " MB";
      }
    },
    //格式化时间
@@ -909,41 +852,40 @@
      var s = time.getSeconds();
      return (
        y +
        '-' +
        "-" +
        this.add0(m) +
        '-' +
        "-" +
        this.add0(d) +
        ' ' +
        " " +
        h +
        ':' +
        ":" +
        mm +
        ':' +
        ":" +
        s
      );
    },
    //格式化时间
    add0(m) {
      return m < 10 ? '0' + m : m;
      return m < 10 ? "0" + m : m;
    },
    //单位转换
    stateFormatSizes(row, column) {
      if (row.sizes >= 1024) {
        const val = parseFloat(row.sizes / 1024).toFixed(3);
        return val + ' GB';
        return val + " GB";
      } else {
        return row.sizes + ' MB';
        return row.sizes + " MB";
      }
    },
    //目录树获取
    async getSelectDictTab() {
      const res = await selectdirTab();
      if (res.code != 200) {
        this.$message.error('列表调用失败');
        this.$message.error("列表调用失败");
      }
      this.optionCount = this.treeData(res.result);
      this.dirComPanyOption = this.treeData(res.result);
      this.listData.dirid = this.optionCount[0].id;
    },
    handleNodeClick(data) {
      this.listData.pageSize = 10;
@@ -1003,7 +945,6 @@
      // this.listData.dirid = 57
      select_meta_ByPageAndCount(this.listData).then((res) => {
        this.tableData = res.result;
        this.count = res.count;
      });
@@ -1030,7 +971,7 @@
    },
    //新增按钮
    showAddDialog() {
      this.behavior = '新增用户';
      this.behavior = "新增用户";
      this.editForm = {};
      this.dialogFormVisible = true;
    },
@@ -1052,8 +993,8 @@
                  this.listData.pageIndex = 1;
                  this.getMetaData();
                  this.$message({
                    message: '添加成功',
                    type: 'success',
                    message: "添加成功",
                    type: "success",
                  });
                  this.editForm = {};
                  this.dialogFormVisible = false;
@@ -1061,11 +1002,11 @@
              }, 500);
            })
            .catch((res) => {
              alert('修改失败,请重试!');
              alert("修改失败,请重试!");
              this.fullscreenLoading = false;
            });
        } else {
          console.log('error submit!!');
          console.log("error submit!!");
          return false;
        }
      });
@@ -1076,10 +1017,10 @@
    },
    // 删除多条
    deleteMetaInfo() {
      this.$confirm('确定是否删除所选内容?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      this.$confirm("确定是否删除所选内容?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          var std = [];
@@ -1089,21 +1030,21 @@
          deleteMeta({ ids: std.toString() }).then((res) => {
            if (res.code == 200) {
              this.$message({
                type: 'success',
                message: '删除成功!',
                type: "success",
                message: "删除成功!",
              });
              this.multipleSelection = [];
              this.listData.pageSize = 10;
              this.listData.pageIndex = 1;
              this.getMetaData();
            } else {
              this.$message.error('删除失败');
              this.$message.error("删除失败");
              this.multipleSelection = [];
            }
          });
        })
        .catch(() => {
          this.$message('已取消删除');
          this.$message("已取消删除");
        });
    },
@@ -1126,26 +1067,26 @@
      delete row.updateUser;
      delete row.updateUser;
      this.initialForm = JSON.stringify(row); //备份
      this.behavior = '修改信息';
      this.behavior = "修改信息";
      this.editForm = JSON.parse(JSON.stringify(row));
      this.dialogFormVisible = true;
      this.getSelectDictTab();
    },
    handleClose(done) {
      this.$confirm('确认关闭?')
      this.$confirm("确认关闭?")
        .then((_) => {
          this.editForm = {};
          done();
        })
        .catch((_) => { });
        .catch((_) => {});
    },
    // 提交修改
    sendEdit() {
      this.$confirm('是否确定编辑?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      this.$confirm("是否确定编辑?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.dialogFormVisible = false;
@@ -1157,8 +1098,8 @@
                this.listData.pageIndex = 1;
                this.getMetaData();
                this.$message({
                  message: '修改成功',
                  type: 'success',
                  message: "修改成功",
                  type: "success",
                });
                this.editForm = {};
                this.dialogFormVisible = false;
@@ -1167,7 +1108,7 @@
          });
        })
        .catch(() => {
          alert('修改失败,请重试!');
          alert("修改失败,请重试!");
          this.fullscreenLoading = false;
        });
    },
@@ -1179,43 +1120,50 @@
    async download() {
      var std = [];
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id)
        std.push(this.multipleSelection[i].id);
      }
      var obj = {
        pwd: encrypt.encrypt(this.codeForm.repassword),
        ids: std
        ids: std,
      };
      const res = await meta_downloadReq(JSON.stringify(obj))
      const res = await meta_downloadReq(JSON.stringify(obj));
      if (res.code != 200) {
        this.$message.error('下载请求失败');
        return
        this.$message.error("下载请求失败");
        return;
      }
      var downObj = {
        guid: res.result,
        pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword))
      }
      const data = await meta_selectDownloadFile(downObj)
        pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)),
      };
      const data = await meta_selectDownloadFile(downObj);
      if (data.code != 200) {
        this.$message.error('下载请求失败');
        return
        this.$message.error("下载请求失败");
        return;
      }
      var token = getToken()
      var url = BASE_URL + "/meta/downloadFile?token=" + token + "&guid=" + res.result + "&pwd=" + encodeURIComponent(encrypt.encrypt(this.codeForm.repassword));
      var token = getToken();
      var url =
        BASE_URL +
        "/meta/downloadFile?token=" +
        token +
        "&guid=" +
        res.result +
        "&pwd=" +
        encodeURIComponent(encrypt.encrypt(this.codeForm.repassword));
      $("#downFrame").attr("src", url).click();
      this.closeDown();
    },
    closeDown() {
      this.showCodeBox = false;
      this.codeForm.password = '';
      this.codeForm.repassword = '';
      this.codeForm.password = "";
      this.codeForm.repassword = "";
    },
    downFormData() {
      if (this.multipleSelection.length == 0) {
        alert('请先选择要下载的文件');
        alert("请先选择要下载的文件");
        return;
      }
      this.showCodeBox = true;
@@ -1236,7 +1184,7 @@
      return cloneData.filter((father) => {
        // 循环所有项
        let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据
        branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值
        branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值
        return father.pid == 0; // 返回一级菜单
      });
    },
@@ -1251,35 +1199,14 @@
  padding: 1%;
  .inquire {
    position: relative;
    padding-bottom: 8px;
    padding: 8px;
    margin-top: 20px;
    border-radius: 5px;
    padding: 1%;
    margin-bottom: 20px;
    .el-form-item {
      margin: 5px;
    }
  }
  .bottom {
    width: 100%;
    margin-top: 1%;
    height: 74%;
    display: flex;
    justify-content: space-between;
    .rightTable {
      width: 98%;
      height: 92%;
      border-radius: 5px;
      padding: 1%;
      .table_box {
        width: 100%;
        height: 93%;
        margin: 0 auto;
        overflow: auto;
      }
    }
  }