Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1cc0122ae9
7839
pnpm-lock.yaml
generated
7839
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
};
|
||||
|
||||
@ -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>
|
||||
@ -47,6 +47,7 @@
|
||||
import {ref, reactive, watch, onMounted} from "vue";
|
||||
|
||||
import {useLayout} from "@/components/BasicListLayout/hooks/useLayout";
|
||||
import {jsdFindPageTaskApi} from "@/api/base/server";
|
||||
|
||||
// 模拟待办列表数据
|
||||
const mockTodoList = [
|
||||
@ -81,15 +82,18 @@ const testList = async (param: any): Promise<Requests<any>> => {
|
||||
};
|
||||
|
||||
const [register, {reload, setParam}] = useLayout({
|
||||
api: testList,
|
||||
componentProps: {},
|
||||
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);
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user