diff --git a/src/apps/AppIntelligentSecurity/SlwVideo.vue b/src/apps/AppIntelligentSecurity/SlwVideo.vue index bf654584..7aa63945 100644 --- a/src/apps/AppIntelligentSecurity/SlwVideo.vue +++ b/src/apps/AppIntelligentSecurity/SlwVideo.vue @@ -1,19 +1,67 @@ \ No newline at end of file diff --git a/src/apps/AppIntelligentSecurity/components/Timeline.vue b/src/apps/AppIntelligentSecurity/components/Timeline.vue new file mode 100644 index 00000000..5c7ded70 --- /dev/null +++ b/src/apps/AppIntelligentSecurity/components/Timeline.vue @@ -0,0 +1,289 @@ + + + + + \ No newline at end of file diff --git a/src/apps/AppIntelligentSecurity/monitorDetail.vue b/src/apps/AppIntelligentSecurity/monitorDetail.vue index c3f9b72c..f00cae19 100644 --- a/src/apps/AppIntelligentSecurity/monitorDetail.vue +++ b/src/apps/AppIntelligentSecurity/monitorDetail.vue @@ -1,7 +1,7 @@ @@ -14,7 +14,8 @@ export default { return { style: {}, videoUrl: '', - monitor: {} + monitor: {}, + id: '' } }, @@ -61,7 +62,8 @@ export default { } }, onLoad(params) { - this.getDetail(params.id) + this.id = params.id + // this.getDetail(params.id) } } diff --git a/src/apps/AppVideoSurveillance/AppVideoSurveillance.vue b/src/apps/AppVideoSurveillance/AppVideoSurveillance.vue index f14a5095..6ea396d1 100644 --- a/src/apps/AppVideoSurveillance/AppVideoSurveillance.vue +++ b/src/apps/AppVideoSurveillance/AppVideoSurveillance.vue @@ -111,7 +111,7 @@ export default { this.$http.post(`/app/appzyvideoequipment/getAreaEquipment?areaId=${this.areaId}`).then(res => { if (res?.data) { this.list = res.data.list - this.count = res.data.count + this.count = res.data.count || 0 this.onlineRate = (this.count.online / this.count.sum).toFixed(2) this.offlineRate = (1 - this.onlineRate).toFixed(2) this.initEchart() diff --git a/src/main.js b/src/main.js index b15ca09f..06772e21 100644 --- a/src/main.js +++ b/src/main.js @@ -5,6 +5,7 @@ import axios from './common/axios'; import utils from './common/util'; import ui from 'uview-ui' import VConsole from 'vconsole' +import dayjs from 'dayjs' const loading = title => { uni.showLoading({ @@ -23,6 +24,7 @@ Vue.use(ui) Vue.config.productionTip = false; //初始化接口工具类 Vue.prototype.$http = axios; +Vue.prototype.$dayjs = dayjs Vue.prototype.$cdn = 'https://cdn.cunwuyun.cn/dvcp/h5/'; Object.keys(utils).map((e) => (Vue.prototype['$' + e] = utils[e])); utils.dict.init({instance: axios}) @@ -32,20 +34,20 @@ const app = new Vue({ store, ...App }); -app.$mount(); -// store.dispatch("agentSign").then(config => { -// const init = (c = 0) => { -// if (config) { -// store.commit("getConfig", {...config, latlng: [config.lat, config.lng]}) -// app.$mount(); -// } else { -// if (c < 5) { -// setTimeout(() => { -// init(++c) -// }, 300) -// } -// } -// } -// init() -// }) +// app.$mount(); +store.dispatch("agentSign").then(config => { + const init = (c = 0) => { + if (config) { + store.commit("getConfig", {...config, latlng: [config.lat, config.lng]}) + app.$mount(); + } else { + if (c < 5) { + setTimeout(() => { + init(++c) + }, 300) + } + } + } + init() +})