Commit 503396f6 authored by yangkaiyi's avatar yangkaiyi

改map页UI、退出登录

parent 3f3f61a4
body, body,
html { html {
.gps-menu {
.gps-menu { position: absolute;
position: absolute; top: 65px;
top: 15px; right: 30px;
left: 15px; min-width: 300px;
min-width: 300px;
.title {
.title { margin: 4px 0 2px;
margin: 4px 0 2px; height: 40px;
height: 40px; //background: #409EFF;
//background: #409EFF; border-radius: 3px;
border-radius: 3px; background: #ffffff;
background: #ffffff; height: 36px;
height:36px; padding: 0px 12px;
padding: 0px 12px; p {
p { text-align: center;
text-align: center; line-height: 40px;
line-height: 40px; color: #fff;
color: #fff; height: 40px;
height: 40px; }
} .name {
.name { max-width: 260px;
max-width: 260px; }
.ctrl {
} float: right;
.ctrl { padding-right: 10px;
float: right; padding-left: 10px;
padding-right: 10px; cursor: pointer;
padding-left: 10px; }
cursor: pointer; .el-dropdown {
} float: right;
.el-dropdown { }
float: right; }
}
} .menu-tree {
position: relative;
.menu-tree { display: inline-block !important;
position: relative; }
display: inline-block !important; .el-tree {
padding: 20px 10px 10px;
} min-width: 300px;
.el-tree { max-height: 460px;
padding: 20px 10px 10px; overflow: auto;
min-width: 300px; // .el-tree-node__expand-icon {
max-height: 460px; // display: none;
overflow:auto; // }
// .el-tree-node__expand-icon { }
// display: none; .tree_icon {
// } margin-right: 5px;
} }
.tree_icon { .dev_zx {
margin-right: 5px; color: #009cf9;
} }
.dev_zx { .dev_lx {
color: #009cf9; color: #009cf9;
} }
.dev_lx { .dev_wjh {
color: #009cf9; color: #009cf9;
} }
.dev_wjh { .el-button-group {
color: #009cf9; vertical-align: baseline;
} }
.el-button-group { }
vertical-align: baseline;
} .el-cascader .el-input.is-disabled .el-input__inner {
} color: #fff;
background-color: #a0cfff;
.el-cascader .el-input.is-disabled .el-input__inner{ border-color: #a0cfff;
color: #fff; }
background-color: #a0cfff; }
border-color: #a0cfff;
}
}
.gps-tools-box { .gps-tools-box {
margin-right: 60px; position: absolute;
position: absolute; top: 15px;
top: 15px; right: 30px;
right: 60px; font-size: 16px;
font-size: 16px; z-index: 100;
z-index: 100; }
} .video-context {
.video-context{ max-width: 900px;
max-width: 900px; min-height: 232px;
min-height: 232px; }
}
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<!-- <span class="login-icon el-icon-lock"></span> <!-- <span class="login-icon el-icon-lock"></span>
<el-input type="password" v-model="loginForm.password" autocomplete="off" :placeholder="$t('register.password')"></el-input> --> <el-input type="password" v-model="loginForm.password" autocomplete="off" :placeholder="$t('register.password')"></el-input> -->
</el-form-item> </el-form-item>
<div style="height: 30px" /> <div style="height: 20px" />
<el-form-item> <el-form-item>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="18" <el-col :span="18"
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
{{ $t("register.password2") }} {{ $t("register.password2") }}
</MDinput> </MDinput>
</el-form-item> </el-form-item>
<div style="height: 30px" /> <div style="height: 20px" />
<el-form-item> <el-form-item>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="16" <el-col :span="16"
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<template slot="title"> &nbsp;&nbsp;&nbsp;&nbsp; 用户列表 </template> <template slot="title"> &nbsp;&nbsp;&nbsp;&nbsp; 用户列表 </template>
<UserTree mode="mapUserTree" @onClickUser="onClickUser"></UserTree> <UserTree mode="mapUserTree" @onClickUser="onClickUser"></UserTree>
</el-collapse-item> </el-collapse-item>
<el-collapse-item title="设备列表" name="1"> <el-collapse-item title="有害植物列表" name="1">
<template slot="title"> <template slot="title">
&nbsp;&nbsp;&nbsp;&nbsp; {{ $t("map.menuDeviceList") }} &nbsp;&nbsp;&nbsp;&nbsp; 有害植物列表
<div class="online-state"> <div class="online-state">
<el-tooltip <el-tooltip
class="item" class="item"
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</el-popover> </el-popover>
<el-button-group> <el-button-group>
<el-button <!-- <el-button
class="steps-bubble" class="steps-bubble"
type="primary" type="primary"
size="medium" size="medium"
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
><font-awesome-icon icon="ruler" /> ><font-awesome-icon icon="ruler" />
{{ $t("map.toolMeasure") }}</el-button {{ $t("map.toolMeasure") }}</el-button
> >
<el-button <el-button
class="steps-measure" class="steps-measure"
type="primary" type="primary"
...@@ -142,10 +143,10 @@ ...@@ -142,10 +143,10 @@
@click="handleAreaSearch" @click="handleAreaSearch"
><font-awesome-icon icon="search" /> ><font-awesome-icon icon="search" />
{{ $t("map.toolMapSearch") }}</el-button {{ $t("map.toolMapSearch") }}</el-button
> > -->
<!-- <el-button type="primary" size="medium" @click="$parent.downLoad"><font-awesome-icon icon="download"/> 下载</el-button> --> <!-- <el-button type="primary" size="medium" @click="$parent.downLoad"><font-awesome-icon icon="download"/> 下载</el-button> -->
<el-button <!-- <el-button
class="steps-bubble" class="steps-bubble"
type="primary" type="primary"
size="medium" size="medium"
...@@ -160,7 +161,7 @@ ...@@ -160,7 +161,7 @@
/> />
视频</el-badge 视频</el-badge
></el-button ></el-button
> > -->
<el-button class="steps-maptype" type="primary" size="medium"> <el-button class="steps-maptype" type="primary" size="medium">
<font-awesome-icon icon="map" /> <font-awesome-icon icon="map" />
...@@ -182,7 +183,7 @@ ...@@ -182,7 +183,7 @@
</el-dropdown> </el-dropdown>
</el-button> </el-button>
<el-button <!-- <el-button
class="steps-customLayers" class="steps-customLayers"
v-if="hasPermission('user:layer:view')" v-if="hasPermission('user:layer:view')"
type="primary" type="primary"
...@@ -200,7 +201,8 @@ ...@@ -200,7 +201,8 @@
@click="handlePois" @click="handlePois"
><font-awesome-icon icon="paint-brush" /> ><font-awesome-icon icon="paint-brush" />
{{ $t("map.toolPoi") }}</el-button {{ $t("map.toolPoi") }}</el-button
> > -->
<!-- 围栏 -->
<el-button <el-button
class="steps-geofence" class="steps-geofence"
v-if="hasPermission('user:geofence:view')" v-if="hasPermission('user:geofence:view')"
...@@ -212,6 +214,7 @@ ...@@ -212,6 +214,7 @@
><font-awesome-icon icon="street-view" /> ><font-awesome-icon icon="street-view" />
{{ $t("map.toolFence") }}</el-button {{ $t("map.toolFence") }}</el-button
> >
<!-- 消息 -->
<el-button <el-button
class="steps-message" class="steps-message"
type="primary" type="primary"
...@@ -226,6 +229,7 @@ ...@@ -226,6 +229,7 @@
{{ $t("map.toolMessage") }}</el-badge {{ $t("map.toolMessage") }}</el-badge
></el-button ></el-button
> >
<!-- 全屏 -->
<el-button <el-button
class="steps-fullScreen" class="steps-fullScreen"
type="primary" type="primary"
...@@ -236,6 +240,10 @@ ...@@ -236,6 +240,10 @@
flag ? $t("map.toolExitFullScreen") : $t("map.toolFullScreen") flag ? $t("map.toolExitFullScreen") : $t("map.toolFullScreen")
}}</el-button }}</el-button
> >
<el-button type="danger" size="medium" @click.native="exitSystem"
><font-awesome-icon icon="undo" />
{{ $t("map.userExitSystem") }}</el-button
>
</el-button-group> </el-button-group>
<audio id="audio" controls="controls" style="display: none" ref="audio"> <audio id="audio" controls="controls" style="display: none" ref="audio">
<source src="'../../../static/sound/zs.mp3" type="audio/mpeg" /> <source src="'../../../static/sound/zs.mp3" type="audio/mpeg" />
...@@ -276,6 +284,25 @@ export default { ...@@ -276,6 +284,25 @@ export default {
}; };
}, },
methods: { methods: {
exitSystem() {
this.$confirm(this.$t("tips.signOut"), this.$t("tips.tips"), {
type: "warning",
lockScroll: false,
})
.then(() => {
this.$store.dispatch("cleanToken").then(() => {
this.$store.dispatch("Exit").then(() => {
location.reload(); // 为了重新实例化vue-router对象 避免bug
});
});
})
.catch(() => {
this.$message({
type: "info",
message: "取消系统退出",
});
});
},
handleGeofence() { handleGeofence() {
this.geoVisible = this.geoVisible ? false : true; this.geoVisible = this.geoVisible ? false : true;
if (this.geoVisible) { if (this.geoVisible) {
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</el-alert> </el-alert>
<tools-box ref="tools"></tools-box> <tools-box ref="tools"></tools-box>
<menu-box :selectDeviceId="selectDeviceId"></menu-box> <menu-box :selectDeviceId="selectDeviceId"></menu-box>
<user-box></user-box> <!-- <user-box></user-box> -->
<control-box v-show="this.$store.state.user.map.mode == 2"></control-box> <control-box v-show="this.$store.state.user.map.mode == 2"></control-box>
<Feedback></Feedback> <Feedback></Feedback>
<VideoPlayBack></VideoPlayBack> <VideoPlayBack></VideoPlayBack>
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
size="small" size="small"
@click.native=" @click.native="
$store.dispatch('setVisblesFlag', [ $store.dispatch('setVisblesFlag', [
{ key: 'feedbackDialog', value: true } { key: 'feedbackDialog', value: true },
]) ])
" "
> >
...@@ -171,8 +171,8 @@ export default { ...@@ -171,8 +171,8 @@ export default {
heatData: [ heatData: [
[119.678552, 29.14023, 80], [119.678552, 29.14023, 80],
[119.677768, 29.13957, 80], [119.677768, 29.13957, 80],
[119.678447, 29.139684, 80] [119.678447, 29.139684, 80],
] ],
}; };
}, },
methods: { methods: {
...@@ -182,11 +182,11 @@ export default { ...@@ -182,11 +182,11 @@ export default {
playstate(val) { playstate(val) {
this.$store.dispatch("setControlValue", { this.$store.dispatch("setControlValue", {
key: "index", key: "index",
value: val.index value: val.index,
}); });
this.$store.dispatch("setControlValue", { this.$store.dispatch("setControlValue", {
key: "total", key: "total",
value: val.total value: val.total,
}); });
}, },
onClickMarker(feature) { onClickMarker(feature) {
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
case "poi": //点击兴趣点 case "poi": //点击兴趣点
this.$store.dispatch("setPoiValue", { this.$store.dispatch("setPoiValue", {
key: "selectId", key: "selectId",
value: feature.getId() value: feature.getId(),
}); });
break; break;
default: default:
...@@ -225,12 +225,12 @@ export default { ...@@ -225,12 +225,12 @@ export default {
if (this.$store.state.user.driving.params.start == "") { if (this.$store.state.user.driving.params.start == "") {
this.$store.dispatch("setDrivingParam", { this.$store.dispatch("setDrivingParam", {
key: "start", key: "start",
value: p.join(",") value: p.join(","),
}); });
} else if (this.$store.state.user.driving.params.end == "") { } else if (this.$store.state.user.driving.params.end == "") {
this.$store.dispatch("setDrivingParam", { this.$store.dispatch("setDrivingParam", {
key: "end", key: "end",
value: p.join(",") value: p.join(","),
}); });
this.$store.dispatch( this.$store.dispatch(
"setDriving", "setDriving",
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
inputValue: geofence.label, inputValue: geofence.label,
inputPattern: /^\S{2,6}$/, inputPattern: /^\S{2,6}$/,
inputErrorMessage: "请输入2-6位的名称", inputErrorMessage: "请输入2-6位的名称",
lockScroll: false lockScroll: false,
}) })
.then(({ value }) => { .then(({ value }) => {
geofence.label = value; geofence.label = value;
...@@ -261,13 +261,13 @@ export default { ...@@ -261,13 +261,13 @@ export default {
this.$store.dispatch("updateGeofence", geofence); this.$store.dispatch("updateGeofence", geofence);
this.$message({ this.$message({
type: "success", type: "success",
message: "保存成功!" message: "保存成功!",
}); });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "继续编辑" message: "继续编辑",
}); });
}); });
}, },
...@@ -283,7 +283,7 @@ export default { ...@@ -283,7 +283,7 @@ export default {
} else if (geofence.type.toLowerCase() === "polygon") { } else if (geofence.type.toLowerCase() === "polygon") {
var points = geofence.area.split(", "); var points = geofence.area.split(", ");
var coords = []; var coords = [];
points.forEach(point => { points.forEach((point) => {
coords.push( coords.push(
Number(point.split(" ")[1]).toFixed(6) + Number(point.split(" ")[1]).toFixed(6) +
" " + " " +
...@@ -294,7 +294,7 @@ export default { ...@@ -294,7 +294,7 @@ export default {
} else if (geofence.type.toLowerCase() === "linestring") { } else if (geofence.type.toLowerCase() === "linestring") {
var points = geofence.area.split(", "); var points = geofence.area.split(", ");
var coords = []; var coords = [];
points.forEach(point => { points.forEach((point) => {
coords.push( coords.push(
Number(point.split(" ")[1]).toFixed(6) + Number(point.split(" ")[1]).toFixed(6) +
" " + " " +
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
label: "新建围栏", label: "新建围栏",
type: geofence.type.toLowerCase(), type: geofence.type.toLowerCase(),
visible: true, visible: true,
color: "red" color: "red",
}; };
this.$store.dispatch("setDrawGeofence", geo); this.$store.dispatch("setDrawGeofence", geo);
...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
inputPattern: /^\S{2,6}$/, inputPattern: /^\S{2,6}$/,
inputErrorMessage: "请输入2-6位的名称", inputErrorMessage: "请输入2-6位的名称",
lockScroll: false lockScroll: false,
}) })
.then(({ value }) => { .then(({ value }) => {
geofence.name = value; geofence.name = value;
...@@ -331,7 +331,7 @@ export default { ...@@ -331,7 +331,7 @@ export default {
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "继续编辑" message: "继续编辑",
}); });
}); });
} else if (this.$refs.tools.poisVisible) { } else if (this.$refs.tools.poisVisible) {
...@@ -341,32 +341,32 @@ export default { ...@@ -341,32 +341,32 @@ export default {
case "point": case "point":
styles = { styles = {
fillColor: "#409EFF", fillColor: "#409EFF",
radius: 10 radius: 10,
}; };
break; break;
case "linestring": case "linestring":
styles = { styles = {
strokeColor: "#409EFF", strokeColor: "#409EFF",
strokeWidth: 5 strokeWidth: 5,
}; };
break; break;
case "polygon": case "polygon":
styles = { styles = {
strokeColor: "#409EFF", strokeColor: "#409EFF",
strokeWidth: 5, strokeWidth: 5,
fillColor: "rgba(64,158,255, 0.4)" fillColor: "rgba(64,158,255, 0.4)",
}; };
break; break;
case "circle": case "circle":
styles = { styles = {
strokeColor: "#409EFF", strokeColor: "#409EFF",
strokeWidth: 5, strokeWidth: 5,
fillColor: "rgba(64,158,255, 0.4)" fillColor: "rgba(64,158,255, 0.4)",
}; };
break; break;
case "marker": case "marker":
styles = { styles = {
fillColor: "#aaff56" fillColor: "#aaff56",
}; };
break; break;
default: default:
...@@ -378,14 +378,14 @@ export default { ...@@ -378,14 +378,14 @@ export default {
type: this.$store.state.user.draw.build.toLowerCase(), type: this.$store.state.user.draw.build.toLowerCase(),
area: geofence.area, area: geofence.area,
visible: true, visible: true,
styles: JSON.stringify(styles) styles: JSON.stringify(styles),
}; };
this.$store.dispatch("addPoi", poi); this.$store.dispatch("addPoi", poi);
var draw = { var draw = {
type: "", type: "",
build: "", build: "",
enable: false enable: false,
}; };
this.$store.dispatch("setDrawEnable", draw); this.$store.dispatch("setDrawEnable", draw);
} else { } else {
...@@ -396,9 +396,9 @@ export default { ...@@ -396,9 +396,9 @@ export default {
let param = { let param = {
longitude: point[1], longitude: point[1],
latitude: point[0], latitude: point[0],
distance: radius distance: radius,
}; };
getAreaDevices(param).then(data => { getAreaDevices(param).then((data) => {
this.$store.dispatch("setAreaDevices", data); this.$store.dispatch("setAreaDevices", data);
}); });
} }
...@@ -417,14 +417,14 @@ export default { ...@@ -417,14 +417,14 @@ export default {
let params = { let params = {
id: this.$store.state.user.customLayers.list[idx].id, id: this.$store.state.user.customLayers.list[idx].id,
coord: v[0] + "," + v[1], coord: v[0] + "," + v[1],
visible: this.$store.state.user.customLayers.list[idx].visible visible: this.$store.state.user.customLayers.list[idx].visible,
}; };
this.$store.dispatch("updateImageLayer", params); this.$store.dispatch("updateImageLayer", params);
}, },
editArea(val) { editArea(val) {
let params = { let params = {
id: val.id, id: val.id,
area: val.area area: val.area,
}; };
this.$store.dispatch("updatePoi", params); this.$store.dispatch("updatePoi", params);
}, },
...@@ -433,7 +433,7 @@ export default { ...@@ -433,7 +433,7 @@ export default {
this.driver.start(); this.driver.start();
localStorage.guide = true; localStorage.guide = true;
}, },
wsTest() {} wsTest() {},
}, },
components: { components: {
"tools-box": ToolsBox, "tools-box": ToolsBox,
...@@ -441,7 +441,7 @@ export default { ...@@ -441,7 +441,7 @@ export default {
"user-box": UserCenterBox, "user-box": UserCenterBox,
"control-box": ControlBox, "control-box": ControlBox,
Feedback, Feedback,
VideoPlayBack VideoPlayBack,
}, },
mounted() { mounted() {
//iframe 提示 //iframe 提示
...@@ -450,7 +450,7 @@ export default { ...@@ -450,7 +450,7 @@ export default {
title: "GPSBD", title: "GPSBD",
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: message:
"GPSBD卫星定位监控系统<br>技术支持QQ:508620006 <br>电话:13355514723 <br>公司电话:400-800-5448" "GPSBD卫星定位监控系统<br>技术支持QQ:508620006 <br>电话:13355514723 <br>公司电话:400-800-5448",
}); });
} }
...@@ -458,7 +458,7 @@ export default { ...@@ -458,7 +458,7 @@ export default {
nextBtnText: "下一步", // Next button text for this step nextBtnText: "下一步", // Next button text for this step
prevBtnText: "上一步", prevBtnText: "上一步",
closeBtnText: "关闭", closeBtnText: "关闭",
doneBtnText: "结束" doneBtnText: "结束",
}); });
if (!localStorage.guide) { if (!localStorage.guide) {
this.guide(); this.guide();
...@@ -472,7 +472,7 @@ export default { ...@@ -472,7 +472,7 @@ export default {
} else { } else {
this.$store.dispatch("initData"); //初始化设备数据 this.$store.dispatch("initData"); //初始化设备数据
this.$store.dispatch("setVisblesFlag", [ this.$store.dispatch("setVisblesFlag", [
{ key: "deviceMenu", value: true } { key: "deviceMenu", value: true },
]); ]);
this.$store.dispatch("initStaticData"); //初始化静态数据 this.$store.dispatch("initStaticData"); //初始化静态数据
this.initConnect(); this.initConnect();
...@@ -485,7 +485,7 @@ export default { ...@@ -485,7 +485,7 @@ export default {
}, },
watch: { watch: {
//模式切换 //模式切换
"$store.state.user.map.mode": function(nv, ov) { "$store.state.user.map.mode": function (nv, ov) {
//console.log('切换模式为:'+ov+'--> '+nv); //console.log('切换模式为:'+ov+'--> '+nv);
if (nv == 2) { if (nv == 2) {
// -->轨迹回放 // -->轨迹回放
...@@ -500,7 +500,7 @@ export default { ...@@ -500,7 +500,7 @@ export default {
} }
this.$store.dispatch("setDeviceMarkersVisible", { this.$store.dispatch("setDeviceMarkersVisible", {
select: [], select: [],
visible: true visible: true,
}); });
} else if (nv == 1 && ov == 2) { } else if (nv == 1 && ov == 2) {
//轨迹回放-->跟踪设备 //轨迹回放-->跟踪设备
...@@ -508,17 +508,17 @@ export default { ...@@ -508,17 +508,17 @@ export default {
this.$store.dispatch("removeHistoryPositions"); this.$store.dispatch("removeHistoryPositions");
this.$store.dispatch("setDeviceMarkersVisible", { this.$store.dispatch("setDeviceMarkersVisible", {
select: [], select: [],
visible: false visible: false,
}); });
//开启画面跟随 //开启画面跟随
if (!this.$store.state.user.map.isTrackCenter) { if (!this.$store.state.user.map.isTrackCenter) {
this.$store.dispatch("isTrackCenter"); this.$store.dispatch("isTrackCenter");
} }
} }
} },
}, },
computed: { computed: {
selectDevice: function() { selectDevice: function () {
if (this.$store.state.user.devices.selectId != 0) { if (this.$store.state.user.devices.selectId != 0) {
var index = this.$store.state.user.devices.index[ var index = this.$store.state.user.devices.index[
this.$store.state.user.devices.selectId this.$store.state.user.devices.selectId
...@@ -528,13 +528,13 @@ export default { ...@@ -528,13 +528,13 @@ export default {
return {}; return {};
} }
}, },
devices: function() { devices: function () {
var arr = this.$store.state.user.devices.list.filter(function(device) { var arr = this.$store.state.user.devices.list.filter(function (device) {
return device.marker && device.marker.coord.length != 0; return device.marker && device.marker.coord.length != 0;
}); });
return arr; return arr;
} },
} },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment