From 7e1dc445692086f9b45397c756338eabbe325d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CXCYH=E2=80=9D?= <“1561381013@qq.com”> Date: Wed, 17 Apr 2024 21:56:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=90=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=88=91=E7=AE=A1=E7=90=86=E7=9A=84=E5=92=8C=E6=88=91=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=8E=A5=E5=8F=A3=EF=BC=88?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=98=E6=B2=A1=E5=81=9A=E5=AE=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 13 - src/api/charge.js | 24 ++ src/api/manage.js | 76 ++++- src/layout/components/Navbar.vue | 2 +- src/router/index.ts | 107 +------ src/router/modules/manage.ts | 81 +++++ src/views/personal/project/charge.vue | 285 ++++++++++-------- .../personal/project/childSystem/manage.vue | 82 +++-- .../personal/project/childmodel/charge.vue | 143 +++++++++ .../personal/project/childmodel/manage.vue | 12 +- src/views/personal/project/detail/charge.vue | 101 +++++++ src/views/personal/project/detail/manage.vue | 103 +++++++ src/views/personal/project/manage.vue | 243 +++++++++------ 13 files changed, 897 insertions(+), 375 deletions(-) create mode 100644 src/api/charge.js create mode 100644 src/router/modules/manage.ts create mode 100644 src/views/personal/project/detail/charge.vue create mode 100644 src/views/personal/project/detail/manage.vue diff --git a/components.d.ts b/components.d.ts index 7e176cd..f44ce52 100644 --- a/components.d.ts +++ b/components.d.ts @@ -20,7 +20,6 @@ declare module '@vue/runtime-core' { ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] - ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] @@ -38,24 +37,15 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElProgress: typeof import('element-plus/es')['ElProgress'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] - ElRate: typeof import('element-plus/es')['ElRate'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] - ElSlider: typeof import('element-plus/es')['ElSlider'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTabPane: typeof import('element-plus/es')['ElTabPane'] - ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTree: typeof import('element-plus/es')['ElTree'] - ElUpload: typeof import('element-plus/es')['ElUpload'] ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default'] GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default'] Hamburger: typeof import('./src/components/Hamburger/index.vue')['default'] @@ -82,7 +72,4 @@ declare module '@vue/runtime-core' { UploadExcel: typeof import('./src/components/UploadExcel/index.vue')['default'] VueCountTo: typeof import('./src/components/vue-count-to/vue-countTo.vue')['default'] } - export interface ComponentCustomProperties { - vLoading: typeof import('element-plus/es')['ElLoadingDirective'] - } } diff --git a/src/api/charge.js b/src/api/charge.js new file mode 100644 index 0000000..4032ace --- /dev/null +++ b/src/api/charge.js @@ -0,0 +1,24 @@ +import axios from "axios"; + +function getCurrentTimestamp() { + return new Date().getTime(); +} + +const api = 'http://nbxt.oa.x-lf.cn' + +/** + * 获取我参与的项目列表 + * + * @param token 访问令牌 + * @returns {Promise> | *} + */ +const getChargeProjectList = (token)=> { + return axios({ + method: 'get', + url: `${api}/project/participate/get`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} \ No newline at end of file diff --git a/src/api/manage.js b/src/api/manage.js index 49f238c..d89dfa0 100644 --- a/src/api/manage.js +++ b/src/api/manage.js @@ -48,14 +48,14 @@ export const getproject = (projectId, token) => { /** - * 获取项目信息 - * @param projectId 项目id + * 获取我管理页面的项目列表(接口有问题) + * * @param token 访问令牌 * @returns {Promise> | *} */ -export const searchModel = (projectId ,token) => { +export const getManageList = (token) => { return axios({ - url: api +"/module/get?projectId=" + projectId , + url: api +"/project/child/get" , method: "get", headers: { 'Authorization': 'Bearer ' + token, @@ -69,3 +69,71 @@ export const searchModel = (projectId ,token) => { }) } +// 我管理的所有接口 + + +/** + * 获取我管理的页面的搜索 + * + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getManageListById = (projectId, token) => { + return axios({ + url: api +'/project/get/' + projectId, + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + }) + +} +/** + * 获取我管理的页面的项目列表 + * + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getManageProjectList = (token) => { + return axios({ + url: api +'/project/child/get' , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + }) + +} + + + + + + +/** + * 获取我管理的页面的子模块项目列表(接口没数据) + * + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getProjectList = (token) => { + return axios({ + url: api +"/project/module/get" , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + + }) +} + + + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 88c2bf4..022fa79 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -2,7 +2,7 @@ @@ -73,8 +73,16 @@ import { ref } from 'vue'; import { ElTable } from 'element-plus'; + import { useRouter } from 'vue-router'; + const router = useRouter(); + + // 路由跳转 + const toDetail = () => { + router.push({ name: 'ManageDetail' }); // 跳转到子系统详情页面 + }; + interface User { date: string name: string diff --git a/src/views/personal/project/detail/charge.vue b/src/views/personal/project/detail/charge.vue new file mode 100644 index 0000000..a0b911e --- /dev/null +++ b/src/views/personal/project/detail/charge.vue @@ -0,0 +1,101 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/detail/manage.vue b/src/views/personal/project/detail/manage.vue new file mode 100644 index 0000000..32976ff --- /dev/null +++ b/src/views/personal/project/detail/manage.vue @@ -0,0 +1,103 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/manage.vue b/src/views/personal/project/manage.vue index 6b8f7f6..bb3fd1b 100644 --- a/src/views/personal/project/manage.vue +++ b/src/views/personal/project/manage.vue @@ -5,14 +5,14 @@
名称 - +
状态 - +
- 查询 + 查询 重置
@@ -25,52 +25,102 @@ @selection-change="handleSelectionChange"> - + - - + + + + 接口文档 + 需求文档 + + + + + + + + 查看详情 - - + + + +