Commit e3b2aae7 authored by wangxiaoming's avatar wangxiaoming

merge 修改分页

parents 5a568618 69956ea7
......@@ -10226,9 +10226,10 @@
}
},
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz",
"integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s="
"version": "2.27.0",
"resolved": "https://registry.npm.taobao.org/moment/download/moment-2.27.0.tgz?cache=0&sync_timestamp=1592516084857&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.27.0.tgz",
"integrity": "sha1-i/9OPiaiNiIN/j423nVrbrqgEF0=",
"dev": true
},
"move-concurrently": {
"version": "1.0.1",
......
This diff is collapsed.
This diff is collapsed.
......@@ -146,13 +146,8 @@
</baidu-map>
</div>
</div>
<el-dialog :visible.sync="isShowPicture" width="960px" >
<div :style="'height:' + fullHeight + 'px; position: relative;'" ref="mainW">
<img :src="bigImgUrl" ref="BGIMG" width="100%" @load="loadBigImg"/>
<div v-for="(item) in customStyleArray" :key="item">
<div class="dash" :style="item" v-if="showRedBox"></div>
</div>
</div>
<el-dialog :visible.sync="isShowPicture" width="960px">
<img :src="bigImgUrl" width="100%" />
</el-dialog>
</div>
</template>
......@@ -162,17 +157,13 @@ import axios from 'axios';
import gcoord from 'gcoord';
import moment from 'moment';
import { Message } from 'element-ui';
import { address } from '../config';
import { address, imgAddress } from '../config';
import { export_json_to_excel } from '@/excel/Export2Excel';
export default {
name: 'task',
data() {
return {
fullHeight: document.documentElement.clientHeight / 1.5,
styleItem: {
},
tableData: [],
infoWindow: {
show: false,
......@@ -249,7 +240,6 @@ export default {
],
},
searchLoading: false,
customStyleArray: [],
};
},
mounted() {},
......@@ -258,25 +248,6 @@ export default {
this.queryTravel();
},
methods: {
loadBigImg() {
const newRedArray = [];
this.scale = this.$refs.BGIMG.naturalWidth / this.$refs.mainW.offsetWidth;
this.hscale = this.$refs.BGIMG.naturalHeight / this.$refs.mainW.offsetHeight;
this.customStyleArray.forEach((e) => {
const customStyle = {
top: `${e.positionRight / this.hscale}px`,
left: `${e.positionLeft / this.scale}px`,
width: `${e.positionWidth / this.scale}px`,
height: `${e.positionHeight / this.hscale}px`,
};
newRedArray.push(customStyle);
});
this.customStyleArray = newRedArray;
this.showRedBox = true;
},
showTitle(e) {
this.infoPosition.lng = e.point.lng;
this.infoPosition.lat = e.point.lat;
......@@ -298,12 +269,9 @@ export default {
},
showPicture(e) {
this.infos.forEach((item) => {
console.log(JSON.stringify(item));
if (item.lng == e.point.lng && item.lat == e.point.lat) {
// 根据坐标信息获取图片
// 这个是描点的
this.getTrajectImgLocation(item.channel, item.plateNo, `${item.date} ${item.time}`);
this.bigImgUrl = `${address
this.bigImgUrl = `${imgAddress
}getTrajectImg?channel=${
item.channel
}&equipment=${
......@@ -327,40 +295,7 @@ export default {
equipment: plateNo,
createTime,
})
// eslint-disable-next-line no-unused-vars
.then((response) => {
})
.catch((error) => {
console.log(error);
});
},
getTrajectImgLocation(channel, plateNo, createTime) {
axios
.get(
`${address}getTrajectImgLocation?channel=${channel}&equipment=${plateNo}&createTime=${createTime}`,
)
// eslint-disable-next-line no-unused-vars
.then((response) => {
const styleArray = response.data.data;
this.customStyleArray = [];
styleArray.forEach((e) => {
const point = JSON.parse(e).location;
if (point.length === 4) {
const style = {
positionLeft: point[0],
positionRight: point[1],
positionWidth: point[2] - point[0],
positionHeight: point[3] - point[1],
};
this.customStyleArray.push(style);
}
});
})
.then((response) => {})
.catch((error) => {
console.log(error);
});
......@@ -763,9 +698,4 @@ export default {
}
}
}
.dash{
position: absolute;
border: 2px #EC292A dashed;
}
</style>
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