独树的风 10 months ago
commit fdd0156b74

@ -1,18 +1,28 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script type="text/javascript" src="<%= BASE_URL %>js/liveplayer-lib.min.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script type="text/javascript" src="<%= BASE_URL %>js/liveplayer-lib.min.js"></script>
<!-- 引入MineMap API插件 -->
<link rel="stylesheet" href="http://50.144.11.244:21009/support/static/api/demo/js-api/zh/css/demo.css">
<link rel="stylesheet" href="http://50.144.11.244:21009/minemapapi/v2.1.0/minemap.css">
<script src="http://50.144.11.244:21009/minemapapi/v2.1.0/minemap.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -0,0 +1,36 @@
import http from '@/utils/http'
// * 获取实有地址
/**
*
* @param {*} params 实有地址分页参数
* @returns 服务器响应数据
*/
export const getRealAddressAPI = (params) => {
return http.get('/sheyang/page', { params })
}
// * 获取人口
export const getPeopleAPI = (params) => {
return http.get(`/sheyang/rkdz`, { params })
}
// * 获取单位
export const getUnitsAPI = (params) => {
return http.get(`/sheyang/dwdz`, { params })
}
// * 获取接警地信息
export const getAlarmAddressAPI = (params) => {
return http.get('JJxx/page', { params })
}
// * 根据接警编号获取接警信息
export const getAlarmInfoAPI = (params) => {
return http.get('JJxx/jjdbh', { params })
}
// * 获取感知设备
export const getPerceptionDeviceAPI = (params) => {
return http.get('sheBei/page', { params })
}

