Commit 901b1182 by 张杰

修复bug,优化界面

1 parent 9b2ca6b5
.map-wrap{ .map-wrap {
// position: absolute; // position: absolute;
// top: 100px; // top: 100px;
// left: 0; // left: 0;
width: 100%; width: 100%;
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{
margin-left: 20px; .fullsize-btn {
} margin-left: 20px;
} }
.map-bottom-controll{ }
position: absolute;
bottom: 30px; .map-bottom-controll {
right: 20px; position: absolute;
z-index: 102; bottom: 30px;
ul{ right: 20px;
border: 1px solid #eee; z-index: 102;
color: #094;
} ul {
.ctrl-item{ border: 1px solid #eee;
background-color: #fff; color: #094;
padding: 6px 10px; }
font-size: 16px;
} .ctrl-item {
} background-color: #fff;
.controll-wrap{ padding: 6px 10px;
position: absolute; font-size: 16px;
top: 40px; }
left: 40px; }
z-index: 101;
width: 320px; .controll-wrap {
max-height: 716px; position: absolute;
} top: 40px;
.menu-search{ left: 40px;
.el-select{ z-index: 101;
width: 100px; width: 320px;
} max-height: 716px;
.input-with-select{ }
width: 100%;
} .menu-search {
.el-input-group__append{ .el-select {
background: #094; width: 100px;
border-color: #094; }
color: #fff;
font-size: 16px; .input-with-select {
} width: 100%;
.el-input-group__append:hover, .el-input-group__append:focus { }
background: #33ad69;
border-color: #33ad69; .el-input-group__append {
} background: #094;
} border-color: #094;
.filter-entrance{ color: #fff;
margin-top: 10px; font-size: 16px;
background-color: rgba(255,255,255,0.9); }
//border: 1px solid #dcdfe6;
box-shadow: 1px 1px 5px #dcdfe6; .el-input-group__append:hover,
.el-button{ .el-input-group__append:focus {
padding: 6px; background: #33ad69;
} border-color: #33ad69;
} }
.filter-dialog-set{ }
margin-top: 10px;
height: 100%; .filter-entrance {
position: relative; margin-top: 10px;
background-color: rgba(255, 255, 255, 0.9);
} //border: 1px solid #dcdfe6;
.filter-dialog{ box-shadow: 1px 1px 5px #dcdfe6;
position: absolute;
top: 0; .el-button {
left: 0; padding: 6px;
width: 100%; }
background-color: #fff; }
border: 1px solid #dcdfe6;
box-sizing: border-box; .filter-dialog-set {
.filter-dialog-header{ margin-top: 10px;
text-align: center; height: 100%;
padding: 8px; position: relative;
border-bottom: 1px solid #eee;
.el-icon-close{ }
font-size: 16px;
cursor: pointer; .filter-dialog {
} position: absolute;
} top: 0;
.filter-dialog-body{ left: 0;
padding: 15px; width: 100%;
.upload-wrap{ background-color: #fff;
border: 1px solid #dcdfe6;
.el-select{ box-sizing: border-box;
width: 100px;
} .filter-dialog-header {
.input-with-select{ text-align: center;
width: 100%; padding: 8px;
} border-bottom: 1px solid #eee;
}
} .el-icon-close {
.upload-sure-btn{ font-size: 16px;
width: 100%; cursor: pointer;
} }
animation-duration: .5s; }
animation-delay: 0s;
display: none; .filter-dialog-body {
padding: 15px;
&.active{
display: block .upload-wrap {
}
.el-select {
.sub-filter{ width: 100px;
padding-bottom: 15px; }
border-bottom: 1px solid #eee;
} .input-with-select {
.monitor-list{ width: 100%;
max-height: calc(100vh - 280px); }
/* max-height: 568px; */ }
overflow: auto; }
margin-right: -10px;
padding-right: 10px; .upload-sure-btn {
} width: 100%;
.monitor-list-item{ }
display: flex;
border-bottom: 1px solid #eee; animation-duration: .5s;
.user-info{ animation-delay: 0s;
flex: 1; display: none;
color: #666;
&>p{ &.active {
margin: 8px 0; display: block
} }
.name{
color: #333; .sub-filter {
margin-right: 15px; padding-bottom: 15px;
} border-bottom: 1px solid #eee;
} }
&:last-child{
border-bottom: none; .monitor-list {
} max-height: calc(100vh - 280px);
.device-icon{ /* max-height: 568px; */
margin-right: 5px; overflow: auto;
margin-top: 12px; margin-right: -10px;
} padding-right: 10px;
} }
.device-icon-label{
display: inline-block; .monitor-list-item {
margin-left: 5px; display: flex;
} border-bottom: 1px solid #eee;
.device-icon{
display: inline-block; .user-info {
vertical-align: middle; flex: 1;
width: 8px; color: #666;
height: 8px;
border-radius: 5px; &>p {
background-color: rgba(0,153,68,0.8); margin: 8px 0;
}
&.offline{ .name {
background-color: rgba(255,0,0,0.8); color: #333;
} margin-right: 15px;
} }
}
.filter-dialog-footer{
border-top: 1px solid #eee; &:last-child {
padding: 10px; border-bottom: none;
span{ }
vertical-align: middle;
} .device-icon {
} margin-right: 5px;
} margin-top: 12px;
}
}
.search-box{
.date-filter{ .device-icon-label {
position: absolute; display: inline-block;
top: 0px; margin-left: 5px;
right: 0px; }
}
.el-form--inline .el-form-item{ .device-icon {
margin-right: 0px; display: inline-block;
} vertical-align: middle;
width: 8px;
.stay-ctrl{ height: 8px;
margin-top: 5px; border-radius: 5px;
input{ background-color: rgba(0, 153, 68, 0.8);
width: 100%;
}
.el-form-item{ &.offline {
margin-bottom: 0px; background-color: rgba(255, 0, 0, 0.8);
} }
.unit{ }
line-height: 30px;
margin-left: 10px; .filter-dialog-footer {
} border-top: 1px solid #eee;
} padding: 10px;
.el-range-editor--mini .el-range-input{
width: 115px; span {
} vertical-align: middle;
.el-form-item{ }
margin-bottom: 15px; }
} }
.submit-el-form-item{
margin-top: 20px;
} .search-box {
} .date-filter {
.search-box, .result-box{ position: absolute;
padding: 20px; top: 0px;
background: #fff; right: 0px;
box-shadow: 1px 1px 4px #ccc; }
display: none;
} .el-form--inline .el-form-item {
.search-box.active, .result-box.active{ margin-right: 0px;
display: block; }
}
.stay-ctrl {
margin-top: 5px;
.result-box{
/* height: 100%; input {
width: 100%;
}
.el-form-item {
margin-bottom: 0px;
}
.unit {
line-height: 30px;
margin-left: 10px;
}
}
.el-range-editor--mini .el-range-input {
width: 115px;
}
.el-form-item {
margin-bottom: 15px;
}
.submit-el-form-item {
margin-top: 20px;
}
}
.search-box,
.result-box {
padding: 20px;
background: #fff;
box-shadow: 1px 1px 4px #ccc;
display: none;
}
.search-box.active,
.result-box.active {
display: block;
}
.result-box {
/* height: 100%;
max-height: 660px; */ max-height: 660px; */
padding: 0px; padding: 0px;
.result-box-head{
text-align: center; .result-box-head {
border-bottom: 1px solid #ddd; text-align: center;
padding: 10px 15px; border-bottom: 1px solid #ddd;
padding: 10px 15px;
&>*{
vertical-align: middle; &>* {
} vertical-align: middle;
} }
}
.result-box-filter{
font-size: 0px; .result-box-filter {
padding: 5px 0px; font-size: 0px;
border-bottom: 1px solid #eee; padding: 5px 0px;
.el-button{ border-bottom: 1px solid #eee;
font-size: 13px;
padding: 2px 10px; .el-button {
margin: 0; font-size: 13px;
&:first-child{ padding: 2px 10px;
border-right: 1px solid #eee; margin: 0;
}
i{ &:first-child {
margin: 0 3px; border-right: 1px solid #eee;
} }
}
i {
} margin: 0 3px;
.stay-list{ }
/* height: calc(100% - 70px); */ }
max-height: calc(100vh - 200px);
overflow-y: auto; }
}
.stay-list-item{ .stay-list {
line-height: 1.5; /* height: calc(100% - 70px); */
padding: 10px 15px; max-height: calc(100vh - 200px);
border-bottom: 1px solid #eee; overflow-y: auto;
p{ }
margin: 0px;
} .stay-list-item {
line-height: 1.5;
.datetime{ padding: 10px 15px;
font-size: 13px; border-bottom: 1px solid #eee;
color: #666;
} p {
margin: 0px;
} }
}
.datetime {
.replay-player{ font-size: 13px;
max-width: 400px; color: #666;
position: absolute; }
top: 20px;
right: 20px; }
z-index: 500; }
background: #fff;
padding: 5px 10px; .replay-player {
margin-top: 10px; max-width: 400px;
.el-progress{ position: absolute;
display: inline-block; top: 20px;
width: 200px; right: 20px;
margin: 0; z-index: 500;
height: 10px; background: #fff;
border-radius: 0; padding: 5px 10px;
} margin-top: 10px;
&>a{
margin: 0 5px; .el-progress {
cursor: pointer; display: inline-block;
&:hover{ width: 200px;
color: #094; margin: 0;
} height: 10px;
} border-radius: 0;
} }
.row-form-item .el-form-item__label{ &>a {
float: none; margin: 0 5px;
} cursor: pointer;
&:hover {
color: #094;
}
}
}
.row-form-item .el-form-item__label {
float: none;
}
} }
.full-width .map-wrap{
// top: 0px; .full-width .map-wrap {
height: 100%; // top: 0px;
height: 100%;
} }
.map-container{
width: 100%; .map-container {
height: 100%; width: 100%;
z-index: 100; height: 100%;
z-index: 100;
} }
.el-loading-mask{
z-index: 500; .el-loading-mask {
z-index: 500;
} }
.map-infowindow-ct{
&>p{ .map-infowindow-ct {
display: flex; &>p {
} display: flex;
.lb{ }
} .lb {}
.des{
flex: 1; .des {
word-break: break-all; flex: 1;
} word-break: break-all;
.icon{ }
margin-right: 5px;
} .icon {
.battery{ margin-right: 5px;
position: relative; }
width: 42px;
height: 20px; .battery {
i{ position: relative;
position: absolute; width: 42px;
top: 0; height: 20px;
left: 0;
width: 100%; i {
height: 100%; position: absolute;
} top: 0;
.fill{ left: 0;
width: 39px; width: 100%;
height: 100%;
} }
.fill-percentage{
padding: 3px; .fill {
box-sizing: border-box; width: 39px;
background-color: #d4f1dc;
} }
.text{
color: #37c060; .fill-percentage {
font-size: 12px; padding: 3px;
text-align: center; box-sizing: border-box;
} background-color: #d4f1dc;
&.empty .fill-percentage{ }
background-color: #f0d0d0;
} .text {
&.empty .fill-percentage{ color: #37c060;
color: #df2222; font-size: 12px;
} text-align: center;
}
&.hide{
display: none; &.empty .fill-percentage {
} background-color: #f0d0d0;
} }
.redirect-row{
display: flex; &.empty .fill-percentage {
} color: #df2222;
a.redirect-btn{ }
flex: 1;
border: 1px solid rgba(0,153,68,0.8); &.hide {
border-radius: 2px; display: none;
text-align: center; }
padding: 4px 0px; }
color: rgba(0,153,68,0.8);
margin: 2px; .redirect-row {
cursor: pointer; display: flex;
&:hover{ }
color: rgba(0,153,68, 1);
border-color: rgba(0,153,68, 1); a.redirect-btn {
} flex: 1;
} border: 1px solid rgba(0, 153, 68, 0.8);
a.locate-btn{ border-radius: 2px;
padding: 2px 8px; text-align: center;
border: 1px solid #094; padding: 4px 0px;
border-radius: 4px 0 0 4px; color: rgba(0, 153, 68, 0.8);
& + .locate-btn{ margin: 2px;
border-radius: 0 4px 4px 0; cursor: pointer;
border-left: none;
} &:hover {
&.active{ color: rgba(0, 153, 68, 1);
background-color: #094; border-color: rgba(0, 153, 68, 1);
color: #fff; }
} }
}
a.locate-btn {
padding: 2px 8px;
border: 1px solid #094;
border-radius: 4px 0 0 4px;
&+.locate-btn {
border-radius: 0 4px 4px 0;
border-left: none;
}
&.active {
background-color: #094;
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;
background-image: url('../images/poi-marker-default.png'); background-image: url('../images/poi-marker-default.png');
background-size: 40px 50px; background-size: 40px 50px;
text-align: center; text-align: center;
color: #fff; color: #fff;
padding-top: 2px; padding-top: 2px;
} }
.poi_infowin{
.poi_item{ .poi_infowin {
display: flex; .poi_item {
justify-content: space-between; display: flex;
label{ justify-content: space-between;
color: #666;
} label {
span, input{ color: #666;
flex: 1; }
}
input{ span,
border: 1px solid #ccc; input {
height: 22px; flex: 1;
padding: 2px 8px; }
}
} input {
.poi_ctrl{ border: 1px solid #ccc;
justify-content: flex-end; height: 22px;
&>a{ padding: 2px 8px;
display: inline-block; }
border: 1px solid rgba(0, 153, 68, 0.8); }
border-radius: 12px;
text-align: center; .poi_ctrl {
padding: 2px 10px; justify-content: flex-end;
color: rgba(0, 153, 68, 0.8);
margin-left: 10px; &>a {
cursor: pointer; display: inline-block;
} border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 12px;
&>a[data-delete]{ text-align: center;
border: 1px solid #dcdfe6; padding: 2px 10px;
color: #606266; color: rgba(0, 153, 68, 0.8);
} margin-left: 10px;
} cursor: pointer;
}
&>a[data-delete] {
border: 1px solid #dcdfe6;
color: #606266;
}
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -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({ self.moveCenter();
isCustom: true, },
content: `<div class="context_menu" > 0
<p onclick="mapMenu.moveCenter()"><span>设置围栏中心</span></p> );
</div>`, //地图绑定鼠标右击事件——弹出右键菜单
}); self.mapObj.on("rightclick", function (e) {
map.on("rightclick", (e) => { console.log(e)
if (self.mapObj.getAllOverlays("circle").length) { contextMenu.open(self.mapObj, e.lnglat);
this.contextMenu.open(map, e.lnglat); self.contextMenuPositon = e.lnglat;
self.contextMenuPositon = e.lnglat; //右键菜单位置 });
}
}); //contextMenu.open(self.mapObj, lnglat);
}
ContextMenu.prototype.moveCenter = function addPOI() {
self.moveCenter();
this.contextMenu.close();
};
}, },
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,10 +422,15 @@ MapService.prototype = { ...@@ -422,10 +422,15 @@ 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 () {
mapService.openPage(`#/monitor/fence?${queryCode}`) if (fenceBtn) {
if (info.isSource != 1) {
fenceBtn.classList.add('fence_btn_grey');
}
fenceBtn.onclick = function () {
if (info.isSource == 1) {
mapService.openPage(`#/monitor/fence?${queryCode}`)
}
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!