抄送我的

This commit is contained in:
ChenXinXin committed 2024-05-17 10:33:11 +08:00
1 parent 5fe0c03efb
commit 4ddb6e428a
1 file changed
+31 -8
+31 -8
View File
@@ -46,6 +46,12 @@
</v-badge>
<span v-else class="">已处理</span>
</v-btn>
<v-btn value="notice" small class="jh-backend-search-btn">
<v-badge v-if="noticeData.length" inline :content="noticeData.length" color="grey darken-3">
<span class="">已抄送</span>
</v-badge>
<span v-else class="">已抄送</span>
</v-btn>
</v-btn-toggle>
</v-col>
<!--搜索-->
@@ -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) {