管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-02-26 09a1635f5182a166771e0c827450cdfc00f052b8
src/views/datamanage/versionManage.vue
@@ -1,19 +1,14 @@
<template>
  <div class="verSionBox">
    <My-bread :list="[
    <My-bread
      :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.versionManage')}`,
      ]"></My-bread>
      ]"
    ></My-bread>
    <el-divider />
    <div
      class="inquire subpage_Div"
      ref="container"
    >
      <el-form
        ref="ruleForm"
        :model="ruleForm"
        :inline="true"
      >
    <div class="inquire subpage_Div" ref="container">
      <el-form ref="ruleForm" :model="ruleForm" :inline="true">
        <div class="flex_box">
          <div style="margin-right: auto">
            <el-form-item size="small">
@@ -22,6 +17,7 @@
                v-model="ruleForm.dirid"
                placeholder="请选择存储目录"
                style="width: 200px"
                ref="treeSelect"
              >
                <el-option
                  :value="ruleForm.dirid"
@@ -55,12 +51,13 @@
              <el-input
                v-model="ruleForm.name"
                :placeholder="$t('shuJuGuanLi.lable5')"
              ><i
                ><i
                  slot="suffix"
                  class="el-icon-search"
                  @click="onSubmit('ruleForm')"
                  style="padding-right: 8px"
                ></i></el-input>
                ></i
              ></el-input>
            </el-form-item>
          </div>
          <div>
@@ -71,7 +68,8 @@
                @click="(InsertFormdialog = true), getSelectdirTab()"
                icon="el-icon-plus"
                size="small"
              >{{ $t("common.append") }}</el-button>
                >{{ $t("common.append") }}</el-button
              >
              <!--              <el-button
                @click="onSubmit('ruleForm')"
                icon="el-icon-search"
@@ -84,7 +82,8 @@
                @click="resetForm('ruleForm')"
                icon="el-icon-delete"
                size="small"
              >{{ $t("common.empty") }}</el-button>
                >{{ $t("common.empty") }}</el-button
              >
            </el-form-item>
          </div>
        </div>
@@ -92,13 +91,11 @@
    </div>
    <div class="dividing-line"></div>
    <div
      class="table_box"
      :style="styleVar"
    >
    <div class="table_box" :style="styleVar">
      <el-table
        :data="tableData"
        style="width: 100%"
        border
        height="calc(100% - 57px)"
      >
        <el-table-column
@@ -107,11 +104,7 @@
          :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"
@@ -149,10 +142,7 @@
          :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"
