From 7f64bc5db41b31c5f2bdf78c01dd369d5dca351d Mon Sep 17 00:00:00 2001 From: "wangmingyong@163.com" Date: Tue, 24 Nov 2026 17:24:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zdxt-admin-plus-ui/.env.production | 2 +- .../statistics_check_evaluation/index.vue | 918 ++++++++++-------- .../src/api/nos/index.js | 2 + .../nos/EnforcementInfoSection.vue | 21 + .../enforcement/enforce/enforcementChat.vue | 4 +- .../enforcement/home/enforcementHome.vue | 53 +- .../my/notice/cp_notice_message.vue | 328 ++++++- .../my/notice/cp_notice_tab_content.vue | 55 +- .../my/reserve/cp_reserve_manual.vue | 50 +- .../my/reserve/cp_reserve_system.vue | 50 +- .../nos/components/NosDetailMaterialsTab.vue | 42 +- .../src/views/enforcement/nos/nosAdd.vue | 4 + .../src/views/enforcement/nos/nosDetail.vue | 23 +- .../vite-env/.env.enforcement-prod | 8 +- 14 files changed, 1092 insertions(+), 468 deletions(-) diff --git a/zdxt-web-client/zdxt-admin-plus-ui/.env.production b/zdxt-web-client/zdxt-admin-plus-ui/.env.production index 950d1a31..e5b40604 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/.env.production +++ b/zdxt-web-client/zdxt-admin-plus-ui/.env.production @@ -17,7 +17,7 @@ VITE_APP_SNAILJOB_ADMIN = '/snail-job' # 生产环境 # VITE_APP_BASE_API = '/efcode20-sup-web/prod-api' #本地环境 -VITE_APP_BASE_API = '/efcode20-sup-web-test/prod-api' #本地环境 +VITE_APP_BASE_API = '/efcode20-sup-web-test/prod-api' #线上测试环境 # VITE_APP_BASE_API = '/zfjdm/prod-api' #生产环境 # 是否在打包时开启压缩,支持 gzip 和 brotli diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/statistics_check_evaluation/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/statistics_check_evaluation/index.vue index cc0d1562..57167b0e 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/statistics_check_evaluation/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/statistics_check_evaluation/index.vue @@ -1,19 +1,12 @@ diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/nos/index.js b/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/nos/index.js index f8aca221..89661631 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/nos/index.js +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/nos/index.js @@ -18,6 +18,8 @@ export const nosApproveApi = (params, success, error) => _post("/app-enf/nos-law // 核实案件(待核实状态) export const nosVerifyCaseApi = (params, success, error) => _post("/app-enf/nos-law-enforcement-task/verify-case", params, success, error); +// 催办提醒(是否发送短信) +export const nosRemindApi = (params, success, error) => _post("/app-enf/nos-law-enforcement-task/remind", params, success, error); // 查询非现场执法项目任务类别 export const nosTypeApi = (params, success, error) => _post("/app-enf/nos-law-enforcement-task/type", params, success, error); //查询非现场执法项目任务来源列表 diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/EnforcementInfoSection.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/EnforcementInfoSection.vue index 99ab0d18..b9dbf91e 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/EnforcementInfoSection.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/EnforcementInfoSection.vue @@ -145,6 +145,16 @@ @click="$emit('showTimePicker')" :required="formData.taskTypeId != 5" /> + + + + + @@ -512,6 +522,17 @@ const removeMaterialRow = (index) => { box-sizing: border-box; } +.sms-field { + :deep(.van-field__label) { + padding-left: 8px; + box-sizing: border-box; + } + + :deep(.van-radio__label) { + font-size: 14px; + } +} + .error-only-field { width: 100%; padding-top: 0; diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementChat.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementChat.vue index 03aafb16..9f14dab6 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementChat.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementChat.vue @@ -74,7 +74,7 @@ @click="closeMenu" @contextmenu.prevent > - + diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/home/enforcementHome.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/home/enforcementHome.vue index 2cbf7b79..d3f3b36b 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/home/enforcementHome.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/home/enforcementHome.vue @@ -14,13 +14,21 @@
- -
+ + + +
+ + + 暂无新计划
@@ -92,7 +100,9 @@ import { ref, computed, onMounted } from 'vue'; import { useRouter } from 'vue-router'; import { showToast } from 'vant'; import FooterBar from '@/components/FooterBar.vue'; -import { getNoticeInfoList, getCarouselBannerList, getSzyptLoginAuth } from '@/api/enforcement/index'; +// import { getNoticeInfoList, getCarouselBannerList, getSzyptLoginAuth } from '@/api/enforcement/index'; +import { getCarouselBannerList, getSzyptLoginAuth } from '@/api/enforcement/index'; +import { getMyPlanList } from '@/api/enforcement/plan'; import { baseUrl } from '@/config/env'; const router = useRouter(); @@ -114,7 +124,8 @@ const checkLawPermission = () => { return true; }; -// ========== 通知数据 ========== +// ========== 通知数据(原系统通知接口,已停用) ========== +/* const noticeList = ref([]); // 多条通知拼接(van-notice-bar 使用单一文本滚动展示) @@ -135,6 +146,34 @@ const fetchNoticeList = () => { console.error('获取通知列表失败', err); }); }; +*/ + +// ========== 我的计划通知数据(/cpPlan/myPageList) ========== +const planNoticeList = ref([]); + +// 计划内容拼接(van-notice-bar 使用单一文本滚动展示) +const noticeText = computed(() => { + return planNoticeList.value + .map(it => it.enforceContent) + .filter(Boolean) + .join(' '); +}); + +// 调用我的计划列表接口 +const fetchPlanNoticeList = () => { + getMyPlanList({ pageNum: 1, pageSize: 10 }, (res) => { + if (res && res.code === 200) { + planNoticeList.value = res.rows || []; + } + }, (err) => { + console.error('获取我的计划列表失败', err); + }); +}; + +// 点击通知栏跳转我的计划页面 +const toMyPlan = () => { + router.push({ path: '/enforcement/plan/mine' }); +}; // ========== 轮播图数据 ========== const bannerList = ref([]); @@ -215,7 +254,8 @@ onMounted(() => { if (useCommon.token) { isLoading.value = false; - fetchNoticeList(); + // fetchNoticeList(); + fetchPlanNoticeList(); fetchBannerList(); return; } @@ -236,7 +276,8 @@ onMounted(() => { useCommon.SET_HAS_LAW(success.data.lawOfficer || ""); useCommon.SET_LAW_CERTIFICATE_NUM(success.data.lawCertificateNum || ""); isLoading.value = false; - fetchNoticeList(); + // fetchNoticeList(); + fetchPlanNoticeList(); fetchBannerList(); }, (error) => { isLoading.value = false; diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_message.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_message.vue index d17a029a..f43286bb 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_message.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_message.vue @@ -1,11 +1,17 @@ @@ -96,6 +160,75 @@ const inputMessage = ref(''); const messageListRef = ref(null); let pollTimer = null; +// 本地编辑/撤回结果,轮询或重新加载时保留,避免被服务端数据覆盖 +const localOverrides = {}; + +const mapMessage = (item) => { + const msg = { + id: item.id, + msgFrom: item.msgFrom ?? 0, + content: item.content || item.message || '', + message: item.content || item.message || '', + time: item.createTime || item.time || '', + isRecalled: item.isRecalled || false, + userName: item.userName || '', + bureauDeptName: item.bureauDeptName || '', + }; + const override = msg.id != null ? localOverrides[msg.id] : null; + if (override) { + if (override.content !== undefined) { + msg.content = override.content; + msg.message = override.content; + } + if (override.isRecalled) { + msg.isRecalled = true; + } + } + return msg; +}; + +// ========== 聊天记录搜索 ========== +const searchVisible = ref(false); +const searchKeyword = ref(''); +const searchInputRef = ref(null); + +// 去掉消息里的 HTML 标签,用于搜索匹配和结果展示 +const plainText = (html) => String(html || '').replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim(); + +const searchResults = computed(() => { + const keyword = searchKeyword.value.trim().toLowerCase(); + if (!keyword) return []; + return messageList.value.filter(msg => { + if (msg.isRecalled) return false; + return plainText(msg.message).toLowerCase().includes(keyword) + || String(msg.userName || '').toLowerCase().includes(keyword); + }); +}); + +const openSearch = () => { + searchKeyword.value = ''; + searchVisible.value = true; + nextTick(() => { + if (searchInputRef.value) searchInputRef.value.focus(); + }); +}; + +const closeSearch = () => { + searchVisible.value = false; + searchKeyword.value = ''; +}; + +// 点击搜索结果定位到对应消息 +const onSelectResult = (item) => { + closeSearch(); + nextTick(() => { + const el = messageListRef.value && messageListRef.value.querySelector(`[data-msg-id="${item.id}"]`); + if (el) { + el.scrollIntoView({ block: 'center' }); + } + }); +}; + onMounted(() => { loadMessages(); startPolling(); @@ -111,16 +244,7 @@ const loadMessages = () => { getNoticeMessages(noticeId.value, (res) => { if (res && res.code === 200 && Array.isArray(res.data)) { const lastItem = res.data[res.data.length - 1]; - messageList.value = res.data.map(item => ({ - id: item.id, - msgFrom: item.msgFrom ?? 0, - content: item.content || item.message || '', - message: item.content || item.message || '', - time: item.createTime || item.time || '', - isRecalled: item.isRecalled || false, - userName: item.userName || '', - bureauDeptName: item.bureauDeptName || '', - })); + messageList.value = res.data.map(mapMessage); nextTick(() => scrollToBottom()); if (lastItem && lastItem.id) { messageRead(lastItem.id, () => {}, () => {}); @@ -151,16 +275,7 @@ const pollMessages = () => { getNoticeMessages(noticeId.value, (res) => { if (res.code === 200 && Array.isArray(res.data)) { const oldCount = messageList.value.length; - messageList.value = res.data.map(item => ({ - id: item.id, - msgFrom: item.msgFrom ?? 0, - content: item.content || item.message || '', - message: item.content || item.message || '', - time: item.createTime || item.time || '', - isRecalled: item.isRecalled || false, - userName: item.userName || '', - bureauDeptName: item.bureauDeptName || '', - })); + messageList.value = res.data.map(mapMessage); if (res.data.length > oldCount) { scrollToBottom(); } @@ -192,6 +307,7 @@ const shouldShowTime = (index) => { // ========== 判断消息是否可编辑/撤回 ========== const canEditOrRecall = (msg, index) => { + if (isReadonly.value) return false; if (msg.msgFrom !== 0) return false; if (msg.isRecalled) return false; const msgTime = new Date(msg.time.replace(/-/g, '/')); @@ -279,7 +395,11 @@ const onEdit = () => { // ========== 撤回消息 ========== const onRecall = () => { if (selectedIndex.value === -1) return; - messageList.value[selectedIndex.value].isRecalled = true; + const target = messageList.value[selectedIndex.value]; + target.isRecalled = true; + if (target.id != null) { + localOverrides[target.id] = { ...(localOverrides[target.id] || {}), isRecalled: true }; + } showToast('消息已撤回'); closeMenu(); }; @@ -304,6 +424,7 @@ const sendMessage = () => { if (msg) { msg.message = text; msg.content = text; + localOverrides[msg.id] = { ...(localOverrides[msg.id] || {}), content: text }; showToast('消息已修改'); } cancelEdit(); @@ -355,7 +476,121 @@ const formatTime = (dateStr) => { .message-list { flex: 1; overflow-y: auto; - padding: 0 0.3rem 0.3rem; + padding: 1rem 0.3rem 0.3rem; +} + +.search-entry { + position: absolute; + top: 0.2rem; + right: 0.24rem; + width: 0.72rem; + height: 0.72rem; + border-radius: 50%; + background: rgba(255, 255, 255, 0.92); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); + display: flex; + align-items: center; + justify-content: center; + z-index: 10; + cursor: pointer; + + &:active { + opacity: 0.8; + } +} + +/* ===== 聊天记录搜索页 ===== */ +.search-panel { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #f7f8fa; + z-index: 1000; + display: flex; + flex-direction: column; +} + +.search-header { + display: flex; + align-items: center; + gap: 0.2rem; + padding: 0.2rem 0.3rem; + background: #fff; + border-bottom: 1px solid #e5e5e5; +} + +.search-input-wrap { + flex: 1; + display: flex; + align-items: center; + gap: 0.1rem; + height: 0.72rem; + padding: 0 0.24rem; + border-radius: 0.36rem; + background: #f2f3f5; +} + +.search-input { + flex: 1; + border: none; + outline: none; + background: transparent; + font-size: 0.3rem; + color: #333; +} + +.search-cancel { + flex-shrink: 0; + font-size: 0.3rem; + color: #4485f5; + cursor: pointer; +} + +.search-results { + flex: 1; + overflow-y: auto; +} + +.search-tip { + padding: 0.8rem 0.3rem; + text-align: center; + font-size: 0.28rem; + color: #999; +} + +.search-result-item { + padding: 0.24rem 0.3rem; + background: #fff; + border-bottom: 1px solid #f0f0f0; + cursor: pointer; + + &:active { + background: #f7f8fa; + } +} + +.result-top { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.1rem; + font-size: 0.26rem; + color: #999; + + .result-sender { + color: #4485f5; + } +} + +.result-content { + font-size: 0.3rem; + color: #333; + line-height: 1.5; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .message-group { @@ -445,6 +680,55 @@ const formatTime = (dateStr) => { z-index: 999; } +.context-menu { + position: absolute; + background: rgba(50, 50, 50, 0.9); + border-radius: 0.12rem; + padding: 0.1rem 0; + min-width: 2rem; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); + transform: translate(-50%, -100%); + + /* 底部三角形箭头 */ + &::after { + content: ''; + position: absolute; + bottom: -0.12rem; + left: 50%; + transform: translateX(-50%); + width: 0; + height: 0; + border-left: 0.12rem solid transparent; + border-right: 0.12rem solid transparent; + border-top: 0.12rem solid rgba(50, 50, 50, 0.9); + } +} + +.menu-item { + display: flex; + align-items: center; + justify-content: center; + gap: 0.1rem; + padding: 0.2rem 0.3rem; + color: #fff; + font-size: 0.3rem; + cursor: pointer; + + &:active { + background: rgba(255, 255, 255, 0.1); + } + + :deep(.van-icon) { + color: #fff; + } +} + +.menu-divider { + height: 1px; + background: rgba(255, 255, 255, 0.2); + margin: 0 0.2rem; +} + .chat-input-area { background-color: #fff; padding: 0.2rem 0.3rem; diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue index 69dc809b..651fb8c1 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue @@ -1,5 +1,13 @@