yxk-20260714
改造抄送模块,将我的抄送拆分为:我的待阅和我的已阅
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
待办
|
||||
<span class="my-work__badge my-work__badge--danger">{{ todoTotal }}</span>
|
||||
</div>
|
||||
<div class="my-work__tab" :class="{ 'my-work__tab--active': activeTab === 'cc' }" @click="activeTab = 'cc'">我的抄送</div>
|
||||
<div class="my-work__tab" :class="{ 'my-work__tab--active': activeTab === 'cc' }" @click="activeTab = 'cc'">待阅</div>
|
||||
</div>
|
||||
<ReloadOutlined class="my-work__refresh" :class="{ 'my-work__refresh--spinning': refreshing }" @click="handleRefresh" />
|
||||
<a class="my-work__more" @click="goMore">
|
||||
@@ -110,7 +110,7 @@
|
||||
designScope: 'process-portal-cc',
|
||||
pagination: true,
|
||||
tableProps: {
|
||||
api: ccList,
|
||||
api: (params) => ccList({ ...params, isRead: 0 }),
|
||||
columns: ccColumns,
|
||||
showIndexColumn: true,
|
||||
showTableSetting: false,
|
||||
@@ -120,7 +120,7 @@
|
||||
useSearchForm: false,
|
||||
},
|
||||
});
|
||||
const [registerCcTable] = ccContext;
|
||||
const [registerCcTable, { reload: reloadCc }] = ccContext;
|
||||
|
||||
onMounted(() => {
|
||||
fetchTodoTotal();
|
||||
@@ -138,7 +138,11 @@
|
||||
async function handleRefresh() {
|
||||
refreshing.value = true;
|
||||
try {
|
||||
reloadTodo();
|
||||
if (activeTab.value === 'todo') {
|
||||
reloadTodo();
|
||||
} else {
|
||||
reloadCc();
|
||||
}
|
||||
await fetchTodoTotal();
|
||||
emit('refresh');
|
||||
} finally {
|
||||
@@ -150,7 +154,7 @@
|
||||
if (activeTab.value === 'todo') {
|
||||
router.push('/task/myTodoTaskInfo');
|
||||
} else {
|
||||
router.push('/task/myCcTaskListInfo');
|
||||
router.push('/task/myUnreadCcTaskList');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,82 +1,9 @@
|
||||
<template>
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
||||
<!-- 查看历史 -->
|
||||
<task-handle-modal @register="registerHistoryModal"></task-handle-modal>
|
||||
<CcTaskListContent :is-read="0" design-scope="my-cc-task-list" show-read-action />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { BasicTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { ref } from 'vue';
|
||||
import { columns, searchFormSchema } from './task.cc.data';
|
||||
import { list } from './task.cc.api';
|
||||
import { getTaskInfoForHistory } from '../myHandleTask/useTaskList';
|
||||
import TaskHandleModal from '../myHandleTask/modal/TaskHandleModal.vue';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
<script lang="ts" setup>
|
||||
import CcTaskListContent from './CcTaskListContent.vue';
|
||||
|
||||
export default {
|
||||
name: 'MyCcTaskList',
|
||||
components: {
|
||||
BasicTable,
|
||||
TaskHandleModal,
|
||||
TableAction,
|
||||
},
|
||||
setup() {
|
||||
const { tableContext } = useListPage({
|
||||
designScope: 'my-apply-task-list',
|
||||
pagination: true,
|
||||
tableProps: {
|
||||
api: list,
|
||||
columns: columns,
|
||||
pagination: { pageSize: 12, defaultPageSize: 12 },
|
||||
showIndexColumn: true,
|
||||
showTableSetting: true,
|
||||
canResize: false,
|
||||
scroll: { x: 1600 },
|
||||
actionColumn: { dataIndex: 'action', fixed: 'right' },
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
autoAdvancedCol: 4,
|
||||
baseColProps: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
|
||||
actionColOptions: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload }] = tableContext;
|
||||
const [registerHistoryModal, { openModal: openHistoryModal }] = useModal();
|
||||
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '查看详情',
|
||||
onClick: showHistory.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
// NY5LzSY2VW1BSthYSnJArCFqbgwtZqSuyPQ/OD1n1twWJGU2RN/wkzf+kBVO5DztN85Ca9keeuaRAiwcatr8N0M15+Wv2SmRw82lMwawE2naX5tpJMpkxrUhUUcjnC+BSBL4+PV2JUXBFW8/oOG8HLqYvmPxoP7MMBhMi9D7lRY=
|
||||
async function showHistory(record) {
|
||||
let { formData, formUrl } = await getTaskInfoForHistory(record);
|
||||
formData['PROCESS_TAB_TYPE'] = 'history';
|
||||
openHistoryModal(true, {
|
||||
formData,
|
||||
formUrl,
|
||||
title: '流程历史',
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
registerTable,
|
||||
getTableAction,
|
||||
registerHistoryModal,
|
||||
};
|
||||
},
|
||||
};
|
||||
defineOptions({ name: 'MyCcTaskList' });
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list = '/act/task/taskAllCcHistoryList',
|
||||
read = '/act/process/extActTaskCc/read',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9,3 +10,9 @@ enum Api {
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 标记已阅
|
||||
* @param id 抄送记录ID
|
||||
*/
|
||||
export const markRead = (id) => defHttp.put({ url: Api.read, params: { id } });
|
||||
|
||||
@@ -57,6 +57,18 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 已阅列表在原抄送列表基础上补充已阅时间。
|
||||
*/
|
||||
export const readColumns: BasicColumn[] = [
|
||||
...columns,
|
||||
{
|
||||
title: '已阅时间',
|
||||
align: 'center',
|
||||
dataIndex: 'readTime',
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 查询条件
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user