diff --git a/src/api/yg/aqrw.js b/src/api/yg/aqrw.js index 4c47f1a..7e6f5d8 100644 --- a/src/api/yg/aqrw.js +++ b/src/api/yg/aqrw.js @@ -8,6 +8,12 @@ export function getStatistics(taskId) { method: 'get', }) } +export function getWarn() { + return request({ + url: '/aqrw/warn', + method: 'get', + }) +} // 查询水闸安全鉴定 统计 信息列表(第三个) export function getStatisticsLevel(taskId) { diff --git a/src/api/yg/dike/aqrw.js b/src/api/yg/dike/aqrw.js index c6b9520..1424884 100644 --- a/src/api/yg/dike/aqrw.js +++ b/src/api/yg/dike/aqrw.js @@ -8,6 +8,12 @@ export function getStatistics(taskId) { method: 'get', }) } +export function getDfWarn() { + return request({ + url: '/df/aqrw/warn', + method: 'get', + }) +} // 查询水闸安全鉴定 统计 信息列表(第三个) export function getStatisticsLevel(taskId) { diff --git a/src/api/yg/dike/jfgl.js b/src/api/yg/dike/jfgl.js index 560c3fb..221a91d 100644 --- a/src/api/yg/dike/jfgl.js +++ b/src/api/yg/dike/jfgl.js @@ -51,6 +51,13 @@ export function delJfgl(id) { }) } +export function delAllJfgl(dikeCode) { + return request({ + url: '/df/jfgl/all/' + dikeCode, + method: 'delete' + }) +} + // 导出经费管理 export function exportJfgl(query) { return request({ @@ -58,4 +65,4 @@ export function exportJfgl(query) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/api/yg/dikeMark.js b/src/api/yg/dikeMark.js index 658f476..341e6f8 100644 --- a/src/api/yg/dikeMark.js +++ b/src/api/yg/dikeMark.js @@ -9,6 +9,14 @@ export function listDikeMark(query) { }) } +export function getStatistics(query) { + return request({ + url: '/df/dikeMark/statistics', + method: 'post', + data: query + }) +} + // 查询堤防标识标牌详细 export function getDikeMark(id) { return request({ diff --git a/src/api/yg/jfgl.js b/src/api/yg/jfgl.js index 94bf93b..fc750c2 100644 --- a/src/api/yg/jfgl.js +++ b/src/api/yg/jfgl.js @@ -50,6 +50,13 @@ export function delJfgl(id) { }) } +export function delJfglAll(wagaCode) { + return request({ + url: '/sz/jfgl/all/' + wagaCode, + method: 'delete' + }) +} + // 导出经费管理 export function exportJfgl(query) { return request({ @@ -57,4 +64,4 @@ export function exportJfgl(query) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/api/yg/sluiceMark.js b/src/api/yg/sluiceMark.js index 6016b62..83abcf7 100644 --- a/src/api/yg/sluiceMark.js +++ b/src/api/yg/sluiceMark.js @@ -9,6 +9,14 @@ export function listSluiceMark(query) { }) } +export function getStatistics(query) { + return request({ + url: '/sz/sluiceMark/statistics', + method: 'post', + data: query + }) +} + // 查询水闸标识标牌详细 export function getSluiceMark(sluiceCode) { return request({ diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index d4873bc..694414f 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -10,6 +10,7 @@ +
--> +
+ +
+ 消息通知 +
+
+
+ + + + + +
+ +
+
+
+
+ + {{'任务:'+ notif.taskName || '预警通知' }} +
+
{{ '计划于'+notif.planCompletionTime+'完成鉴定,但还有未鉴定子任务。' }}
+
+ {{ notif.createTime || '暂无时间' }} + 发送人: 系统 +
+
+
+ 查看 +
+
+
+
+ + +
+
{ + this.sluiceData=res.data + }) + getDfWarn().then(res=>{ + this.dikeData=res.data + }) }, mounted() { if (!this.selectTab) { @@ -155,6 +226,105 @@ export default { } }, methods: { + initMockData() { + // 模拟数据,实际项目中应从API获取 + this.sluiceData = [ + { + id: 1, + title: '水闸安全预警通知', + context: '某某水闸安全评级出现异常,请及时处理', + createUid: '系统管理员', + createTime: '2025-03-18 14:30', + read: false + }, + { + id: 2, + title: '水闸日常检查提醒', + context: '请注意安排本周水闸安全检查工作', + createUid: '监控中心', + createTime: '2025-03-17 09:15', + read: false + } + ]; + + this.dikeData = [ + { + id: 3, + title: '堤防安全预警通知', + context: '东部堤防区域检测到安全隐患,请立即排查', + createUid: '防汛办', + createTime: '2025-03-19 10:20', + read: false + } + ]; + }, + handlePopoverShow() { + // 当弹出层显示时,可以在这里请求最新数据 + this.fetchNotificationData(); + }, + fetchNotificationData() { + // 模拟API请求,实际项目中应调用真实API + this.loading = true; + + // 模拟网络请求延迟 + setTimeout(() => { + // 实际项目中,这里应该是真实的API调用 + // this.$http.get('/api/notifications/sluice').then(res => { + // this.sluiceData = res.data; + // }); + + // this.$http.get('/api/notifications/dike').then(res => { + // this.dikeData = res.data; + // }); + + this.loading = false; + }, 500); + }, + handleTabClick(tab) { + // 切换标签页时可以执行一些操作,如果需要的话 + console.log('Switched to tab:', tab.name); + }, + markAllAsRead() { + // 根据当前激活的标签页将对应类型的通知标记为已读 + if (this.activeTab === 'sluice') { + this.sluiceData.forEach(item => { + item.read = true; + }); + } else { + this.dikeData.forEach(item => { + item.read = true; + }); + } + + // 实际项目中,这里应该调用API更新已读状态 + // this.$http.post('/api/notifications/read-all', { type: this.activeTab }); + + this.$message.success('已全部标记为已读'); + }, + viewAllMessages() { + // 查看全部消息 + this.$router.push('/message/records'); + }, + viewMessage(notif) { + // 查看单条消息详情 + notif.read = true; + + // 可以根据消息类型跳转到不同页面 + if (this.activeTab === 'sluice') { + sessionStorage.setItem("topTab", 'sluice'); + this.$store.dispatch("changeTopTab",'sluice'); + this.$router.replace({ + path: '/sluice/safetyManage/safetyAppraisal/task' + }); + } else { + sessionStorage.setItem("topTab", 'dike'); + this.$store.dispatch("changeTopTab",'dike'); + + this.$router.replace({ + path: '/dike/safetyManage/safetyAppraisal/task' + }); + } + }, handleSelectTab(e) { if (e.label === "一张图") { this.handleJump(e.value); @@ -201,7 +371,6 @@ export default { }, }); } - else { this.$router.replace({ path: "/", @@ -228,7 +397,7 @@ export default { location.href = "/"; }); }); - }, + } }, }; @@ -237,9 +406,9 @@ export default { .navbar { // background: #122c7d !important; background: linear-gradient( - 270deg, - rgba(61, 156, 204, 1) 1%, - rgba(131, 179, 107, 1) 100% + 270deg, + rgba(61, 156, 204, 1) 1%, + rgba(131, 179, 107, 1) 100% ) !important; // height: 70px; height: 56px; @@ -299,11 +468,45 @@ export default { } } + .notification-bell { + margin-right: 20px; + display: flex; + align-items: center; + + .bell-wrapper { + position: relative; + cursor: pointer; + } + + .bell { + font-size: 22px; + color: #fff; + position: relative; + display: flex; + align-items: center; + } + + .badge { + position: absolute; + top: -10px; + right: -10px; + background-color: #FF4D4F; + color: white; + border-radius: 50%; + min-width: 16px; + height: 16px; + padding: 0 4px; + font-size: 12px; + display: flex; + align-items: center; + justify-content: center; + } + } + .right-menu { - // float: right; - // height: 100%; - // line-height: 70px; - // line-height: 50px; + display: flex; + align-items: center; + height: 100%; &:focus { outline: none; @@ -312,7 +515,7 @@ export default { .right-menu-item { display: inline-block; padding: 0 8px; - height: 100%; + height: 50%; font-size: 18px; color: #5a5e66; vertical-align: text-bottom; @@ -368,3 +571,107 @@ export default { transform: translate(-50%, -50%); } + + diff --git a/src/views/dike/engineeringCondition/identificationPlate/components/statisticalChart.vue b/src/views/dike/engineeringCondition/identificationPlate/components/statisticalChart.vue new file mode 100644 index 0000000..ae5ea51 --- /dev/null +++ b/src/views/dike/engineeringCondition/identificationPlate/components/statisticalChart.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/views/dike/engineeringCondition/identificationPlate/index.vue b/src/views/dike/engineeringCondition/identificationPlate/index.vue index 5c2794c..7f51183 100644 --- a/src/views/dike/engineeringCondition/identificationPlate/index.vue +++ b/src/views/dike/engineeringCondition/identificationPlate/index.vue @@ -1,6 +1,8 @@ + + diff --git a/src/views/sluice/engineeringCondition/identificationPlate/index.vue b/src/views/sluice/engineeringCondition/identificationPlate/index.vue index bdd3341..417876e 100644 --- a/src/views/sluice/engineeringCondition/identificationPlate/index.vue +++ b/src/views/sluice/engineeringCondition/identificationPlate/index.vue @@ -1,5 +1,6 @@