From f124eeb48dfa7a488b01ff5d674a0f0b6ee76bc0 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 00:52:58 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=EF=BC=88=E9=9D=A2=E5=8C=85=E5=B1=91=E6=9C=AA=E5=AE=8C=E5=96=84?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 2 - components.d.ts | 12 +- src/api/manage.js | 71 ++++ src/components/Breadcrumb/index.vue | 7 +- src/router/index.ts | 58 +++- src/views/personal/project/charge.vue | 137 +++++++- .../personal/project/childSystem/charge.vue | 136 ++++++++ .../personal/project/childSystem/manage.vue | 162 +++++++++ .../personal/project/childmodel/charge.vue | 0 .../personal/project/childmodel/manage.vue | 135 ++++++++ src/views/personal/project/manage.vue | 314 +++++++++++------- 11 files changed, 890 insertions(+), 144 deletions(-) create mode 100644 src/api/manage.js create mode 100644 src/views/personal/project/childSystem/charge.vue create mode 100644 src/views/personal/project/childSystem/manage.vue create mode 100644 src/views/personal/project/childmodel/charge.vue create mode 100644 src/views/personal/project/childmodel/manage.vue diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 07b6235..8139ac9 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -2,6 +2,4 @@ export {} declare global { const ElMessage: typeof import('element-plus/es')['ElMessage'] - const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] - const ElNotification: typeof import('element-plus/es')['ElNotification'] } diff --git a/components.d.ts b/components.d.ts index 6de8fe2..7e176cd 100644 --- a/components.d.ts +++ b/components.d.ts @@ -13,12 +13,14 @@ declare module '@vue/runtime-core' { DropdownMenu: typeof import('./src/components/Share/DropdownMenu.vue')['default'] Dropzone: typeof import('./src/components/Dropzone/index.vue')['default'] EditorImage: typeof import('./src/components/Tinymce/components/EditorImage.vue')['default'] + ElAlert: typeof import('element-plus/es')['ElAlert'] ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElBadge: typeof import('element-plus/es')['ElBadge'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] 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'] @@ -31,14 +33,15 @@ declare module '@vue/runtime-core' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] 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'] @@ -47,8 +50,12 @@ declare module '@vue/runtime-core' { 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'] @@ -75,4 +82,7 @@ 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/manage.js b/src/api/manage.js new file mode 100644 index 0000000..49f238c --- /dev/null +++ b/src/api/manage.js @@ -0,0 +1,71 @@ +import axios from "axios"; + +function getCurrentTimestamp() { + return new Date().getTime(); +} + +const api = 'http://nbxt.oa.x-lf.cn' + +/** + * 根据项目id获取项目信息 + * @param id 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +const projectGetById = (id, token) => { + return axios({ + url: api + "/project/get/id?id=" + id, + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + }) +} + + +/** + * 获取项目信息 + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ + +export const getproject = (projectId, token) => { + return axios({ + url: api +"/project/get?projectId=" + projectId, + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + + } + + + }) +} + + + +/** + * 获取项目信息 + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const searchModel = (projectId ,token) => { + return axios({ + url: api +"/module/get?projectId=" + projectId , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + + 'Timestamp': getCurrentTimestamp() + + + } + + + }) +} + diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index bb5074a..2e7b973 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -3,8 +3,8 @@ {{ - item.meta.title - }} + item.meta.title + }} {{ item.meta.title }} @@ -41,8 +41,9 @@ export default defineComponent({ const first = matched[0]; if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched); + matched = [{ path: '/dashboard', meta: { title: 'Dashboard' } }].concat(matched); } + this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false); }, diff --git a/src/router/index.ts b/src/router/index.ts index 3e8bd0d..0796433 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -31,6 +31,7 @@ export const constantRoutes:RouteRecordRaw[] = [ } ] }, + { path: '/login', component: () => import('@/views/login/index.vue'), @@ -158,41 +159,64 @@ export const asyncRoutes:RouteRecordRaw[] = [ { path: '/myself', component: Layout, - redirect: '/myself', + redirect: 'noRedirect', meta: { - alwaysShow: true, // will always show the root menu + alwaysShow: false, // 始终显示根菜单 title: '个人项目', icon: 'nested', roles: ['admin', 'teacher_user'] }, children: [ { - // 我负责的 - path: 'charge', - component: () => import('@/views/personal/project/charge.vue'), - name: 'Charge', + path: 'participate', + component: () => import('@/views/personal/project/participate.vue'), + name: 'participate', meta: { title: '我负责的', icon: 'user', affix: true } }, + //我管理的以及子页面 { - // 我管理的 path: 'manage', component: () => import('@/views/personal/project/manage.vue'), name: 'Manage', - meta: { title: '我管理的', icon: 'user', affix: true } + meta: { title: '我管理的', icon: 'user', affix: true, }, + }, { - // 我参与的 - path: 'participate', - component: () => import('@/views/personal/project/participate.vue'), - name: 'Participate', + path: 'childSysManage', + component: () => import('@/views/personal/project/childSystem/manage.vue'), + name: 'ChildSysManage', + meta: { title: '子系统', breadcrumb: true , hidden: true }, + + }, + { + path: 'childModManage', + component: () => import('@/views/personal/project/childModel/manage.vue'), + name: 'ChildModManage', + meta: { title: '子模块', breadcrumb: true , hidden: true } + }, + //我参与的以及子界面 + { + path: 'charge', + component: () => import('@/views/personal/project/charge.vue'), + name: 'Charge', meta: { title: '我参与的', icon: 'user', affix: true } }, - - - - + { + path: 'childSysCharge', + component: () => import('@/views/personal/project/childSystem/manage.vue'), + name: 'ChildSysCharge', + meta: { title: '子系统', breadcrumb: true , hidden: true }, + + }, + { + path: 'childModCharge', + component: () => import('@/views/personal/project/childModel/manage.vue'), + name: 'ChildModCharge', + meta: { title: '子模块', breadcrumb: true , hidden: true } + }, ] - }, + } + , // { diff --git a/src/views/personal/project/charge.vue b/src/views/personal/project/charge.vue index b8461c3..85827ce 100644 --- a/src/views/personal/project/charge.vue +++ b/src/views/personal/project/charge.vue @@ -1,3 +1,136 @@ \ No newline at end of file +
+ + +
+
+ 名称 + +
+
+ 状态 + +
+
+ 查询 + 重置 +
+
+
+ +
+ 项目列表 +
+ + + + + + + + + + + + + + 查看详情 + + + +
+ +
+ + + + \ No newline at end of file diff --git a/src/views/personal/project/childSystem/charge.vue b/src/views/personal/project/childSystem/charge.vue new file mode 100644 index 0000000..ca5b038 --- /dev/null +++ b/src/views/personal/project/childSystem/charge.vue @@ -0,0 +1,136 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/childSystem/manage.vue b/src/views/personal/project/childSystem/manage.vue new file mode 100644 index 0000000..e177ac1 --- /dev/null +++ b/src/views/personal/project/childSystem/manage.vue @@ -0,0 +1,162 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/childmodel/charge.vue b/src/views/personal/project/childmodel/charge.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/personal/project/childmodel/manage.vue b/src/views/personal/project/childmodel/manage.vue new file mode 100644 index 0000000..47a23ae --- /dev/null +++ b/src/views/personal/project/childmodel/manage.vue @@ -0,0 +1,135 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/manage.vue b/src/views/personal/project/manage.vue index a704adf..6b8f7f6 100644 --- a/src/views/personal/project/manage.vue +++ b/src/views/personal/project/manage.vue @@ -1,124 +1,200 @@ - - - \ No newline at end of file +}) + .catch(err => { + console.log(err); + }); + + + +const input = ref(''); + + + + + + + + \ No newline at end of file -- 2.43.0 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 02/15] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=90=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=88=91=E7=AE=A1=E7=90=86=E7=9A=84=E5=92=8C=E6=88=91?= =?UTF-8?q?=E5=8F=82=E4=B8=8E=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=88=E6=8E=A5=E5=8F=A3=E8=BF=98=E6=B2=A1=E5=81=9A=E5=AE=8C?= =?UTF-8?q?=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"> - + - - + + + + 接口文档 + 需求文档 + + + + + + + + 查看详情 - - + + + + \ No newline at end of file + hi + \ No newline at end of file diff --git a/src/views/personal/project/childSystem/charge.vue b/src/views/personal/project/childSystem/participate.vue similarity index 98% rename from src/views/personal/project/childSystem/charge.vue rename to src/views/personal/project/childSystem/participate.vue index ca5b038..b340fd4 100644 --- a/src/views/personal/project/childSystem/charge.vue +++ b/src/views/personal/project/childSystem/participate.vue @@ -73,7 +73,7 @@ const router = useRouter(); const toChildModel = () => { - router.push({name:'ChildModCharge'}) + router.push({name:'ChildModParticipate'}) }; const input = ref(''); diff --git a/src/views/personal/project/childmodel/charge.vue b/src/views/personal/project/childmodel/participate.vue similarity index 97% rename from src/views/personal/project/childmodel/charge.vue rename to src/views/personal/project/childmodel/participate.vue index e38d1e1..5c79f30 100644 --- a/src/views/personal/project/childmodel/charge.vue +++ b/src/views/personal/project/childmodel/participate.vue @@ -77,7 +77,7 @@ // 路由跳转 const toDetail = () => { - router.push({ name: 'ChargeDetail' }); // 跳转到子系统详情页面 + router.push({ name: 'ParticipateDetail' }); // 跳转到子系统详情页面 }; interface User { diff --git a/src/views/personal/project/detail/charge.vue b/src/views/personal/project/detail/participate.vue similarity index 100% rename from src/views/personal/project/detail/charge.vue rename to src/views/personal/project/detail/participate.vue diff --git a/src/views/personal/project/participate.vue b/src/views/personal/project/participate.vue index 5cd477b..7483a84 100644 --- a/src/views/personal/project/participate.vue +++ b/src/views/personal/project/participate.vue @@ -1,3 +1,240 @@ \ No newline at end of file +
+ + +
+
+ 名称 + +
+
+ 状态 + +
+
+ 查询 + 重置 +
+
+
+ +
+ 项目列表 +
+ + + + + + + + + + + + + + + + + + + + + 查看详情 + + + +
+ +
+ + + + \ No newline at end of file -- 2.43.0 From b30cc287e872d56c78a5a268b14e54efbc8e688b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CXCYH=E2=80=9D?= <“1561381013@qq.com”> Date: Thu, 18 Apr 2024 17:17:45 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E6=88=91=E5=8F=82=E4=B8=8E=E7=9A=84?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90=EF=BC=88?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E8=BF=98=E5=B7=AE=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 + src/api/participate.js | 49 +++ .../project/childSystem/participate.vue | 336 +++++++++++------- .../project/childmodel/participate.vue | 316 +++++++++------- .../personal/project/detail/participate.vue | 61 +++- src/views/personal/project/participate.vue | 17 +- 6 files changed, 514 insertions(+), 267 deletions(-) diff --git a/components.d.ts b/components.d.ts index f44ce52..8e58971 100644 --- a/components.d.ts +++ b/components.d.ts @@ -23,6 +23,7 @@ declare module '@vue/runtime-core' { ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] @@ -44,6 +45,7 @@ declare module '@vue/runtime-core' { ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTableRow: typeof import('element-plus/es')['ElTableRow'] ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default'] diff --git a/src/api/participate.js b/src/api/participate.js index a043a3a..d00797a 100644 --- a/src/api/participate.js +++ b/src/api/participate.js @@ -22,6 +22,55 @@ export const getParticipateProjectList = (token)=> { } }) } +/** + * 获取我参与的项目的子系统列表 + * @param projectId 项目ID + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateSystemList = ( projectId,token)=> { + return axios({ + method: 'get', + url: `${api}/module/get?projectId=${projectId}`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} +/** + * 获取我参与的项目的子模块列表 + * @param SysId 项目ID + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateModuleList = ( SysId,token)=> { + return axios({ + method: 'get', + url: `${api}/module/get/min?sysId=${SysId}`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} +/** + * 获取我参与的项目的子模块的详细信息 + * @param ModId 项目ID + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateDetail = ( ModId,token)=> { + return axios({ + method: 'get', + url: `${api}/project/module/id?id=${ModId}`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} + diff --git a/src/views/personal/project/childSystem/participate.vue b/src/views/personal/project/childSystem/participate.vue index b340fd4..f4a4c34 100644 --- a/src/views/personal/project/childSystem/participate.vue +++ b/src/views/personal/project/childSystem/participate.vue @@ -1,136 +1,216 @@ - - - \ No newline at end of file + + // 根据关键词和状态进行检索 + tableData.value = initialTableData.value.filter(item => { + const matchKeyword = (keyword === '' || item.name.toLowerCase().includes(keyword)); + const matchStatus = (status === '' || item.status.toLowerCase().includes(status)); + return matchKeyword && matchStatus; + }); +}; + +const input1 = ref(''); +const input2 = ref(''); + +// 重置检索条件 +const reset = () => { + input1.value = ''; + input2.value = ''; + tableData.value = initialTableData.value.slice(); // 恢复初始数据 +}; + + + + + + + \ No newline at end of file diff --git a/src/views/personal/project/childmodel/participate.vue b/src/views/personal/project/childmodel/participate.vue index 5c79f30..79df9cb 100644 --- a/src/views/personal/project/childmodel/participate.vue +++ b/src/views/personal/project/childmodel/participate.vue @@ -1,140 +1,198 @@ - - - \ No newline at end of file + + // 根据关键词和状态进行检索 + tableData.value = initialTableData.value.filter(item => { + const matchKeyword = (keyword === '' || item.name.toLowerCase().includes(keyword)); + const matchStatus = (status === '' || item.status.toLowerCase().includes(status)); + return matchKeyword && matchStatus; + }); +}; + +const input1 = ref(''); +const input2 = ref(''); + +// 重置检索条件 +const reset = () => { + input1.value = ''; + input2.value = ''; + tableData.value = initialTableData.value.slice(); // 恢复初始数据 +}; + + + + \ No newline at end of file diff --git a/src/views/personal/project/detail/participate.vue b/src/views/personal/project/detail/participate.vue index ddf88ad..c558f28 100644 --- a/src/views/personal/project/detail/participate.vue +++ b/src/views/personal/project/detail/participate.vue @@ -1,7 +1,7 @@ +