管道基础大数据平台系统开发-【前端】-新系統界面
liupengpeng
2023-02-09 3c52cfb3c70bd2a3d06e97167a0a1a981d658227
版本管理
已修改1个文件
151 ■■■■ 文件已修改
src/views/datamanage/versionManage.vue 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/versionManage.vue
@@ -16,7 +16,27 @@
          :inline="true"
        >
          <el-form-item>
            <el-cascader
            <el-select
            :popper-append-to-body="false"
            v-model="ruleForm.dirid"
            placeholder="请选择"
            style="width:300px"
          >
            <el-option
              :value="ruleForm.dirid"
              :label="ruleForm.depName"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="companyOption"
                node-key="id"
                :props="props"
                @node-click="handleChange"
              />
            </el-option>
          </el-select>
            <!-- <el-cascader
              v-model="ruleForm.dirid"
              :show-all-levels="false"
              :options="companyOption"
@@ -28,7 +48,7 @@
              checkStrictly: true,
              emitPath: false,
            }"
            ></el-cascader>
            ></el-cascader> -->
          </el-form-item>
          <el-form-item>
            <el-input
@@ -137,14 +157,14 @@
            </el-table-column>
          </el-table>
          <div
            style="margin-top: 20px; margin-left: 200px"
            style="margin-top: 20px; "
            class="pagination_box"
          >
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="listData.pageIndex"
              :page-sizes="[10, 20, 30, 40]"
              :page-sizes="[10, 20, 50, 100]"
              :page-size="listData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="count"
@@ -157,6 +177,7 @@
    <el-dialog
      :title="$t('dataManage.vmobj.editVersion')"
      :visible.sync="dialogFormVisible"
      width="25%"
    >
      <el-form :model="upform">
        <el-form-item
@@ -166,19 +187,40 @@
          <el-input
            v-model="upform.name"
            autocomplete="off"
            style="width: 300px"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.vmobj.catalogue')"
          :label-width="formLabelWidth"
        >
          <el-cascader
        <el-select
            :popper-append-to-body="false"
            v-model="upform.dirid"
            placeholder="请选择"
            style="width:300px"
          >
            <el-option
              :value="upform.dirid"
              :label="upform.depName"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="editcatalogOption"
                node-key="id"
                :props="props"
                @node-click="handlupCatalogChange"
              />
            </el-option>
          </el-select>
          <!-- <el-cascader
            style="width: 300px"
            v-model="upform.dirid"
            :options="editcatalogOption"
            @change="upCatalogChange"
            :props="cascader"
          ></el-cascader>
          ></el-cascader> -->
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.vmobj.describe')"
@@ -187,6 +229,7 @@
          <el-input
            v-model="upform.descr"
            autocomplete="off"
            style="width: 300px"
          ></el-input>
        </el-form-item>
      </el-form>
@@ -214,7 +257,7 @@
    <el-dialog
      :title="$t('dataManage.vmobj.addVersion')"
      :visible.sync="InsertFormdialog"
      width="30%"
      width="25%"
    >
      <el-form :model="insertform">
        <el-form-item
@@ -231,13 +274,33 @@
          :label="$t('dataManage.vmobj.catalogue')"
          :label-width="formLabelWidth"
        >
          <el-cascader
        <el-select
            :popper-append-to-body="false"
            v-model="insertform.path"
            placeholder="请选择"
            style="width:300px"
          >
            <el-option
              :value="insertform.path"
              :label="insertform.dirName"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="editcatalogOption"
                node-key="id"
                :props="props"
                @node-click="catalogChangeAdd"
              />
            </el-option>
          </el-select>
          <!-- <el-cascader
            style="width: 300px"
            v-model="insertform.path"
            :options="catalogOption"
            @change="catalogChange"
            :props="cascader"
          ></el-cascader>
          ></el-cascader> -->
        </el-form-item>
        <el-form-item
@@ -373,6 +436,13 @@
  components: { MyBread, verDirTree, verDirTrees },
  data() {
    return {
      props: {
        label: 'name',
        value: 'id',
        children: 'children',
        checkStrictly: true,
        emitPath: false,
      },
      catalogOption: [],
      editcatalogOption: [],
      showCata: false,
@@ -415,6 +485,7 @@
    this.getQueryDirTree();
    this.getRoleTabelData();
    this.showPermsBtn();
    this.$set(this.ruleForm, 'depName', '请选择')
  },
  computed: {
    pathId() {
@@ -427,8 +498,18 @@
    catalogChange(value) {
      this.insertform.dirid = value;
    },
    catalogChangeAdd (data, node, nodeData) {
      this.$set(this.insertform, 'path', data.id)
      this.$set(this.insertform, 'dirName', data.name)
    },
    upCatalogChange(val) {
      this.upform.dirid == val;
    },
    handlupCatalogChange(data, node, nodeData) {
      this.$set(this.upform, 'dirid', data.id)
      this.$set(this.upform, 'depName', data.name)
      // this.upform.dirid == data.id;
      // this.upform.depName = data.name;
    },
    //目录列表获取
    async getQueryDirTree() {
@@ -441,11 +522,18 @@
      this.ruleForm.dirid = this.companyOption[0].id
    },
    handleChange(val) {
      this.ruleForm.dirid = val;
    handleChange (data, node, nodeData) {
      this.$set(this.ruleForm, 'dirid', data.id)
      this.$set(this.ruleForm, 'depName', data.name)
      // this.ruleForm.dirid = data.id;
      // this.ruleForm.depName = data.name;
      this.onSubmit();
    },
    // handleChange(val) {
    //   this.ruleForm.dirid = val;
    //   this.onSubmit();
    // },
    //目录列表获取
    async getSelectdirTab() {
      const res = await selectdirTab();
@@ -601,21 +689,32 @@
      }
      return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss');
    },
    async handleDelete(index, row) {
      const data = await deleteVersion(row.id);
      if (data.code == 200) {
        this.InsertFormdialog = false;
        this.$message({
          message: '删除成功!',
          type: 'success',
    handleDelete(index, row) {
      this.$confirm('此操作将永久删除该版本信息, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(async () => {
          const data = await deleteVersion(row.id);
          if (data.code == 200) {
            this.InsertFormdialog = false;
            this.$message({
              message: '删除成功!',
              type: 'success',
            });
            this.getRoleTabelData();
          } else {
            this.$message({
              message: '删除失败!',
              type: 'warning',
            });
          }
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
        this.getRoleTabelData();
      } else {
        this.$message({
          message: '删除失败!',
          type: 'warning',
        });
      }
    },
    handleEdit(index, row) {
      this.dialogFormVisible = true;