@ -1,5 +1,6 @@
import request from './request'
import request from '../utils/request'
import { getToken } from '@/utils/token'
import axios from 'axios'
const token = getToken()
@ -24,7 +25,7 @@ export const getDeviceListAPI = (params) => {
// * 获取视频列表
export const getVideoListAPI = (channel) => {
return request.get(
`/api/v1/stream/start?serial=${'32092400002005063063'}&channel=${channel}&timeout=${500}&token=${token}`
`/api/v1/stream/start?serial=${'32092400002005063063'}&channel=${channel}&timeout=${500}&check_channel_status=${true}&token=${token}`
)
}
@ -32,12 +33,6 @@ export const getVideoListAPI = (channel) => {
export const logoutAPI = () => {
return request.get('/api/v1/logout')
}
// // * 获取视频列表
// export const getVideoChannelAPI = () => {
// return request.get(
// `/api/v1/stream/start?serial=${'32092400002005063063'}&code=${'32092400001310088291'}&token=${getToken()}`
// )
// }
// * 关闭视频流
export const getCloseVideoAPI = (channel) => {
@ -45,3 +40,8 @@ export const getCloseVideoAPI = (channel) => {
`/api/v1/stream/stop?serial=${'32092400002005063063'}&channel=${channel}&token=${token}`
)
}
// * gbs数据发送
export const postGbsDataAPI = (data) => {
return axios.post('http://50.146.63.43:12000/live', data)
}

@ -0,0 +1,6 @@
import server from '@/utils/server'
// * 点聚合数据懒加载
export const postResources = (params) => {
return server.post('/bigscreen/overviewResources', params)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

@ -2,4 +2,34 @@ html,body {
margin: 0;
padding: 0;
box-sizing: border-box;
font-size: 12px;
}
// *
.house{
display: flex;
flex-direction: column;
justify-content: space-around;
width: 15vw;
height: 30vh;
font-size: 1rem;
color: #fff;
.house-item {
padding: 5px;
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
}
.state-a{
border-radius: 5px 5px 0 0;
background-color: rgb(240, 156, 156);
}
.state-b{
background-color: rgb(250, 114, 3);
}
.state-c{
border-radius: 0 0 5px 5px;
background-color: rgb(0, 119, 255);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,43 @@
<template>
<div class="popup">
<el-dialog
title="提示"
width="30%"
:visible="visible"
modal
:close-on-click-modal="true"
lock-scroll
:before-close="(visible = false)"
>
<span>内容展位</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'PopupContainer',
props: {
dialog: {
type: Boolean
}
},
data() {
return {
visible: this.dialog
}
}
}
</script>
<style lang="scss" scoped>
.popup {
width: 10vw;
height: 10vh;
.el-dialog {
width: 100%;
height: 100%;
}
}
</style>

@ -2,9 +2,12 @@ import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import '../src/assets/main.scss'
import 'element-ui/lib/theme-chalk/index.css'
Vue.config.productionTip = false
Vue.use(ElementUI)
new Vue({
router,

@ -6,8 +6,36 @@ Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'map',
component: () => import('@/views/MinedataMap.vue')
name: 'layout',
redirect: '/home/coastalMap',
component: () => import('@/views/coastalMap/index.vue')
// {
// path: '/map',
// name: 'map',
// component: () => import('@/views/map/MapMain.vue')
// },
},
{
path: '/home',
name: 'home',
component: () => import('@/views/home/index.vue'),
children: [
{
path: 'coastalMap',
name: 'coastalMap',
component: () => import('@/views/coastalMap/index.vue')
},
{
path: 'videoMonitor',
name: 'videoMonitor',
component: () => import('@/views/videoMonitor/index.vue')
},
{
path: 'sensingDevice',
name: 'sensingDevice',
component: () => import('@/views/sensingDevice/index.vue')
}
]
}
]

@ -1,12 +1,11 @@
import Vue from "vue";
import Vuex from "vuex";
import Vue from 'vue'
import Vuex from 'vuex'
import device from './modules/device'
Vue.use(Vuex);
Vue.use(Vuex)
export default new Vuex.Store({
state: {},
getters: {},
mutations: {},
actions: {},
modules: {},
});
modules: {
device
}
})

@ -0,0 +1,37 @@
//
import { getDeviceListAPI } from '@/api/facility'
import { setDeviceLatlng } from '@/utils/latlng'
export default {
namespaced: true,
state() {
return {
// * 监控视频数据
channelData: [],
// * 监控视频数量
channelCount: 0
}
},
mutations: {
// * 存储地址经纬度信息
setVideoData(state, newValue) {
state.channelData = newValue.channelData
state.channelCount = newValue.channelCount
console.log(newValue, 'store 中的监控数据')
}
},
actions: {
// * 获取设备列表
async getVideoData(context, params) {
const res = await getDeviceListAPI(params)
const channels = res.ChannelList.filter((item) => item.Latitude !== 0)
const channel = {
channelData: channels,
channelCount: res.ChannelCount
}
// * 存储监控设备列表
setDeviceLatlng(channel)
context.commit('setVideoData', channel)
}
},
getters: {}
}

@ -0,0 +1,4 @@
// * 事件总线
import Vue from 'vue'
const bus = new Vue()
export default bus

@ -0,0 +1,61 @@
// TODO 封装控制图层的方法
export const onShowLayer = (minemap, value, label) => {
console.log(minemap, value, label)
if (minemap && value) {
// * 监控设备图层显示
if (minemap.getLayer('device-points') && label === '监控') {
minemap.setLayoutProperty('device-points', 'visibility', 'visible')
}
// * 地址相关图层显示
if (minemap.getLayer('address-points') && label === '房屋') {
minemap.setLayoutProperty('address-points', 'visibility', 'visible')
}
// * 接警相关图层显示
if (minemap.getLayer('alarm-points') && label === '接警') {
minemap.setLayoutProperty('alarm-points', 'visibility', 'visible')
}
// * 感知设备图层显示
if (minemap.getLayer('perception-points') && label === '感知') {
minemap.setLayoutProperty('perception-points', 'visibility', 'visible')
}
}
}
export const onHideLayer = (minemap, value, label) => {
if (minemap && !value) {
// * 监控设备图层隐藏
if (minemap.getLayer('device-points') && label === '监控') {
minemap.setLayoutProperty('device-points', 'visibility', 'none')
}
// * 地址相关图层隐藏
if (minemap.getLayer('address-points') && label === '房屋') {
minemap.setLayoutProperty('address-points', 'visibility', 'none')
}
// * 接警相关图层隐藏
if (minemap.getLayer('alarm-points') && label === '接警') {
minemap.setLayoutProperty('alarm-points', 'visibility', 'none')
}
// * 感知设备图层隐藏
if (minemap.getLayer('perception-points') && label === '感知') {
minemap.setLayoutProperty('perception-points', 'visibility', 'none')
}
}
}
// * 地图加载时将 其余图层隐藏
export const onLoadHideLayer = (minemap) => {
if (minemap) {
console.log(minemap.getLayer('address-points'), '图层')
// * 地址相关图层隐藏
if (minemap.getLayer('address-points')) {
minemap.setLayoutProperty('address-points', 'visibility', 'none')
}
// * 接警相关图层隐藏
if (minemap.getLayer('alarm-points')) {
minemap.setLayoutProperty('alarm-points', 'visibility', 'none')
}
// * 感知设备图层隐藏
if (minemap.getLayer('perception-points')) {
minemap.setLayoutProperty('perception-points', 'visibility', 'none')
}
}
}

@ -0,0 +1,70 @@
// TODO 坐标转换
const x_PI = (3.14159265358979324 * 3000.0) / 180.0
const PI = 3.1415926535897932384626
const a = 6378245.0
const ee = 0.00669342162296594323
/**
* 判断是否在国内不在国内则不偏移
* @param {*} lng 经度
* @param {*} lat 纬度
*/
const outOfChina = (lng, lat) => {
return (
lng < 72.004 || lng > 137.8347 || lat < 0.8293 || lat > 55.8271 || false
)
}
/**
* 经度转换
* @param {Number} lng
* @param {Number} lat
*/
function transformlat(lng, lat) {
let ret =
-100.0 +
2.0 * lng +
3.0 * lat +
0.2 * lat * lat +
0.1 * lng * lat +
0.2 * Math.sqrt(Math.abs(lng))
ret +=
((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) *
2.0) /
3.0
ret +=
((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * 2.0) /
3.0
ret +=
((160.0 * Math.sin((lat / 12.0) * PI) + 320 * Math.sin((lat * PI) / 30.0)) *
2.0) /
3.0
return ret
}
/**
* 纬度转换
* @param {Number} lng 经度
* @param {Number} lat 纬度
*/
function transformlng(lng, lat) {
let ret =
300.0 +
lng +
2.0 * lat +
0.1 * lng * lng +
0.1 * lng * lat +
0.1 * Math.sqrt(Math.abs(lng))
ret +=
((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) *
2.0) /
3.0
ret +=
((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * 2.0) /
3.0
ret +=
((160.0 * Math.sin((lat / 12.0) * PI) + 320 * Math.sin((lat * PI) / 30.0)) *
2.0) /
3.0
return ret
}

@ -0,0 +1,92 @@
// * 封装时间函数
export const dateFormat = (date) => {
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
let hours = date.getHours()
let min = date.getMinutes()
let seconds = date.getSeconds()
// * 数字补 0
function check(num) {
if (num < 10) {
return '0' + num
} else {
return num
}
}
// * 创建时间集合
let timeArr = {}
let timeText = `${check(year)}${check(month)}${check(day)}${check(
hours
)}:${check(min)}:${check(seconds)}`
let nowDate = date.getDay()
let weeks = new Array(
'星期日',
'星期一',
'星期二',
'星期三',
'星期四',
'星期五',
'星期六'
)
let week = weeks[nowDate]
// * 判断时间段
class TimePeriod {
constructor(hours) {
this.hours = hours
}
getState() {
return this.strategy.getState()
}
setStrategy(strategy) {
this.strategy = strategy
}
}
// * 定义策略对象
const strategies = {
morning: {
getState() {
return '早上'
}
},
midday: {
getState() {
return '中午'
}
},
afternoon: {
getState() {
return '下午'
}
},
evening: {
getState() {
return '晚上'
}
}
}
// * 定义时间分区
const timeIntervals = {
morning: [0, 10],
midday: [11, 14],
afternoon: [15, 18],
evening: [19, 24]
}
// * 获取当前策略
const getStrategy = (hours) => {
for (let key in timeIntervals) {
if (hours >= timeIntervals[key][0] && hours <= timeIntervals[key][1]) {
return strategies[key]
}
}
}
// * 实例化
const timePeriod = new TimePeriod(hours)
// * 设置策略
timePeriod.setStrategy(getStrategy(hours))
const state = timePeriod.getState()
timeArr.timeText = timeText
timeArr.week = week
timeArr.state = state
return timeArr
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save