|
@@ -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();
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- });
|
|
|
- },
|
|
|
},
|
|
|
};
|