浏览代码

场景数据包根节点不显示添加场景

zhangliang2 3 年之前
父节点
当前提交
558e3c0795
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 1 1
      src/axios/filter.js
  2. 4 3
      src/views/sceneLibrary/scenePacketList.vue

+ 1 - 1
src/axios/filter.js

@@ -90,7 +90,7 @@ const instance = axios.create({
 
 // instance.defaults.headers.common['Authorization'] = ""; //请求token信息配置
 // instance.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; //请求type设置
-instance.defaults.timeout = 1000 * 60 * 60; //在超时前,所有请求都会等待
+instance.defaults.timeout = 1000 * 60 * 3; //在超时前,所有请求都会等待
 // instance.defaults.withCredentials = true;
 
 instance.interceptors.request.use(function (config) {

+ 4 - 3
src/views/sceneLibrary/scenePacketList.vue

@@ -35,8 +35,9 @@
                     ></i>
                     <i
                         v-if="
-                            !scope.row.children ||
-                            scope.row.children.length === 0
+                            scope.row.parentId != '0' &&
+                            (!scope.row.children ||
+                                scope.row.children.length === 0)
                         "
                         @click="addScenario(scope.row)"
                         class="el-icon-document-add elIcon"
@@ -314,7 +315,7 @@ export default {
                         id: "1",
                         packageAndRules: "",
                         packageLevel: 1,
-                        parentId: "0",
+                        parentId: "0", // 判断根路径的标识
                         remarks: "",
                         rootId: null,
                         ruleName: "",