Commit f2a9de84 authored by xinzhedeai's avatar xinzhedeai

fix:手动刷新问题;隐患检查分页重复数据问题;隐患检查&特征工作全部已读实时显示问题

parent 0e22ab5e
var VUE = null var VUE = null
window.addEventListener("pageshow", (event) => {
console.log(event, 'event')
if (event.persisted) { // 从 BF Cache 加载时触发
location.reload(); // 强制刷新
}
});
window.onload = function() { window.onload = function() {
// const currentDate = gemhoUtil.getTargetDateYM() // const currentDate = gemhoUtil.getTargetDateYM()
VUE = new Vue({ VUE = new Vue({
...@@ -98,6 +104,7 @@ window.onload = function() { ...@@ -98,6 +104,7 @@ window.onload = function() {
} }
} }
} }
let url = gemhoUtil.setParameter(`src/_${toData}.html`, param) let url = gemhoUtil.setParameter(`src/_${toData}.html`, param)
gemhoUtil.navigatePage(url, '跳转中...') gemhoUtil.navigatePage(url, '跳转中...')
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
* description: 商户首页 * description: 商户首页
*/ */
var VUE = null var VUE = null
window.addEventListener("pageshow", (event) => {
console.log(event, 'event')
if (event.persisted) { // 从 BF Cache 加载时触发
location.reload(); // 强制刷新
}
});
window.addEventListener("load", function() { window.addEventListener("load", function() {
VUE = new Vue({ VUE = new Vue({
el: '#app', el: '#app',
......
...@@ -3,13 +3,23 @@ ...@@ -3,13 +3,23 @@
* date: 2024-03-15 * date: 2024-03-15
* description: 商户首页 * description: 商户首页
*/ */
var VUE = null var VUE = null
window.addEventListener("pageshow", (event) => {
console.log(event, 'event')
if (event.persisted) { // 从 BF Cache 加载时触发
location.reload(); // 强制刷新
}
});
window.addEventListener("load", function() { window.addEventListener("load", function() {
VUE = new Vue({ VUE = new Vue({
el: '#app', el: '#app',
data() { data() {
return { return {
reMark:'', reMark: '',
title: '', title: '',
userType: gemhoUtil.getCookie('userType'), userType: gemhoUtil.getCookie('userType'),
...@@ -30,8 +40,7 @@ window.addEventListener("load", function() { ...@@ -30,8 +40,7 @@ window.addEventListener("load", function() {
}, },
methods: { methods: {
markAllAsRead() { // 全部标记为已读 markAllAsRead() { // 全部标记为已读
http2.post( http2.post({
{
serviceId: API_KEY_MAP['submit']['id'], serviceId: API_KEY_MAP['submit']['id'],
interfacePublicKey: API_KEY_MAP['submit']['publicKey'], interfacePublicKey: API_KEY_MAP['submit']['publicKey'],
interfacePrivateKey: API_KEY_MAP['submit']['privateKey'], interfacePrivateKey: API_KEY_MAP['submit']['privateKey'],
...@@ -52,6 +61,12 @@ window.addEventListener("load", function() { ...@@ -52,6 +61,12 @@ window.addEventListener("load", function() {
vant.Toast({ vant.Toast({
message: '操作成功', message: '操作成功',
}) })
this.hazardList.forEach(item => {
if (item.msgFlag) {
this.$set(item, 'msgFlag', false); // 动态添加响应式属性
}
});
} }
} }
) )
...@@ -72,7 +87,7 @@ window.addEventListener("load", function() { ...@@ -72,7 +87,7 @@ window.addEventListener("load", function() {
}, },
viewDetail(item) { viewDetail(item) {
let params = { let params = {
id: item.id ||'', id: item.id || '',
merId: gemhoUtil.getParameter('merId'), merId: gemhoUtil.getParameter('merId'),
pageName: '_tezhongzuoye' pageName: '_tezhongzuoye'
} }
......
...@@ -25,7 +25,7 @@ window.addEventListener('load', function () { ...@@ -25,7 +25,7 @@ window.addEventListener('load', function () {
], ],
loading: false, loading: false,
finished: false, finished: false,
page: 0, page: 1,
size: 6, size: 6,
total: 0, total: 0,
remindStatistic: [] remindStatistic: []
...@@ -112,7 +112,7 @@ window.addEventListener('load', function () { ...@@ -112,7 +112,7 @@ window.addEventListener('load', function () {
) )
}, },
reset() { reset() {
this.page = 0 this.page = 1
this.size = 6 this.size = 6
this.total = 0 this.total = 0
this.hazardList = [] this.hazardList = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment