Merge remote-tracking branch 'origin/master'

This commit is contained in:
Net 2025-06-10 16:27:38 +08:00
commit 1cc0122ae9
3 changed files with 3421 additions and 4716 deletions

7843
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) => {
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="tab-item"
:class="{ active: currentTab === 0 }"
@click="changeTab(0)"
:class="{ active: currentTab === 1 }"
@click="changeTab(1)"
>
待办
</view>
<view
class="tab-item"
:class="{ active: currentTab === 1 }"
@click="changeTab(1)"
:class="{ active: currentTab === 0 }"
@click="changeTab(0)"
>
已办
</view>
@ -22,10 +22,10 @@
<template #default="{ data }">
<view class="white-bg-color r-md p-15 mb-15 flex-row" @click="goToDetail(data)">
<view class="card-left">
<view class="card-title">{{ data.title }}</view>
<view class="card-desc">{{ data.desc }}</view>
<view class="card-title">{{ data.rwmc }}</view>
<view class="card-desc" v-html="data.rwms"></view>
<view class="card-meta">
<text>{{ data.date }}</text>
<text>{{ data.fbsj }}</text>
<text>{{ data.timeAgo }}</text>
</view>
</view>
@ -44,9 +44,10 @@
</template>
<script lang="ts" setup>
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 = [
@ -75,21 +76,24 @@ const mockTodoList = [
const testList = async (param: any): Promise<Requests<any>> => {
return new Promise((resolve) => {
setTimeout(() => {
resolve({ message: "测试", resultCode: 1, rows: mockTodoList });
resolve({message: "测试", resultCode: 1, rows: mockTodoList});
}, 1000);
});
};
const [register, { reload, setParam }] = useLayout({
api: testList,
componentProps: {},
const [register, {reload, setParam}] = useLayout({
api: jsdFindPageTaskApi,
componentProps: {
auto: false
},
});
const currentTab = ref(0); // 0: , 1:
const currentTab = ref(1); // 0: , 1:
const fetchListData = async (tabIndex: number) => {
setParam({
type: tabIndex,
mobile: getUser.mobile
});
reload();
};
@ -100,7 +104,9 @@ const changeTab = (tabIndex: number) => {
fetchListData(tabIndex);
}
};
import {useUserStore} from "@/store/modules/user";
const {getUser} = useUserStore()
// ()
onMounted(() => {
fetchListData(currentTab.value);
@ -114,7 +120,7 @@ const goToDetail = (data: any) => {
uni.navigateTo({
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)
console.warn("Navigating using title as ID fallback for:", data);
const encodedTitle = encodeURIComponent(data.title);
@ -123,7 +129,7 @@ const goToDetail = (data: any) => {
});
} else {
console.error("Cannot navigate to detail: Missing identifier (id or title) in data:", data);
uni.showToast({ title: "无法打开详情", icon: "none" });
uni.showToast({title: "无法打开详情", icon: "none"});
}
};
</script>
@ -153,6 +159,7 @@ const goToDetail = (data: any) => {
font-weight: bold;
color: #333;
}
.navbar-actions {
position: absolute;
right: 15px;
@ -234,6 +241,7 @@ const goToDetail = (data: any) => {
overflow: hidden;
text-overflow: ellipsis;
}
.card-desc {
font-size: 13px;
color: #666;
@ -244,9 +252,11 @@ const goToDetail = (data: any) => {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.card-meta {
font-size: 12px;
color: #999;
text {
margin-right: 10px;
}
@ -272,22 +282,27 @@ const goToDetail = (data: any) => {
&.notice {
background-color: #447ade;
}
&.task {
background-color: #19be6b;
}
//
&.approval {
background-color: #ff9f0a; //
}
&.submit {
background-color: #8e8e93; //
}
}
.stats {
display: flex;
align-items: center;
font-size: 12px;
color: #999;
.icon {
margin-left: 8px;
display: flex;