Commit 901b1182 by 张杰

修复bug,优化界面

1 parent 9b2ca6b5
.map-wrap{ .map-wrap {
// position: absolute; // position: absolute;
// top: 100px; // top: 100px;
// left: 0; // left: 0;
...@@ -6,31 +6,36 @@ ...@@ -6,31 +6,36 @@
height: calc(100% - 100px); height: calc(100% - 100px);
overflow: hidden; overflow: hidden;
.map-controll{ .map-controll {
position: absolute; position: absolute;
top: 40px; top: 40px;
right: 250px; right: 250px;
z-index: 102; z-index: 102;
.fullsize-btn{
.fullsize-btn {
margin-left: 20px; margin-left: 20px;
} }
} }
.map-bottom-controll{
.map-bottom-controll {
position: absolute; position: absolute;
bottom: 30px; bottom: 30px;
right: 20px; right: 20px;
z-index: 102; z-index: 102;
ul{
ul {
border: 1px solid #eee; border: 1px solid #eee;
color: #094; color: #094;
} }
.ctrl-item{
.ctrl-item {
background-color: #fff; background-color: #fff;
padding: 6px 10px; padding: 6px 10px;
font-size: 16px; font-size: 16px;
} }
} }
.controll-wrap{
.controll-wrap {
position: absolute; position: absolute;
top: 40px; top: 40px;
left: 40px; left: 40px;
...@@ -38,40 +43,49 @@ ...@@ -38,40 +43,49 @@
width: 320px; width: 320px;
max-height: 716px; max-height: 716px;
} }
.menu-search{
.el-select{ .menu-search {
.el-select {
width: 100px; width: 100px;
} }
.input-with-select{
.input-with-select {
width: 100%; width: 100%;
} }
.el-input-group__append{
.el-input-group__append {
background: #094; background: #094;
border-color: #094; border-color: #094;
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
} }
.el-input-group__append:hover, .el-input-group__append:focus {
.el-input-group__append:hover,
.el-input-group__append:focus {
background: #33ad69; background: #33ad69;
border-color: #33ad69; border-color: #33ad69;
} }
} }
.filter-entrance{
.filter-entrance {
margin-top: 10px; margin-top: 10px;
background-color: rgba(255,255,255,0.9); background-color: rgba(255, 255, 255, 0.9);
//border: 1px solid #dcdfe6; //border: 1px solid #dcdfe6;
box-shadow: 1px 1px 5px #dcdfe6; box-shadow: 1px 1px 5px #dcdfe6;
.el-button{
.el-button {
padding: 6px; padding: 6px;
} }
} }
.filter-dialog-set{
.filter-dialog-set {
margin-top: 10px; margin-top: 10px;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.filter-dialog{
.filter-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -79,188 +93,223 @@ ...@@ -79,188 +93,223 @@
background-color: #fff; background-color: #fff;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
box-sizing: border-box; box-sizing: border-box;
.filter-dialog-header{
.filter-dialog-header {
text-align: center; text-align: center;
padding: 8px; padding: 8px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
.el-icon-close{
.el-icon-close {
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
} }
} }
.filter-dialog-body{
.filter-dialog-body {
padding: 15px; padding: 15px;
.upload-wrap{
.el-select{ .upload-wrap {
.el-select {
width: 100px; width: 100px;
} }
.input-with-select{
.input-with-select {
width: 100%; width: 100%;
} }
} }
} }
.upload-sure-btn{
.upload-sure-btn {
width: 100%; width: 100%;
} }
animation-duration: .5s; animation-duration: .5s;
animation-delay: 0s; animation-delay: 0s;
display: none; display: none;
&.active{ &.active {
display: block display: block
} }
.sub-filter{ .sub-filter {
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.monitor-list{
.monitor-list {
max-height: calc(100vh - 280px); max-height: calc(100vh - 280px);
/* max-height: 568px; */ /* max-height: 568px; */
overflow: auto; overflow: auto;
margin-right: -10px; margin-right: -10px;
padding-right: 10px; padding-right: 10px;
} }
.monitor-list-item{
.monitor-list-item {
display: flex; display: flex;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
.user-info{
.user-info {
flex: 1; flex: 1;
color: #666; color: #666;
&>p{
&>p {
margin: 8px 0; margin: 8px 0;
} }
.name{
.name {
color: #333; color: #333;
margin-right: 15px; margin-right: 15px;
} }
} }
&:last-child{
&:last-child {
border-bottom: none; border-bottom: none;
} }
.device-icon{
.device-icon {
margin-right: 5px; margin-right: 5px;
margin-top: 12px; margin-top: 12px;
} }
} }
.device-icon-label{
.device-icon-label {
display: inline-block; display: inline-block;
margin-left: 5px; margin-left: 5px;
} }
.device-icon{
.device-icon {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 5px; border-radius: 5px;
background-color: rgba(0,153,68,0.8); background-color: rgba(0, 153, 68, 0.8);
&.offline{ &.offline {
background-color: rgba(255,0,0,0.8); background-color: rgba(255, 0, 0, 0.8);
} }
} }
.filter-dialog-footer{ .filter-dialog-footer {
border-top: 1px solid #eee; border-top: 1px solid #eee;
padding: 10px; padding: 10px;
span{
span {
vertical-align: middle; vertical-align: middle;
} }
} }
} }
.search-box{ .search-box {
.date-filter{ .date-filter {
position: absolute; position: absolute;
top: 0px; top: 0px;
right: 0px; right: 0px;
} }
.el-form--inline .el-form-item{
.el-form--inline .el-form-item {
margin-right: 0px; margin-right: 0px;
} }
.stay-ctrl{ .stay-ctrl {
margin-top: 5px; margin-top: 5px;
input{
input {
width: 100%; width: 100%;
} }
.el-form-item{
.el-form-item {
margin-bottom: 0px; margin-bottom: 0px;
} }
.unit{
.unit {
line-height: 30px; line-height: 30px;
margin-left: 10px; margin-left: 10px;
} }
} }
.el-range-editor--mini .el-range-input{
.el-range-editor--mini .el-range-input {
width: 115px; width: 115px;
} }
.el-form-item{
.el-form-item {
margin-bottom: 15px; margin-bottom: 15px;
} }
.submit-el-form-item{
.submit-el-form-item {
margin-top: 20px; margin-top: 20px;
} }
} }
.search-box, .result-box{
.search-box,
.result-box {
padding: 20px; padding: 20px;
background: #fff; background: #fff;
box-shadow: 1px 1px 4px #ccc; box-shadow: 1px 1px 4px #ccc;
display: none; display: none;
} }
.search-box.active, .result-box.active{
.search-box.active,
.result-box.active {
display: block; display: block;
} }
.result-box{ .result-box {
/* height: 100%; /* height: 100%;
max-height: 660px; */ max-height: 660px; */
padding: 0px; padding: 0px;
.result-box-head{
.result-box-head {
text-align: center; text-align: center;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
padding: 10px 15px; padding: 10px 15px;
&>*{ &>* {
vertical-align: middle; vertical-align: middle;
} }
} }
.result-box-filter{ .result-box-filter {
font-size: 0px; font-size: 0px;
padding: 5px 0px; padding: 5px 0px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
.el-button{
.el-button {
font-size: 13px; font-size: 13px;
padding: 2px 10px; padding: 2px 10px;
margin: 0; margin: 0;
&:first-child{
&:first-child {
border-right: 1px solid #eee; border-right: 1px solid #eee;
} }
i{
i {
margin: 0 3px; margin: 0 3px;
} }
} }
} }
.stay-list{
.stay-list {
/* height: calc(100% - 70px); */ /* height: calc(100% - 70px); */
max-height: calc(100vh - 200px); max-height: calc(100vh - 200px);
overflow-y: auto; overflow-y: auto;
} }
.stay-list-item{
.stay-list-item {
line-height: 1.5; line-height: 1.5;
padding: 10px 15px; padding: 10px 15px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
p{
p {
margin: 0px; margin: 0px;
} }
.datetime{ .datetime {
font-size: 13px; font-size: 13px;
color: #666; color: #666;
} }
...@@ -268,7 +317,7 @@ ...@@ -268,7 +317,7 @@
} }
} }
.replay-player{ .replay-player {
max-width: 400px; max-width: 400px;
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -277,123 +326,156 @@ ...@@ -277,123 +326,156 @@
background: #fff; background: #fff;
padding: 5px 10px; padding: 5px 10px;
margin-top: 10px; margin-top: 10px;
.el-progress{
.el-progress {
display: inline-block; display: inline-block;
width: 200px; width: 200px;
margin: 0; margin: 0;
height: 10px; height: 10px;
border-radius: 0; border-radius: 0;
} }
&>a{
&>a {
margin: 0 5px; margin: 0 5px;
cursor: pointer; cursor: pointer;
&:hover{
&:hover {
color: #094; color: #094;
} }
} }
} }
.row-form-item .el-form-item__label{ .row-form-item .el-form-item__label {
float: none; float: none;
} }
} }
.full-width .map-wrap{
.full-width .map-wrap {
// top: 0px; // top: 0px;
height: 100%; height: 100%;
} }
.map-container{
.map-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 100; z-index: 100;
} }
.el-loading-mask{
.el-loading-mask {
z-index: 500; z-index: 500;
} }
.map-infowindow-ct{
&>p{ .map-infowindow-ct {
&>p {
display: flex; display: flex;
} }
.lb{
} .lb {}
.des{
.des {
flex: 1; flex: 1;
word-break: break-all; word-break: break-all;
} }
.icon{
.icon {
margin-right: 5px; margin-right: 5px;
} }
.battery{
.battery {
position: relative; position: relative;
width: 42px; width: 42px;
height: 20px; height: 20px;
i{
i {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.fill{
.fill {
width: 39px; width: 39px;
} }
.fill-percentage{
.fill-percentage {
padding: 3px; padding: 3px;
box-sizing: border-box; box-sizing: border-box;
background-color: #d4f1dc; background-color: #d4f1dc;
} }
.text{
.text {
color: #37c060; color: #37c060;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
} }
&.empty .fill-percentage{
&.empty .fill-percentage {
background-color: #f0d0d0; background-color: #f0d0d0;
} }
&.empty .fill-percentage{
&.empty .fill-percentage {
color: #df2222; color: #df2222;
} }
&.hide{ &.hide {
display: none; display: none;
} }
} }
.redirect-row{
.redirect-row {
display: flex; display: flex;
} }
a.redirect-btn{
a.redirect-btn {
flex: 1; flex: 1;
border: 1px solid rgba(0,153,68,0.8); border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 2px; border-radius: 2px;
text-align: center; text-align: center;
padding: 4px 0px; padding: 4px 0px;
color: rgba(0,153,68,0.8); color: rgba(0, 153, 68, 0.8);
margin: 2px; margin: 2px;
cursor: pointer; cursor: pointer;
&:hover{
color: rgba(0,153,68, 1); &:hover {
border-color: rgba(0,153,68, 1); color: rgba(0, 153, 68, 1);
border-color: rgba(0, 153, 68, 1);
} }
} }
a.locate-btn{
a.locate-btn {
padding: 2px 8px; padding: 2px 8px;
border: 1px solid #094; border: 1px solid #094;
border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px;
& + .locate-btn{
&+.locate-btn {
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
border-left: none; border-left: none;
} }
&.active{
&.active {
background-color: #094; background-color: #094;
color: #fff; color: #fff;
} }
} }
a.fence_btn_grey {
border: 1px solid #d8d8d8;
color: #999;
background: #f2f2f2;
&:hover {
border: 1px solid #d8d8d8;
color: #999;
background: #f2f2f2;
}
}
} }
.poi_marker{ .poi_marker {
display: inline-block; display: inline-block;
width: 40px; width: 40px;
height: 48px; height: 48px;
...@@ -403,25 +485,32 @@ ...@@ -403,25 +485,32 @@
color: #fff; color: #fff;
padding-top: 2px; padding-top: 2px;
} }
.poi_infowin{
.poi_item{ .poi_infowin {
.poi_item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
label{
label {
color: #666; color: #666;
} }
span, input{
span,
input {
flex: 1; flex: 1;
} }
input{
input {
border: 1px solid #ccc; border: 1px solid #ccc;
height: 22px; height: 22px;
padding: 2px 8px; padding: 2px 8px;
} }
} }
.poi_ctrl{
.poi_ctrl {
justify-content: flex-end; justify-content: flex-end;
&>a{
&>a {
display: inline-block; display: inline-block;
border: 1px solid rgba(0, 153, 68, 0.8); border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 12px; border-radius: 12px;
...@@ -432,7 +521,7 @@ ...@@ -432,7 +521,7 @@
cursor: pointer; cursor: pointer;
} }
&>a[data-delete]{ &>a[data-delete] {
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
color: #606266; color: #606266;
} }
......
...@@ -52,7 +52,7 @@ import remoteLoad from "utils/remoteLoad.js"; ...@@ -52,7 +52,7 @@ import remoteLoad from "utils/remoteLoad.js";
import mapService from "utils/mapService.js"; import mapService from "utils/mapService.js";
import FenceMapControll from "./FenceMapControll.vue"; import FenceMapControll from "./FenceMapControll.vue";
const BUSINESS_SERVICE = services.business; const BUSINESS_SERVICE = services.business;
const mapMenu = ""; var mapMenu = "";
import { CONSTANT } from "../../constant"; import { CONSTANT } from "../../constant";
export default { export default {
props: ["fenceMapModalVisible", "init", "readonlyStatus"], props: ["fenceMapModalVisible", "init", "readonlyStatus"],
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
], ],
}; };
}, },
mounted() {}, async mounted() {},
watch: { watch: {
lng(newVal) { lng(newVal) {
//this.transfer() //this.transfer()
...@@ -187,27 +187,22 @@ export default { ...@@ -187,27 +187,22 @@ export default {
}, },
bindContextMenu() { bindContextMenu() {
const self = this; const self = this;
window.mapMenu = new ContextMenu(self.mapObj); //暴露mapMenu onclick要用 var contextMenu = new AMap.ContextMenu();
function ContextMenu(map) { contextMenu.addItem(
var me = this; "设置围栏中心",
this.contextMenuPositon = null; function () {
this.contextMenu = new AMap.ContextMenu({
isCustom: true,
content: `<div class="context_menu" >
<p onclick="mapMenu.moveCenter()"><span>设置围栏中心</span></p>
</div>`,
});
map.on("rightclick", (e) => {
if (self.mapObj.getAllOverlays("circle").length) {
this.contextMenu.open(map, e.lnglat);
self.contextMenuPositon = e.lnglat; //右键菜单位置
}
});
}
ContextMenu.prototype.moveCenter = function addPOI() {
self.moveCenter(); self.moveCenter();
this.contextMenu.close(); },
}; 0
);
//地图绑定鼠标右击事件——弹出右键菜单
self.mapObj.on("rightclick", function (e) {
console.log(e)
contextMenu.open(self.mapObj, e.lnglat);
self.contextMenuPositon = e.lnglat;
});
//contextMenu.open(self.mapObj, lnglat);
}, },
drawFence() { drawFence() {
if (!this.lng && !this.lat) { if (!this.lng && !this.lat) {
...@@ -422,13 +417,13 @@ export default { ...@@ -422,13 +417,13 @@ export default {
self.geolocation.getCurrentPosition(); self.geolocation.getCurrentPosition();
AMap.event.addListener(self.geolocation, "complete", function (e) { AMap.event.addListener(self.geolocation, "complete", function (e) {
console.log('complete',e) console.log("complete", e);
//返回定位信息 //返回定位信息
var lnglatXY = mapService.getLngLat(e.position.lng, e.position.lat); var lnglatXY = mapService.getLngLat(e.position.lng, e.position.lat);
resolve(lnglatXY); resolve(lnglatXY);
}); });
AMap.event.addListener(self.geolocation, "error", function (e) { AMap.event.addListener(self.geolocation, "error", function (e) {
console.log('error',e) console.log("error", e);
//返回定位出错信息 //返回定位出错信息
resolve(mapObj.getCenter()); resolve(mapObj.getCenter());
}); });
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-form-item> <el-form-item>
<div class="pre_select_box"> <div class="pre_select_box">
<el-select v-model="form.timeType" class="small_select mr5" placeholder="请选择"> <el-select v-model="form.timeType" class="small_select mr5" placeholder="请选择">
<el-option label="创建时间" value="1"></el-option> <el-option label="激活时间" value="1"></el-option>
</el-select> </el-select>
<el-date-picker v-model="form.timeDate" class="data_picker" value-format="yyyy-MM-dd" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"> <el-date-picker v-model="form.timeDate" class="data_picker" value-format="yyyy-MM-dd" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="controll-wrap"> <div class="controll-wrap">
<div class="search-box" :class="resultBoxHidden?'active':''"> <div class="search-box" :class="resultBoxHidden?'active':''">
<h3>轨迹回放</h3> <h3>轨迹回放</h3>
<p class="info">{{name}}/{{standno}}/{{sn}}</p> <p class="info">{{name||'--'}}/{{standno||'--'}}/{{sn||'--'}}</p>
<el-form ref="form" :model="form" :rules="rules" :inline="false" size="mini" class="form"> <el-form ref="form" :model="form" :rules="rules" :inline="false" size="mini" class="form">
<el-form-item label="查询范围" prop="daterange"> <el-form-item label="查询范围" prop="daterange">
<el-date-picker class="pull-left" style="width: 100%;" v-model="form.dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" format="yyyy-MM-dd HH:mm" :clearable="false" :editable="false" :picker-options="{ <el-date-picker class="pull-left" style="width: 100%;" v-model="form.dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" format="yyyy-MM-dd HH:mm" :clearable="false" :editable="false" :picker-options="{
......
...@@ -422,12 +422,17 @@ MapService.prototype = { ...@@ -422,12 +422,17 @@ MapService.prototype = {
// 跳转到电子围栏页面 无线设备不能跳转电子围栏 isSource:1有线,其他无线 // 跳转到电子围栏页面 无线设备不能跳转电子围栏 isSource:1有线,其他无线
let fenceBtn = infoDiv.querySelector('[data-fence]'); let fenceBtn = infoDiv.querySelector('[data-fence]');
if (fenceBtn && info.isSource == 1) {
fenceBtn.onclick = function () {
if (fenceBtn) {
if (info.isSource != 1) {
fenceBtn.classList.add('fence_btn_grey');
}
fenceBtn.onclick = function () {
if (info.isSource == 1) {
mapService.openPage(`#/monitor/fence?${queryCode}`) mapService.openPage(`#/monitor/fence?${queryCode}`)
} }
} }
}
console.log(historyBtn) console.log(historyBtn)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!