This commit is contained in:
chengdandan 2023-02-24 17:32:06 +08:00
commit 2d588051c8
15 changed files with 114 additions and 60 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,6 @@ export const getStopAlgorithm = params => {
}); });
}; };
//分析-删除视频源接口 //分析-删除视频源接口
//172.16.1.26:5000/api/DeleteShipjk?F_VC_ID=9df02f1a113640c498e74a74c93aca77
export const getDeleteShipjk = params => { export const getDeleteShipjk = params => {
return axios.get('api/DeleteShipjk', { return axios.get('api/DeleteShipjk', {
params params

View File

@ -115,7 +115,7 @@ export default {
}, },
boundaryGap: ['5%', '5%'], boundaryGap: ['5%', '5%'],
data: this.xData data: this.xData.reverse()
} }
], ],
yAxis: [ yAxis: [
@ -259,7 +259,9 @@ export default {
} else if (title === '拥堵') { } else if (title === '拥堵') {
series[0].data = newVal.map(val => { }); series[0].data = newVal.map(val => { });
} }
series.forEach(ele=>{
ele.data.reverse()
})
return series return series
} }
} }

View File

@ -17,7 +17,7 @@
<!-- <el-table-column align="center" prop="steam_id" label="视频路"></el-table-column> <!-- <el-table-column align="center" prop="steam_id" label="视频路"></el-table-column>
<el-table-column align="center" prop="zone_id" label="区域编号"></el-table-column> --> <el-table-column align="center" prop="zone_id" label="区域编号"></el-table-column> -->
<el-table-column align="center" prop="name" label="区域名称"></el-table-column> <el-table-column align="center" prop="name" label="区域名称"></el-table-column>
<el-table-column align="center" prop="timestamp" label="时间戳"></el-table-column> <el-table-column align="center" prop="time" label="时间戳"></el-table-column>
<!-- <el-table-column align="center" prop="" label="视频帧"></el-table-column> --> <!-- <el-table-column align="center" prop="" label="视频帧"></el-table-column> -->
<el-table-column align="center" label="目标类型"> <el-table-column align="center" label="目标类型">
<template slot-scope="scope"> <template slot-scope="scope">
@ -51,7 +51,7 @@
<el-table :data="msg" style="width: 100%" v-if="triggerType == '周期统计'"> <el-table :data="msg" style="width: 100%" v-if="triggerType == '周期统计'">
<el-table-column align="center" prop="gate_id" label="断面编号"></el-table-column> <el-table-column align="center" prop="gate_id" label="断面编号"></el-table-column>
<el-table-column align="center" prop="name" label="断面名称"></el-table-column> <el-table-column align="center" prop="name" label="断面名称"></el-table-column>
<el-table-column align="center" prop="timestamp" label="时间戳"></el-table-column> <el-table-column align="center" prop="time" label="时间戳"></el-table-column>
<el-table-column align="center" prop="interval" label="时间序号"></el-table-column> <el-table-column align="center" prop="interval" label="时间序号"></el-table-column>
<el-table-column align="center" prop="type" label="目标类型"> <el-table-column align="center" prop="type" label="目标类型">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -143,9 +143,11 @@ export default {
}; };
}, },
created() { created() {
// console.log(this.title + 'TYPECHARTdataArr', this.dataArr) console.log(this.title);
}, },
methods: { methods: {
//
getTotal(dataArr) { getTotal(dataArr) {
return dataArr[0].type_data.reduce(function(prev, cur) { return dataArr[0].type_data.reduce(function(prev, cur) {
return cur.quantity + prev return cur.quantity + prev
@ -166,13 +168,15 @@ export default {
// }else if(dataArr[0].timeMode==''){ // }else if(dataArr[0].timeMode==''){
// } // }
if (dataArr[0].n_queue) {
if (dataArr[0].timeMode=='触发') {
this.queue = dataArr[0].n_queue this.queue = dataArr[0].n_queue
} else if (dataArr[0].ave_queue) { } else if (dataArr[0].timeMode=='周期统计') {
this.queue = dataArr[0].ave_queue this.queue = dataArr[0].ave_queue
} else if (dataArr[0].timeMode == '周期时刻') { } else if (dataArr[0].timeMode=='周期时刻') {
} }
} }
}, },
@ -186,7 +190,10 @@ export default {
dataArr: { dataArr: {
handler(newVal) { handler(newVal) {
// console.log('dataArr', newVal); // console.log('dataArr', newVal);
this.getNewQueue(newVal) if(newVal!=undefined&&newVal.length!=0){
this.getNewQueue(newVal)
}
}, },
immediate: true immediate: true

View File

@ -7,31 +7,32 @@ export default {
// addFigure: "http://172.16.1.22:8080/api/AddJianktx", // addFigure: "http://172.16.1.22:8080/api/AddJianktx",
// //编辑图形名称 // //编辑图形名称
// editFigure: "http://172.16.1.22:8080/api/EditTuxmc", // editFigure: "http://172.16.1.22:8080/api/EditTuxmc",
// dataUrl: 'http://172.16.1.168:5000/api/AddShipjk',
// getSpareElementOrder: 'http://172.16.1.168:5000/api/Upload', dataUrl: 'http://172.16.1.168:5000/api/AddShipjk',
// postSetQuanjsz: 'http://172.16.1.168:5000/api/SetQuanjsz', getSpareElementOrder: 'http://172.16.1.168:5000/api/Upload',
// saveRoleApi: 'http://172.16.1.168:5000/api/AddZhangh', postSetQuanjsz: 'http://172.16.1.168:5000/api/SetQuanjsz',
// saveSetFtppz: 'http://172.16.1.168:5000/api/SetFtppz', saveRoleApi: 'http://172.16.1.168:5000/api/AddZhangh',
// //编辑保存组件弹窗传参 saveSetFtppz: 'http://172.16.1.168:5000/api/SetFtppz',
// editComponent: 'http://172.16.1.168:5000/api/SetMonqjkzjcs', //编辑保存组件弹窗传参
// //保存主机名称 editComponent: 'http://172.16.1.168:5000/api/SetMonqjkzjcs',
// editRoleApi: 'http://172.16.1.168:5000/api/EditZhangh', //保存主机名称
// //新增图形接口 editRoleApi: 'http://172.16.1.168:5000/api/EditZhangh',
// addFigure: 'http://172.16.1.168:5000/api/AddJianktx', //新增图形接口
// //编辑图形名称 addFigure: 'http://172.16.1.168:5000/api/AddJianktx',
// editFigure: 'http://172.16.1.168:5000/api/EditTuxmc', //编辑图形名称
// //编辑保存组件弹窗传参 editFigure: 'http://172.16.1.168:5000/api/EditTuxmc',
// setHostName: 'http://172.16.1.168:5000/api/SetHostName', //编辑保存组件弹窗传参
// setHostTime: 'http://172.16.1.168:5000/api/SetHostTime' setHostName: 'http://172.16.1.168:5000/api/SetHostName',
setHostTime: 'http://172.16.1.168:5000/api/SetHostTime'
// `http://${ipUurl}:5000/api/AddShipjk` // `http://${ipUurl}:5000/api/AddShipjk`
dataUrl: `http://${ipUurl}:5000/api/AddShipjk`, // dataUrl: `http://${ipUurl}:5000/api/AddShipjk`,
getSpareElementOrder: `http://${ipUurl}:5000/api/Upload`, // getSpareElementOrder: `http://${ipUurl}:5000/api/Upload`,
postSetQuanjsz: `http://${ipUurl}:5000/api/SetQuanjsz`, // postSetQuanjsz: `http://${ipUurl}:5000/api/SetQuanjsz`,
//新增图形接口 // //新增图形接口
addFigure: `http://${ipUurl}:5000/api/AddJianktx`, // addFigure: `http://${ipUurl}:5000/api/AddJianktx`,
//编辑图形名称 // //编辑图形名称
editFigure: `http://${ipUurl}:5000/api/EditTuxmc`, // editFigure: `http://${ipUurl}:5000/api/EditTuxmc`,
//编辑保存组件弹窗传参 // //编辑保存组件弹窗传参
editComponent: `http://${ipUurl}:5000/api/SetMonqjkzjcs`, // editComponent: `http://${ipUurl}:5000/api/SetMonqjkzjcs`,
}; };

View File

@ -37,8 +37,8 @@ class mqttHandle {
const { host, port, endpoint, ...options } = this.connect; const { host, port, endpoint, ...options } = this.connect;
console.log("this.connect.host",this.connect.host) console.log("this.connect.host",this.connect.host)
// const connectUrl = `ws://${this.connect.host}:${this.connect.port}${this.connect.endpoint}`; // const connectUrl = `ws://${this.connect.host}:${this.connect.port}${this.connect.endpoint}`;
// const connectUrl = 'ws://172.16.1.168:10087/'; const connectUrl = 'ws://172.16.1.168:10087/';
const connectUrl = `ws://${this.connect.host}:${this.connect.port}`; // const connectUrl = `ws://${this.connect.host}:${this.connect.port}`;
// if (!client.connected) { // if (!client.connected) {
// client.on('connect', function () { // client.on('connect', function () {
// console.log('连接成功') // console.log('连接成功')

View File

@ -1045,8 +1045,8 @@ export default {
// const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt // const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt
var ip = window.location.host.split(":")[0]; var ip = window.location.host.split(":")[0];
console.log("ip",ip) console.log("ip",ip)
const host = `ws://${ip}:10087`; // const host = `ws://${ip}:10087`;
// const host = 'ws://172.16.1.168:10087/'; const host = 'ws://172.16.1.168:10087/';
const options = { const options = {
// //
// IP // IP

View File

@ -36,11 +36,12 @@
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]" :echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
:chartName="o.combinationName" :typeValue="typeCycleTimeData" /> :chartName="o.combinationName" :typeValue="typeCycleTimeData" />
<!-- 周期统计的组件 --> <!-- 周期统计的组件 -->
<typeChart ref="typeChartRef2" style="width: 100%;" v-if="o.timeMode === '周期统计'" <typeChart ref="typeChartRef2" style="width: 100%;"
:pageType="o.graphicType" :triggerType="o.timeMode" v-if="o.timeMode === '周期统计'" :pageType="o.graphicType"
:componentName="o.componentName" :dataArr="o.cycleStatistics" :triggerType="o.timeMode" :componentName="o.componentName"
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]" :dataArr="o.cycleStatistics" :echartArr="o.presentationForm"
:chartName="o.combinationName" :typeValue="typeCycleStatistics" /> :title="o.componentName.split('_')[0]" :chartName="o.combinationName"
:typeValue="typeCycleStatistics" />
</el-collapse-item> </el-collapse-item>
</div> </div>
</el-collapse> </el-collapse>
@ -262,8 +263,10 @@ export default {
}else if(item.componentName.split('_')[0]=="类型"&&item.$refs.pieChartRef){ }else if(item.componentName.split('_')[0]=="类型"&&item.$refs.pieChartRef){
// // // //
item.$refs.pieChartRef.drawPie(item.dataArr[0]) item.$refs.pieChartRef.drawPie(item.dataArr[0])
}
} }
}
@ -307,7 +310,30 @@ export default {
that.$nextTick(() => { that.$nextTick(() => {
// //
for (let i = 0; i < that.$refs.typeChartRef1.length; i++) { for (let i = 0; i < that.$refs.typeChartRef1.length; i++) {
item = that.$refs.typeChartRef1[i]
that.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef1[i].dataArr, that.$refs.typeChartRef[i].componentName.split('_')[0]) that.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef1[i].dataArr, that.$refs.typeChartRef[i].componentName.split('_')[0])
// if (item.componentName.split('_')[0] == "") {
// if (item.echartArr.includes('')){
// //
// item.$refs.barChartRef.drawBar(item.dataArr[0])
// }
// if (item.echartArr.includes('')){
// //
// item.$refs.pieChartRef.drawPie(item.dataArr[0])
// }
// }
if(item.componentName.split('_')[0]=="类型"&&item.$refs.barChartRef){
//
item.$refs.barChartRef.drawBar(item.dataArr[0])
}else if(item.componentName.split('_')[0]=="类型"&&item.$refs.pieChartRef){
// //
// item.$refs.pieChartRef.drawPie(item.dataArr[0])
}
} }
}) })
} }
@ -320,7 +346,7 @@ export default {
}, },
cycleStatistics: { cycleStatistics: {
handler(newVal) { handler(newVal) {
console.log(newVal,'周期统计数据'); console.log(newVal, '周期统计数据');
if (newVal.length != 0 && this.sectionData) { if (newVal.length != 0 && this.sectionData) {
this.componentList.forEach(ele => { this.componentList.forEach(ele => {
if (ele.cycleStatistics == undefined && ele.timeMode == '周期统计') { if (ele.cycleStatistics == undefined && ele.timeMode == '周期统计') {
@ -333,13 +359,33 @@ export default {
} else { } else {
item.time = item.time.split('.')[0]; item.time = item.time.split('.')[0];
if (item.type_data != null) { if (item.type_data != null) {
//
this.typeCycleStatistics = item; this.typeCycleStatistics = item;
} }
ele.cycleStatistics.unshift(item); ele.cycleStatistics.unshift(item);
for (let i = 0; i < this.$refs.typeChartRef2.length; i++) { for (let i = 0; i < this.$refs.typeChartRef2.length; i++) {
// console.log(_this.$refs.typeChartRef[i], ''); item = that.$refs.typeChartRef2[i]
this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr,_this.$refs.typeChartRe2f[i].componentName.split('_')[0]) // console.log(_this.$refs.typeChartRef[i], '');
this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0])
// if (item.componentName.split('_')[0] == "") {
// if (item.echartArr.includes('')) {
// //
// item.$refs.barChartRef.drawBar(item.dataArr[0])
// }
// if (item.echartArr.includes('')) {
// //
// item.$refs.pieChartRef.drawPie(item.dataArr[0])
// }
// }
if(item.componentName.split('_')[0]=="类型"&&item.echartArr.includes('直方图')){
//
item.$refs.barChartRef.drawBar(item.dataArr[0])
}else if(item.componentName.split('_')[0]=="类型"&&item.echartArr.includes('饼状图')){
// //
item.$refs.pieChartRef.drawPie(item.dataArr[0])
}
} }
} }
} }

View File

@ -655,8 +655,8 @@ export default {
OnSceneN() { OnSceneN() {
var ip = window.location.host; var ip = window.location.host;
this.ipData = 'http://' + ip.split(':')[0] + ':5000'; this.ipData = 'http://' + ip.split(':')[0] + ':5000';
document.getElementById('mapModule').contentWindow.getIpData(this.ipData); // document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
// document.getElementById('mapModule').contentWindow.getIpData('http://172.16.1.168:5000'); document.getElementById('mapModule').contentWindow.getIpData('http://172.16.1.168:5000');
if (this.$route.query.type == '离线视频') { if (this.$route.query.type == '离线视频') {
document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis)); document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
} }
@ -809,8 +809,7 @@ export default {
this.componentForm.componentName = res.data.data.componentName; this.componentForm.componentName = res.data.data.componentName;
this.componentForm.componentParameterId = res.data.data.componentParameterId; this.componentForm.componentParameterId = res.data.data.componentParameterId;
this.componentForm.cycleInterval = parseInt(res.data.data.cycleInterval); this.componentForm.cycleInterval = parseInt(res.data.data.cycleInterval);
this.componentForm.FlowType = res.data.data.flowType;
this.componentForm.startSectionIds = res.data.data.startSectionIds; this.componentForm.startSectionIds = res.data.data.startSectionIds;
this.componentForm.startSectionNames = res.data.data.startSectionNames; this.componentForm.startSectionNames = res.data.data.startSectionNames;
this.componentForm.endSectionIds = res.data.data.endSectionIds; this.componentForm.endSectionIds = res.data.data.endSectionIds;