Browse Source

layout.ts内去掉了ScanController和userController的引用,否则会造成依赖循环

niuheng 2 years ago
parent
commit
978f786bb4
1 changed files with 0 additions and 36 deletions
  1. 0 36
      src/store/modules/layout.ts

+ 0 - 36
src/store/modules/layout.ts

@@ -1,8 +1,6 @@
 // import {
 //     getAllProject
 //   } from "@/api/scan/request";
-import ScanController from "@/controller/old-adm/ScanController";
-import { userController } from "@/controller/userController";
 // import {
 //   getUserInfo,getUserInfoByUserId
 // } from "@/api/system/persagy-sso-server";
@@ -144,39 +142,5 @@ export default {
     setErrorReport(contentx, value) {
       contentx.commit("setErrorReport", value);
     },
-    /**
-     * @info 获取全部项目
-     */
-    getAllProject({ state }) {
-      return new Promise((resolve, reject) => {
-        ScanController.getAllProject(
-          {
-            pageNumber: 1,
-            pageSize: 1000,
-          },
-          (res) => {
-            if (res.result === "success" && res.content && res.content.length) {
-              state.projects = [];
-              // if (res.content[0] && res.content[0].id) {
-              //     state.projectId = res.content[0].id
-              //     state.projectName = res.content[0].localName || res.content[0].name || ""
-              //     state.secret = res.content[0].secret || ""
-              // }
-              res.content.forEach((proj) =>
-                state.projects.push({
-                  id: proj.id,
-                  name: proj.localName || proj.name || "",
-                  pwd: proj.secret || "",
-                  group_code: proj.groupCode || "",
-                })
-              );
-              resolve(res);
-            } else {
-              reject();
-            }
-          }
-        );
-      });
-    },
   },
 };