diff --git a/code/web/IT工具综合平台/src/layout/Index.vue b/code/web/IT工具综合平台/src/layout/Index.vue index 2bfe396..22e4e56 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-05 10:53:45 + * @LastEditTime: 2023-02-06 09:26:48 * @FilePath: /IT工具综合平台/src/layout/Index.vue * @Description: * @@ -97,10 +97,9 @@ export default { /* width: 175px; */ background-color: #2f4156; overflow-x: hidden; - /* height: calc(100vh - 50px); + height: calc(100vh - 50px); max-height: calc(100vh - 50px); - min-height: calc(100vh - 50px); */ - height: 100%; + min-height: calc(100vh - 50px); } #layout-header { diff --git a/code/web/IT工具综合平台/src/layout/components/Aside.vue b/code/web/IT工具综合平台/src/layout/components/Aside.vue index 7eb8c81..ca6719a 100644 --- a/code/web/IT工具综合平台/src/layout/components/Aside.vue +++ b/code/web/IT工具综合平台/src/layout/components/Aside.vue @@ -2,14 +2,14 @@ * @Author: Kane * @Date: 2023-01-04 11:30:33 * @LastEditors: Kane - * @LastEditTime: 2023-02-06 00:25:26 + * @LastEditTime: 2023-02-06 09:28:16 * @FilePath: /IT工具综合平台/src/layout/components/Aside.vue * @Description: * * Copyright (c) ${2022} by Kane, All Rights Reserved. 223142 2f4156 --> - + diff --git a/code/web/IT工具综合平台/src/layout/components/Header copy.vue b/code/web/IT工具综合平台/src/layout/components/Header copy.vue new file mode 100644 index 0000000..ebbfe7a --- /dev/null +++ b/code/web/IT工具综合平台/src/layout/components/Header copy.vue @@ -0,0 +1,99 @@ + + + + CPIC + + 测试版 + 3.6.7 x64 Build 202208301257 + + + + + + + + + + \ No newline at end of file diff --git a/code/web/IT工具综合平台/src/layout/components/Header.vue b/code/web/IT工具综合平台/src/layout/components/Header.vue index ebbfe7a..8918290 100644 --- a/code/web/IT工具综合平台/src/layout/components/Header.vue +++ b/code/web/IT工具综合平台/src/layout/components/Header.vue @@ -2,8 +2,8 @@ * @Author: Kane * @Date: 2023-01-04 11:39:04 * @LastEditors: Kane - * @LastEditTime: 2023-02-04 01:09:49 - * @FilePath: \IT工具综合平台\src\layout\components\Header.vue + * @LastEditTime: 2023-02-06 10:17:22 + * @FilePath: /IT工具综合平台/src/layout/components/Header.vue * @Description: * * Copyright (c) ${2022} by Kane, All Rights Reserved. @@ -23,26 +23,16 @@ diff --git a/code/web/IT工具综合平台/src/layout/components/Main.vue b/code/web/IT工具综合平台/src/layout/components/Main.vue index 0b5ba50..141fc4a 100644 --- a/code/web/IT工具综合平台/src/layout/components/Main.vue +++ b/code/web/IT工具综合平台/src/layout/components/Main.vue @@ -20,7 +20,7 @@ diff --git a/code/web/IT工具综合平台/src/store/modules/requirement.js b/code/web/IT工具综合平台/src/store/modules/requirement.js index 57b1cc3..6727ea8 100644 --- a/code/web/IT工具综合平台/src/store/modules/requirement.js +++ b/code/web/IT工具综合平台/src/store/modules/requirement.js @@ -10,8 +10,11 @@ */ const state = { - status: {}, + status: {},//包含全部需求状态的数组 status_update_time: new Date(), + ui: { + selected_status: [], //已选择的需求状态 + }, }; export default { diff --git a/code/web/IT工具综合平台/src/utils/api/LocalStorage.js b/code/web/IT工具综合平台/src/utils/api/LocalStorage.js new file mode 100644 index 0000000..686e74e --- /dev/null +++ b/code/web/IT工具综合平台/src/utils/api/LocalStorage.js @@ -0,0 +1,73 @@ +/* + * @Author: Kane + * @Date: 2023-02-06 14:12:11 + * @LastEditors: Kane + * @LastEditTime: 2023-02-06 15:52:55 + * @FilePath: /IT工具综合平台/src/utils/api/LocalStorage.js + * @Description: 初始化localStorage中保存的值。 + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ + +//常量 +const REQUIREMRNT_UI = "requirement_ui"; + +//需求管理模块 +function loadRequirementUI() +{ + // debugger; + + let requirementUI = null; + + try + { + requirementUI = JSON.parse(window.localStorage.getItem(REQUIREMRNT_UI)); + } + catch (error) + { + console.log("转换requirement-ui失败:", error); + requirementUI = {}; + } + + //如果之前不存在,json转换结果也会是null + if (requirementUI === null) + { + requirementUI = {}; + } + + if (requirementUI.selected_status === undefined) + { + requirementUI.selected_status = []; + } + + if (requirementUI.title === undefined) + { + requirementUI.title = ""; + } + + if (requirementUI.serial_no === undefined) + { + requirementUI.serial_no = ""; + } + + if (requirementUI.request_people === undefined) + { + requirementUI.request_people = ""; + } + + if (requirementUI.commit_start_date === undefined) + { + requirementUI.commit_start_date = new Date(); + requirementUI.commit_start_date.setMonth(0); + requirementUI.commit_start_date.setDate(1); + } + + if (requirementUI.commit_end_date === undefined) + { + requirementUI.commit_end_date = new Date(); + } + + return requirementUI; +} + +export { loadRequirementUI }; \ No newline at end of file diff --git a/code/web/IT工具综合平台/src/utils/api/request.js b/code/web/IT工具综合平台/src/utils/api/request.js index 382d641..f7bce7c 100644 --- a/code/web/IT工具综合平台/src/utils/api/request.js +++ b/code/web/IT工具综合平台/src/utils/api/request.js @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2022-12-22 17:18:10 * @LastEditors: Kane - * @LastEditTime: 2023-02-04 21:51:11 + * @LastEditTime: 2023-02-06 09:19:32 * @FilePath: /IT工具综合平台/src/utils/api/request.js * @Description: 配置axios拦截器 * @@ -72,7 +72,7 @@ service.interceptors.response.use( confirmButtonText: "是", cancelButtonText: "否", type: "warning", - }, + } ).then(() => { router.replace("/login"); diff --git a/code/web/IT工具综合平台/src/views/account/Login.vue b/code/web/IT工具综合平台/src/views/account/Login.vue index 664cbce..3d1b3be 100644 --- a/code/web/IT工具综合平台/src/views/account/Login.vue +++ b/code/web/IT工具综合平台/src/views/account/Login.vue @@ -3,7 +3,7 @@ * @Author: Kane * @Date: 2022-12-14 15:23:54 * @LastEditors: Kane - * @LastEditTime: 2023-02-04 16:55:12 + * @LastEditTime: 2023-02-06 14:32:18 * @FilePath: /IT工具综合平台/src/views/account/Login.vue * @Description: * @@ -59,6 +59,7 @@ import { useStore } from "vuex"; import { useRouter } from "vue-router"; import { Login } from "@/utils/api/info/account"; import { ElMessage } from "element-plus"; + //import router from "../../router/index"; export default { @@ -77,8 +78,8 @@ export default { const tab_menu = reactive( [ - { type: "login", label: "登录" }, - { type: "regiester", label: "注册" }, + { type: "login", label: "登录", }, + { type: "regiester", label: "注册", }, ]); const ui = reactive( @@ -103,6 +104,23 @@ export default { type: "error", }); }; + + //将获取到的用户信息和token保存到vuex和localStorage + const saveUserInfo = (userInfo) => + { + console.log("保存用户信息"); + console.log("保存用户信息", store); + //保存到vuex + store.commit("app/SET_USERINFO", userInfo); + + //保存到localStorage + const token = userInfo.token; + const userInfoJson = JSON.stringify(userInfo); + + window.localStorage.setItem("token", token); + window.localStorage.setItem("user_info", userInfoJson); + }; + /** * 登录 */ @@ -180,22 +198,6 @@ export default { }); }; - //将获取到的用户信息和token保存到vuex和localStorage - const saveUserInfo = (userInfo) => - { - console.log("保存用户信息"); - console.log("保存用户信息", store); - //保存到vuex - store.commit("app/SET_USERINFO", userInfo); - - //保存到localStorage - const token = userInfo.token; - const userInfoJson = JSON.stringify(userInfo); - - window.localStorage.setItem("token", token); - window.localStorage.setItem("user_info", userInfoJson); - }; - onBeforeMount(() => { //初始化菜单选项 diff --git a/code/web/IT工具综合平台/src/views/requirement/RequirementManager.vue b/code/web/IT工具综合平台/src/views/requirement/RequirementManager.vue index 5a9bebb..150cca2 100644 --- a/code/web/IT工具综合平台/src/views/requirement/RequirementManager.vue +++ b/code/web/IT工具综合平台/src/views/requirement/RequirementManager.vue @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2023-02-02 22:19:12 * @LastEditors: Kane - * @LastEditTime: 2023-02-06 08:33:42 + * @LastEditTime: 2023-02-06 15:57:19 * @FilePath: /IT工具综合平台/src/views/requirement/RequirementManager.vue * @Description: * @@ -38,7 +38,8 @@ - + @@ -161,13 +162,13 @@ 状态 - + 当前处理人 - + @@ -175,19 +176,19 @@ 联系人 - + 联系方式 - + 提交日期 - + @@ -228,12 +229,13 @@