Commit e3b2aae7 authored by wangxiaoming's avatar wangxiaoming

merge 修改分页

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