From b49493c795eea89c0aa67fdd4c1a879ff50424ef Mon Sep 17 00:00:00 2001 From: GUjiYN <2946459904@qq.com> Date: Sat, 16 Mar 2024 16:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AD=90=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/request.js | 28 +- src/router/index.js | 339 +++++++++--------- src/views/AuthPage/Login.vue | 2 +- src/views/WorkLoadPage/ChildModule.vue | 72 +--- src/views/WorkLoadPage/I_Manage.vue | 78 ++-- .../WorkLoadPage/I_Manage_ChildSystem.vue | 71 ++-- 6 files changed, 287 insertions(+), 303 deletions(-) diff --git a/src/js/request.js b/src/js/request.js index ae36083..a81b94c 100644 --- a/src/js/request.js +++ b/src/js/request.js @@ -506,7 +506,7 @@ const infoEditSettingHeaderImage = (showType, token) => { */ const projectGet =(token,url) => { return axios({ - url:api+ "/project/get"+url, + url:api+ "/project/get", method: "get", headers:{ 'Authorization':'Bearer '+token, @@ -625,7 +625,7 @@ const projectWorkGet = (data,token) =>{ const queryTags = `tags=${encodedTags.join('&tags=')}`; const queryIsFinish = `isFinish=${encodedIsFinish.join('&isFinish=')}`; return axios({ - url:`${api}/project/work/get?${queryTags}&${queryIsFinish}`, + url:`${api}/project/work/get?${queryTags}&${queryIsFinish}&is=1`, method: "get", headers:{ 'content-type': 'application/json;charset=utf-8', @@ -675,18 +675,24 @@ const moduleGetByProjectId = (projectId, token) => { } -/*const moduleGetByProjectId = (projectId, token) => { - return axios ({ - url:api + "/module/get", - methods:"get", - params:projectId, - headers:{ +/** + * 根据子系统id获取子模块信息 + * @param sysId + * @param token + */ +const moduleGetBySysId = (sysId, token) => { + return axios({ + url: api + "/module/get/min?sysId=" + sysId, + method:"get", + headers: { 'Authorization':'Bearer '+token, - 'content-type': 'application/json;charset=utf-8', + 'Content-Type': 'application/json;charset=utf-8', 'Timestamp': getCurrentTimestamp() } }) -}*/ +} + + export default { login, @@ -730,7 +736,7 @@ export default { projectWorkGet, moduleGetByProjectId, - + moduleGetBySysId, messageGet, diff --git a/src/router/index.js b/src/router/index.js index 231ab54..ec45ee0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,183 +1,184 @@ import {createRouter, createWebHistory} from 'vue-router' const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path:'/', - name:'app', - component:()=>import('../views/HomePage/IndexView.vue'), - children:[ - { - path: "/", - component:() => import ('../views/HomePage/Main.vue') - },{ - path:'/Project', - name:'Project', - component:()=>import('@/views/ProjectPage/ProjectList.vue') - }, + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ { - path:'/WorkLoad', - name:'WorkLoad', - component:()=>import('@/views/WorkLoadPage/WorkLoad.vue'), - children:[ - { - path: '/WorkLoad/PersonalInformation', - name:'WorkLoadPersonalInformation', - component:() =>import('@/views/WorkLoadPage/PersonalInformation.vue') - }, - { - path: '/WorkLoad/PersonalProject', - name:'WorkLoadPersonalProject', - component:()=>import('@/views/WorkLoadPage/PersonalProject.vue') - }, - { - path: '/WorkLoad/PersonalBelongings', - name:'WorkLoadPersonalBelongings', - component:()=>import('@/views/WorkLoadPage/PersonalBelongings.vue') - }, - { - path: '/WorkLoad/Message', - name:'WorkLoadMessage', - component:()=>import('@/views/WorkLoadPage/Message.vue') - }, - { - path: '/WorkLoad/DailyPaper', - name:'WorkLoadDailyPaper', - component:() =>import('@/views/WorkLoadPage/DailyPaper.vue') - }, - { - path:'/WorkLoad/I_Manage', - name:'WordLoadI_Manage', - component:()=>import('@/views/WorkLoadPage/I_Manage.vue'), - }, - { - path: '/WorkLoad/I_Responsible', - name:'WorkLoadI_Responsible', - component:() =>import('@/views/WorkLoadPage/I_Responsible.vue') - }, - - { - path:'/WorkLoad/I_Responsible/:projId', - name:'WorkLoadI_ResponsibleProject', - component:() =>import('@/views/WorkLoadPage/I_ResponsibleChild.vue') - }, + path: '/', + name: 'app', + component: () => import('../views/HomePage/IndexView.vue'), + children: [ + { + path: "/", + component: () => import ('../views/HomePage/Main.vue') + }, + { + path: '/Project', + name: 'Project', + component: () => import('@/views/ProjectPage/ProjectList.vue') + }, + { + path: '/WorkLoad', + name: 'WorkLoad', + component: () => import('@/views/WorkLoadPage/WorkLoad.vue'), + children: [ + { + path: '/WorkLoad/PersonalInformation', + name: 'WorkLoadPersonalInformation', + component: () => import('@/views/WorkLoadPage/PersonalInformation.vue') + }, + { + path: '/WorkLoad/PersonalProject', + name: 'WorkLoadPersonalProject', + component: () => import('@/views/WorkLoadPage/PersonalProject.vue') + }, + { + path: '/WorkLoad/PersonalBelongings', + name: 'WorkLoadPersonalBelongings', + component: () => import('@/views/WorkLoadPage/PersonalBelongings.vue') + }, + { + path: '/WorkLoad/Message', + name: 'WorkLoadMessage', + component: () => import('@/views/WorkLoadPage/Message.vue') + }, + { + path: '/WorkLoad/DailyPaper', + name: 'WorkLoadDailyPaper', + component: () => import('@/views/WorkLoadPage/DailyPaper.vue') + }, + { + path: '/WorkLoad/I_Manage', + name: 'WordLoadI_Manage', + component: () => import('@/views/WorkLoadPage/I_Manage.vue'), + }, + { + path: '/WorkLoad/I_Responsible', + name: 'WorkLoadI_Responsible', + component: () => import('@/views/WorkLoadPage/I_Responsible.vue') + }, + + { + path: '/WorkLoad/I_Responsible/:projId', + name: 'WorkLoadI_ResponsibleProject', + component: () => import('@/views/WorkLoadPage/I_ResponsibleChild.vue') + }, - { - path:'/WorkLoad/I_Manage/ChildModule', - name:'WorkLoad/I_Manage/ChildModule', - component:()=>import('@/views/WorkLoadPage/ChildModule.vue') - }, - { - path:'/WorkLoad/I_Manage/UserManageModule', - name:'WorkLoadI_ManageUserManageModule', - component:()=>import('@/views/WorkLoadPage/UserManageModule.vue') - }, - { - path:'/WorkLoad/I_Manage/LoginRegisterModule', - name:'WorkLoadI_ManageLoginRegisterModule', - component:()=>import('@/views/WorkLoadPage/LoginRegisterModule.vue') - }, - { - path:'/WorkLoad/I_Manage/AuthorityManageModule', - name:'WorkLoadI_ManageAuthorityManageModule', - component:()=>import('@/views/WorkLoadPage/AuthorityManageModule.vue') - }, - { - path:'/WorkLoad/I_Manage/ChildSystem', - name:'WorkLoad/I_Manage/ChildSystem', - component:() => import('@/views/WorkLoadPage/I_Manage_ChildSystem.vue') - } - ] + { + path: '/WorkLoad/I_Manage/ChildModule', + name: 'WorkLoad/I_Manage/ChildModule', + component: () => import('@/views/WorkLoadPage/ChildModule.vue') + }, + { + path: '/WorkLoad/I_Manage/UserManageModule', + name: 'WorkLoadI_ManageUserManageModule', + component: () => import('@/views/WorkLoadPage/UserManageModule.vue') + }, + { + path: '/WorkLoad/I_Manage/LoginRegisterModule', + name: 'WorkLoadI_ManageLoginRegisterModule', + component: () => import('@/views/WorkLoadPage/LoginRegisterModule.vue') + }, + { + path: '/WorkLoad/I_Manage/AuthorityManageModule', + name: 'WorkLoadI_ManageAuthorityManageModule', + component: () => import('@/views/WorkLoadPage/AuthorityManageModule.vue') + }, + { + path: '/WorkLoad/I_Manage/ChildSystem', + name: 'WorkLoad/I_Manage/ChildSystem', + component: () => import('@/views/WorkLoadPage/I_Manage_ChildSystem.vue') + } + ] + }, + + { + path: '/ProjectMessage', + name: 'MainMessageCustom', + component: () => import('@/views/ProjectPage/MainMessageCustom.vue') + }, + ] + }, + { + path: '/login', + name: 'login', + component: () => import('@/views/AuthPage/Login.vue') + }, + { + path: '/register', + name: 'register', + component: () => import('../views/AuthPage/Register.vue') + }, + { + path: '/LoginRegister/Login', + name: 'Login', + component: () => import('@/views/AuthPage/Login.vue') }, { - path:'/ProjectMessage', - name:'MainMessageCustom', - component:()=>import('@/views/ProjectPage/MainMessageCustom.vue') - }, - ] - }, - { - path:'/login', - name:'login', - component:()=>import('@/views/AuthPage/Login.vue') - }, - { - path:'/register', - name:'register', - component:()=>import('../views/AuthPage/Register.vue') - }, - { - path:'/LoginRegister/Login', - name:'Login', - component:() =>import('@/views/AuthPage/Login.vue') - }, - - { - path:'/Manager', - name:'Manager', - component:()=>import('@/views/ManagePage/Manager.vue'), - children:[ - { - path:'/Manager/Main', - component:() =>import('@/views/ManagePage/Main.vue') - }, - { - path:'/Manager/User', - component:() =>import('@/views/ManagePage/User.vue') - }, - { - path:'/Manager/Role', - component:() =>import('@/views/ManagePage/Role.vue') - }, - { - path:'/Manager/Authority', - component:() =>import('@/views/ManagePage/Authority.vue') - }, - { - path:'/Manager/Log', - component:() =>import('@/views/ManagePage/Log.vue') - }, - { - path:'/Manager/Daily', - component:() =>import('@/views/ManagePage/Daily.vue') - }, - { - path:'/Manager/Message', - component:() =>import('@/views/ManagePage/Message.vue') - }, - { - path:'/Manager/Carousel', - component:() =>import('@/views/ManagePage/Carousel.vue') - } ,{ - path:'/Manager/TeamProfile', - component:() =>import('@/views/ManagePage/TeamProfile.vue') - },{ - path:'/Manager/ProjectRecommend', - component:() =>import('@/views/ManagePage/ProjectRecommend.vue') - },{ - path:'/Manager/NewsDisplay', - component:() =>import('@/views/ManagePage/NewsDisplay.vue') - },{ - path:'/Manager/UserRecommend', - component:() =>import('@/views/ManagePage/UserRecommend.vue') - },{ - path:'/Manager/ProjectInformation', - component:() =>import('@/views/ManagePage/ProjectInformation.vue') - },{ - path:'/Manager/TeamInformation', - component:() =>import('@/views/ManagePage/TeamInformation.vue') - },{ - path:'/Manager/NewsInformation', - component:() =>import('@/views/ManagePage/NewsInformation.vue') + path: '/Manager', + name: 'Manager', + component: () => import('@/views/ManagePage/Manager.vue'), + children: [ + { + path: '/Manager/Main', + component: () => import('@/views/ManagePage/Main.vue') + }, + { + path: '/Manager/User', + component: () => import('@/views/ManagePage/User.vue') + }, + { + path: '/Manager/Role', + component: () => import('@/views/ManagePage/Role.vue') + }, + { + path: '/Manager/Authority', + component: () => import('@/views/ManagePage/Authority.vue') + }, + { + path: '/Manager/Log', + component: () => import('@/views/ManagePage/Log.vue') + }, + { + path: '/Manager/Daily', + component: () => import('@/views/ManagePage/Daily.vue') + }, + { + path: '/Manager/Message', + component: () => import('@/views/ManagePage/Message.vue') + }, + { + path: '/Manager/Carousel', + component: () => import('@/views/ManagePage/Carousel.vue') + }, { + path: '/Manager/TeamProfile', + component: () => import('@/views/ManagePage/TeamProfile.vue') + }, { + path: '/Manager/ProjectRecommend', + component: () => import('@/views/ManagePage/ProjectRecommend.vue') + }, { + path: '/Manager/NewsDisplay', + component: () => import('@/views/ManagePage/NewsDisplay.vue') + }, { + path: '/Manager/UserRecommend', + component: () => import('@/views/ManagePage/UserRecommend.vue') + }, { + path: '/Manager/ProjectInformation', + component: () => import('@/views/ManagePage/ProjectInformation.vue') + }, { + path: '/Manager/TeamInformation', + component: () => import('@/views/ManagePage/TeamInformation.vue') + }, { + path: '/Manager/NewsInformation', + component: () => import('@/views/ManagePage/NewsInformation.vue') + } + ] } - ] - } - , + , - ] + ] }) export default router diff --git a/src/views/AuthPage/Login.vue b/src/views/AuthPage/Login.vue index 4365218..eb08f46 100644 --- a/src/views/AuthPage/Login.vue +++ b/src/views/AuthPage/Login.vue @@ -8,7 +8,7 @@ diff --git a/src/views/WorkLoadPage/ChildModule.vue b/src/views/WorkLoadPage/ChildModule.vue index 5fc22c9..f8dd0e1 100644 --- a/src/views/WorkLoadPage/ChildModule.vue +++ b/src/views/WorkLoadPage/ChildModule.vue @@ -22,10 +22,10 @@ -
+
-

登录注册模块

+

{{ChildModule.name}}

负责人: 无

@@ -48,56 +48,6 @@
- -
-

用户管理模块

-

负责人: 无

-
-
-

剩余 5 天

- -
-
-
- -

进行中

-
-
-

2

-

人/天

-
- -
-
- -
-

权限管理模块

-

负责人: 无

-
-
-

剩余 1 天

- -
-
-
- -

进行中

-
-
-

2

-

人/天

-
- -
-
@@ -133,10 +83,26 @@ \ No newline at end of file diff --git a/src/views/WorkLoadPage/I_Manage.vue b/src/views/WorkLoadPage/I_Manage.vue index 74b3e4b..fdec355 100644 --- a/src/views/WorkLoadPage/I_Manage.vue +++ b/src/views/WorkLoadPage/I_Manage.vue @@ -23,23 +23,29 @@
- +
- +
-

{{ChildProject.name}}

+

{{ ChildProject.name }}

剩余

10天

-
@@ -47,7 +53,7 @@
-
+ @@ -59,12 +65,13 @@ const showButton = reactive([]); const token = window.localStorage.getItem('token') const ChildProjects = ref([]); // 使用ref创建响应式数据 const id = ref(2); -const tagAll=ref(true) +const tagAll = ref(true) const tagsData = ref([]); const selectTags = ref([false, false, false, false]); -const data =reactive({ - tags:[], - isFinish:[0,1,2,-1] +const data = reactive({ + tags: [], + isFinish: [0, 1, 2, -1], + is: 1 }) @@ -86,30 +93,30 @@ const options = [ value: -1, }, ] -watch(() =>data.isFinish, async (newValue, oldValue) =>{ +watch(() => data.isFinish, async (newValue, oldValue) => { console.log("data.isFinish", data.isFinish) GetManageProject() }) -onMounted(() =>{ +onMounted(() => { GetManageProject(); }) -function GetManageProject(){ +function GetManageProject() { request.projectWorkGet(data, token).then((res) => { ChildProjects.value = res.data.data; }) } -const handleClickAll=(checked)=>{ - if(checked){ - selectTags.value.forEach((item,index)=>{ - selectTags.value[index]=false +const handleClickAll = (checked) => { + if (checked) { + selectTags.value.forEach((item, index) => { + selectTags.value[index] = false }) // 发送获取全部数据的请求 - request.projectGet(token).then(res=>{ + request.projectGet(token).then(res => { console.log(res.data.data) }) } @@ -117,45 +124,40 @@ const handleClickAll=(checked)=>{ } // 当选中其他的时候, 全部 不选中 const handleChange = (tag, checked) => { - if(checked){ - tagAll.value=false - } - else{ - let flag=true - selectTags.value.forEach((item,index)=>{ - if(item){ - flag=false + if (checked) { + tagAll.value = false + } else { + let flag = true + selectTags.value.forEach((item, index) => { + if (item) { + flag = false } }) - if(flag){ - tagAll.value=true + if (flag) { + tagAll.value = true } } }; - // 有关新增 -const handleAdd=()=>{ +const handleAdd = () => { console.log('新增') } - - - // 当组件挂载时 请求tag数据 onMounted( - ()=>{ + () => { // 设置标签 - request.getTagsProjectList(token).then(res=>{ + request.getTagsProjectList(token).then(res => { console.log(res.data.data) - tagsData.value=res.data.data + tagsData.value = res.data.data }) // 默认获取全部数据 - request.projectGet(token).then(res=>{ + request.projectGet(token).then(res => { console.log(res) }) diff --git a/src/views/WorkLoadPage/I_Manage_ChildSystem.vue b/src/views/WorkLoadPage/I_Manage_ChildSystem.vue index d4a41b7..fdc773f 100644 --- a/src/views/WorkLoadPage/I_Manage_ChildSystem.vue +++ b/src/views/WorkLoadPage/I_Manage_ChildSystem.vue @@ -8,9 +8,9 @@ -
+
-

项目名称:梁溪区纪委大数据管理平台{{ChildSystems.name}}

+

项目名称:梁溪区纪委大数据管理平台{{ ChildSystems.name }}

项目周期:3个月

项目开始时间:

项目完成时间:

@@ -21,16 +21,22 @@
- +

01

-

{{ChildSystem.name}}

+

{{ ChildSystem.name }}

-
@@ -41,10 +47,13 @@
- +
- + + +
- - + + + + + +
- - - + + + + +
-
+
\ No newline at end of file