添加时间戳字段以同步搜索状态
This commit is contained in:
@@ -67,18 +67,18 @@ Vue.prototype.$marketBoard = Vue.observable({
|
||||
screenId: '5b1849ac-4fc3-451a-844c-3362b47341ef',
|
||||
thirdGoods: {},
|
||||
saleHour: undefined,
|
||||
search: {"groupCodeList": [], "currentDate": "20240701", "compareDate": "20240630", "hourNum": "18"}
|
||||
search: {"groupCodeList": [], "currentDate": "20240701", "compareDate": "20240630", "hourNum": "18", t: null}
|
||||
})
|
||||
Vue.prototype.$multipleStoreBoard = Vue.observable({
|
||||
carouselIndex: 0,
|
||||
search: {"groupCodeList": [], "hourNum": "", type: "1"}
|
||||
search: {"groupCodeList": [], "hourNum": "", type: "1", t: null}
|
||||
})
|
||||
Vue.prototype.$storeBoard = Vue.observable({
|
||||
currentDate: "20240705",
|
||||
dialog: false,
|
||||
aroundStock: [],
|
||||
query: {},
|
||||
search: {}
|
||||
search: {t: null}
|
||||
})
|
||||
Vue.component("HlsPlayer", {
|
||||
render: (h) => h('div', {style: {width: '100%', height: '100%'}}),
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script>
|
||||
const screens = [
|
||||
{id: '5b1849ac-4fc3-451a-844c-3362b47341ef', label: '市场看板', bg: 'http://10.0.97.209/img/kengee/kengee16.png'},
|
||||
{id: '7d26854c-769d-418b-9bae-5c1105e716a9', label: '多店监控', bg: 'http://10.0.97.209/img/kengee/kengee17.png'},
|
||||
{id: 'a90522ef-869b-40ea-8542-d1fc9674a1e8', label: '单店监控', bg: 'http://10.0.97.209/img/kengee/kengee18.png'},
|
||||
{id: '5b1849ac-4fc3-451a-844c-3362b47341ef', label: '市场看板', bg: 'http://10.0.97.209/img/kengee/kengee16.png', ob: '$marketBoard'},
|
||||
{id: '7d26854c-769d-418b-9bae-5c1105e716a9', label: '多店监控', bg: 'http://10.0.97.209/img/kengee/kengee17.png', ob: '$multipleStoreBoard'},
|
||||
{id: 'a90522ef-869b-40ea-8542-d1fc9674a1e8', label: '单店监控', bg: 'http://10.0.97.209/img/kengee/kengee18.png', ob: '$storeBoard'},
|
||||
]
|
||||
export default {
|
||||
name: "AppNavbar",
|
||||
label: "标题栏",
|
||||
data() {
|
||||
return {screens}
|
||||
return {screens, timer: null}
|
||||
},
|
||||
computed: {
|
||||
groupId: v => v.$marketBoard.screenId,
|
||||
@@ -26,6 +26,16 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.timer = setInterval(() => {
|
||||
const screen = this.screens.find(e => e.id === this.groupId)
|
||||
this.$set(this[screen.ob].search, 't', Date.now())
|
||||
console.log(screen.ob, this[screen.ob].search.t)
|
||||
}, 5000)
|
||||
},
|
||||
destroyed() {
|
||||
this.timer && clearInterval(this.timer)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user