任务查询

This commit is contained in:
zwq 2025-06-08 19:07:15 +08:00
parent edc5edece2
commit ff2a58510f
3 changed files with 3421 additions and 4716 deletions

7839
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -27,3 +27,6 @@ export const findAllNjBjTree = async () => {
export const jsConfirmJsDataApi = async (params: any) => { export const jsConfirmJsDataApi = async (params: any) => {
return await post("/api/js/confirmJsData", params); return await post("/api/js/confirmJsData", params);
}; };
export const jsdFindPageTaskApi = async (params: any) => {
return await get("/api/jsd/findPageTask", params);
};

View File

@ -5,15 +5,15 @@
<view class="tabs-container"> <view class="tabs-container">
<view <view
class="tab-item" class="tab-item"
:class="{ active: currentTab === 0 }" :class="{ active: currentTab === 1 }"
@click="changeTab(0)" @click="changeTab(1)"
> >
待办 待办
</view> </view>
<view <view
class="tab-item" class="tab-item"
:class="{ active: currentTab === 1 }" :class="{ active: currentTab === 0 }"
@click="changeTab(1)" @click="changeTab(0)"
> >
已办 已办
</view> </view>
@ -22,10 +22,10 @@
<template #default="{ data }"> <template #default="{ data }">
<view class="white-bg-color r-md p-15 mb-15 flex-row" @click="goToDetail(data)"> <view class="white-bg-color r-md p-15 mb-15 flex-row" @click="goToDetail(data)">
<view class="card-left"> <view class="card-left">
<view class="card-title">{{ data.title }}</view> <view class="card-title">{{ data.rwmc }}</view>
<view class="card-desc">{{ data.desc }}</view> <view class="card-desc" v-html="data.rwms"></view>
<view class="card-meta"> <view class="card-meta">
<text>{{ data.date }}</text> <text>{{ data.fbsj }}</text>
<text>{{ data.timeAgo }}</text> <text>{{ data.timeAgo }}</text>
</view> </view>
</view> </view>
@ -47,6 +47,7 @@
import {ref, reactive, watch, onMounted} from "vue"; import {ref, reactive, watch, onMounted} from "vue";
import {useLayout} from "@/components/BasicListLayout/hooks/useLayout"; import {useLayout} from "@/components/BasicListLayout/hooks/useLayout";
import {jsdFindPageTaskApi} from "@/api/base/server";
// //
const mockTodoList = [ const mockTodoList = [
@ -81,15 +82,18 @@ const testList = async (param: any): Promise<Requests<any>> => {
}; };
const [register, {reload, setParam}] = useLayout({ const [register, {reload, setParam}] = useLayout({
api: testList, api: jsdFindPageTaskApi,
componentProps: {}, componentProps: {
auto: false
},
}); });
const currentTab = ref(0); // 0: , 1: const currentTab = ref(1); // 0: , 1:
const fetchListData = async (tabIndex: number) => { const fetchListData = async (tabIndex: number) => {
setParam({ setParam({
type: tabIndex, type: tabIndex,
mobile: getUser.mobile
}); });
reload(); reload();
}; };
@ -100,7 +104,9 @@ const changeTab = (tabIndex: number) => {
fetchListData(tabIndex); fetchListData(tabIndex);
} }
}; };
import {useUserStore} from "@/store/modules/user";
const {getUser} = useUserStore()
// () // ()
onMounted(() => { onMounted(() => {
fetchListData(currentTab.value); fetchListData(currentTab.value);
@ -114,7 +120,7 @@ const goToDetail = (data: any) => {
uni.navigateTo({ uni.navigateTo({
url: `/pages/base/message/detail?id=${encodedId}` url: `/pages/base/message/detail?id=${encodedId}`
}); });
} else if (data && data.title) { } else if (data && data.rwmc) {
// Fallback: use title if id is missing (less reliable) // Fallback: use title if id is missing (less reliable)
console.warn("Navigating using title as ID fallback for:", data); console.warn("Navigating using title as ID fallback for:", data);
const encodedTitle = encodeURIComponent(data.title); const encodedTitle = encodeURIComponent(data.title);
@ -153,6 +159,7 @@ const goToDetail = (data: any) => {
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
.navbar-actions { .navbar-actions {
position: absolute; position: absolute;
right: 15px; right: 15px;
@ -234,6 +241,7 @@ const goToDetail = (data: any) => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.card-desc { .card-desc {
font-size: 13px; font-size: 13px;
color: #666; color: #666;
@ -244,9 +252,11 @@ const goToDetail = (data: any) => {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.card-meta { .card-meta {
font-size: 12px; font-size: 12px;
color: #999; color: #999;
text { text {
margin-right: 10px; margin-right: 10px;
} }
@ -272,22 +282,27 @@ const goToDetail = (data: any) => {
&.notice { &.notice {
background-color: #447ade; background-color: #447ade;
} }
&.task { &.task {
background-color: #19be6b; background-color: #19be6b;
} }
// //
&.approval { &.approval {
background-color: #ff9f0a; // background-color: #ff9f0a; //
} }
&.submit { &.submit {
background-color: #8e8e93; // background-color: #8e8e93; //
} }
} }
.stats { .stats {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
color: #999; color: #999;
.icon { .icon {
margin-left: 8px; margin-left: 8px;
display: flex; display: flex;