Commit 901b1182 by 张杰

修复bug,优化界面

1 parent 9b2ca6b5
.map-wrap{
// position: absolute;
// top: 100px;
// left: 0;
width: 100%;
height: calc(100% - 100px);
overflow: hidden;
.map-controll{
position: absolute;
top: 40px;
right: 250px;
z-index: 102;
.fullsize-btn{
margin-left: 20px;
}
}
.map-bottom-controll{
position: absolute;
bottom: 30px;
right: 20px;
z-index: 102;
ul{
border: 1px solid #eee;
color: #094;
}
.ctrl-item{
background-color: #fff;
padding: 6px 10px;
font-size: 16px;
}
}
.controll-wrap{
position: absolute;
top: 40px;
left: 40px;
z-index: 101;
width: 320px;
max-height: 716px;
}
.menu-search{
.el-select{
width: 100px;
}
.input-with-select{
width: 100%;
}
.el-input-group__append{
background: #094;
border-color: #094;
color: #fff;
font-size: 16px;
}
.el-input-group__append:hover, .el-input-group__append:focus {
background: #33ad69;
border-color: #33ad69;
}
}
.filter-entrance{
margin-top: 10px;
background-color: rgba(255,255,255,0.9);
//border: 1px solid #dcdfe6;
box-shadow: 1px 1px 5px #dcdfe6;
.el-button{
padding: 6px;
}
}
.filter-dialog-set{
margin-top: 10px;
height: 100%;
position: relative;
}
.filter-dialog{
position: absolute;
top: 0;
left: 0;
width: 100%;
background-color: #fff;
border: 1px solid #dcdfe6;
box-sizing: border-box;
.filter-dialog-header{
text-align: center;
padding: 8px;
border-bottom: 1px solid #eee;
.el-icon-close{
font-size: 16px;
cursor: pointer;
}
}
.filter-dialog-body{
padding: 15px;
.upload-wrap{
.el-select{
width: 100px;
}
.input-with-select{
width: 100%;
}
}
}
.upload-sure-btn{
width: 100%;
}
animation-duration: .5s;
animation-delay: 0s;
display: none;
&.active{
display: block
}
.sub-filter{
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.monitor-list{
max-height: calc(100vh - 280px);
/* max-height: 568px; */
overflow: auto;
margin-right: -10px;
padding-right: 10px;
}
.monitor-list-item{
display: flex;
border-bottom: 1px solid #eee;
.user-info{
flex: 1;
color: #666;
&>p{
margin: 8px 0;
}
.name{
color: #333;
margin-right: 15px;
}
}
&:last-child{
border-bottom: none;
}
.device-icon{
margin-right: 5px;
margin-top: 12px;
}
}
.device-icon-label{
display: inline-block;
margin-left: 5px;
}
.device-icon{
display: inline-block;
vertical-align: middle;
width: 8px;
height: 8px;
border-radius: 5px;
background-color: rgba(0,153,68,0.8);
&.offline{
background-color: rgba(255,0,0,0.8);
}
}
.filter-dialog-footer{
border-top: 1px solid #eee;
padding: 10px;
span{
vertical-align: middle;
}
}
}
.search-box{
.date-filter{
position: absolute;
top: 0px;
right: 0px;
}
.el-form--inline .el-form-item{
margin-right: 0px;
}
.stay-ctrl{
margin-top: 5px;
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%;
.map-wrap {
// position: absolute;
// top: 100px;
// left: 0;
width: 100%;
height: calc(100% - 100px);
overflow: hidden;
.map-controll {
position: absolute;
top: 40px;
right: 250px;
z-index: 102;
.fullsize-btn {
margin-left: 20px;
}
}
.map-bottom-controll {
position: absolute;
bottom: 30px;
right: 20px;
z-index: 102;
ul {
border: 1px solid #eee;
color: #094;
}
.ctrl-item {
background-color: #fff;
padding: 6px 10px;
font-size: 16px;
}
}
.controll-wrap {
position: absolute;
top: 40px;
left: 40px;
z-index: 101;
width: 320px;
max-height: 716px;
}
.menu-search {
.el-select {
width: 100px;
}
.input-with-select {
width: 100%;
}
.el-input-group__append {
background: #094;
border-color: #094;
color: #fff;
font-size: 16px;
}
.el-input-group__append:hover,
.el-input-group__append:focus {
background: #33ad69;
border-color: #33ad69;
}
}
.filter-entrance {
margin-top: 10px;
background-color: rgba(255, 255, 255, 0.9);
//border: 1px solid #dcdfe6;
box-shadow: 1px 1px 5px #dcdfe6;
.el-button {
padding: 6px;
}
}
.filter-dialog-set {
margin-top: 10px;
height: 100%;
position: relative;
}
.filter-dialog {
position: absolute;
top: 0;
left: 0;
width: 100%;
background-color: #fff;
border: 1px solid #dcdfe6;
box-sizing: border-box;
.filter-dialog-header {
text-align: center;
padding: 8px;
border-bottom: 1px solid #eee;
.el-icon-close {
font-size: 16px;
cursor: pointer;
}
}
.filter-dialog-body {
padding: 15px;
.upload-wrap {
.el-select {
width: 100px;
}
.input-with-select {
width: 100%;
}
}
}
.upload-sure-btn {
width: 100%;
}
animation-duration: .5s;
animation-delay: 0s;
display: none;
&.active {
display: block
}
.sub-filter {
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.monitor-list {
max-height: calc(100vh - 280px);
/* max-height: 568px; */
overflow: auto;
margin-right: -10px;
padding-right: 10px;
}
.monitor-list-item {
display: flex;
border-bottom: 1px solid #eee;
.user-info {
flex: 1;
color: #666;
&>p {
margin: 8px 0;
}
.name {
color: #333;
margin-right: 15px;
}
}
&:last-child {
border-bottom: none;
}
.device-icon {
margin-right: 5px;
margin-top: 12px;
}
}
.device-icon-label {
display: inline-block;
margin-left: 5px;
}
.device-icon {
display: inline-block;
vertical-align: middle;
width: 8px;
height: 8px;
border-radius: 5px;
background-color: rgba(0, 153, 68, 0.8);
&.offline {
background-color: rgba(255, 0, 0, 0.8);
}
}
.filter-dialog-footer {
border-top: 1px solid #eee;
padding: 10px;
span {
vertical-align: middle;
}
}
}
.search-box {
.date-filter {
position: absolute;
top: 0px;
right: 0px;
}
.el-form--inline .el-form-item {
margin-right: 0px;
}
.stay-ctrl {
margin-top: 5px;
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; */
padding: 0px;
.result-box-head{
text-align: center;
border-bottom: 1px solid #ddd;
padding: 10px 15px;
&>*{
vertical-align: middle;
}
}
.result-box-filter{
font-size: 0px;
padding: 5px 0px;
border-bottom: 1px solid #eee;
.el-button{
font-size: 13px;
padding: 2px 10px;
margin: 0;
&:first-child{
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{
line-height: 1.5;
padding: 10px 15px;
border-bottom: 1px solid #eee;
p{
margin: 0px;
}
.datetime{
font-size: 13px;
color: #666;
}
}
}
.replay-player{
max-width: 400px;
position: absolute;
top: 20px;
right: 20px;
z-index: 500;
background: #fff;
padding: 5px 10px;
margin-top: 10px;
.el-progress{
display: inline-block;
width: 200px;
margin: 0;
height: 10px;
border-radius: 0;
}
&>a{
margin: 0 5px;
cursor: pointer;
&:hover{
color: #094;
}
}
}
.row-form-item .el-form-item__label{
float: none;
}
padding: 0px;
.result-box-head {
text-align: center;
border-bottom: 1px solid #ddd;
padding: 10px 15px;
&>* {
vertical-align: middle;
}
}
.result-box-filter {
font-size: 0px;
padding: 5px 0px;
border-bottom: 1px solid #eee;
.el-button {
font-size: 13px;
padding: 2px 10px;
margin: 0;
&:first-child {
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 {
line-height: 1.5;
padding: 10px 15px;
border-bottom: 1px solid #eee;
p {
margin: 0px;
}
.datetime {
font-size: 13px;
color: #666;
}
}
}
.replay-player {
max-width: 400px;
position: absolute;
top: 20px;
right: 20px;
z-index: 500;
background: #fff;
padding: 5px 10px;
margin-top: 10px;
.el-progress {
display: inline-block;
width: 200px;
margin: 0;
height: 10px;
border-radius: 0;
}
&>a {
margin: 0 5px;
cursor: pointer;
&:hover {
color: #094;
}
}
}
.row-form-item .el-form-item__label {
float: none;
}
}
.full-width .map-wrap{
// top: 0px;
height: 100%;
.full-width .map-wrap {
// top: 0px;
height: 100%;
}
.map-container{
width: 100%;
height: 100%;
z-index: 100;
.map-container {
width: 100%;
height: 100%;
z-index: 100;
}
.el-loading-mask{
z-index: 500;
.el-loading-mask {
z-index: 500;
}
.map-infowindow-ct{
&>p{
display: flex;
}
.lb{
}
.des{
flex: 1;
word-break: break-all;
}
.icon{
margin-right: 5px;
}
.battery{
position: relative;
width: 42px;
height: 20px;
i{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.fill{
width: 39px;
}
.fill-percentage{
padding: 3px;
box-sizing: border-box;
background-color: #d4f1dc;
}
.text{
color: #37c060;
font-size: 12px;
text-align: center;
}
&.empty .fill-percentage{
background-color: #f0d0d0;
}
&.empty .fill-percentage{
color: #df2222;
}
&.hide{
display: none;
}
}
.redirect-row{
display: flex;
}
a.redirect-btn{
flex: 1;
border: 1px solid rgba(0,153,68,0.8);
border-radius: 2px;
text-align: center;
padding: 4px 0px;
color: rgba(0,153,68,0.8);
margin: 2px;
cursor: pointer;
&:hover{
color: rgba(0,153,68, 1);
border-color: rgba(0,153,68, 1);
}
}
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;
}
}
.map-infowindow-ct {
&>p {
display: flex;
}
.lb {}
.des {
flex: 1;
word-break: break-all;
}
.icon {
margin-right: 5px;
}
.battery {
position: relative;
width: 42px;
height: 20px;
i {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.fill {
width: 39px;
}
.fill-percentage {
padding: 3px;
box-sizing: border-box;
background-color: #d4f1dc;
}
.text {
color: #37c060;
font-size: 12px;
text-align: center;
}
&.empty .fill-percentage {
background-color: #f0d0d0;
}
&.empty .fill-percentage {
color: #df2222;
}
&.hide {
display: none;
}
}
.redirect-row {
display: flex;
}
a.redirect-btn {
flex: 1;
border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 2px;
text-align: center;
padding: 4px 0px;
color: rgba(0, 153, 68, 0.8);
margin: 2px;
cursor: pointer;
&:hover {
color: rgba(0, 153, 68, 1);
border-color: rgba(0, 153, 68, 1);
}
}
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{
display: inline-block;
width: 40px;
height: 48px;
background-image: url('../images/poi-marker-default.png');
background-size: 40px 50px;
text-align: center;
color: #fff;
padding-top: 2px;
.poi_marker {
display: inline-block;
width: 40px;
height: 48px;
background-image: url('../images/poi-marker-default.png');
background-size: 40px 50px;
text-align: center;
color: #fff;
padding-top: 2px;
}
.poi_infowin{
.poi_item{
display: flex;
justify-content: space-between;
label{
color: #666;
}
span, input{
flex: 1;
}
input{
border: 1px solid #ccc;
height: 22px;
padding: 2px 8px;
}
}
.poi_ctrl{
justify-content: flex-end;
&>a{
display: inline-block;
border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 12px;
text-align: center;
padding: 2px 10px;
color: rgba(0, 153, 68, 0.8);
margin-left: 10px;
cursor: pointer;
}
&>a[data-delete]{
border: 1px solid #dcdfe6;
color: #606266;
}
}
.poi_infowin {
.poi_item {
display: flex;
justify-content: space-between;
label {
color: #666;
}
span,
input {
flex: 1;
}
input {
border: 1px solid #ccc;
height: 22px;
padding: 2px 8px;
}
}
.poi_ctrl {
justify-content: flex-end;
&>a {
display: inline-block;
border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 12px;
text-align: center;
padding: 2px 10px;
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
......@@ -52,7 +52,7 @@ import remoteLoad from "utils/remoteLoad.js";
import mapService from "utils/mapService.js";
import FenceMapControll from "./FenceMapControll.vue";
const BUSINESS_SERVICE = services.business;
const mapMenu = "";
var mapMenu = "";
import { CONSTANT } from "../../constant";
export default {
props: ["fenceMapModalVisible", "init", "readonlyStatus"],
......@@ -98,7 +98,7 @@ export default {
],
};
},
mounted() {},
async mounted() {},
watch: {
lng(newVal) {
//this.transfer()
......@@ -187,27 +187,22 @@ export default {
},
bindContextMenu() {
const self = this;
window.mapMenu = new ContextMenu(self.mapObj); //暴露mapMenu onclick要用
function ContextMenu(map) {
var me = this;
this.contextMenuPositon = null;
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();
this.contextMenu.close();
};
var contextMenu = new AMap.ContextMenu();
contextMenu.addItem(
"设置围栏中心",
function () {
self.moveCenter();
},
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() {
if (!this.lng && !this.lat) {
......@@ -422,13 +417,13 @@ export default {
self.geolocation.getCurrentPosition();
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);
resolve(lnglatXY);
});
AMap.event.addListener(self.geolocation, "error", function (e) {
console.log('error',e)
console.log("error", e);
//返回定位出错信息
resolve(mapObj.getCenter());
});
......
......@@ -29,7 +29,7 @@
<el-form-item>
<div class="pre_select_box">
<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-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>
......
......@@ -10,7 +10,7 @@
<div class="controll-wrap">
<div class="search-box" :class="resultBoxHidden?'active':''">
<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-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="{
......
......@@ -422,10 +422,15 @@ MapService.prototype = {
// 跳转到电子围栏页面 无线设备不能跳转电子围栏 isSource:1有线,其他无线
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!