diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/src/assets/global_images/on.png b/src/assets/global_images/on.png new file mode 100644 index 0000000..3aa5b7d --- /dev/null +++ b/src/assets/global_images/on.png Binary files differ diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/src/assets/global_images/on.png b/src/assets/global_images/on.png new file mode 100644 index 0000000..3aa5b7d --- /dev/null +++ b/src/assets/global_images/on.png Binary files differ diff --git a/src/router/index.js b/src/router/index.js index b67baa9..805197a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -28,6 +28,24 @@ * 静态路由 */ export const constantRouterMap = [ + { + path: '/', + component: Layout, + redirect: '/overview', + name: 'Overview', + meta: { + title: '地图总览', + icon: 'icon-map' // 图标 + }, + children: [ + { + path: '/overview', + name: 'Overview', + component: () => import('@/views/overview/listoverview.vue'), + meta: { title: '地图总览', icon: '' } + } + ] + }, { // 重定向 path: '/redirect', component: Layout, @@ -44,7 +62,7 @@ { path: '/login', component: () => import('@/views/login/index_2'), hidden: true }, // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, - // 401 错误页面 + // // 401 错误页面 { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/src/assets/global_images/on.png b/src/assets/global_images/on.png new file mode 100644 index 0000000..3aa5b7d --- /dev/null +++ b/src/assets/global_images/on.png Binary files differ diff --git a/src/router/index.js b/src/router/index.js index b67baa9..805197a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -28,6 +28,24 @@ * 静态路由 */ export const constantRouterMap = [ + { + path: '/', + component: Layout, + redirect: '/overview', + name: 'Overview', + meta: { + title: '地图总览', + icon: 'icon-map' // 图标 + }, + children: [ + { + path: '/overview', + name: 'Overview', + component: () => import('@/views/overview/listoverview.vue'), + meta: { title: '地图总览', icon: '' } + } + ] + }, { // 重定向 path: '/redirect', component: Layout, @@ -44,7 +62,7 @@ { path: '/login', component: () => import('@/views/login/index_2'), hidden: true }, // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, - // 401 错误页面 + // // 401 错误页面 { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter diff --git a/src/utils/HKVideo.js b/src/utils/HKVideo.js index 8daffc3..d00448c 100644 --- a/src/utils/HKVideo.js +++ b/src/utils/HKVideo.js @@ -1,6 +1,4 @@ // 初始化控件 -import de from "element-ui/src/locale/lang/de"; - export function initPlugin(iWndowType, id, bWndFull, callback, cbDoubleClickWnd) { // 检查浏览器是否支持无插件 // if (!WebVideoCtrl.I_SupportNoPlugin()) { diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/src/assets/global_images/on.png b/src/assets/global_images/on.png new file mode 100644 index 0000000..3aa5b7d --- /dev/null +++ b/src/assets/global_images/on.png Binary files differ diff --git a/src/router/index.js b/src/router/index.js index b67baa9..805197a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -28,6 +28,24 @@ * 静态路由 */ export const constantRouterMap = [ + { + path: '/', + component: Layout, + redirect: '/overview', + name: 'Overview', + meta: { + title: '地图总览', + icon: 'icon-map' // 图标 + }, + children: [ + { + path: '/overview', + name: 'Overview', + component: () => import('@/views/overview/listoverview.vue'), + meta: { title: '地图总览', icon: '' } + } + ] + }, { // 重定向 path: '/redirect', component: Layout, @@ -44,7 +62,7 @@ { path: '/login', component: () => import('@/views/login/index_2'), hidden: true }, // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, - // 401 错误页面 + // // 401 错误页面 { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter diff --git a/src/utils/HKVideo.js b/src/utils/HKVideo.js index 8daffc3..d00448c 100644 --- a/src/utils/HKVideo.js +++ b/src/utils/HKVideo.js @@ -1,6 +1,4 @@ // 初始化控件 -import de from "element-ui/src/locale/lang/de"; - export function initPlugin(iWndowType, id, bWndFull, callback, cbDoubleClickWnd) { // 检查浏览器是否支持无插件 // if (!WebVideoCtrl.I_SupportNoPlugin()) { diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue index 32c8913..b51764c 100644 --- a/src/views/overview/listoverview.vue +++ b/src/views/overview/listoverview.vue @@ -26,8 +26,9 @@
+ -
+ +
+ + +
+ + 在线:{{ online }} +
+
+ +
+ + 离线:{{ offline }} +
+
+
@@ -92,16 +109,17 @@ import { getOverviewList, getOverviewAllList } from '@/api/overview' import { offlineCount } from '@/api/device' import { getDictByCode } from '@/api/system/dict' -import DeptSelect from '@/components/DeptSelect' import L from 'leaflet' import 'leaflet/dist/leaflet.css' import 'leaflet-rotatedmarker/leaflet.rotatedMarker.js' import { getDeviceListPage, getDeviceList } from '@/api/device' +import VideoCom from './video.vue' export default { name: 'ListOverview', - components: { DeptSelect }, + components: { VideoCom }, data() { return { + deviceInfo: {}, dialogFormVisible: false, // 是否显示编辑框 refresh: '30', online: 0, @@ -158,14 +176,16 @@ // listLoading: true, // 加载动画 fullscreenLoading: false, // 全屏加载动画 cartypelist: [], // 类型列表 - deptlist: [] // 类型列表 + deptlist: [], // 类型列表 + showVideo: false // 是否显示视频组件 } }, watch: { sec(val) { if (val === 0) { this.sec = Number(this.refresh) - this.fetchData() + // 隐藏自动刷新 + // this.fetchData() } } }, @@ -338,17 +358,18 @@ for (var i = 0; i < this.alllist.length; i++) { if (this.alllist[i].statusName === '在线') { Icon = L.icon({ - iconUrl: require('../../assets/global_images/online.png'), - iconSize: [40, 40] + iconUrl: require('../../assets/global_images/on.png'), + iconSize: [30, 30] }) } else if (this.alllist[i].statusName === '离线') { Icon = L.icon({ - iconUrl: require('../../assets/global_images/offline.png'), - iconSize: [40, 40] + iconUrl: require('../../assets/global_images/off.png'), + iconSize: [30, 30] }) } var myIcon = L.divIcon({ - html: '
' + this.alllist[i].devCode + '_' + this.alllist[i].remarks + '
', + // html: '
' + this.alllist[i].devCode + '_' + this.alllist[i].remarks + '
', + html: '
' + this.alllist[i].remarks + '
', className: '', iconSize: [100, 15] }) @@ -363,8 +384,10 @@ '
' + this.alllist[i].installTime + '
' + '
' + this.alllist[i].detailLocation + '
' + '
' + this.alllist[i].remarks + '
' + - '
' - // + '
' + + '' + + '' + // '' var popup = L.popup().setContent(str) var marker = L.marker([this.alllist[i].latitude, this.alllist[i].longitude], { icon: Icon, @@ -374,8 +397,21 @@ }).addTo(this.map).bindPopup(popup) var that = this marker.on('click', function(e) { - document.getElementById('btndetail').onclick = function() { - that.detail(e.sourceTarget.options.slug.carId) + // document.getElementById('btndetail').onclick = function() { + // console.log('详情', e.sourceTarget.options); + // // that.detail(e.sourceTarget.options.slug.carId) + // } + console.log('marker click', e.sourceTarget.options.slug) + document.getElementById('buttonVideo').onclick = function() { + // that.detail(e.sourceTarget.options.slug.carId) + that.showVideo = true + that.deviceInfo = e.sourceTarget.options.slug + console.log('父组件设备信息', that.deviceInfo) + } + + document.getElementById('buttonCancle').onclick = function() { + console.log('关闭') + that.showVideo = false } }) } diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/src/assets/global_images/on.png b/src/assets/global_images/on.png new file mode 100644 index 0000000..3aa5b7d --- /dev/null +++ b/src/assets/global_images/on.png Binary files differ diff --git a/src/router/index.js b/src/router/index.js index b67baa9..805197a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -28,6 +28,24 @@ * 静态路由 */ export const constantRouterMap = [ + { + path: '/', + component: Layout, + redirect: '/overview', + name: 'Overview', + meta: { + title: '地图总览', + icon: 'icon-map' // 图标 + }, + children: [ + { + path: '/overview', + name: 'Overview', + component: () => import('@/views/overview/listoverview.vue'), + meta: { title: '地图总览', icon: '' } + } + ] + }, { // 重定向 path: '/redirect', component: Layout, @@ -44,7 +62,7 @@ { path: '/login', component: () => import('@/views/login/index_2'), hidden: true }, // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, - // 401 错误页面 + // // 401 错误页面 { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter diff --git a/src/utils/HKVideo.js b/src/utils/HKVideo.js index 8daffc3..d00448c 100644 --- a/src/utils/HKVideo.js +++ b/src/utils/HKVideo.js @@ -1,6 +1,4 @@ // 初始化控件 -import de from "element-ui/src/locale/lang/de"; - export function initPlugin(iWndowType, id, bWndFull, callback, cbDoubleClickWnd) { // 检查浏览器是否支持无插件 // if (!WebVideoCtrl.I_SupportNoPlugin()) { diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue index 32c8913..b51764c 100644 --- a/src/views/overview/listoverview.vue +++ b/src/views/overview/listoverview.vue @@ -26,8 +26,9 @@
+ -
+ +
+ + +
+ + 在线:{{ online }} +
+
+ +
+ + 离线:{{ offline }} +
+
+
@@ -92,16 +109,17 @@ import { getOverviewList, getOverviewAllList } from '@/api/overview' import { offlineCount } from '@/api/device' import { getDictByCode } from '@/api/system/dict' -import DeptSelect from '@/components/DeptSelect' import L from 'leaflet' import 'leaflet/dist/leaflet.css' import 'leaflet-rotatedmarker/leaflet.rotatedMarker.js' import { getDeviceListPage, getDeviceList } from '@/api/device' +import VideoCom from './video.vue' export default { name: 'ListOverview', - components: { DeptSelect }, + components: { VideoCom }, data() { return { + deviceInfo: {}, dialogFormVisible: false, // 是否显示编辑框 refresh: '30', online: 0, @@ -158,14 +176,16 @@ // listLoading: true, // 加载动画 fullscreenLoading: false, // 全屏加载动画 cartypelist: [], // 类型列表 - deptlist: [] // 类型列表 + deptlist: [], // 类型列表 + showVideo: false // 是否显示视频组件 } }, watch: { sec(val) { if (val === 0) { this.sec = Number(this.refresh) - this.fetchData() + // 隐藏自动刷新 + // this.fetchData() } } }, @@ -338,17 +358,18 @@ for (var i = 0; i < this.alllist.length; i++) { if (this.alllist[i].statusName === '在线') { Icon = L.icon({ - iconUrl: require('../../assets/global_images/online.png'), - iconSize: [40, 40] + iconUrl: require('../../assets/global_images/on.png'), + iconSize: [30, 30] }) } else if (this.alllist[i].statusName === '离线') { Icon = L.icon({ - iconUrl: require('../../assets/global_images/offline.png'), - iconSize: [40, 40] + iconUrl: require('../../assets/global_images/off.png'), + iconSize: [30, 30] }) } var myIcon = L.divIcon({ - html: '
' + this.alllist[i].devCode + '_' + this.alllist[i].remarks + '
', + // html: '
' + this.alllist[i].devCode + '_' + this.alllist[i].remarks + '
', + html: '
' + this.alllist[i].remarks + '
', className: '', iconSize: [100, 15] }) @@ -363,8 +384,10 @@ '
' + this.alllist[i].installTime + '
' + '
' + this.alllist[i].detailLocation + '
' + '
' + this.alllist[i].remarks + '
' + - '
' - // + '
' + + '' + + '' + // '' var popup = L.popup().setContent(str) var marker = L.marker([this.alllist[i].latitude, this.alllist[i].longitude], { icon: Icon, @@ -374,8 +397,21 @@ }).addTo(this.map).bindPopup(popup) var that = this marker.on('click', function(e) { - document.getElementById('btndetail').onclick = function() { - that.detail(e.sourceTarget.options.slug.carId) + // document.getElementById('btndetail').onclick = function() { + // console.log('详情', e.sourceTarget.options); + // // that.detail(e.sourceTarget.options.slug.carId) + // } + console.log('marker click', e.sourceTarget.options.slug) + document.getElementById('buttonVideo').onclick = function() { + // that.detail(e.sourceTarget.options.slug.carId) + that.showVideo = true + that.deviceInfo = e.sourceTarget.options.slug + console.log('父组件设备信息', that.deviceInfo) + } + + document.getElementById('buttonCancle').onclick = function() { + console.log('关闭') + that.showVideo = false } }) } diff --git a/src/views/overview/video.vue b/src/views/overview/video.vue new file mode 100644 index 0000000..d00893e --- /dev/null +++ b/src/views/overview/video.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/public/HKVideo/codebase/webVideoCtrl.js b/public/HKVideo/codebase/webVideoCtrl.js index 5ad0c77..2a94fd9 100644 --- a/public/HKVideo/codebase/webVideoCtrl.js +++ b/public/HKVideo/codebase/webVideoCtrl.js @@ -595,6 +595,12 @@ this.I_Resize = function (iWidth, iHeight) { return m_pluginOBJECT.JS_Resize(iWidth, iHeight) } + this.JS_CuttingPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight) + } + this.JS_RepairPartWindow = function (iLeft, iTop, iWidth, iHeight) { + m_pluginOBJECT.JS_RepairPartWindow(iLeft, iTop, iWidth, iHeight) + } this.I_InitPlugin = function (options) { m_utilsInc.extend(m_options, options) var szDirName = m_utilsInc.getDirName() @@ -5088,6 +5094,7 @@ m_utilsInc = new Utils() return this })() + debugger var NS = (window.WebVideoCtrl = WebVideoCtrl) NS.version = '3.3.0' })(this) diff --git a/src/assets/global_images/off.png b/src/assets/global_images/off.png new file mode 100644 index 0000000..706c07f --- /dev/null +++ b/src/assets/global_images/off.png Binary files differ diff --git a/src/assets/global_images/on.png b/src/assets/global_images/on.png new file mode 100644 index 0000000..3aa5b7d --- /dev/null +++ b/src/assets/global_images/on.png Binary files differ diff --git a/src/router/index.js b/src/router/index.js index b67baa9..805197a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -28,6 +28,24 @@ * 静态路由 */ export const constantRouterMap = [ + { + path: '/', + component: Layout, + redirect: '/overview', + name: 'Overview', + meta: { + title: '地图总览', + icon: 'icon-map' // 图标 + }, + children: [ + { + path: '/overview', + name: 'Overview', + component: () => import('@/views/overview/listoverview.vue'), + meta: { title: '地图总览', icon: '' } + } + ] + }, { // 重定向 path: '/redirect', component: Layout, @@ -44,7 +62,7 @@ { path: '/login', component: () => import('@/views/login/index_2'), hidden: true }, // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, - // 401 错误页面 + // // 401 错误页面 { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter diff --git a/src/utils/HKVideo.js b/src/utils/HKVideo.js index 8daffc3..d00448c 100644 --- a/src/utils/HKVideo.js +++ b/src/utils/HKVideo.js @@ -1,6 +1,4 @@ // 初始化控件 -import de from "element-ui/src/locale/lang/de"; - export function initPlugin(iWndowType, id, bWndFull, callback, cbDoubleClickWnd) { // 检查浏览器是否支持无插件 // if (!WebVideoCtrl.I_SupportNoPlugin()) { diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue index 32c8913..b51764c 100644 --- a/src/views/overview/listoverview.vue +++ b/src/views/overview/listoverview.vue @@ -26,8 +26,9 @@
+ -
+ +
+ + +
+ + 在线:{{ online }} +
+
+ +
+ + 离线:{{ offline }} +
+
+
@@ -92,16 +109,17 @@ import { getOverviewList, getOverviewAllList } from '@/api/overview' import { offlineCount } from '@/api/device' import { getDictByCode } from '@/api/system/dict' -import DeptSelect from '@/components/DeptSelect' import L from 'leaflet' import 'leaflet/dist/leaflet.css' import 'leaflet-rotatedmarker/leaflet.rotatedMarker.js' import { getDeviceListPage, getDeviceList } from '@/api/device' +import VideoCom from './video.vue' export default { name: 'ListOverview', - components: { DeptSelect }, + components: { VideoCom }, data() { return { + deviceInfo: {}, dialogFormVisible: false, // 是否显示编辑框 refresh: '30', online: 0, @@ -158,14 +176,16 @@ // listLoading: true, // 加载动画 fullscreenLoading: false, // 全屏加载动画 cartypelist: [], // 类型列表 - deptlist: [] // 类型列表 + deptlist: [], // 类型列表 + showVideo: false // 是否显示视频组件 } }, watch: { sec(val) { if (val === 0) { this.sec = Number(this.refresh) - this.fetchData() + // 隐藏自动刷新 + // this.fetchData() } } }, @@ -338,17 +358,18 @@ for (var i = 0; i < this.alllist.length; i++) { if (this.alllist[i].statusName === '在线') { Icon = L.icon({ - iconUrl: require('../../assets/global_images/online.png'), - iconSize: [40, 40] + iconUrl: require('../../assets/global_images/on.png'), + iconSize: [30, 30] }) } else if (this.alllist[i].statusName === '离线') { Icon = L.icon({ - iconUrl: require('../../assets/global_images/offline.png'), - iconSize: [40, 40] + iconUrl: require('../../assets/global_images/off.png'), + iconSize: [30, 30] }) } var myIcon = L.divIcon({ - html: '
' + this.alllist[i].devCode + '_' + this.alllist[i].remarks + '
', + // html: '
' + this.alllist[i].devCode + '_' + this.alllist[i].remarks + '
', + html: '
' + this.alllist[i].remarks + '
', className: '', iconSize: [100, 15] }) @@ -363,8 +384,10 @@ '
' + this.alllist[i].installTime + '
' + '
' + this.alllist[i].detailLocation + '
' + '
' + this.alllist[i].remarks + '
' + - '
' - // + '
' + + '' + + '' + // '' var popup = L.popup().setContent(str) var marker = L.marker([this.alllist[i].latitude, this.alllist[i].longitude], { icon: Icon, @@ -374,8 +397,21 @@ }).addTo(this.map).bindPopup(popup) var that = this marker.on('click', function(e) { - document.getElementById('btndetail').onclick = function() { - that.detail(e.sourceTarget.options.slug.carId) + // document.getElementById('btndetail').onclick = function() { + // console.log('详情', e.sourceTarget.options); + // // that.detail(e.sourceTarget.options.slug.carId) + // } + console.log('marker click', e.sourceTarget.options.slug) + document.getElementById('buttonVideo').onclick = function() { + // that.detail(e.sourceTarget.options.slug.carId) + that.showVideo = true + that.deviceInfo = e.sourceTarget.options.slug + console.log('父组件设备信息', that.deviceInfo) + } + + document.getElementById('buttonCancle').onclick = function() { + console.log('关闭') + that.showVideo = false } }) } diff --git a/src/views/overview/video.vue b/src/views/overview/video.vue new file mode 100644 index 0000000..d00893e --- /dev/null +++ b/src/views/overview/video.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/src/views/video/history.vue b/src/views/video/history.vue index 819647d..8f8c267 100644 --- a/src/views/video/history.vue +++ b/src/views/video/history.vue @@ -7,7 +7,7 @@
-
+
@@ -35,7 +37,7 @@