管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-02-07 21de2bb71eef9c890909d3494abcf8fef767fa6f
合并冲突
已修改7个文件
97 ■■■■ 文件已修改
src/assets/img/systemMonitoring/图层 37.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/systemMonitoring/图层 38.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/systemMonitoring/图层 40.png 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/SpatialData.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/catalogueManage.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/dataUpdata.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/systemMonitoring/ͼ²ã 37.png

src/assets/img/systemMonitoring/ͼ²ã 38.png

src/assets/img/systemMonitoring/ͼ²ã 40.png

src/utils/request.js
@@ -9,7 +9,7 @@
import { Message } from "element-ui";
import store from "@/store";
import { getToken } from "@/utils/auth";
import router from "../router"
// create an axios instance
const service = axios.create({
  baseURL: BASE_URL, // api的base_url
@@ -29,14 +29,7 @@
      config.headers["token"] = token;
    }
    if (config.url.indexOf("logout") != -1 && config.url.indexOf("login") != -1) {
      var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire;
      var timeire = new Date().getTime();
      if (timeire >= expire) {
        this.$router.push("logout")
      }
    }
    //加载loading
    store.commit("UPDATE_API_COUNT", "add");
@@ -50,6 +43,16 @@
  }
); service.interceptors.response.use(
  (response) => {
    if (window.localStorage.getItem("LFToken") != null) {
      var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire;
      var timeire = new Date().getTime();
      if (timeire >= expire) {
          router.push('/login')
        localStorage.removeItem("LFToken");
      }
    }
    store.commit("UPDATE_API_COUNT", "sub");
    //console.log(response) 
    //返回因有ResponeType===Blob ,分开处理
src/views/datamanage/SpatialData.vue
@@ -401,6 +401,12 @@
          label: '业务数据',
          value: 'BS',
          children: [],
        }, {
          id: 3,
          tabDesc: '元数据',
          label: '元数据',
          value: 'MD',
          children: [],
        },
      ],
      tableAttach: [],
@@ -776,7 +782,6 @@
      var val;
      if (this.formSql.type == "long" || this.formSql.type == "integer") {
        val = parseInt(this.formSql.value);
      } else if (this.formSql.type == 'double') {
src/views/datamanage/catalogueManage.vue
@@ -237,6 +237,7 @@
      old_dirDat: [], //el树数据(拖动前)
      newData: [], //拖动后原始数据
      itemdetail: {},
      itemaName: null,
      backUpData: '',
      formLabelWidth: '150px',
      delChildID: '',
@@ -271,13 +272,18 @@
          this.oriData = res.result;
          this.newData = res.result;
          this.dirList = this.treeData(res.result);
          //  this.$nextTick(() => {
          if (this.itemdetail.id != null) {
          //    this.expandData=[15]
          //    this.$refs.tree.setCurrentKey(15);
          //   });
          if (this.itemaName != null) {
            this.$nextTick(() => {
              // this.expandData=[1]
              // this.$refs.tree.setCurrentKey(this.itemdetail.id);
              // document.getElementById(this.itemdetail.id).click();
              this.expandData = [this.itemaName]
              this.$refs.tree.setCurrentKey(this.itemaName);
            });
          }
@@ -378,12 +384,10 @@
      if (res == 1) {//新增同级
        id = this.itemdetail.pid;
        orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes)
        lever = this.itemdetail.level;
      } else if (res == 2) {//新增子级
        id = this.itemdetail.id;
        orderNum = this.getMaxOrderNum(this.newNode.childNodes)
        lever = this.itemdetail.level + 1;
      }
@@ -428,12 +432,13 @@
              .then((res) => {
                setTimeout(() => {
                  this.fullscreenLoading = false;
                  if (res.code == 200) {
                    this.$message({
                      message: '添加成功',
                      type: 'success',
                    });
                    this.itemaName = res.result;
                    this.itemdetail = {};
                    this.ruleForm = {};
                    this.dialogFormVisible = false;
@@ -456,6 +461,8 @@
      });
    },
    remove(node, data) {
      this.itemaName =node.parent.data.id;
      this.$confirm('此操作将删除该节点, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
@@ -484,6 +491,7 @@
                  message: '删除成功!',
                });
                this.itemdetail = {};
                this.getDirTree();
              } else if (res[0].code == 200) {
                this.$message.error('删除成功,位置调整失败');
@@ -601,6 +609,7 @@
    },
    handleNodeClick(data, node) {
      // console.log(data);
      this.newNode = node;
      this.backUpData = JSON.stringify(data);
      this.itemdetail = JSON.parse(JSON.stringify(data));
src/views/datamanage/dataUpdata.vue
@@ -946,6 +946,21 @@
      </div>
    </el-dialog>
    <el-dialog
      :close-on-click-modal="false"
      title="上传进度"
      :visible.sync="jindudialogVisible"
      width="30%">
      <div>
        <div>
          æ–‡ä»¶ä¼ è¾“进度:
        </div>
        <div>
          <el-progress :percentage="jindutiao" :format="format"></el-progress>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
@@ -1129,6 +1144,9 @@
        download: false,
      },
      jindutiao: 0,
      jindudialogVisible: false,
      jindutiaoname: []
    }
  },
@@ -1753,6 +1771,16 @@
          }
        }
      }
      const that = this
      that.jindudialogVisible = true
      let listval = []
      formData.forEach((key, val) => {
        listval.push({
          name: val
        })
      })
      that.$set(this, 'jindutiaoname', listval)
      that.$set(this, 'jindutiao', 0)
      this.loading = true;
      $.ajax(BASE_URL + "/dataUpload/uploadFiles?token=" + token + "&path=" + this.formInline.path, {
        type: "post",
@@ -1767,6 +1795,7 @@
            return this.$message.error('数据上传失败');
          }
          this.getFileLength();
          this.$set(this, 'jindutiao', 100)
          this.$message({
            message: '上传成功',
            type: 'success'
@@ -1776,9 +1805,26 @@
        error: (rs) => {
          this.loading = false;
          this.$message.error('数据上传失败');
        },
        xhr: function () {
            var myXhr = $.ajaxSettings.xhr();
            if (myXhr.upload) { //检查upload属性是否存在
                myXhr.upload.addEventListener('progress', that.progressHandlingFunction, false); //绑定progress事件的回调函数
            }
            return myXhr; //xhr对象返回给jQuery使用
        }
      });
    },
      progressHandlingFunction(event) {
        var loaded = event.loaded;//已上传
        var loaded = Math.floor(100 * (event.loaded / event.total) - 1); //计算已经上传的百分比
        $("#prog").html(loaded + "%"); //应用到显示UI,可根据自己需要修改
        this.jindutiao = loaded
        this.$set(this, 'jindutiao', loaded)
      },
      format(percentage) {
        return percentage === 100 ? '上传完毕' : `${percentage}%`;
      },
    //获取文件上传路径
    async getFilePath() {
      const res = await dataUploadSelectPath();