Browse Source

计划预约任务联合调整

dev
wangmingyong@163.com 1 month ago
parent
commit
8338d26e21
  1. 3
      zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/reserve.js
  2. 3
      zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/task.js
  3. 13
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementReserveList.vue
  4. 11
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementTaskList.vue
  5. 180
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/messageCenter.vue
  6. 9
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue
  7. 5
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_list.vue
  8. 3
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_mine.vue
  9. 185
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_other.vue
  10. 15
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/reserve/cp_reserve_list.vue

3
zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/reserve.js

@ -40,4 +40,7 @@ export const rejectReserveByManual = (id, success, error) => _put(reserveBaseUrl
// 查询同组关联计划(同planGroupId下的其他预约记录关联的计划信息)
export const getReserveGroupMembers = (planGroupId, excludeId, success, error) => _get(reserveBaseUrl + "/groupMembers", { planGroupId, excludeId }, success, error);
// 标记预约消息为已读
export const readReserve = (reserveId, success, error) => _get(reserveBaseUrl + "/read", { reserveId }, success, error);
// endregion

3
zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/task.js

@ -16,4 +16,7 @@ export const getMyTaskDetail = (planId, success, error) => _get(taskBaseUrl + "/
// 批量查询联合执法任务的关联单位信息(第二次请求)
export const getMyTaskAssociatedPlans = (planIds, success, error) => _get(taskBaseUrl + "/myListAssociatedPlans", { planIds }, success, error);
// 标记任务消息为已读
export const myTaskMsgRead = (taskId, success, error) => _get(taskBaseUrl + "/myTaskMsgRead", { taskId }, success, error);
// endregion

13
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementReserveList.vue

@ -67,7 +67,7 @@ import { ref, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { showToast } from 'vant';
import SearchFilterBar from '@/components/common/SearchFilterBar.vue';
import { getReserveList } from '@/api/enforcement/reserve';
import { getReserveList, readReserve } from '@/api/enforcement/reserve';
const router = useRouter();
@ -86,6 +86,7 @@ const fetchReserveList = () => {
const params = {
pageNum: pageNum.value,
pageSize: pageSize.value,
opStatus:3,
};
if (searchText.value) {
params.searchValue = searchText.value;
@ -148,7 +149,15 @@ const formatTime = (val) => {
// ========== ==========
const toDetail = (item) => {
showToast('查看详情');
if (item.id || item.reserveId) {
readReserve(item.id || item.reserveId, () => {}, () => {});
}
router.push({
path: '/enforcement/reserve',
query: {
resFrom: String(item.resFrom ?? 0),
}
});
};
const onLoad = () => {

11
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementTaskList.vue

@ -50,7 +50,7 @@ import { ref, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { showToast } from 'vant';
import SearchFilterBar from '@/components/common/SearchFilterBar.vue';
import { getMyTaskList } from '@/api/enforcement/task';
import { getMyTaskList, myTaskMsgRead } from '@/api/enforcement/task';
const router = useRouter();
@ -84,6 +84,9 @@ const formatTime = (val) => {
// ========== ==========
const toDetail = (item) => {
if (!item.planDate) return;
if (item.id) {
myTaskMsgRead(item.id, () => {}, () => {});
}
const d = new Date(item.planDate);
router.push({
path: '/enforcement/task',
@ -176,7 +179,6 @@ const onDateChange = ({ dateType: type, dateSearch: search }) => {
};
onMounted(() => {
console.log('enforcementTaskList mounted');
fetchTaskList();
});
</script>
@ -233,9 +235,8 @@ onMounted(() => {
position: absolute;
top: -0.05rem;
right: -0.05rem;
width: 0.12rem;
height: 0.12rem;
min-width: 0.12rem;
width: 6px;
height: 6px;
background-color: #ee0a24;
border-radius: 50%;
}

180
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/messageCenter.vue

@ -10,7 +10,11 @@
<div class="content-area">
<!-- Tab 切换 -->
<van-tabs v-model:active="activeTab" class="message-tabs" sticky swipeable>
<van-tab title="消息">
<van-tab>
<template #title>
<span>消息</span>
<span v-if="messageTotalCount > 0" class="tab-badge">{{ messageTotalCount > 99 ? '99+' : messageTotalCount }}</span>
</template>
<!-- 消息列表 -->
<van-pull-refresh v-model="messageRefreshing" @refresh="onMessageRefresh">
<van-list v-model:loading="messageLoading" :finished="messageFinished" finished-text="没有更多了"
@ -19,8 +23,8 @@
<div class="message-item" v-for="item in messageList" :key="item.id"
@click="onMessageClick(item)">
<div class="item-icon" :class="item.iconBg">
<!-- 红点角标 -->
<div class="item-icon" :class="item.iconClass">
<component :is="item.iconComp" />
<span v-if="item.unreadCount > 0" class="icon-badge">{{ item.unreadCount > 99 ?
'99+' : item.unreadCount }}</span>
</div>
@ -37,7 +41,11 @@
</van-pull-refresh>
</van-tab>
<van-tab title="待办">
<van-tab>
<template #title>
<span>待办</span>
<span v-if="todoTotalCount > 0" class="tab-badge">{{ todoTotalCount > 99 ? '99+' : todoTotalCount }}</span>
</template>
<!-- 待办列表 -->
<van-pull-refresh v-model="todoRefreshing" @refresh="onTodoRefresh">
<van-list v-model:loading="todoLoading" :finished="todoFinished" finished-text="没有更多了"
@ -46,7 +54,8 @@
<div class="message-item" v-for="item in todoList" :key="item.id"
@click="onTodoClick(item)">
<div class="item-icon" :class="item.iconBg">
<div class="item-icon" :class="item.iconClass">
<component :is="item.iconComp" />
<span v-if="item.unreadCount > 0" class="icon-badge">{{ item.unreadCount > 99 ?
'99+' : item.unreadCount }}</span>
</div>
@ -71,7 +80,7 @@
</template>
<script setup name="messageCenter">
import { ref, computed, onMounted, watch } from 'vue';
import { ref, computed, onMounted, watch, h } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { showToast } from 'vant';
import 'vant/es/toast/style';
@ -79,12 +88,46 @@ import FooterBar from '@/components/FooterBar.vue';
import { getMessageUnreadCount } from '@/api/enforcement/index';
import { pffwCount, zfpjcount, zfygCount, jhtzcount, zfrwCount, zfyqCount, setMessageStats } from '@/store/messageState';
// ========== SVG ==========
const IconLaw = () => h('svg', { viewBox: '0 0 24 24', fill: 'currentColor' }, [
h('path', { d: 'M12 3v10.55c-.59.34-1.27.55-2 .55-2.21 0-4-1.79-4-4s1.79-4 4-4c.28 0 .54.04.79.1C10.81 4.19 11.38 3.5 12 3zm1 2.26V9h1.74C14.38 7.88 13.34 6.64 12 6.26zM11 21c3.87 0 7-3.13 7-7h-2c0 2.76-2.24 5-5 5s-5-2.24-5-5H4c0 3.87 3.13 7 7 7z' }),
]);
const IconPlan = () => h('svg', { viewBox: '0 0 24 24', fill: 'currentColor' }, [
h('path', { d: 'M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z' }),
]);
const IconFeedback = () => h('svg', { viewBox: '0 0 24 24', fill: 'currentColor' }, [
h('path', { d: 'M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z' }),
]);
const IconNotice = () => h('svg', { viewBox: '0 0 24 24', fill: 'currentColor' }, [
h('path', { d: 'M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM7 9h10v2H7V9zm6 5H7v-2h6v2zm4-6H7V6h10v2z' }),
]);
const IconTask = () => h('svg', { viewBox: '0 0 24 24', fill: 'currentColor' }, [
h('path', { d: 'M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-2 14l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z' }),
]);
const IconAppointment = () => h('svg', { viewBox: '0 0 24 24', fill: 'currentColor' }, [
h('path', { d: 'M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z' }),
]);
const router = useRouter();
const route = useRoute();
// ========== Tab ==========
const activeTab = ref(0);
// ========== ==========
const messageTotalCount = computed(() => {
return pffwCount.value + zfpjcount.value + jhtzcount.value;
});
const todoTotalCount = computed(() => {
return zfygCount.value + zfrwCount.value + zfyqCount.value;
});
// ========== ==========
const messageList = ref([]);
const messageLoading = ref(false);
@ -122,8 +165,8 @@ const initMessageList = () => {
title: '涉企普法',
desc: '',
time: '',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconLaw,
iconClass: 'icon-blue',
unreadCount: pffwCount.value,
},
// {
@ -131,8 +174,8 @@ const initMessageList = () => {
// title: '',
// desc: '',
// time: '',
// icon: 'law',
// iconBg: 'icon-blue',
// iconComp: IconPlan,
// iconClass: 'icon-cyan',
// unreadCount: jhtzcount.value,
// },
{
@ -140,16 +183,17 @@ const initMessageList = () => {
title: '执法反馈',
desc: '',
time: '',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconFeedback,
iconClass: 'icon-orange',
unreadCount: zfpjcount.value,
},{
},
{
id: 4,
title: '非现场执法反馈',
desc: '',
time: '',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconFeedback,
iconClass: 'icon-red',
unreadCount: zfpjcount.value,
},
];
@ -163,8 +207,8 @@ const initTodoList = () => {
title: '执法预告',
desc: '',
time: '',
icon: 'check',
iconBg: 'icon-red',
iconComp: IconNotice,
iconClass: 'icon-cyan',
unreadCount: zfygCount.value,
},
{
@ -172,8 +216,8 @@ const initTodoList = () => {
title: '执法任务',
desc: '',
time: '',
icon: 'check',
iconBg: 'icon-red',
iconComp: IconTask,
iconClass: 'icon-red',
unreadCount: zfrwCount.value,
},
{
@ -181,8 +225,8 @@ const initTodoList = () => {
title: '联合执法预约',
desc: '',
time: '',
icon: 'check',
iconBg: 'icon-red',
iconComp: IconAppointment,
iconClass: 'icon-teal',
unreadCount: zfyqCount.value,
},
];
@ -198,16 +242,16 @@ const fetchMessageList = () => {
title: '涉企普法',
desc: '最新一条普法信息标题',
time: '2026-04-15 10:07',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconLaw,
iconClass: 'icon-blue',
unreadCount: pffwCount.value,
}, {
id: 2,
title: '计划通知',
desc: jhtzcount.value > 0 ? `您有${jhtzcount.value}条计划通知,请及时查看` : '暂无计划通知',
time: '2026-04-15 10:07',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconPlan,
iconClass: 'icon-cyan',
unreadCount: jhtzcount.value,
},
{
@ -215,8 +259,8 @@ const fetchMessageList = () => {
title: '执法反馈',
desc: zfpjcount.value > 0 ? `您有${zfpjcount.value}条执法反馈,请及时查看` : '暂无执法反馈',
time: '2026-04-15 10:07',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconFeedback,
iconClass: 'icon-orange',
unreadCount: zfpjcount.value,
},
{
@ -224,11 +268,10 @@ const fetchMessageList = () => {
title: '非现场执法反馈',
desc: zfpjcount.value > 0 ? `您有${zfpjcount.value}条非现场执法反馈,请及时查看` : '暂无非现场执法反馈',
time: '2026-04-15 10:07',
icon: 'law',
iconBg: 'icon-blue',
iconComp: IconFeedback,
iconClass: 'icon-red',
unreadCount: zfpjcount.value,
},
];
messageRefreshing.value = false;
}
@ -247,8 +290,8 @@ const fetchTodoList = () => {
title: '执法预告',
desc: zfygCount.value > 0 ? `您有${zfygCount.value}条执法预告,请及时查看` : '暂无执法预告',
time: '2026-04-15 09:30',
icon: 'check',
iconBg: 'icon-red',
iconComp: IconNotice,
iconClass: 'icon-cyan',
unreadCount: zfygCount.value,
},
{
@ -256,8 +299,8 @@ const fetchTodoList = () => {
title: '执法任务',
desc: zfrwCount.value > 0 ? `您有${zfrwCount.value}条执法任务,请及时查看` : '暂无执法任务',
time: '2026-04-15 09:30',
icon: 'check',
iconBg: 'icon-red',
iconComp: IconTask,
iconClass: 'icon-red',
unreadCount: zfrwCount.value,
},
{
@ -265,8 +308,8 @@ const fetchTodoList = () => {
title: '联合执法预约',
desc: zfyqCount.value > 0 ? `您有${zfyqCount.value}条联合执法预约,请及时查看` : '暂无联合执法预约',
time: '2026-04-15 09:30',
icon: 'check',
iconBg: 'icon-red',
iconComp: IconAppointment,
iconClass: 'icon-teal',
unreadCount: zfyqCount.value,
},
];
@ -280,7 +323,7 @@ const fetchTodoList = () => {
// ========== ==========
const onMessageLoad = () => {
if (messageRefreshing.value) return;
fetchMessageList();
// fetchMessageList();
messagePageNum.value++;
};
@ -289,14 +332,14 @@ const onMessageRefresh = () => {
messagePageNum.value = 1;
messageFinished.value = false;
messageLoading.value = true;
fetchMessageList();
// fetchMessageList();
messagePageNum.value++;
};
// ========== ==========
const onTodoLoad = () => {
if (todoRefreshing.value) return;
fetchTodoList();
// fetchTodoList();
todoPageNum.value++;
};
@ -305,7 +348,7 @@ const onTodoRefresh = () => {
todoPageNum.value = 1;
todoFinished.value = false;
todoLoading.value = true;
fetchTodoList();
// fetchTodoList();
todoPageNum.value++;
};
@ -452,6 +495,20 @@ onMounted(() => {
border-radius: 2px;
}
.tab-badge {
display: inline-block;
min-width: 16px;
height: 16px;
padding: 0 4px;
margin-left: 4px;
background: #f44336;
border-radius: 8px;
color: #fff;
font-size: 10px;
line-height: 16px;
text-align: center;
}
:deep(.message-tabs .van-tabs__content) {
background: #fbfdff;
padding: 12px 16px;
@ -484,26 +541,39 @@ onMounted(() => {
height: 24px;
color: #fff;
}
&.icon-blue {
background: linear-gradient(135deg, #60a5fa, #3b82f6);
}
&.icon-cyan {
background: linear-gradient(135deg, #22d3ee, #06b6d4);
}
&.icon-teal {
background: linear-gradient(135deg, #2dd4bf, #14b8a6);
}
&.icon-orange {
background: linear-gradient(135deg, #fb923c, #f97316);
}
&.icon-red {
background: linear-gradient(135deg, #f87171, #ef4444);
}
&.icon-green {
background: linear-gradient(135deg, #34d399, #10b981);
}
&.icon-purple {
background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}
}
.item-right{
font-size: 22px;
color: #a6a6a6;
}
/* 图标背景色 */
.icon-blue {
background: url('@/assets/images/icon_pffw.jpg') center center no-repeat;
background-size: 100% 100%;
}
.icon-orange {
// background: url('@/assets/images/icon_zfyg.jpg') center center no-repeat;
// background-size: 100% 100%;
}
.icon-red {
background: url('@/assets/images/icon_zfpj.jpg') center center no-repeat;
background-size: 100% 100%;
}
/* 红点角标 */
.icon-badge {

9
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue

@ -13,7 +13,7 @@
v-if="showNotice"
left-icon="info-o"
:text="noticeText"
:scrollable="false"
:scrollable="true"
background="#fff9dc"
color="#7d661c"
class="notice-bar"
@ -101,7 +101,7 @@
<span class="person-name">{{ person.name }}</span>
<span class="person-phone">{{ person.phone }}</span>
<van-icon
v-if="personList.length > 1"
v-if="personList.length > 1 && person.id !== useCommon.userId"
name="close"
class="person-remove"
@click="removePerson(index)"
@ -651,6 +651,11 @@ const onSelectPerson = (user) => {
//
const removePerson = (index) => {
const person = personList.value[index];
if (person && person.id === useCommon.userId) {
showToast('本人不可移除');
return;
}
personList.value.splice(index, 1);
syncPersonData();
};

5
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_list.vue

@ -28,7 +28,10 @@
</div>
<!-- 悬浮新增按钮仅我的计划Tab显示 -->
<div v-if="activeTab === 'mine'" class="add-btn" @click="onAdd">
<!-- <div v-if="activeTab === 'mine'" class="add-btn" @click="onAdd">
<van-icon name="plus" size="22" color="#fff" />
</div> -->
<div class="add-btn" @click="onAdd">
<van-icon name="plus" size="22" color="#fff" />
</div>
</div>

3
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_mine.vue

@ -14,8 +14,7 @@
</div> -->
<!-- 统一搜索和时间筛选组件 -->
<SearchFilterBar :search-value="searchText" :date-type="dateType" :date-search="dateSearch"
@search="onSearch" @clear="onClear" @date-change="onDateChange" />
<SearchFilterBar :search-value="searchText" :showDateFilter="false" @search="onSearch" @clear="onClear" @date-change="onDateChange" />
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list

185
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_other.vue

@ -1,11 +1,15 @@
<template>
<div class="plan-other">
<!-- 搜索触发栏 -->
<div class="search-trigger" @click="showSearchPopup = true">
<van-icon name="search" size="16" color="#666" />
<span class="search-trigger-text">{{ searchSummary || '点击筛选查询' }}</span>
<van-icon v-if="hasSearchCondition" name="clear" size="14" color="#999" @click.stop="onResetSearch" />
</div>
<!-- 统一搜索和时间筛选组件 -->
<SearchFilterBar
:search-value="searchText"
:date-type="dateType"
:date-search="dateSearch"
:showDateFilter="false"
@search="onSearch"
@clear="onClear"
@date-change="onDateChange"
/>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
@ -66,51 +70,6 @@
</van-list>
</van-pull-refresh>
<!-- 搜索弹窗 -->
<van-popup v-model:show="showSearchPopup" position="bottom" round :style="{ maxHeight: '70%' }">
<div class="search-popup">
<div class="search-popup-title">筛选查询</div>
<van-field
v-model="tempSearchForm.planDate"
label="执法日期"
placeholder="请选择"
readonly
is-link
@click="showSearchDate = true"
>
<template #right-icon>
<van-icon v-if="tempSearchForm.planDate" name="clear" @click.stop="tempSearchForm.planDate = ''" />
</template>
</van-field>
<van-field
v-model="tempSearchForm.enterpriseName"
label="企业名称"
placeholder="输入企业名称"
clearable
/>
<van-field
v-model="tempSearchForm.enforceContent"
label="执法事项"
placeholder="输入执法事项"
clearable
/>
<div class="search-popup-actions">
<van-button plain type="default" size="small" @click="onResetSearch">重置</van-button>
<van-button type="primary" size="small" @click="onConfirmSearch">查询</van-button>
</div>
</div>
</van-popup>
<!-- 日期选择器 -->
<van-popup v-model:show="showSearchDate" position="bottom" round :style="{ zIndex: 3000 }">
<van-date-picker
v-model="searchDateValue"
title="选择执法日期"
@confirm="onSearchDateConfirm"
@cancel="showSearchDate = false"
/>
</van-popup>
<!-- 预约留言弹窗 -->
<van-popup v-model:show="showReservePopup" position="bottom" round :style="{ maxHeight: '50%' }">
<div class="reserve-popup">
@ -136,63 +95,30 @@
import { showSuccessToast, showDialog } from 'vant';
import { useRouter, useRoute } from 'vue-router';
import { getOtherPlanList, checkCanReserve, doReservePlan } from '@/api/enforcement/plan';
import SearchFilterBar from '@/components/common/SearchFilterBar.vue';
const router = useRouter();
const route = useRoute();
//
const searchForm = ref({
planDate: '',
enterpriseName: '',
enforceContent: '',
});
const tempSearchForm = ref({
planDate: '',
enterpriseName: '',
enforceContent: '',
});
const showSearchPopup = ref(false);
const showSearchDate = ref(false);
const searchDateValue = ref([
String(new Date().getFullYear()),
String(new Date().getMonth() + 1).padStart(2, '0'),
String(new Date().getDate()).padStart(2, '0'),
]);
//
const hasSearchCondition = computed(() => {
const f = searchForm.value;
return !!(f.planDate || f.enterpriseName || f.enforceContent);
});
//
const searchSummary = computed(() => {
const f = searchForm.value;
const parts = [];
if (f.planDate) parts.push(f.planDate);
if (f.enterpriseName) parts.push(f.enterpriseName);
if (f.enforceContent) parts.push(f.enforceContent);
return parts.join(' | ');
});
//
const onSearchDateConfirm = ({ selectedValues }) => {
tempSearchForm.value.planDate = selectedValues.join('-');
showSearchDate.value = false;
const searchText = ref('');
const dateType = ref(null);
const dateSearch = ref(null);
//
const onSearch = (params) => {
searchText.value = params.searchValue || '';
doSearch();
};
//
const onConfirmSearch = () => {
searchForm.value = { ...tempSearchForm.value };
showSearchPopup.value = false;
const onClear = () => {
searchText.value = '';
doSearch();
};
//
const onResetSearch = () => {
tempSearchForm.value = { planDate: '', enterpriseName: '', enforceContent: '' };
searchForm.value = { planDate: '', enterpriseName: '', enforceContent: '' };
showSearchPopup.value = false;
const onDateChange = (params) => {
dateType.value = params.dateType;
dateSearch.value = params.dateSearch;
doSearch();
};
@ -240,10 +166,10 @@ const onRefresh = () => {
const fetchList = () => {
loading.value = true;
const params = { pageNum: pageNum.value, pageSize };
//
if (searchForm.value.planDate) params.planDate = searchForm.value.planDate;
if (searchForm.value.enterpriseName) params.enterpriseName = searchForm.value.enterpriseName;
if (searchForm.value.enforceContent) params.enforceContent = searchForm.value.enforceContent;
//
if (searchText.value) params.searchValue = searchText.value;
//
if (dateSearch.value) params.planDate = dateSearch.value;
getOtherPlanList(
params,
(res) => {
@ -390,61 +316,6 @@ const onConfirmReserve = () => {
box-sizing: border-box;
}
.search-trigger {
margin-top: 8px;
display: flex;
align-items: center;
gap: 8px;
background: #fff;
border-radius: 20px;
padding: 10px 14px;
margin-bottom: 12px;
box-shadow: 0 2px 8px rgba(44, 116, 190, 0.06);
cursor: pointer;
.search-trigger-text {
flex: 1;
font-size: 13px;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.search-popup {
padding: 16px;
.search-popup-title {
font-size: 16px;
font-weight: 600;
text-align: center;
margin-bottom: 16px;
color: #333;
}
:deep(.van-field) {
padding: 10px 0;
}
:deep(.van-field__label) {
width: 65px;
font-size: 14px;
color: #666;
}
.search-popup-actions {
display: flex;
gap: 12px;
margin-top: 20px;
padding: 0 10px;
.van-button {
flex: 1;
}
}
}
.plan-list {
display: flex;
flex-direction: column;

15
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/reserve/cp_reserve_list.vue

@ -27,14 +27,25 @@
</template>
<script setup name="cpReserveList">
import { useRouter } from 'vue-router';
import { useRouter, useRoute } from 'vue-router';
import { showConfirmDialog, showSuccessToast, showFailToast, showLoadingToast } from 'vant';
import { autoMatchReserve } from '@/api/enforcement/plan';
import CpReserveManual from './cp_reserve_manual.vue';
import CpReserveSystem from './cp_reserve_system.vue';
const router = useRouter();
const activeTab = ref('manual');
const route = useRoute();
const getTabFromResFrom = (val) => {
if (val === '1' || val === 1) return 'system';
return 'manual';
};
const activeTab = ref(getTabFromResFrom(route.query.resFrom));
watch(() => route.query.resFrom, (val) => {
activeTab.value = getTabFromResFrom(val);
});
const onBack = () => {
router.back();

Loading…
Cancel
Save