Merge branch 'feature-ui' into developer

This commit is contained in:
吴红兵
2026-03-04 12:44:08 +08:00

View File

@@ -46,10 +46,11 @@
@click="handleTodoClick(item)"
>
<div class="todo-item-left">
<el-tag size="small" :type="getTodoType(item.priority)">
{{ getPriorityText(item.priority) }}
<el-tag size="small" type="primary">
{{ item.flowName || '流程' }}
</el-tag>
<span class="todo-title">{{ item.title || item.taskName }}</span>
<span class="todo-title">{{ item.jobName }}</span>
<span class="todo-code" v-if="item.code">({{ item.code }})</span>
</div>
<div class="todo-item-right">
<span class="todo-time">{{ formatTime(item.createTime) }}</span>
@@ -185,33 +186,13 @@ const formatTime = (time: string) => {
}
}
// 获取待办工作优先级文本
const getPriorityText = (priority?: number) => {
const map: Record<number, string> = {
0: '普通',
1: '重要',
2: '紧急'
}
return map[priority || 0] || '普通'
}
// 获取待办工作优先级类型
const getTodoType = (priority?: number) => {
const map: Record<number, string> = {
0: 'info',
1: 'warning',
2: 'danger'
}
return map[priority || 0] || 'info'
}
// 加载待办工作
const loadTodoList = async () => {
try {
todoLoading.value = true
const res = await fetchTodoPage({ current: 1, size: 10 })
if (res.code === 0 && res.data) {
todoList.value = res.data.rows || res.data || []
todoList.value = res.data.records || res.data.rows || res.data || []
}
} catch (e) {
console.error('加载待办工作失败:', e)
@@ -254,13 +235,15 @@ const loadMessageList = async () => {
// 点击待办项
const handleTodoClick = (item: any) => {
// 根据待办类型跳转到对应页面
if (item.businessType) {
router.push({
path: '/stuwork/pendingwork',
query: { id: item.id }
})
}
// 跳转到流程处理页面
router.push({
path: '/jsonflow/run-job/do-job',
query: {
flowInstId: item.flowInstId,
id: item.id,
runNodeId: item.runNodeId
}
})
}
// 点击通知公告
@@ -435,6 +418,12 @@ onUnmounted(() => {
color: var(--el-text-color-primary);
}
.todo-code {
font-size: 12px;
color: var(--el-text-color-secondary);
margin-left: 4px;
}
.todo-item-right {
display: flex;
align-items: center;