管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-06 531b6d25d21474f8df88bd484b901111e048837d
接口请求时间判断
已修改6个文件
51 ■■■■■ 文件已修改
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/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));