diff --git a/app/view/page/approvalManagement.html b/app/view/page/approvalManagement.html index ca9264f..5889184 100644 --- a/app/view/page/approvalManagement.html +++ b/app/view/page/approvalManagement.html @@ -46,6 +46,12 @@ 已处理 + + + 已抄送 + + 已抄送 + @@ -217,6 +223,7 @@ isTableLoading: true, tableData: [], historyData: [], + noticeData:[], headers: [ { text: "审批ID", value: "taskId", width: 90 }, { text: "分组", value: "taskTemplateGroup", width: 100 }, @@ -248,13 +255,27 @@ // 计算 computed: { tableDataList() { - return this.workflowType === 'todo' ? this.tableData : this.historyData; + var data = []; + switch (this.workflowType) { + case 'todo': + data = this.tableData; + break; + case 'history': + data = this.historyData; + break; + case 'notice': + data = this.noticeData; + break; + default: + break; + } + return data; }, }, watch: {}, mounted() { this.doUiAction('getTableData'); - this.doUiAction('getHistoryData'); + this.doUiAction('getTaskHistoryData'); }, methods: { async doUiAction(uiActionId, uiActionData) { @@ -262,8 +283,8 @@ case 'getTableData': await this.getTableData(); break; - case 'getHistoryData': - await this.getHistoryData(); + case 'getTaskHistoryData': + await this.getTaskHistoryData(); break; case 'startUpdateItem': await this.prepareUpdateFormData(uiActionData); @@ -276,7 +297,7 @@ await this.submitForReview(uiActionData); await this.closeSubmitDrawer(); this.getTableData(); - this.getHistoryData(); + this.getTaskHistoryData(); break; default: console.error("[doUiAction] uiActionId not find", { uiActionId }); @@ -298,7 +319,7 @@ this.tableData = result.data.appData.resultData; this.isTableLoading = false; }, - async getHistoryData() { + async getTaskHistoryData() { this.isTableLoading = true; const result = await window.jianghuAxios({ data: { @@ -306,7 +327,8 @@ pageId: 'approvalManagement', actionId: 'selectHistoryList', actionData: {}, - whereLike: { createHistoryBy: '<$ ctx.userInfo.userId $>', taskConfigId: 'approvalTask-' }, + where: { createHistoryBy: '<$ ctx.userInfo.userId $>'}, + whereOrOptions: [['taskConfigId', 'like', 'approvalTask-%'], ['taskConfigId', 'like', 'noticeTask-%']], orderBy: [{ column: 'operationAt', order: 'desc' }] } } @@ -318,7 +340,8 @@ rows.forEach(row => { row.operationAt = dayjs(row.operationAt).format('YYYY-MM-DD HH:mm:ss'); }); - this.historyData = rows; + this.historyData = rows.filter(data => data.taskConfigId.startsWith('approvalTask-') ); + this.noticeData = rows.filter(data => data.taskConfigId.startsWith('noticeTask-') ); }, // ---------- 审核、查看 uiAction >>>>>>>>>>>> -------- async prepareUpdateFormData(funObj) {