From 18ba5ccc3abf3c7e508793246a8f23fe1ed22163 Mon Sep 17 00:00:00 2001 From: "wangmingyong@163.com" Date: Thu, 30 Jul 2026 18:06:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E9=A1=B5=E9=9D=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enforcement/enforce/enforcementChat.vue | 16 +- .../enforce/enforcementNoticeList.vue | 2 +- .../message/enforcementReserveList.vue | 220 +++++++++++++----- .../message/enforcementTaskList.vue | 184 ++++++++++----- .../enforcement/my/plan/cp_plan_edit.vue | 4 +- 5 files changed, 290 insertions(+), 136 deletions(-) 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 2d34bfb0..57fb910c 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 @@ -83,7 +83,7 @@ @click="closeMenu" @contextmenu.prevent > -
@@ -96,7 +96,7 @@ 撤回
- + --> @@ -130,9 +130,9 @@ import { getNoticeMessages, addNoticeMessage } from '@/api/enforcement/notice'; const router = useRouter(); const route = useRoute(); - +const { useCommon } = $globalStore; // ========== 从路由参数获取信息 ========== -const noticeId = route.query.id|| ''; +const noticeId = route.query.noticeId|| ''; const bureauDeptName = ref(route.query.bureauDeptName || '深圳司法局'); const contactPerson = ref(route.query.contactPerson || '付明明 周昂'); const noticeTitle = ref(route.query.title || '安全生产检查'); @@ -149,10 +149,10 @@ const loadMessageList = () => { if (res && res.code === 200 && res.data) { messageList.value = res.data.map(item => ({ id: item.id, - sender: item.sender === 'self' ? 'self' : 'other', + sender: item.userName == useCommon.userName ? 'self' : 'other', content: item.content || item.message || '', time: item.createTime || item.time || '', - avatar: item.sender === 'self' ? selfAvatar : otherAvatar, + avatar: item.userName == useCommon.userName ? selfAvatar : otherAvatar, isRecalled: item.isRecalled || false, })); nextTick(() => scrollToBottom()); @@ -334,7 +334,9 @@ const sendMessage = () => { if (noticeId) { addNoticeMessage({ noticeId, - content: text, + userId: useCommon.userId, + userName: useCommon.userName, + message: text, }, (res) => { if (res && res.code === 200) { newMsg.id = res.data?.id || newMsg.id; diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementNoticeList.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementNoticeList.vue index a180a299..aae3a9da 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementNoticeList.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementNoticeList.vue @@ -25,7 +25,7 @@
执法时间: - {{ item.checkTime }} + {{ item.enforceDate }}
{{ item.checkItemText }}
diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementReserveList.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementReserveList.vue index dc1a1999..f7e4667f 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementReserveList.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementReserveList.vue @@ -13,28 +13,48 @@ -
-
{{ item.time }}
-
- -
待确认预约:
-
-
- {{ item.reserveUnit ? '预约单位' : '执法单位' }} - {{ item.reserveUnit || item.bureauDeptName || '-' }} -
-
- 企业名称 - {{ item.enterpriseName || '-' }} -
-
- 检查时间 - {{ formatDate(item.planDate) }} -
+
+ +
+
+ + + +
+
+
待确认预约
+
+ +
{{ formatTime(item.planDate) }}
+
+ +
+ + + + +
@@ -113,6 +133,24 @@ const formatDate = (dateStr) => { return dateStr.substring(0, 10); }; +// ========== 格式化时间 ========== +const formatTime = (val) => { + if (!val) return ''; + const d = new Date(typeof val === 'string' ? val.replace(/-/g, '/') : val); + if (isNaN(d.getTime())) return val; + const y = d.getFullYear(); + const m = String(d.getMonth() + 1).padStart(2, '0'); + const day = String(d.getDate()).padStart(2, '0'); + const h = String(d.getHours()).padStart(2, '0'); + const mi = String(d.getMinutes()).padStart(2, '0'); + return `${y}-${m}-${day} ${h}:${mi}`; +}; + +// ========== 跳转详情 ========== +const toDetail = (item) => { + showToast('查看详情'); +}; + const onLoad = () => { if (loading.value || finished.value) return; fetchReserveList(); @@ -153,69 +191,125 @@ onMounted(() => { display: flex; flex-direction: column; height: 100%; - background: #fbfdff; -} + background-color: #fbfdff; -.content-area { - flex: 1; - overflow-y: auto; - padding: 12px; - padding-top: 0px; + .content-area { + flex: 1; + overflow-y: auto; + padding: 0.27rem; + } } +/* ===== 列表项样式 ===== */ .reserve-item { - margin-bottom: 16px; + background: #fff; + border-radius: 0.2rem; + padding:6px 10px; + margin-bottom: 0.27rem; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } -.reserve-time { - font-size: 12px; - color: #999; - margin-bottom: 8px; - padding-left: 8px; +.item-title-row { + display: flex; + // align-items: center; + margin-bottom: 0.2rem; + .item-content{ + width: 240px; + } } -.reserve-card { - background: #fff; - border-radius: 12px; - padding: 12px 16px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); -} +.item-icon { + width: 0.5rem; + height: 0.5rem; + min-width: 0.5rem; + margin-right: 0.15rem; + color: #2d94fa; + display: flex; + align-items: center; + justify-content: center; + position: relative; + + svg { + width: 100%; + height: 100%; + } -.card-header { - margin-bottom: 8px; + .unread-dot { + position: absolute; + top: -0.05rem; + right: -0.05rem; + width: 0.12rem; + height: 0.12rem; + min-width: 0.12rem; + background-color: #ee0a24; + border-radius: 50%; + } } -.reserve-type { - font-size: 14px; - font-weight: 600; - color: #333; - padding: 8px 0; +.item-title { + flex: 1; + font-size: 0.4rem; + font-weight: bold; + color: #1a1a1a; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } -.card-body { - padding-left: 4px; +.item-summary { + font-size: 0.32rem; + color: #666; + line-height: 1.6; + margin-bottom: 0.2rem; + + // .info-row { + // display: flex; + // margin-bottom: 0.1rem; + + // &:last-child { + // margin-bottom: 0; + // } + // } + + .info-label { + color: #999; + min-width: 1.4rem; + flex-shrink: 0; + } + + .info-value { + color: #666; + flex: 1; + } } -.reserve-row { +.item-footer { display: flex; + justify-content: space-between; align-items: center; - margin-bottom: 10px; - - &:last-child { - margin-bottom: 0; - } } -.reserve-label { - font-size: 13px; - color: #666; - min-width: 60px; - flex-shrink: 0; +.item-time { + font-size: 0.3rem; + color: #999; } -.reserve-value { - font-size: 13px; - color: #333; - flex: 1; +.item-action { + font-size: 0.3rem; + color: #999; + display: flex; + align-items: center; + + :deep(.van-icon) { + font-size: 0.28rem; + margin-left: 0.05rem; + } +} +.info-row{ + display: flex; + align-items: center; + font-size: 14px; + color: #999; + height: 24px; } diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementTaskList.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementTaskList.vue index 4ee5fd33..df8cd098 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementTaskList.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/message/enforcementTaskList.vue @@ -14,27 +14,29 @@ -
-
{{ item.time }}
-
- -
待执行任务:
-
-
- 企业名称 - {{ item.enterpriseName || '-' }} -
-
- 检查时间 - {{ item.planDate || '-' }} -
-
- 执法事项 - {{ item.enforceContent || '-' }} -
+
+ +
+
+ + + +
+
+
待执行任务
+
+ +
{{ item.planDate || '-' }}
+
+
+
@@ -66,6 +68,33 @@ const goBack = () => { router.back(); }; +// ========== 格式化时间 ========== +const formatTime = (val) => { + if (!val) return ''; + const d = new Date(typeof val === 'string' ? val.replace(/-/g, '/') : val); + if (isNaN(d.getTime())) return val; + const y = d.getFullYear(); + const m = String(d.getMonth() + 1).padStart(2, '0'); + const day = String(d.getDate()).padStart(2, '0'); + const h = String(d.getHours()).padStart(2, '0'); + const mi = String(d.getMinutes()).padStart(2, '0'); + return `${y}-${m}-${day} ${h}:${mi}`; +}; + +// ========== 跳转详情 ========== +const toDetail = (item) => { + if (!item.planDate) return; + const d = new Date(item.planDate); + router.push({ + path: '/enforcement/task', + query: { + year: String(d.getFullYear()), + month: String(d.getMonth() + 1), + day: String(d.getDate()), + } + }); +}; + const fetchTaskList = () => { loading.value = true; const params = { @@ -157,69 +186,98 @@ onMounted(() => { display: flex; flex-direction: column; height: 100%; - background: #fbfdff; -} + background-color: #fbfdff; -.content-area { - flex: 1; - overflow-y: auto; - padding: 12px; - padding-top: 0px; + .content-area { + flex: 1; + overflow-y: auto; + padding: 0.27rem; + } } +/* ===== 列表项样式 ===== */ .task-item { - margin-bottom: 16px; + background: #fff; + border-radius: 0.2rem; + padding:6px 10px; + margin-bottom: 0.27rem; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } -.task-time { - font-size: 12px; - color: #999; - margin-bottom: 8px; - padding-left: 8px; +.item-title-row { + display: flex; + // align-items: center; + margin-bottom: 0.2rem; + .item-content{ + width: 240px; + } } -.task-card { - background: #fff; - border-radius: 12px; - padding: 12px 16px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); -} +.item-icon { + width: 0.5rem; + height: 0.5rem; + min-width: 0.5rem; + margin-right: 0.15rem; + color: #2d94fa; + display: flex; + align-items: center; + justify-content: center; + position: relative; -.card-header { - margin-bottom: 8px; + svg { + width: 100%; + height: 100%; + } + + .unread-dot { + position: absolute; + top: -0.05rem; + right: -0.05rem; + width: 0.12rem; + height: 0.12rem; + min-width: 0.12rem; + background-color: #ee0a24; + border-radius: 50%; + } } -.task-type { +.item-title { + flex: 1; font-size: 14px; - font-weight: 600; - color: #333; - padding: 8px 0; + font-weight: bold; + color: #1a1a1a; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.item-footer { + display: flex; + justify-content: space-between; + align-items: center; } -.card-body { - padding-left: 4px; +.item-time { + font-size: 0.3rem; + color: #ccc; } -.task-row { +.item-action { + font-size: 0.3rem; + color: #999; display: flex; align-items: center; - margin-bottom: 10px; - &:last-child { - margin-bottom: 0; + :deep(.van-icon) { + font-size: 0.28rem; + margin-left: 0.05rem; } } - -.task-label { - font-size: 13px; - color: #666; - min-width: 60px; - flex-shrink: 0; -} - -.task-value { - font-size: 13px; - color: #333; - flex: 1; +.info-row{ + display: flex; + align-items: center; + font-size: 14px; + color: #999; + height: 24px; } diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue index 85864092..0c7208b5 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue @@ -1,11 +1,11 @@