管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-05-27 0af4ecb9b2047b8ba6d00e891050cf2d68b829a6
src/views/datamanage/catalogueManage.vue
@@ -2,7 +2,7 @@
  <div class="subpage_Box">
    <My-bread :list="[
          `${$t('dataManage.dataManage')}`,
          `${$t('dataManage.catalogueManage')}`,
          `${$t('dataManage.projectManagement')}`,
        ]"></My-bread>
    <el-divider />
    <div class="mainBox">
@@ -145,27 +145,27 @@
        >
          <el-form-item
            prop="name"
            :label="$t('dataManage.dataUpObj.directoryName')"
            :label="$t('dataManage.dataUpObj.name')"
            :label-width="formLabelWidth"
          >
            <el-input
              v-model="itemdetail.name"
              size="small"
              style=" max-width: 420px"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')"
              clearable
            />
            <!--            style="max-width: 400px"-->
          </el-form-item>
          <el-form-item
            :label="$t('dataManage.dataUpObj.catalogDescription')"
            :label="$t('dataManage.dataUpObj.explain')"
            :label-width="formLabelWidth"
          >
            <el-input
              v-model="itemdetail.descr"
              type="textarea"
              style=" max-width: 420px"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')"
              clearable
            />
          </el-form-item>
@@ -176,6 +176,7 @@
            <el-select
              style="width: 420px"
              v-model="itemdetail.checks"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')"
              multiple
            >
              <el-option
@@ -204,7 +205,7 @@
              v-model="itemdetail.exts"
              type="textarea"
              style=" max-width: 420px"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')"
              clearable
            />
          </el-form-item>
@@ -228,7 +229,6 @@
              disabled
              type="textarea"
              style=" max-width: 420px"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')"
              autosize
            />
          </el-form-item>
@@ -304,22 +304,24 @@
        :rules="rules"
      >
        <el-form-item
          :label="$t('dataManage.dataUpObj.directoryName')"
          :label="$t('dataManage.dataUpObj.name')"
          prop="name"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="ruleForm.name"
            autocomplete="off"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.dataUpObj.catalogDescription')"
          :label="$t('dataManage.dataUpObj.explain')"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="ruleForm.descr"
            autocomplete="off"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -331,6 +333,7 @@
            type="textarea"
            resize="none"
            style="height: 100%; overflow: auto"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')"
          />
        </el-form-item>
        <el-form-item
@@ -347,6 +350,7 @@
            v-model="ruleForm.checks"
            multiple
            style="width:100%;"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')"
          >
            <el-option
              v-for="item in options"
@@ -371,12 +375,13 @@
          />
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.dataUpObj.catalogRemarks')"
          :label="$t('dataManage.dataUpObj.Remarks')"
          :label-width="formLabelWidth"
        >
          <el-input
            v-model="ruleForm.bak"
            autocomplete="off"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueRemarks')"
          ></el-input>
        </el-form-item>
      </el-form>
@@ -695,6 +700,7 @@
      queryDirTree().then((res) => {
        // console.log(res);
        if (res.code == 200) {
          this.oriData = res.result;
          this.newData = res.result;
          this.dirList = this.treeData(res.result);
@@ -747,19 +753,22 @@
          if (currentId != 0) {
            const tempChildrenNodex1 = pchildNodes[currentId - 1];
            const tempChildrenNodex2 = pchildNodes[currentId];
            tempChildrenNodex2.orderNum =
              pchildNodes[currentId - 1].data.orderNum;
            tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
            // tempChildrenNodex2.orderNum =
            //   pchildNodes[currentId - 1].data.orderNum;
            // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
            var arr = [];
            this.oriData.filter((res) => {
              if (res.id == tempChildrenNodex2.data.id) {
                res.orderNum = tempChildrenNodex2.orderNum;
                // res.orderNum = tempChildrenNodex2.orderNum;
                arr.push(res);
              } else if (res.id == tempChildrenNodex1.data.id) {
                res.orderNum = tempChildrenNodex1.orderNum;
                // res.orderNum = tempChildrenNodex1.orderNum;
                arr.push(res);
              }
            });
            const orderNum = arr[1].orderNum
            arr[1].orderNum = arr[0].orderNum
            arr[0].orderNum = orderNum
            this.newData = arr;
            this.sendChange();
          } else {
@@ -773,19 +782,22 @@
          if (currentId < pchildNodes.length - 1) {
            const tempChildrenNodex1 = pchildNodes[currentId + 1];
            const tempChildrenNodex2 = pchildNodes[currentId];
            tempChildrenNodex2.orderNum =
              pchildNodes[currentId + 1].data.orderNum;
            tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
            // tempChildrenNodex2.orderNum =
            //   pchildNodes[currentId + 1].data.orderNum;
            // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
            var arr = [];
            this.oriData.filter((res) => {
              if (res.id == tempChildrenNodex2.data.id) {
                res.orderNum = tempChildrenNodex2.orderNum;
                // res.orderNum = tempChildrenNodex2.orderNum;
                arr.push(res);
              } else if (res.id == tempChildrenNodex1.data.id) {
                res.orderNum = tempChildrenNodex1.orderNum;
                // res.orderNum = tempChildrenNodex1.orderNum;
                arr.push(res);
              }
            });
            const orderNum = arr[1].orderNum
            arr[1].orderNum = arr[0].orderNum
            arr[0].orderNum = orderNum
            this.newData = arr;
            this.sendChange();
          } else {
@@ -863,7 +875,13 @@
          if (valid) {
            this.fullscreenLoading = true;
            var val = this.ruleForm;
            val.checks = this.ruleForm.checks.toString()
            if (this.ruleForm.checks) {
              val.checks = this.ruleForm.checks.toString()
            } else {
              val.checks = ''
            }
            insertDir(val)
              .then((res) => {
                setTimeout(() => {
@@ -1034,11 +1052,11 @@
            this.getDirTree();
            return;
          } else {
            this.$message.error("修改失败,请重试!");
            this.$message.error("移动失败,请重试!");
          }
        })
        .catch(() => {
          this.$message.error("修改失败,请重试!");
          this.$message.error("移动失败,请重试!");
        });
    },