@@ -163,26 +153,25 @@
              type="warning"
              size="small"
              plain
            >{{ $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"
              plain
            >{{ $t("common.delete") }}</el-button>
              >{{ $t("common.delete") }}</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <div
        class="pagination_box"
        style="margin-top: 15px"
      >
      <div class="pagination_box" style="margin-top: 15px">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="listData.pageIndex"
          :page-sizes="[10, 20, 50, 100]"
          :page-sizes="[10, 50, 100, 200]"
          :page-size="listData.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="count"
@@ -194,12 +183,10 @@
    <el-dialog
      :title="$t('dataManage.vmobj.editVersion')"
      :visible.sync="dialogFormVisible"
      :before-close="handleClose"
    >
      <div style="height: 500px; overflow: auto">
        <el-form
          :model="upform"
          label-position="top"
        >
        <el-form :model="upform" label-position="top">
          <el-form-item
            :label="$t('dataManage.vmobj.name')"
            :label-width="formLabelWidth"
@@ -207,7 +194,7 @@
            <el-input
              v-model="upform.name"
              autocomplete="off"
              style="width:85%"
              style="width: 85%"
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -218,7 +205,7 @@
              :popper-append-to-body="false"
              v-model="upform.dirid"
              :placeholder="$t('shuJuGuanLi.pselect.select')"
              style="width:85%"
              style="width: 85%"
            >
              <el-option
                :value="upform.dirid"
@@ -249,27 +236,16 @@
            <el-input
              v-model="upform.descr"
              autocomplete="off"
              style="width:85%"
              style="width: 85%"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div
        slot="footer"
        type="info"
        class="dialog-footer"
      >
        <el-button
          size="small"
          @click="editFromDataClose"
        >{{
      <div slot="footer" type="info" class="dialog-footer">
        <el-button size="small" @click="editFromDataClose">{{
          $t("common.close")
        }}</el-button>
        <el-button
          size="small"
          @click="editFromData"
          class="primary"
        >{{
        <el-button size="small" @click="editFromData" class="primary">{{
          $t("common.confirm")
        }}</el-button>
      </div>
@@ -278,20 +254,19 @@
    <el-dialog
      :title="$t('dataManage.vmobj.addVersion')"
      :visible.sync="InsertFormdialog"
      :before-close="handleCloseadd"
    >
      <div style="height: 500px; overflow: auto">
        <el-form
          :model="insertform"
          label-position="top"
        >
        <el-form :model="insertform" label-position="top">
          <el-form-item
            :label="$t('dataManage.vmobj.name')"
            :label-width="formLabelWidth"
          >
            <el-input
              style="width:85%"
              style="width: 85%"
              v-model="insertform.name"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName1')"
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -300,9 +275,9 @@
          >
            <el-select
              :popper-append-to-body="false"
              v-model="insertform.path"
              placeholder="请选择"
              style="width:85%"
              v-model="insertform.dirName"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedirectory')"
              style="width: 85%"
            >
              <el-option
                :value="insertform.path"
@@ -332,29 +307,19 @@
            :label-width="formLabelWidth"
          >
            <el-input
              style="width:85%"
              style="width: 85%"
              v-model="insertform.descr"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedescription')"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          @click="insertFromDataClose"
          type="info"
          size="small"
        >{{
      <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"
          size="small"
        >{{
        <el-button @click="insertFromData" class="primary" size="small">{{
          $t("common.confirm")
        }}</el-button>
      </div>
@@ -478,7 +443,9 @@
      itemdetail: {},
      upform: {},
      ruleForm: {},
      insertform: {},
      insertform: {
        name: "",
      },
      tableData: [],
      companyOption: [],
      count: 0,
@@ -550,7 +517,9 @@
      this.insertform.dirid = value;
    },
    catalogChangeAdd(data, node, nodeData) {
      this.$set(this.insertform, "path", data.id);
      this.insertform.path = data.id;
      this.insertform.dirid = data.id;
      // this.$set(this.insertform, "path", data.id);
      this.$set(this.insertform, "dirName", data.name);
    },
    upCatalogChange(val) {
@@ -592,9 +561,9 @@
        return;
      }
      this.insertform.name = this.getYMD();
      this.insertform.path = 1;
      this.insertform.dirid = 1;
      this.upform.dirid == 1;
      // this.insertform.path = 1;
      // this.insertform.dirid = 1;
      // this.upform.dirid == 1;
      this.catalogOption = this.treeData(res.result);
      this.editcatalogOption = this.treeData(res.result);
    },
@@ -677,8 +646,15 @@
      }
    },
    editFromDataClose() {
      this.dialogFormVisible = false;
      this.upform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.dialogFormVisible = false;
          this.upform = {};
          this.getRoleTabelData();
        })
        .catch((_) => {});
      // this.dialogFormVisible = false;
      // this.upform = {};
    },
    async editFromData() {
      if (this.upform.depName == null) {
@@ -705,8 +681,15 @@
      }
    },
    insertFromDataClose() {
      this.InsertFormdialog = false;
      this.insertform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false;
          this.insertform = {};
          this.getRoleTabelData();
        })
        .catch((_) => {});
      // this.InsertFormdialog = false;
      // this.insertform = {};
    },
    async insertFromData() {
      if (this.insertform.dirid == null) {
@@ -716,6 +699,7 @@
        });
        return;
      }
      const data = await insertVersion(this.insertform);
      if (data.code == 200) {
        this.InsertFormdialog = false;
@@ -753,6 +737,7 @@
              message: "删除成功!",
              type: "success",
            });
            this.listData.pageIndex = 1;
            this.getRoleTabelData();
          } else {
            this.$message({
@@ -772,11 +757,30 @@
      this.dialogFormVisible = true;
      this.upform = row;
    },
    handleClose() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.dialogFormVisible = false;
          this.getRoleTabelData();
        })
        .catch((_) => {});
    },
    handleCloseadd() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false;
          this.getRoleTabelData();
        })
        .catch((_) => {});
    },
  },
  watch: {
    pathId: {
      immediate: true,
      handler(val) { },
      handler(val) {},
    },
    "ruleForm.dirid"() {
      this.$refs.treeSelect.visible = false;
    },
  },
};