Commit 42544e6b authored by wangxiaoming's avatar wangxiaoming

merge 没有视频 其他bug修复

parent 2b17445f
This diff is collapsed.
......@@ -10,36 +10,37 @@
},
"dependencies": {
"axios": "^0.18.1",
"core-js": "^2.6.5",
"echarts": "^4.2.1",
"element-ui": "^2.9.0",
"core-js": "^2.6.11",
"echarts": "^4.8.0",
"element-ui": "^2.13.2",
"file-saver": "^2.0.2",
"gcoord": "^0.2.3",
"js-cookie": "^2.2.1",
"vue": "^2.6.10",
"vue": "^2.6.11",
"vue-baidu-map": "^0.21.22",
"vue-router": "^3.0.3",
"vuex": "^3.0.1",
"xlsx": "^0.16.1"
"vue-router": "^3.3.4",
"vue-video-player": "^5.0.2",
"vuex": "^3.5.1",
"xlsx": "^0.16.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-plugin-unit-jest": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-plugin-unit-jest": "^3.12.1",
"@vue/cli-service": "^3.12.1",
"@vue/eslint-config-airbnb": "^4.0.1",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^23.6.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"less": "^3.0.4",
"eslint-plugin-vue": "^5.2.3",
"less": "^3.12.2",
"less-loader": "^4.1.0",
"lodash": "^4.17.19",
"moment": "^2.27.0",
"script-loader": "^0.7.2",
"vue-template-compiler": "^2.6.10"
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
......
src/assets/img/video.png

1.74 KB | W: | H:

src/assets/img/video.png

422 Bytes | W: | H:

src/assets/img/video.png
src/assets/img/video.png
src/assets/img/video.png
src/assets/img/video.png
  • 2-up
  • Swipe
  • Onion skin
// const address = 'http://152.136.233.116:8083/roadlinks/';
// const address = '/roadlinks/';
const address = 'http://127.0.0.1:8088/roadlinks/';
const address = 'http://127.0.0.1:8088/roadlinks/'; // 本地
// const address = '/roadlinks/'; // 测试环境
// const address = 'http://vmax.corp.roadlinks.cn:8088/roadlinks/';
// const address = 'http://127.0.0.1:8088/roadlinks/';
// const address = 'http://193.112.197.170:8080/roadlinks/';
// const address = 'http://172.16.40.196:29980/roadlinks/';
const photoAddress = 'http://106.52.130.113:9088/';
const imgAddress = 'http://152.136.233.116:8083/roadlinks/';
const imgApi = 'http://152.136.233.116:8083/roadlinks/getCapitalImg?imgName=';
const videoAddress = 'http://152.136.233.116:8000';
const photoAddress = 'http://152.136.233.116:8000';
// const imgAddress = '/roadlinks/';// 测试环境
const imgAddress = 'http://152.136.233.116:8083/roadlinks/'; // 本地
// const imgApi = 'http://152.136.233.116:8083/roadlinks/getCapitalImg?imgName='; //这个没用到啊
export {
address, photoAddress, imgApi, imgAddress,
address, photoAddress, imgAddress, videoAddress,
};
......@@ -6,10 +6,15 @@ import BaiduMap from 'vue-baidu-map';
import 'element-ui/lib/theme-chalk/index.css';
import _ from 'lodash';
import moment from 'moment';
import VideoPlayer from 'vue-video-player';
import App from './App.vue';
import router from './router';
import store from './store';
require('video.js/dist/video-js.css');
require('vue-video-player/src/custom-theme.css');
Vue.use(VideoPlayer);
Vue.use(ElementUI);
Vue.use(BaiduMap, {
ak: 'AZzMTSKLP4lVHphRauTBdINZUFnpWTcu',
......
......@@ -48,6 +48,24 @@
<span slot="title" style="font-size: 16px">巡检结果明细</span>
</el-menu-item>
</el-submenu>
<!--<el-submenu index="4">
<span slot="title" class="submenu_parent">视频查看入口</span>
<el-menu-item
index="4-1"
@click="goTo('/result')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">实时视频查看</span>
</el-menu-item>
<el-menu-item
index="4-2"
@click="goTo('/resultDetail')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">停车视频查看</span>
</el-menu-item>
</el-submenu>-->
</el-menu>
</el-aside>
<el-container>
......
This diff is collapsed.
......@@ -188,9 +188,9 @@ import axios from 'axios';
import { Message } from 'element-ui';
import echarts from 'echarts';
import moment from 'moment';
import { address, imgAddress } from '../config';
import { export_json_to_excel } from '@/excel/Export2Excel';
import elDragDialog from '@/components/el-drag-dialog';
import { address, imgAddress } from '../config';
export default {
name: 'detail',
......@@ -385,10 +385,10 @@ export default {
that.filters.equipment = this.$route.params.equipment;
}
if (this.startTime != null && this.endTime != null) {
if (that.startTime && that.endTime) {
this.filters.dateTime = [
moment(this.startTime).format('YYYY-MM-DD HH:mm:ss'),
moment(this.endTime).format('YYYY-MM-DD HH:mm:ss'),
this.$route.params.startTime,
this.$route.params.endTime,
];
} else if (searchVal) {
this.filters = JSON.parse(searchVal);
......@@ -438,7 +438,7 @@ export default {
if (response.data.data) {
this.pageOption.totalCount = response.data.data.total;
response.data.data.list.forEach((val) => {
val.status = val.status == 1 ? '正常' : val.status == 2 ? '异常' : '新增';
val.status = val.status == 1 ? '正常' : val.status == 2 ? '异常' : '正常';
val.imageTime = moment(parseInt(val.imageTime)).format(
'YYYY-MM-DD HH:mm:ss',
);
......
......@@ -93,7 +93,7 @@
<!-- 任务统计 -->
<div class="ov-map" id="ov-map">
<baidu-map
class="map"
class="bm-view"
:center="center"
:zoom="zoom"
@zoomend="zoomEnd"
......@@ -163,8 +163,8 @@ import gcoord from 'gcoord';
// eslint-disable-next-line import/no-extraneous-dependencies
import moment from 'moment';
import { Message } from 'element-ui';
import { address } from '../config';
import { export_json_to_excel } from '@/excel/Export2Excel';
import { address } from '../config';
export default {
name: 'task',
......@@ -353,6 +353,51 @@ export default {
// 描点并且展示图片
getTrajectImgLocationByImageId(id) {
axios
.get(
`${address}getTrajectImgLocationByImageId?imageId=${id}`,
)
// eslint-disable-next-line no-unused-vars
.then((response) => {
const styleArray = response.data.data;
const nowBigImgUrl = `${address
}getTrajectImgByImageId?imageId=${id}`;
this.screenLoading = true;
// eslint-disable-next-line eqeqeq
if (this.bigImgUrl == nowBigImgUrl) {
this.screenLoading = false;
this.isShowPicture = true;
return;
}
this.bigImgUrl = nowBigImgUrl;
this.customStyleArray = [];
console.log(JSON.stringify(styleArray));
// 拼接 展示的资产信息
styleArray.forEach((e, styleIndex) => {
e.index = styleIndex + 1;
const point = JSON.parse(e.vector).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);
}
});
this.isShowPicture = true;
})
.catch((error) => {
console.log(error);
});
/* axios
.get(
`${address}getTrajectImgLocationByImageId?imageId=${id}`,
)
......@@ -390,7 +435,7 @@ export default {
})
.catch((error) => {
console.log(error);
});
}); */
},
......@@ -834,7 +879,12 @@ export default {
this.trajectoryWithLinkId = [];
this.no = 0;
const resData = response.data.data;
// console.log(`travellog${JSON.stringify(resData)}`);
console.log(`travellog${JSON.stringify(resData)}`);
/* travellog{"zjhn_ZJHN20070701":[{"plateNo":"皖ALA827","startTime":1596415382242,
"endTime":1596424458181,"startPoint":"淮南收费站","endPoint":"淮南收费站",
"inspectDistance":"146.7km","inspectTime":"2.5h","averageSpeed":"58183.5km / h",
"trajectorys":null,"totalDistance":null}]} */
// eslint-disable-next-line no-restricted-syntax
for (const key in resData) { // 这里是遍历车辆信息 车辆会有多个轨迹 在遍历
if (resData[key]) {
......@@ -846,11 +896,6 @@ export default {
const points = [];
let linkIds = [];
// 距离
let distance = 0;
// eslint-disable-next-line no-unused-vars
let totalDistance = 0;
// 根据几条轨迹遍历
gis.trajectorys.forEach((item, index) => {
if (item) {
......@@ -876,34 +921,6 @@ export default {
gcoord.BD09,
);
// eslint-disable-next-line eqeqeq
if (gis.trajectorys[index + 1].linkId == gis.trajectorys[index].linkId) {
distance += Math.abs(
gis.trajectorys[index + 1].roadEndDis
- gis.trajectorys[index].roadEndDis,
);
totalDistance += Math.abs(
gis.trajectorys[index + 1].roadEndDis
- gis.trajectorys[index].roadEndDis,
);
} else {
distance += Math.abs(
this.getDistance(
result1[0],
result1[1],
result[0],
result[1],
),
);
totalDistance += Math.abs(
this.getDistance(
result1[0],
result1[1],
result[0],
result[1],
),
);
}
// poly 画红线
poly.push({
......@@ -944,16 +961,10 @@ export default {
),
startPoint: gis.startPoint,
endPoint: gis.endPoint,
inspectDistance: `${(totalDistance / 1000).toFixed(1)}km`,
inspectDistance: gis.inspectDistance,
inspectTime: gis.inspectTime,
averageSpeed: `${(
totalDistance
/ 1000
/ ((gis.endTime
- gis.startTime)
/ (1000 * 3600))
).toFixed(1)}km/h`,
averageSpeed: gis.averageSpeed,
});
if (points) {
// eslint-disable-next-line global-require
......@@ -1119,6 +1130,10 @@ export default {
</script>
<style lang="less" scope>
.bm-view {
width: 100%;
height: 600px;
}
.BMap_Marker {
z-index: 10 !important;
}
......@@ -1137,16 +1152,16 @@ export default {
}
.ov-map {
width: 100%;
height: 100%;
height: 600px;
background: #888;
.map {
width: 100%;
height: 100%;
height: 600px;
}
}
}
.picture {
height: 100%;
height: 600px;
width: 30%;
float: left;
ul {
......
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