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] =?UTF-8?q?=E6=88=91=E5=8F=82=E4=B8=8E=E7=9A=84=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90=EF=BC=88=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=95=B0=E6=8D=AE=E8=BF=98=E5=B7=AE=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=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 @@