diff --git a/code/web/IT工具综合平台/src/layout/Index.vue b/code/web/IT工具综合平台/src/layout/Index.vue index 1c4ab47..2bfe396 100644 --- a/code/web/IT工具综合平台/src/layout/Index.vue +++ b/code/web/IT工具综合平台/src/layout/Index.vue @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2023-01-04 11:05:44 * @LastEditors: Kane - * @LastEditTime: 2023-02-04 22:48:20 + * @LastEditTime: 2023-02-05 10:53:45 * @FilePath: /IT工具综合平台/src/layout/Index.vue * @Description: * @@ -52,14 +52,12 @@ export default { onMounted(() => { - //加载数据 // query_requirement_status() // .then((response) => // { // // debugger; // const data = response.data; - // console.log(data); // }) // .catch((error) => diff --git a/code/web/IT工具综合平台/src/layout/components/Aside.vue b/code/web/IT工具综合平台/src/layout/components/Aside.vue index 04b6553..521f076 100644 --- a/code/web/IT工具综合平台/src/layout/components/Aside.vue +++ b/code/web/IT工具综合平台/src/layout/components/Aside.vue @@ -2,8 +2,8 @@ * @Author: Kane * @Date: 2023-01-04 11:30:33 * @LastEditors: Kane - * @LastEditTime: 2023-02-04 01:15:34 - * @FilePath: \IT工具综合平台\src\layout\components\Aside.vue + * @LastEditTime: 2023-02-05 10:47:17 + * @FilePath: /IT工具综合平台/src/layout/components/Aside.vue * @Description: * * Copyright (c) ${2022} by Kane, All Rights Reserved. 223142 2f4156 @@ -92,7 +92,7 @@ export default { //获取导航栏是否折叠的标志 asideCollapse() { - return this.$store.state.app.asideBarCollapse; + return this.$store.state.app.ui.asideBarCollapse; } }, created() diff --git a/code/web/IT工具综合平台/src/store/modules/app.js b/code/web/IT工具综合平台/src/store/modules/app.js index 350aae1..3d0455e 100644 --- a/code/web/IT工具综合平台/src/store/modules/app.js +++ b/code/web/IT工具综合平台/src/store/modules/app.js @@ -2,16 +2,19 @@ * @Author: Kane * @Date: 2023-01-07 22:25:43 * @LastEditors: Kane - * @LastEditTime: 2023-01-11 09:44:46 - * @FilePath: \admin_system\src\store\modules\app.js + * @LastEditTime: 2023-02-05 10:47:28 + * @FilePath: /IT工具综合平台/src/store/modules/app.js * @Description: vuex中存放全局数据的模块 * * Copyright (c) ${2022} by Kane, All Rights Reserved. */ const state = { count: 1001, - asideBarCollapse: false, //侧边栏折叠标志位 userInfo: null, //用户信息和token + ui:{ //ui相关的数据 + asideBarCollapse: false, //侧边栏折叠标志位 + + }, }; const getters = {}; const mutations = { diff --git a/code/web/IT工具综合平台/src/utils/api/requirement/requirement.js b/code/web/IT工具综合平台/src/utils/api/requirement/requirement.js index 92f8579..a61af59 100644 --- a/code/web/IT工具综合平台/src/utils/api/requirement/requirement.js +++ b/code/web/IT工具综合平台/src/utils/api/requirement/requirement.js @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2023-02-04 15:48:00 * @LastEditors: Kane - * @LastEditTime: 2023-02-04 17:11:07 + * @LastEditTime: 2023-02-05 11:47:17 * @FilePath: /IT工具综合平台/src/utils/api/requirement/requirement.js * @Description: * @@ -10,15 +10,42 @@ */ import instance from "@/utils/api/request"; import { API_URL } from "@/utils/api/config"; +import router from "@/router/index"; -function query_requirement_status() +/***************************************************** + * 从后台获取需求管理页面所需数据,存放到vuex中。 + * @param ui 保存ui标志位的对象 + * @param store 保存在vuex中需求相关的对象 + * @param error_page_name 提示错误页面的路径 + *****************************************************/ +function query_requirement_ui(requirement_store, error_page_name) { - return instance.request( + //发送请求 + instance.request( { method: "post", url: API_URL.URL_QUERY_REQUIREMENT_STATUS, - } - ); + }) + .then((response) => + { + const data = response.data; + + if (data.success === true) + { + requirement_store.status = data.requirement_status; + } + }) + .catch((error) => + { + console.log("获取需求后台数据失败", error); + router.push( + { + name: error_page_name, + query: { + error + } + }); + }); } -export { query_requirement_status }; \ No newline at end of file +export { query_requirement_ui }; \ No newline at end of file diff --git a/code/web/IT工具综合平台/src/views/overview/Desktop.vue b/code/web/IT工具综合平台/src/views/overview/Desktop.vue index 567490e..5ab8047 100644 --- a/code/web/IT工具综合平台/src/views/overview/Desktop.vue +++ b/code/web/IT工具综合平台/src/views/overview/Desktop.vue @@ -66,8 +66,9 @@