New file |
| | |
| | | { |
| | | "code": "200", |
| | | "success": true, |
| | | "data": [ |
| | | { |
| | | "id": "5", |
| | | "name": "gb28181", |
| | | "src": "../../images/app-mid/GB-config.png", |
| | | "alt": "GB28181配置", |
| | | "type": "2", |
| | | "url": "/view/gb28181", |
| | | "title": "GB28181配置", |
| | | "width": 600, |
| | | "height": 670 |
| | | }, |
| | | { |
| | | "id": "12", |
| | | "name": "cameraVideo", |
| | | "src": "../../images/app-mid/monitor.png", |
| | | "alt": "实时监控", |
| | | "type": "2", |
| | | "url": "/view/cameraVideo", |
| | | "title": "实时监控", |
| | | "width": 1328, |
| | | "height": 690 |
| | | }, |
| | | { |
| | | "id": "9", |
| | | "name": "algorithmManage", |
| | | "src": "../../images/app-mid/algorithm-store.png", |
| | | "alt": "应用中心", |
| | | "type": "2", |
| | | "url": "/view/ai", |
| | | "title": "应用中心", |
| | | "width": 1243, |
| | | "height": 670 |
| | | }, |
| | | { |
| | | "id": "1", |
| | | "name": "cameraAccess", |
| | | "src": "../../images/app-mid/camera-access.png", |
| | | "alt": "camera-access", |
| | | "type": "2", |
| | | "url": "/view/cameraAccess", |
| | | "title": "摄像机配置", |
| | | "width": 1200, |
| | | "height": 670 |
| | | }, |
| | | { |
| | | "id": "2", |
| | | "name": "dataStack", |
| | | "src": "../../images/app-mid/datastack-config.png", |
| | | "alt": "datastack-config", |
| | | "type": "2", |
| | | "url": "/view/cameraAccess?dataStack=1", |
| | | "title": "数据栈配置", |
| | | "width": 1200, |
| | | "height": 670 |
| | | }, |
| | | { |
| | | "id": "4", |
| | | "name": "datapush", |
| | | "src": "../../images/app-mid/data-push.png", |
| | | "alt": "data-push", |
| | | "type": "2", |
| | | "url": "/view/datapush", |
| | | "title": "数据推送", |
| | | "width": 1024, |
| | | "height": 512 |
| | | }, |
| | | { |
| | | "id": "7", |
| | | "name": "library", |
| | | "src": "../../images/app-mid/library.png", |
| | | "alt": "比对库管理", |
| | | "type": "2", |
| | | "url": "/view/library", |
| | | "title": "比对库管理", |
| | | "width": 1200, |
| | | "height": 670 |
| | | }, |
| | | { |
| | | "id": "11", |
| | | "name": "analysisPower", |
| | | "src": "../../images/app-mid/hashrate-manage.png", |
| | | "alt": "算力管理", |
| | | "type": "2", |
| | | "url": "/view/analysisPower", |
| | | "title": "算力管理", |
| | | "width": 1200, |
| | | "height": 670 |
| | | }, |
| | | { |
| | | "id": "13", |
| | | "name": "search", |
| | | "src": "../../images/app-mid/search.png", |
| | | "alt": "统计查询", |
| | | "type": "2", |
| | | "url": "/view/search", |
| | | "title": "统计查询", |
| | | "width": 1344, |
| | | "height": 675 |
| | | }, |
| | | { |
| | | "id": "15", |
| | | "name": "syslog", |
| | | "src": "../../images/app-mid/log-manage.png", |
| | | "alt": "日志管理", |
| | | "type": "2", |
| | | "url": "/view/syslog", |
| | | "title": "日志管理", |
| | | "width": 1200, |
| | | "height": 600 |
| | | }, |
| | | { |
| | | "id": "17", |
| | | "name": "settings", |
| | | "src": "../../images/app-mid/settings.png", |
| | | "alt": "系统设置", |
| | | "type": "2", |
| | | "url": "/view/settings", |
| | | "title": "系统设置", |
| | | "width": 1200, |
| | | "height": 650 |
| | | }, |
| | | { |
| | | "id": "18", |
| | | "name": "vindicate", |
| | | "src": "../../images/app-mid/vindicate.png", |
| | | "alt": "系统维护", |
| | | "type": "2", |
| | | "url": "/view/vindicate", |
| | | "title": "系统维护", |
| | | "width": 760, |
| | | "height": 534 |
| | | }, |
| | | { |
| | | "id": "19", |
| | | "name": "heatCamera", |
| | | "src": "../../images/app-mid/algorithm-manage.png", |
| | | "alt": "热力图", |
| | | "type": "2", |
| | | "url": "/view/heatCamera", |
| | | "title": "热力图", |
| | | "width": 760, |
| | | "height": 600 |
| | | }, |
| | | { |
| | | "id": "20", |
| | | "name": "areaManage", |
| | | "src": "../../images/app-mid/device.png", |
| | | "alt": "摄像机区域管理", |
| | | "type": "2", |
| | | "url": "/view/areaManage", |
| | | "title": "摄像机区域管理", |
| | | "width": 1200, |
| | | "height": 600 |
| | | } |
| | | ] |
| | | } |
| | |
| | | public size: number; |
| | | public contentValue: string = ""; |
| | | public tableId: number; |
| | | public orderName: string = "id"; |
| | | public orderName: string = "createTime"; |
| | | public orderType: string = "desc"; |
| | | public faceUrl: string = ""; |
| | | public threshold: number = 60; |
New file |
| | |
| | | import request from "@/scripts/httpRequest"; |
| | | |
| | | export const getApps = (query: any) => { |
| | | return request({ |
| | | url: "/apps.json", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | }; |
| | |
| | | <template> |
| | | <div id="app" @contextmenu.prevent=""> |
| | | <div id="app" @contextmenu.prevent> |
| | | <tools></tools> |
| | | <desktop></desktop> |
| | | <tools-entry ref="dock_model"></tools-entry> |
| | |
| | | import ToolsEntry from './components/ToolsEntry'; |
| | | import axios from 'axios' |
| | | |
| | | import { getApps } from '@/api/app' |
| | | |
| | | export default { |
| | | name: 'app', |
| | | components: { |
| | | Desktop, NotificationCenter, NoticeTip, Tools, ToolsEntry |
| | | }, |
| | | |
| | | |
| | | mounted() { |
| | | document.getElementById('app').style.backgroundImage = process.env.VUE_APP_MAIN_URL; |
| | | let _that = this; |
| | | let user_res = require("./mock/userData.json") |
| | | if (user_res.success) { |
| | | user_res.data.docks.forEach(function (item) { |
| | | _that.$store.commit('desktop/addDock', item); |
| | | }); |
| | | } |
| | | this.showApps(); |
| | | |
| | | let _that = this; |
| | | let msgResp = require("./mock/messages.json") |
| | | if (msgResp.success) { |
| | | msgResp.data.forEach(function (item) { |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | showApps() { |
| | | let _that = this; |
| | | |
| | | getApps().then(rsp => { |
| | | if (rsp && rsp.success) { |
| | | rsp.data.forEach(function (item) { |
| | | _that.$store.commit('desktop/addDock', item); |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | addMessage: function (message, ding) { |
| | | this.$store.dispatch('desktop/addMessage', message); |
| | | // if (ding) { |
| | |
| | | addWeather: function (weather) { |
| | | this.$store.commit('desktop/addWeather', weather); |
| | | }, |
| | | screenShot(dock){ |
| | | screenShot(dock) { |
| | | //找到当前的iframe |
| | | let curIframe = Array.from(document.querySelectorAll('iframe')).find(iframe => iframe.src.indexOf(dock.url) >= 0); |
| | | //保存当前应用快照 |
| | |
| | | // type: "3", |
| | | // screenshot: shotSrc |
| | | // }); |
| | | this.$store.commit('desktop/shotscreen', {id:dock.id, src:shotSrc}); |
| | | |
| | | this.$store.commit('desktop/shotscreen', { id: dock.id, src: shotSrc }); |
| | | |
| | | }).catch(e => { |
| | | this.$store.commit('desktop/shotscreen', {id:dock.id, src:''}); |
| | | this.$store.commit('desktop/shotscreen', { id: dock.id, src: '' }); |
| | | }); |
| | | } |
| | | } |