Commit 2d6459fb by 潘建波

添加经纬度地图重置

1 parent 5dad5317
No preview for this file type
...@@ -2,26 +2,26 @@ import axios from "axios"; ...@@ -2,26 +2,26 @@ import axios from "axios";
import store from "../store/index.js"; import store from "../store/index.js";
import router from "../router/index"; import router from "../router/index";
import {Message,Loading} from 'element-ui' import { Message, Loading } from "element-ui";
let loading; let loading;
//内存中正在请求的数量 //内存中正在请求的数量
let loadingNum=0; let loadingNum = 0;
function startLoading() { function startLoading() {
if(loadingNum==0){ if (loadingNum == 0) {
loading = Loading.service({ loading = Loading.service({
lock: true, lock: true,
text: '拼命加载中...', text: "拼命加载中...",
background:'rgba(255,255,255,0.5)', background: "rgba(255,255,255,0.5)"
}) });
} }
//请求数量加1 //请求数量加1
loadingNum++; loadingNum++;
} }
function endLoading() { function endLoading() {
//请求数量减1 //请求数量减1
loadingNum-- loadingNum--;
if(loadingNum<=0){ if (loadingNum <= 0) {
loading.close() loading.close();
} }
} }
// 创建 axios 实例 // 创建 axios 实例
...@@ -32,64 +32,65 @@ let service = axios.create({ ...@@ -32,64 +32,65 @@ let service = axios.create({
// 添加请求拦截器 // 添加请求拦截器
service.interceptors.request.use( service.interceptors.request.use(
(config) => { config => {
startLoading(); // startLoading();
if (store.state.users.atoken) { // 判断是否存在token,如果存在的话,则每个http header都加上token let atoken = localStorage.getItem("atoken");
config.headers.authorization = store.state.users.atoken; if (atoken) {
}else{ // 判断是否存在token,如果存在的话,则每个http header都加上token
config.headers.authorization = atoken;
} else {
router.push("/login"); router.push("/login");
endLoading(); // endLoading();
} }
if (config.method == 'get') { if (config.method == "get") {
config.params = { config.params = {
_t: Date.parse(new Date()) / 1000, _t: Date.parse(new Date()) / 1000,
...config.params ...config.params
};
} }
} return config;
return config
}, },
(err) => { err => {
// 请求错误处理 // 请求错误处理
return Promise.reject(err) return Promise.reject(err);
// config => { // config => {
// let token = localStorage.getItem("atoken"); // let token = localStorage.getItem("atoken");
// if (token) { // if (token) {
// // 判断是否存在token,如果存在的话,则每个http header都加上token // // 判断是否存在token,如果存在的话,则每个http header都加上token
// config.headers.authorization = token; // config.headers.authorization = token;
// } else { // } else {
// router.push("/login"); // router.push("/login");
// } // }
// if (config.method == "get") { // if (config.method == "get") {
// config.params = { // config.params = {
// _t: Date.parse(new Date()) / 1000, // _t: Date.parse(new Date()) / 1000,
// ...config.params // ...config.params
// }; // };
// } // }
// return config; // return config;
// }, // },
// error => { // error => {
// // 请求错误处理 // // 请求错误处理
// return Promise.reject(error); // return Promise.reject(error);
} }
); );
// 添加响应拦截器 // 添加响应拦截器
service.interceptors.response.use( service.interceptors.response.use(
(response) => { response => {
endLoading(); // endLoading();
let { data } = response let { data } = response;
return data return data;
}, },
(err) => { err => {
endLoading(); // endLoading();
if (err && err.response) { if (err && err.response) {
Message.error({message: err.response.data.enote}); Message.error({ message: err.response.data.enote });
} else {
}else{ Message.error({ message: "连接服务器失败!" });
Message.error({message: '连接服务器失败!'});
} }
return Promise.reject(err) return Promise.reject(err);
} }
); );
......
...@@ -5,6 +5,12 @@ html,body{ ...@@ -5,6 +5,12 @@ html,body{
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
body{
background: #fff!important;
}
.el-main{
background: #f5f7f9;
}
.home,.home-box{ .home,.home-box{
height: 100%; height: 100%;
} }
...@@ -158,6 +164,10 @@ html,body{ ...@@ -158,6 +164,10 @@ html,body{
right: .5em; right: .5em;
top:auto!important; top:auto!important;
} }
.rotate-north {
right: .5em;
bottom: 3.8em;
}
.nav-tag-box { .nav-tag-box {
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
...@@ -217,6 +227,9 @@ html,body{ ...@@ -217,6 +227,9 @@ html,body{
} }
/* 菜单 */ /* 菜单 */
.el-menu-vertical-dem:not(.el-menu--collapse){
min-height: 900px;
}
.el-menu .is-opened{ .el-menu .is-opened{
background:rgba(239,239,239,1); background:rgba(239,239,239,1);
} }
......
...@@ -20,8 +20,8 @@ Vue.prototype.$buildCode = buildCode; ...@@ -20,8 +20,8 @@ Vue.prototype.$buildCode = buildCode;
Vue.prototype.oParse = new XML.ObjTree(); Vue.prototype.oParse = new XML.ObjTree();
Vue.prototype.axios = axios; Vue.prototype.axios = axios;
import VueParticles from "vue-particles"; // import VueParticles from "vue-particles";
Vue.use(VueParticles); // Vue.use(VueParticles);
Vue.use(api); Vue.use(api);
Vue.use(ElementUI, { size: "small", zIndex: 3000 }); Vue.use(ElementUI, { size: "small", zIndex: 3000 });
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<el-menu-item index="/trficcshow"> <el-menu-item index="/trficcshow">
<i class="submenuicon"></i>交通展示 <i class="submenuicon"></i>交通展示
</el-menu-item> </el-menu-item>
<el-menu-item index="/behaviorshow"> <!-- <el-menu-item index="/behaviorshow">
<i class="submenuicon"></i>综治展示 <i class="submenuicon"></i>综治展示
</el-menu-item> </el-menu-item> -->
</el-submenu> </el-submenu>
<el-submenu v-for="(fristmenu,index) in permission_routers" :index="fristmenu.path" :key="index" class="menu-icon"> <el-submenu v-for="(fristmenu,index) in permission_routers" :index="fristmenu.path" :key="index" class="menu-icon">
<template slot="title"> <template slot="title">
......
<template> <template>
<div id="login" :style="{ height: innerHeight + 'px' }"> <div id="login" :style="{ height: innerHeight + 'px' }">
<!-- ie空白解决方法https://blog.csdn.net/heyNewbie/article/details/99623550 --> <!-- ie空白解决方法https://blog.csdn.net/heyNewbie/article/details/99623550 -->
<vue-particles <!-- <vue-particles
color="#dedede" color="#dedede"
:particleOpacity="0.7" :particleOpacity="0.7"
:particlesNumber="80" :particlesNumber="80"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:clickEffect="true" :clickEffect="true"
clickMode="push" clickMode="push"
> >
</vue-particles> </vue-particles> -->
<div class="box"> <div class="box">
<h1>视频分析综合管理平台</h1> <h1>视频分析综合管理平台</h1>
<div style="width: 60%;margin: 0 auto;"> <div style="width: 60%;margin: 0 auto;">
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
}, },
getDev() { getDev() {
this.$api.resource.devs().then(res => { this.$api.resource.devs().then(res => {
sessionStorage.setItem('dev_unid',res[0].dev_unid); localStorage.setItem('dev_unid',res[0].dev_unid);
this.getDevsName(res[0].dev_unid); this.getDevsName(res[0].dev_unid);
}) })
}, },
......
...@@ -349,7 +349,7 @@ export default { ...@@ -349,7 +349,7 @@ export default {
} }
.left-box { .left-box {
overflow: auto; overflow: auto;
width: 63vw; width: 73vw;
position: relative; position: relative;
height: 100%; height: 100%;
margin: 0 0 12vh 0; margin: 0 0 12vh 0;
......
<template>
<div class="contentBox minHeight">
<el-col :span="12">
<el-form label-position="left" label-width="80px" :model="formLabelAlign">
<el-form-item label="视频1">
<el-input v-model="formLabelAlign.video1"></el-input>
</el-form-item>
<el-form-item label="视频2">
<el-input v-model="formLabelAlign.video2"></el-input>
</el-form-item>
<el-form-item label="视频3">
<el-input v-model="formLabelAlign.video3"></el-input>
</el-form-item>
<el-form-item label="视频4">
<el-input v-model="formLabelAlign.video4"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">提交</el-button>
</el-form-item>
</el-form>
</el-col>
</div>
</template>
<script>
export default {
data(){
return{
activeName: 'first',
height:'',
formLabelAlign:{
video1:"",
video2:"",
video3:"",
video4:"",
}
}
},
mounted(){
},
methods:{
handleClick(tab, event) {
},
onSubmit(){
}
},
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<el-tab-pane label="系统维护" name="second"> <el-tab-pane label="系统维护" name="second">
<sytemset></sytemset> <sytemset></sytemset>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="展示设置" name="third">
<showset></showset>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -16,7 +19,7 @@ ...@@ -16,7 +19,7 @@
<script> <script>
import proofreadtime from './systemComponents/proofreadtime' import proofreadtime from './systemComponents/proofreadtime'
import sytemset from './systemComponents/sytemSet' import sytemset from './systemComponents/sytemSet'
import showset from './systemComponents/showSet'
export default { export default {
data(){ data(){
return{ return{
...@@ -25,7 +28,7 @@ ...@@ -25,7 +28,7 @@
} }
}, },
components:{ components:{
proofreadtime,sytemset proofreadtime,sytemset,showset
}, },
mounted(){ mounted(){
this.height=document.body.clientHeight - 140 + 'px' this.height=document.body.clientHeight - 140 + 'px'
......
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
props: ["playersrc", "vnum"], props: ["playersrc", "vnum"],
methods: { methods: {
initocx(){ initocx(){
VionVideo.Init(0, 'Null', 4); VionVideo.Init(2, 'Null', 4);
}, },
downloadOCx() { downloadOCx() {
if (navigator.userAgent.indexOf('Trident') > -1) { if (navigator.userAgent.indexOf('Trident') > -1) {
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}, },
mounted() { mounted() {
var testStr = 'Null'; var testStr = 'Null';
nvrTotalOcx.Init(0, testStr, 4); nvrTotalOcx.Init(2, testStr, 4);
nvrTotalOcx.SetSingleWindow(true); nvrTotalOcx.SetSingleWindow(true);
nvrTotalOcx.SetParam("SetLanguage", "Chinese"); nvrTotalOcx.SetParam("SetLanguage", "Chinese");
nvrTotalOcx.SetParam("VideoSize", 0); nvrTotalOcx.SetParam("VideoSize", 0);
...@@ -79,9 +79,7 @@ export default { ...@@ -79,9 +79,7 @@ export default {
},1000) },1000)
console.log('shipin'+a) console.log('shipin'+a)
}, },
watch: { watch: {},
},
beforeDestroy: function () { beforeDestroy: function () {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) { // if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause(); // this.videoplayer.pause();
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
:formatter="cateFormatter" :formatter="cateFormatter"
> >
</el-table-column> </el-table-column>
<el-table-column align="center" prop="active" label="状态"
:formatter="activeFormatter">
</el-table-column>
<el-table-column align="center" prop="operation" label="操作"> <el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip
...@@ -126,7 +129,20 @@ ...@@ -126,7 +129,20 @@
> >
<el-input v-model="codeData.name"></el-input> <el-input v-model="codeData.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item
label="启用"
prop="active"
:rules="[
{ required: true, message: '名称不能为空!', trigger: 'blur' }
]"
>
<el-select v-model="codeData.active" placeholder="请选择">
<el-option label="开启" :value="1"></el-option>
<el-option label="关闭" :value="0"></el-option>
</el-select>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="detailVisible = false">取 消</el-button> <el-button size="small" @click="detailVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="saveCode" <el-button size="small" type="primary" @click="saveCode"
...@@ -151,7 +167,8 @@ export default { ...@@ -151,7 +167,8 @@ export default {
codeData: { codeData: {
name: "", name: "",
code: "", code: "",
catename: "" catename: "",
active:1
}, },
editStatus: 0, editStatus: 0,
event_type_unid: "" event_type_unid: ""
...@@ -190,6 +207,15 @@ export default { ...@@ -190,6 +207,15 @@ export default {
cateFormatter(row) { cateFormatter(row) {
return this.getCateName(row.event_cate_unid); return this.getCateName(row.event_cate_unid);
}, },
activeFormatter(row){
let text = "开启"
if(row.active && row.active == 0) {
text = "关闭"
} else {
text = "开启"
}
return text
},
editCode(index, row) { editCode(index, row) {
this.event_type_unid = row.event_type_unid; this.event_type_unid = row.event_type_unid;
this.detailVisible = true; this.detailVisible = true;
...@@ -198,7 +224,8 @@ export default { ...@@ -198,7 +224,8 @@ export default {
name: row.name, name: row.name,
code: row.code, code: row.code,
catename: this.getCateName(this.curcate), catename: this.getCateName(this.curcate),
event_cate_unid: row.event_cate_unid event_cate_unid: row.event_cate_unid,
active: row.active
}; };
}, },
deleteCode(index, row) { deleteCode(index, row) {
......
...@@ -51,6 +51,12 @@ ...@@ -51,6 +51,12 @@
<el-form-item label="密码"> <el-form-item label="密码">
<el-input v-model="addVideoParam.password"></el-input> <el-input v-model="addVideoParam.password"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="经度">
<el-input v-model="addVideoParam.longitude"></el-input>
</el-form-item>
<el-form-item label="纬度">
<el-input v-model="addVideoParam.latitude"></el-input>
</el-form-item>
<el-form-item label="扩展字段1"> <el-form-item label="扩展字段1">
<el-input v-model="addVideoParam.extend_1"></el-input> <el-input v-model="addVideoParam.extend_1"></el-input>
</el-form-item> </el-form-item>
...@@ -85,7 +91,9 @@ ...@@ -85,7 +91,9 @@
extend_1:'', extend_1:'',
extend_2:'', extend_2:'',
is_dome:false, is_dome:false,
vchan_type:'camera' vchan_type:'camera',
longitude:'',
latitude:''
}, },
initParam:{ initParam:{
}, },
...@@ -143,6 +151,8 @@ ...@@ -143,6 +151,8 @@
this.addVideoParam.password=node.password; this.addVideoParam.password=node.password;
this.addVideoParam.extend_1=node.extend_1; this.addVideoParam.extend_1=node.extend_1;
this.addVideoParam.extend_2=node.extend_2; this.addVideoParam.extend_2=node.extend_2;
this.addVideoParam.longitude=node.longitude;
this.addVideoParam.latitude=node.latitude;
}else if(type == 'detail'){ }else if(type == 'detail'){
this.type = 'detail'; this.type = 'detail';
this.addVideoParam.addr_unid = node.addrNode.unid; this.addVideoParam.addr_unid = node.addrNode.unid;
...@@ -164,6 +174,8 @@ ...@@ -164,6 +174,8 @@
this.addVideoParam.password=node.password; this.addVideoParam.password=node.password;
this.addVideoParam.extend_1=node.extend_1; this.addVideoParam.extend_1=node.extend_1;
this.addVideoParam.extend_2=node.extend_2; this.addVideoParam.extend_2=node.extend_2;
this.addVideoParam.longitude=node.longitude;
this.addVideoParam.latitude=node.latitude;
} }
}, },
save(){ save(){
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
{ min: 2, max: 9, message: '长度在 2 到 9 个字符', trigger: 'blur' } { min: 2, max: 9, message: '长度在 2 到 9 个字符', trigger: 'blur' }
], ],
}, },
dev_unid: sessionStorage.getItem('dev_unid'), dev_unid: localStorage.getItem('dev_unid'),
} }
}, },
components:{ components:{
......
...@@ -308,7 +308,6 @@ export default { ...@@ -308,7 +308,6 @@ export default {
}, },
changeCanvasState: function() { changeCanvasState: function() {
alert(1);
if (this.canvasState) { if (this.canvasState) {
this.cancleSelectedGroup(); this.cancleSelectedGroup();
} }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</div> </div>
<div style="padding: 0 23px 20px 23px;width:98%"> <div style="padding: 0 23px 20px 23px;width:98%">
<el-table <el-table
height="50vh" height="59vh"
:data="tableData" :data="tableData"
stripe stripe
border border
...@@ -584,20 +584,4 @@ export default { ...@@ -584,20 +584,4 @@ export default {
color: #f2365a; color: #f2365a;
font-size: 16px; font-size: 16px;
} }
.subtask-info:nth-child(2) {
width: 8vw;
}
.subtask-info:nth-child(4) {
width: 6vw;
}
.subtask-info:nth-child(6) {
width: 4.5vw;
}
.subtask-info:nth-child(8) {
width: 4vw;
}
.subtask-info:nth-child(10) {
width: 12vw;
}
</style> </style>
...@@ -99,20 +99,20 @@ export default { ...@@ -99,20 +99,20 @@ export default {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
.subtask-info:nth-child(2) { .subtask-info:nth-child(3) {
width: 9vw; width: 9vw;
overflow: hidden; overflow: hidden;
} }
.subtask-info:nth-child(4) { .subtask-info:nth-child(5) {
width: 6vw; width: 6vw;
} }
.subtask-info:nth-child(6) { .subtask-info:nth-child(7) {
width: 4.5vw; width: 4.5vw;
} }
.subtask-info:nth-child(8) { .subtask-info:nth-child(9) {
width: 4vw; width: 4vw;
} }
.subtask-info:nth-child(10) { .subtask-info:nth-child(11) {
width: 12vw; width: 12vw;
} }
.sub-btn { .sub-btn {
......
<template> <template>
<el-row :gutter="10" style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden"> <el-row :gutter="10" style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden">
<el-col :span="15"> <el-col :span="17">
<div id="map" class="maps"> <div id="map" class="maps">
<showmap ref="map"></showmap> <showmap ref="map"></showmap>
<div class="eventlist-box"> <div class="eventlist-box">
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="7">
<el-row> <el-row>
<div class="collect-box"> <div class="collect-box">
<div class="header-title">今日抓拍量</div> <div class="header-title">今日抓拍量</div>
...@@ -113,6 +113,7 @@ import eventTypedis from "./eventTypedis"; ...@@ -113,6 +113,7 @@ import eventTypedis from "./eventTypedis";
import eventList from "./eventList"; import eventList from "./eventList";
import alarmEvent from "./alarmEvent"; import alarmEvent from "./alarmEvent";
import devInfo from "../behaviorShow/devInfo"; import devInfo from "../behaviorShow/devInfo";
export default { export default {
data() { data() {
return { return {
......
...@@ -34,6 +34,7 @@ import Feature from "ol/Feature"; //元素 ...@@ -34,6 +34,7 @@ import Feature from "ol/Feature"; //元素
import Overlay from "ol/Overlay"; //弹出框 import Overlay from "ol/Overlay"; //弹出框
import { toStringHDMS } from "ol/coordinate"; import { toStringHDMS } from "ol/coordinate";
import { fromLonLat, toLonLat } from "ol/proj"; import { fromLonLat, toLonLat } from "ol/proj";
import {defaults as defaultControls, Control} from 'ol/control.js';
import { import {
Tile as TileLayer, Tile as TileLayer,
Vector as VectorLayer, Vector as VectorLayer,
...@@ -71,6 +72,40 @@ var content = ""; ...@@ -71,6 +72,40 @@ var content = "";
var voideocontent = ""; var voideocontent = "";
var closer = ""; var closer = "";
var overlay = ""; var overlay = "";
var RotateNorthControl = (function (Control) {
function RotateNorthControl(opt_options) {
var options = opt_options || {};
var button = document.createElement('button');
button.className = 'el-icon-aim';
var element = document.createElement('div');
element.className = 'rotate-north ol-unselectable ol-control';
element.appendChild(button);
Control.call(this, {
element: element,
target: options.target
});
button.addEventListener('click', this.handleRotateNorth.bind(this), false);
}
if ( Control ) RotateNorthControl.__proto__ = Control;
RotateNorthControl.prototype = Object.create( Control && Control.prototype );
RotateNorthControl.prototype.constructor = RotateNorthControl;
RotateNorthControl.prototype.handleRotateNorth = function handleRotateNorth () {
let pos = [120.324447, 36.074594];
Views.animate({
center: pos,
duration: 400,
zoom: 14
});
};
return RotateNorthControl;
}(Control));
export default { export default {
data() { data() {
return { return {
...@@ -142,6 +177,9 @@ export default { ...@@ -142,6 +177,9 @@ export default {
center: [120.324447, 36.064594] center: [120.324447, 36.064594]
}); });
map = new Map({ map = new Map({
controls: defaultControls().extend([
new RotateNorthControl()
]),
// 设置地图图层 // 设置地图图层
layers: [ layers: [
// 创建一个使用Open Street Map地图源的瓦片图层 // 创建一个使用Open Street Map地图源的瓦片图层
...@@ -177,8 +215,8 @@ export default { ...@@ -177,8 +215,8 @@ export default {
let that = this; let that = this;
map.on("click", e => { map.on("click", e => {
console.log('经纬度',e.coordinate);
var pixel = map.getEventPixel(e.originalEvent); var pixel = map.getEventPixel(e.originalEvent);
console.log(pixel);
//点击相机标注点 //点击相机标注点
map.forEachFeatureAtPixel(pixel, function(feature) { map.forEachFeatureAtPixel(pixel, function(feature) {
// var coodinate = e.coordinate; // var coodinate = e.coordinate;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!