Commit 42544e6b authored by wangxiaoming's avatar wangxiaoming

merge 没有视频 其他bug修复

parent 2b17445f
This diff is collapsed.
...@@ -10,36 +10,37 @@ ...@@ -10,36 +10,37 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.18.1", "axios": "^0.18.1",
"core-js": "^2.6.5", "core-js": "^2.6.11",
"echarts": "^4.2.1", "echarts": "^4.8.0",
"element-ui": "^2.9.0", "element-ui": "^2.13.2",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"gcoord": "^0.2.3", "gcoord": "^0.2.3",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"vue": "^2.6.10", "vue": "^2.6.11",
"vue-baidu-map": "^0.21.22", "vue-baidu-map": "^0.21.22",
"vue-router": "^3.0.3", "vue-router": "^3.3.4",
"vuex": "^3.0.1", "vue-video-player": "^5.0.2",
"xlsx": "^0.16.1" "vuex": "^3.5.1",
"xlsx": "^0.16.5"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0", "@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.8.0", "@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-plugin-unit-jest": "^3.8.0", "@vue/cli-plugin-unit-jest": "^3.12.1",
"@vue/cli-service": "^3.8.0", "@vue/cli-service": "^3.12.1",
"@vue/eslint-config-airbnb": "^4.0.0", "@vue/eslint-config-airbnb": "^4.0.1",
"@vue/test-utils": "1.0.0-beta.29", "@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0", "babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.1.0",
"babel-jest": "^23.6.0", "babel-jest": "^23.6.0",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.2.3",
"less": "^3.0.4", "less": "^3.12.2",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"moment": "^2.27.0", "moment": "^2.27.0",
"script-loader": "^0.7.2", "script-loader": "^0.7.2",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.11"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "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 = 'http://152.136.233.116:8083/roadlinks/';
// const address = '/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://vmax.corp.roadlinks.cn:8088/roadlinks/';
// const address = 'http://127.0.0.1:8088/roadlinks/'; // const address = 'http://127.0.0.1:8088/roadlinks/';
// const address = 'http://193.112.197.170:8080/roadlinks/'; // const address = 'http://193.112.197.170:8080/roadlinks/';
// const address = 'http://172.16.40.196:29980/roadlinks/'; // const address = 'http://172.16.40.196:29980/roadlinks/';
const videoAddress = 'http://152.136.233.116:8000';
const photoAddress = 'http://106.52.130.113:9088/'; const photoAddress = 'http://152.136.233.116:8000';
const imgAddress = 'http://152.136.233.116:8083/roadlinks/'; // const imgAddress = '/roadlinks/';// 测试环境
const imgApi = 'http://152.136.233.116:8083/roadlinks/getCapitalImg?imgName='; const imgAddress = 'http://152.136.233.116:8083/roadlinks/'; // 本地
// const imgApi = 'http://152.136.233.116:8083/roadlinks/getCapitalImg?imgName='; //这个没用到啊
export { export {
address, photoAddress, imgApi, imgAddress, address, photoAddress, imgAddress, videoAddress,
}; };
...@@ -6,10 +6,15 @@ import BaiduMap from 'vue-baidu-map'; ...@@ -6,10 +6,15 @@ import BaiduMap from 'vue-baidu-map';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import _ from 'lodash'; import _ from 'lodash';
import moment from 'moment'; import moment from 'moment';
import VideoPlayer from 'vue-video-player';
import App from './App.vue'; import App from './App.vue';
import router from './router'; import router from './router';
import store from './store'; 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(ElementUI);
Vue.use(BaiduMap, { Vue.use(BaiduMap, {
ak: 'AZzMTSKLP4lVHphRauTBdINZUFnpWTcu', ak: 'AZzMTSKLP4lVHphRauTBdINZUFnpWTcu',
......
...@@ -48,6 +48,24 @@ ...@@ -48,6 +48,24 @@
<span slot="title" style="font-size: 16px">巡检结果明细</span> <span slot="title" style="font-size: 16px">巡检结果明细</span>
</el-menu-item> </el-menu-item>
</el-submenu> </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-menu>
</el-aside> </el-aside>
<el-container> <el-container>
......
This diff is collapsed.
...@@ -188,9 +188,9 @@ import axios from 'axios'; ...@@ -188,9 +188,9 @@ import axios from 'axios';
import { Message } from 'element-ui'; import { Message } from 'element-ui';
import echarts from 'echarts'; import echarts from 'echarts';
import moment from 'moment'; import moment from 'moment';
import { address, imgAddress } from '../config';
import { export_json_to_excel } from '@/excel/Export2Excel'; import { export_json_to_excel } from '@/excel/Export2Excel';
import elDragDialog from '@/components/el-drag-dialog'; import elDragDialog from '@/components/el-drag-dialog';
import { address, imgAddress } from '../config';
export default { export default {
name: 'detail', name: 'detail',
...@@ -385,10 +385,10 @@ export default { ...@@ -385,10 +385,10 @@ export default {
that.filters.equipment = this.$route.params.equipment; that.filters.equipment = this.$route.params.equipment;
} }
if (this.startTime != null && this.endTime != null) { if (that.startTime && that.endTime) {
this.filters.dateTime = [ this.filters.dateTime = [
moment(this.startTime).format('YYYY-MM-DD HH:mm:ss'), this.$route.params.startTime,
moment(this.endTime).format('YYYY-MM-DD HH:mm:ss'), this.$route.params.endTime,
]; ];
} else if (searchVal) { } else if (searchVal) {
this.filters = JSON.parse(searchVal); this.filters = JSON.parse(searchVal);
...@@ -438,7 +438,7 @@ export default { ...@@ -438,7 +438,7 @@ export default {
if (response.data.data) { if (response.data.data) {
this.pageOption.totalCount = response.data.data.total; this.pageOption.totalCount = response.data.data.total;
response.data.data.list.forEach((val) => { 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( val.imageTime = moment(parseInt(val.imageTime)).format(
'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss',
); );
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<!-- 任务统计 --> <!-- 任务统计 -->
<div class="ov-map" id="ov-map"> <div class="ov-map" id="ov-map">
<baidu-map <baidu-map
class="map" class="bm-view"
:center="center" :center="center"
:zoom="zoom" :zoom="zoom"
@zoomend="zoomEnd" @zoomend="zoomEnd"
...@@ -163,8 +163,8 @@ import gcoord from 'gcoord'; ...@@ -163,8 +163,8 @@ import gcoord from 'gcoord';
// eslint-disable-next-line import/no-extraneous-dependencies // eslint-disable-next-line import/no-extraneous-dependencies
import moment from 'moment'; import moment from 'moment';
import { Message } from 'element-ui'; import { Message } from 'element-ui';
import { address } from '../config';
import { export_json_to_excel } from '@/excel/Export2Excel'; import { export_json_to_excel } from '@/excel/Export2Excel';
import { address } from '../config';
export default { export default {
name: 'task', name: 'task',
...@@ -353,6 +353,51 @@ export default { ...@@ -353,6 +353,51 @@ export default {
// 描点并且展示图片 // 描点并且展示图片
getTrajectImgLocationByImageId(id) { getTrajectImgLocationByImageId(id) {
axios 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( .get(
`${address}getTrajectImgLocationByImageId?imageId=${id}`, `${address}getTrajectImgLocationByImageId?imageId=${id}`,
) )
...@@ -390,7 +435,7 @@ export default { ...@@ -390,7 +435,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
}); }); */
}, },
...@@ -834,7 +879,12 @@ export default { ...@@ -834,7 +879,12 @@ export default {
this.trajectoryWithLinkId = []; this.trajectoryWithLinkId = [];
this.no = 0; this.no = 0;
const resData = response.data.data; 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 // eslint-disable-next-line no-restricted-syntax
for (const key in resData) { // 这里是遍历车辆信息 车辆会有多个轨迹 在遍历 for (const key in resData) { // 这里是遍历车辆信息 车辆会有多个轨迹 在遍历
if (resData[key]) { if (resData[key]) {
...@@ -846,11 +896,6 @@ export default { ...@@ -846,11 +896,6 @@ export default {
const points = []; const points = [];
let linkIds = []; let linkIds = [];
// 距离
let distance = 0;
// eslint-disable-next-line no-unused-vars
let totalDistance = 0;
// 根据几条轨迹遍历 // 根据几条轨迹遍历
gis.trajectorys.forEach((item, index) => { gis.trajectorys.forEach((item, index) => {
if (item) { if (item) {
...@@ -876,34 +921,6 @@ export default { ...@@ -876,34 +921,6 @@ export default {
gcoord.BD09, 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 画红线
poly.push({ poly.push({
...@@ -944,16 +961,10 @@ export default { ...@@ -944,16 +961,10 @@ export default {
), ),
startPoint: gis.startPoint, startPoint: gis.startPoint,
endPoint: gis.endPoint, endPoint: gis.endPoint,
inspectDistance: `${(totalDistance / 1000).toFixed(1)}km`, inspectDistance: gis.inspectDistance,
inspectTime: gis.inspectTime, inspectTime: gis.inspectTime,
averageSpeed: `${( averageSpeed: gis.averageSpeed,
totalDistance
/ 1000
/ ((gis.endTime
- gis.startTime)
/ (1000 * 3600))
).toFixed(1)}km/h`,
}); });
if (points) { if (points) {
// eslint-disable-next-line global-require // eslint-disable-next-line global-require
...@@ -1119,6 +1130,10 @@ export default { ...@@ -1119,6 +1130,10 @@ export default {
</script> </script>
<style lang="less" scope> <style lang="less" scope>
.bm-view {
width: 100%;
height: 600px;
}
.BMap_Marker { .BMap_Marker {
z-index: 10 !important; z-index: 10 !important;
} }
...@@ -1137,16 +1152,16 @@ export default { ...@@ -1137,16 +1152,16 @@ export default {
} }
.ov-map { .ov-map {
width: 100%; width: 100%;
height: 100%; height: 600px;
background: #888; background: #888;
.map { .map {
width: 100%; width: 100%;
height: 100%; height: 600px;
} }
} }
} }
.picture { .picture {
height: 100%; height: 600px;
width: 30%; width: 30%;
float: left; float: left;
ul { 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