2023022104

This commit is contained in:
chengdandan 2023-02-21 20:18:33 +08:00
commit e3a50535e4
15 changed files with 721 additions and 619 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

13
src/api/management.js Normal file
View File

@ -0,0 +1,13 @@
import axios from 'axios';
import qs from 'qs';
if (process.env.NODE_ENV === 'development') {
axios.defaults.baseURL = '/';
} else if (process.env.NODE_ENV === 'production') {
axios.defaults.baseURL = '/';
}
//获取所有账号数据接口
export const getZhanghData = params => {
return axios.get('api/GetZhangh', {
params
});
};

View File

@ -1,5 +1,15 @@
<template>
<div id="barChart" ref="barChart" style="width: 100%; height: 300px"></div>
<div style="width: 100%;margin-top: 5px;">
<div class="tableTitle">
<div>
<span
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
></span>
<span style="font-size:18px;">{{ componentName + '-' + chartName + '-' + '均值图' }}</span>
</div>
</div>
<div id="barChart" ref="barChart" style="width: 100%; height: 300px"></div>
</div>
</template>
<script>
@ -10,10 +20,17 @@ export default {
type: Array,
default() {
return [];
},
}
},
typeValue: {
type:Object,
type: Object
},
//
componentName: {
type: String
},
chartName: {
type: String
}
},
data() {
@ -21,23 +38,14 @@ export default {
},
methods: {
drawBar(arr) {
let myChart = this.$echarts.getInstanceByDom(this.$refs.barChart)
let myChart = this.$echarts.getInstanceByDom(this.$refs.barChart);
if (myChart == null) {
myChart = this.$echarts.init(this.$refs.barChart)
myChart = this.$echarts.init(this.$refs.barChart);
}
let chartData = [{ stage: '', number: 40 }];
let chartData = [{ stage: '', number: 40 }];
let option = {
tooltip: {},
color: ['#0EECE4'],
tooltip: {
// trigger: 'axis',
confine: true
// axisPointer: { //
// type: 'line', // 线'line' | 'shadow'
// lineStyle: {
// color: 'transparent',
// },
// },
},
grid: {
left: '0%',
right: '0%',
@ -49,7 +57,7 @@ export default {
{
type: 'category',
gridIndex: 0,
data: chartData.map((item) => item.stage),
data: chartData.map(item => item.stage),
axisLine: {
show: false
},
@ -79,6 +87,24 @@ export default {
max: 200
},
series: [
{
name: '外框',
type: 'bar',
barGap: '-120%', //
data: [300],
barWidth: 150,
itemStyle: {
normal: {
color: 'rgba(0,0,0,.1)', //
barBorderWidth: 1, //
label: {
//
show: false
}
}
},
z: 1
},
{
name: '平均值',
type: 'bar',
@ -89,107 +115,113 @@ export default {
label: {
show: true,
position: 'right',
// align: 'right',
// offset: [10, 20],
distance: 15,
color: '#000',
fontSize: 17,
formatter: '{c}' + '[avg]'
},
itemStyle: {
color: '#DF8414'
color: '#89c6ff'
},
data: [10],
zlevel: 11
data: [arr.avg],
zlevel: 9
},
{
name: '中间值',
type: 'bar',
barWidth: 150,
// xAxisIndex: 0,
// yAxisIndex: 0,
stack: 'val',
label: {
show: true,
position: 'left',
distance: 15,
color: '#000',
// align: 'left',
fontSize: 17,
formatter: '{c}' + '[med]',
rich: {}
},
itemStyle: {
color: '#0E76AF'
color: '#67b4fd'
},
data: [30],
zlevel: 11
data: [arr.med],
zlevel: 9
},
{
name: '最值',
name: '最值',
type: 'bar',
stack: 'val',
barWidth: 150,
barGap: '-100%',
data: [20],
data: [arr.max],
label: {
show: true,
position: 'bottom',
position: 'right',
distance: 10,
color: '#000',
fontSize: 17,
formatter: '{c}' + '[min]'
},
tooltip: {
backgroundColor: 'transparent',
formatter: ' '
offset: [0, -30],
formatter: '{c}' + '[max]'
},
itemStyle: {
color: '#ABA7A7'
color: '#319cff'
},
zlevel: 9
},
{
name: '最值',
name: '最值',
type: 'bar',
stack: 'val',
barWidth: 150,
barGap: '-100%',
data: [200],
data: [arr.min],
label: {
offset: [10, 20],
show: true,
position: 'top',
distance: 15,
position: 'left',
distance: 10,
color: '#000',
offset: [0, -30],
fontSize: 17,
formatter: '{c}' + '[max]'
},
tooltip: {
backgroundColor: 'transparent',
formatter: ' '
formatter: '{c}' + '[min]'
},
// tooltip: {
// backgroundColor: 'transparent',
// formatter: ' '
// },
itemStyle: {
color: '#ABA7A7'
color: '#328adc'
},
zlevel: 9
}
]
};
myChart.setOption(option);
window.addEventListener('resize', function () {
window.addEventListener('resize', function() {
myChart.resize();
});
}
},
mounted() {
this.drawBar()
this.drawBar(this.typeValue);
},
watch: {
// typeValue: {
// handler(newVal) {
// if (newVal) {
// this.drawBar(newVal);
// }
// }
// }
typeValue: {
handler(newVal) {
if (newVal) {
this.drawBar(newVal);
}
},
deep: true
}
}
};
</script>
<style>
.tableTitle {
background: #f7f8fa;
margin-bottom: 5px;
padding: 8px;
}
</style>

View File

@ -1,16 +1,24 @@
<template>
<div id="barChart" ref="barChart" style="width:100%;height:300px;"></div>
<div style="width: 100%;margin-top: 5px;">
<div class="tableTitle">
<div>
<span
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
></span>
<span style="font-size:18px;">{{ componentName + '-' + chartName + '-' + '柱状图' }}</span>
</div>
</div>
<div id="barChart" ref="barChart" style="width:100%;height:300px;"></div>
</div>
</template>
<script>
export default {
name: 'barChart', //
props: {
list: Array,
default() {
return []
return [];
},
pageType: {
type: String
@ -27,59 +35,50 @@ export default {
chartName: {
type: String
},
typeValue:{
type:Object
typeValue: {
type: Object
}
},
data() {
return {
xData: [],
yData: []
}
},
created() {
};
},
created() {},
methods: {
drawBar() {
let myChart = this.$echarts.getInstanceByDom(this.$refs.barChart)
let myChart = this.$echarts.getInstanceByDom(this.$refs.barChart);
if (myChart == null) {
myChart = this.$echarts.init(this.$refs.barChart)
myChart = this.$echarts.init(this.$refs.barChart);
}
let option = {
color: ['#7262FD', '#FC5A5A'],
title:{
show:true,
text:this.componentName + '-' + this.chartName + '-' + '柱状图',
textStyle:{
lineHeight:'30',
}
},
tooltip: {
confine: true,
confine: true
},
grid: {
left: '2%',
right: '4%',
bottom: '10%',
top: '20%',
containLabel: true,
containLabel: true
},
xAxis: {
type: 'category',
data: this.xData,
axisLine: {
lineStyle: {
color: '#000',
},
color: '#000'
}
},
axisLabel: {
fontSize: 12,
color: '#000',
color: '#000'
},
axisTick: {
show: false,
},
show: false
}
},
yAxis: [
{
@ -87,64 +86,67 @@ export default {
min: 0,
minInterval: 1,
splitArea: {
show: false,
show: false
},
axisLine: {
show: true,
show: true
},
axisTick: {
show: false,
show: false
},
splitLine: {
lineStyle: {
color: '#eeebeb',
type: 'dashed', // dotted 线
},
type: 'dashed' // dotted 线
}
},
axisLabel: {
fontSize: 12,
color: '#000',
fontFamily: 'Bebas',
},
}],
series: [{
type: 'bar',
barWidth: 20,
itemStyle: { barBorderRadius: [5, 5, 0, 0], },
name: '时间',
data: this.yData
},
fontFamily: 'Bebas'
}
}
],
series: [
{
type: 'bar',
barWidth: 20,
itemStyle: { barBorderRadius: [5, 5, 0, 0] },
name: '时间',
data: this.yData
}
]
};
myChart.setOption(option)
// window.onresize = () => { //
// myChart.resize();
// };
window.addEventListener('resize', function () {
myChart.resize()
}
)
},
myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
});
}
},
mounted() {
this.drawBar()
this.xData = this.typeValue.type_data.map(ele => {
return ele.name;
});
this.yData = this.typeValue.type_data.map(ele => {
return ele.quantity;
});
this.drawBar();
},
watch: {
typeValue: {
typeValue: {
handler(newVal) {
if (newVal) {
this.xData = newVal.type_data.map(ele => {
return ele.name
})
return ele.name;
});
this.yData = newVal.type_data.map(ele => {
return ele.quantity
})
this.drawBar()
return ele.quantity;
});
this.drawBar();
}
}
}
}
}
</script>
};
</script>

View File

@ -1,5 +1,15 @@
<template>
<div id="lineChart" ref="lineChart" style="width: 100%; height: 300px"></div>
<div style="width: 100%;margin-top: 5px;">
<div class="tableTitle">
<div>
<span
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
></span>
<span style="font-size:18px;">{{this.componentName + '-' + this.chartName + '-' + '曲线图', }}</span>
</div>
</div>
<div id="lineChart" ref="lineChart" style="width: 100%; height: 300px"></div>
</div>
</template>
<script>
@ -41,7 +51,6 @@ export default {
return {
xData: [],
yData: [],
yData1: [],
yData2: [],
yData3: [],
@ -65,14 +74,14 @@ export default {
myChart = this.$echarts.init(this.$refs.lineChart);
}
let option = {
title: {
show: true,
text: this.componentName + '-' + this.chartName + '-' + '曲线图',
textStyle: {
lineHeight: '30'
}
},
legend:{},
// title: {
// show: true,
// text: this.componentName + '-' + this.chartName + '-' + '线',
// textStyle: {
// lineHeight: '30'
// }
// },
legend: {},
grid: {
left: '2%',
right: '4%',
@ -282,4 +291,10 @@ export default {
}
};
</script>
<style scoped></style>
<style scoped>
.tableTitle {
background: #f7f8fa;
margin-bottom: 5px;
padding: 8px;
}
</style>

View File

@ -1,15 +1,25 @@
<template>
<div id="pieChart" ref="pieChart" style="width:100%;height:300px;"></div>
<div style="width: 100%;margin-top: 5px;">
<div class="tableTitle">
<div>
<span
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
></span>
<span style="font-size:18px;">{{this.componentName + '-' + this.chartName + '-' + '饼状图', }}</span>
</div>
</div>
<div id="pieChart" ref="pieChart" style="width:100%;height:300px;"></div>
</div>
</template>
<script>
export default {
name: 'pieChart',//
name: 'pieChart', //
props: {
list: {
type: Array,
default() {
return []
return [];
}
},
componentName: {
@ -21,10 +31,8 @@ export default {
typeValue: {
type: Object
}
},
data() {
return {
//
legend: [],
@ -37,112 +45,118 @@ export default {
{
name: '非机动车',
value: 0
}, {
},
{
name: '行人',
value: 0
}
]
}
},
created() {
};
},
created() {},
methods: {
drawPie() {
let myChart = this.$echarts.getInstanceByDom(this.$refs.pieChart)
let myChart = this.$echarts.getInstanceByDom(this.$refs.pieChart);
if (myChart == null) {
myChart = this.$echarts.init(this.$refs.pieChart)
myChart = this.$echarts.init(this.$refs.pieChart);
}
var color = [
'#0CD2E6',
'#3751E6',
'#FFC722'
];
var color = ['#0CD2E6', '#3751E6', '#FFC722'];
let option = {
title: {
show: true,
text: this.componentName + '-' + this.chartName + '-' + '饼状图',
textStyle: {
lineHeight: '30',
}
},
// title: {
// show: true,
// text: this.componentName + '-' + this.chartName + '-' + '',
// textStyle: {
// lineHeight: '30'
// }
// },
color: color,
legend: {
top: 20,
right: 'center',
textStyle: {
},
data: this.legend,
textStyle: {},
data: this.legend
},
tooltip: {},
series: [{
type: 'pie',
center: ['50%', '55%'],
radius: '70%',
label: {
normal: {
show: false,
series: [
{
type: 'pie',
center: ['50%', '55%'],
radius: '70%',
label: {
normal: {
show: false
}
},
},
labelLine: {
show: false,
length: 0,
length2: 0,
},
label: {
normal: {
show: true,
position: 'inside',
formatter: '{value|{c}}',
rich: {
value: {
fontSize: 20,
color: '#ffffff',
},
},
}
},
data: this.seriesData,
}],
labelLine: {
show: false,
length: 0,
length2: 0
},
label: {
normal: {
show: true,
position: 'inside',
formatter: '{value|{c}}',
rich: {
value: {
fontSize: 20,
color: '#ffffff'
}
}
}
},
data: this.seriesData
}
]
};
myChart.setOption(option)
myChart.setOption(option);
// window.onresize = () => { //
// myChart.resize();
// };
window.addEventListener('resize', function () {
myChart.resize()
}
)
},
window.addEventListener('resize', function() {
myChart.resize();
});
}
},
mounted() {
this.drawPie();
if (this.typeValue) {
this.typeValue.type_data.forEach(ele => {
this.seriesData.push({
name: ele.name,
value: ele.quantity
});
});
this.drawPie();
}
},
watch: {
//
typeValue: {
handler(newVal) {
if (newVal) {
this.legend = newVal.type_data.map(ele => {
return ele.name
return ele.name;
});
this.seriesData = []
this.seriesData = [];
newVal.type_data.forEach(ele => {
this.seriesData.push({
name: ele.name,
value: ele.quantity
})
})
this.drawPie()
});
});
// this.drawPie();
}
}
}
}
}
};
</script>
<style scoped></style>
<style scoped>
.tableTitle {
background: #f7f8fa;
margin-bottom: 5px;
padding: 8px;
}
</style>

View File

@ -1,15 +1,15 @@
<template><!-- 触发类型 -->
<template
><!-- 触发类型 -->
<div class="setion" v-if="isRefer">
<p class="chartTitle"><span class="titleIcon"></span> {{ componentName }} {{ triggerType }}</p>
<!-- 触发数据数值渲染 -->
<div class="typeContent" v-if="triggerType == '触发' || '周期时刻'">
<div v-if="dataArr && dataArr.length != 0">
<div v-if="title == '类型'" style="display:flex">
<el-card v-for="(n, i) in typeValue.type_data" :key="i"
style="width: 150px; margin-bottom: 20px; text-align: center">
<el-card v-for="(n, i) in typeValue.type_data" :key="i" style="width: 150px; margin-bottom: 20px; text-align: center">
<div>
<span style="font-size: 15px;">{{ n.name }}</span><br />
<span style="font-size: 15px;">{{ n.name }}</span
><br />
<span style="font-size: 30px; font-weight: bold">{{ n.quantity }}</span>
</div>
<div>
@ -34,27 +34,19 @@
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '流量'">
<span style="font-size: 15px;">流量</span><br />
<span style="font-size: 30px; font-weight: bold">{{
typeValue.flow
}}</span>
<span style="font-size: 30px; font-weight: bold">{{ typeValue.flow }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '车头时距'">
<span style="font-size: 15px;">车头时距</span><br />
<span style="font-size: 30px; font-weight: bold">{{
typeValue.heavy
}}</span>
<span style="font-size: 30px; font-weight: bold">{{ typeValue.heavy }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '排队数'">
<span style="font-size: 15px;">排队数</span>
<span style="font-size: 30px; font-weight: bold">{{
typeValue.n_queue
}}</span>
<span style="font-size: 30px; font-weight: bold">{{ typeValue.n_queue }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '检测数'">
<span style="font-size: 15px;">检测数</span>
<span style="font-size: 30px; font-weight: bold">{{
typeValue.n_stay
}}</span>
<span style="font-size: 30px; font-weight: bold">{{ typeValue.n_stay }}</span>
</div>
<div>
<div>
@ -66,15 +58,17 @@
<el-empty :image-size="100"></el-empty>
</div>
</el-card>
</div>
<div v-show="echartArr.includes('表格')">
<div class="tableTitle">
<div class="">
<div>
<span
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
></span>
<span style="font-size:18px;">{{ this.chartName + '-' + this.componentName + '-' + '表格' }}</span>
</div>
<div class="tableTime">
{{ typeValue.time }}
</div>
</div>
<div v-if="pageType == '断面'" style="margin-bottom: 20px; border: 1px solid #e4e7ed">
@ -86,28 +80,56 @@
</div>
<div class="border" v-if="echartArr.includes('曲线图')">
<detailDialog />
<lineChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr"
:status="triggerType" :title="title" :typeValue = typeValue />
<lineChart
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
/>
</div>
<div class="border" v-if="echartArr.includes('饼状图')">
<detailDialog />
<pieChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr"
:status="triggerType" :title="title" :typeValue = typeValue />
<pieChart
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
/>
</div>
<div class="border" v-if="echartArr.includes('均值图')">
<detailDialog />
<avgChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr"
:status="triggerType" :title="title" :typeValue = typeValue />
<avgChart
ref="avgRefChart"
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
/>
</div>
<div class="border" v-if="echartArr.includes('直方图')">
<detailDialog />
<barChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr"
:status="triggerType" :title="title" :typeValue = typeValue />
<barChart
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
/>
</div>
</div>
</div>
</template>
<script>
import avgChart from '../chart/avgChart.vue';
import lineChart from '../chart/lineChart.vue';
@ -138,43 +160,31 @@ export default {
flow: 0,
isRefer: true,
valueShow:{}
valueShow: {}
};
},
created() {
},
created() {},
methods: {
//
},
computed: {
},
mounted() { },
computed: {},
mounted() {},
watch: {
//
dataArr: {
handler(newVal) {
},
handler(newVal) {},
immediate: true
},
typeValue:{
handler(newVal){
this.total = 0
typeValue: {
handler(newVal) {
this.total = 0;
if (this.title == '类型') {
newVal.type_data.forEach(ele => {
this.total += ele.quantity
})
newVal.type_data.forEach(ele => {
this.total += ele.quantity;
});
}
}
}
// cycleTimeData: {
@ -186,6 +196,11 @@ export default {
};
</script>
<style scoped>
.tableTitle {
background: #f7f8fa;
margin-bottom: 5px;
padding: 8px;
}
.typeContent {
box-sizing: border-box;
}
@ -195,4 +210,4 @@ export default {
margin-bottom: 20px;
position: relative;
}
</style>
</style>

View File

@ -1,118 +1,113 @@
<template>
<div class="content-box">
<div class="container">
<p class="title">账号管理</p>
<!-- <div class="test-div">
<i class="el-icon-edit"></i>
<i class="el-icon-share"></i>
<i class="el-icon-delete"></i>
</div> -->
<el-button @click="addAccountDialog = true" type="primary" style="margin-bottom: 10px;"><i
class="el-icon-circle-plus-outline" style="margin-right: 3px;"></i>新增</el-button>
<el-table :data="tableData" :height="tableHeight" border style="width: 100%">
<el-table-column align="center" prop="name" label="用户名称" width="180"></el-table-column>
<el-table-column align="center" prop="account" label="用户账号" width="180"></el-table-column>
<el-table-column align="center" prop="role" label="角色"></el-table-column>
<el-table-column align="center" prop="jurisdiction" label="权限"></el-table-column>
<el-table-column align="center" label="操作" width="160">
<template slot-scope="scope">
<el-button @click="edit(scope.row)" type="text" size="small" class="">编辑</el-button>
<el-button @click="showView(scope.row)" type="text" size="small" class="el-icon-view"></el-button>
<el-button @click="clickDelete(scope.row)" type="text" size="small" class="el-icon-delete"></el-button>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="pageSize"
layout="sizes, prev, pager, next" :total="totalNumber" style="padding-top: 10px;">
</el-pagination>
<div class="dialog">
<el-dialog :title="dialogTitle" :visible.sync="addAccountDialog" width="30%">
<el-form label-position="left" label-width="80px" :model="formLabelAlign">
<el-form-item label="名称:">
<el-input v-model="formLabelAlign.name"></el-input>
</el-form-item>
<el-form-item label="账号:">
<el-input v-model="formLabelAlign.account"></el-input>
</el-form-item>
<el-form-item label="角色:">
<el-input v-model="formLabelAlign.role"></el-input>
</el-form-item>
<el-form-item label="权限:">
<el-input v-model="formLabelAlign.jurisdiction"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addAccountDialog = false"> </el-button>
</span>
</el-dialog>
</div>
<div class="content-box">
<div class="container">
<p class="title">账号管理</p>
<el-button @click="addAccountDialog = true" type="primary" style="margin-bottom: 10px;"
><i class="el-icon-circle-plus-outline" style="margin-right: 3px;"></i>新增</el-button
>
<el-table :data="tableData" :height="tableHeight" border style="width: 100%">
<el-table-column align="center" prop="userName" label="用户名称" width="180"></el-table-column>
<el-table-column align="center" prop="account" label="用户账号" width="180"></el-table-column>
<el-table-column align="center" prop="roleName" label="角色"></el-table-column>
<el-table-column align="center" label="权限">
<template slot-scope="scope">
<span>{{ scope.row.isEnable === '1' ? '启用' : '禁用' }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160">
<template slot-scope="scope">
<el-button @click="edit(scope.row)" type="text" size="small" class="">编辑</el-button>
<!-- <el-button @click="showView(scope.row)" type="text" size="small" class="el-icon-view"></el-button> -->
<el-button @click="clickDelete(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="dialog">
<el-dialog :title="dialogTitle" :visible.sync="addAccountDialog" width="30%">
<el-form label-position="left" label-width="80px" :model="formLabelAlign">
<el-form-item label="名称:">
<el-input v-model="formLabelAlign.name"></el-input>
</el-form-item>
<el-form-item label="账号:">
<el-input v-model="formLabelAlign.account"></el-input>
</el-form-item>
<el-form-item label="角色:">
<el-input v-model="formLabelAlign.role"></el-input>
</el-form-item>
<el-form-item label="权限:">
<el-input v-model="formLabelAlign.jurisdiction"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addAccountDialog = false"> </el-button>
</span>
</el-dialog>
</div>
</div>
</div>
</div>
</template>
<script>
import { getZhanghData } from '@/api/management';
export default {
data() {
return {
addAccountDialog: false,
formLabelAlign: {
name: '',
account: '',
role: '',
jurisdiction: ''
},
tableData: [
{
name: 'admin',
account: '',
role: 'admin',
jurisdiction: '超级管理员'
data() {
return {
addAccountDialog: false,
formLabelAlign: {
name: '',
account: '',
role: '',
jurisdiction: ''
},
tableData: [],
tableHeight: 0,
currentPage: 1,
pageSize: 100,
totalNumber: 1000,
tableHeight: 0,
dialogTitle: '新增'
};
},
created() {
let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
this.tableHeight = windowHeight - 280;
this.getData();
},
methods: {
getData() {
getZhanghData().then(res => {
console.log(res);
this.tableData = res.data.data;
});
},
edit(scope) {
console.log(scope, '编辑');
this.dialogTitle = '编辑';
this.addAccountDialog = true;
},
showView(scope) {
console.log(scope, '查看');
this.dialogTitle = '查看';
this.addAccountDialog = true;
},
clickDelete(scope) {
console.log(scope, '删除');
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
}
],
tableHeight: 0,
currentPage: 1,
pageSize: 100,
totalNumber: 1000,
tableHeight: 0,
dialogTitle: '新增'
}
},
created() {
let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
this.tableHeight = windowHeight - 220;
},
methods: {
edit(scope) {
console.log(scope, '编辑');
this.dialogTitle = '编辑';
this.addAccountDialog = true;
},
showView(scope) {
console.log(scope, '查看');
this.dialogTitle = '查看';
this.addAccountDialog = true;
},
clickDelete(scope) {
console.log(scope, '删除');
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
}
}
}
};
</script>
<style scoped>
.test-div i {
font-size: 25px;
font-size: 25px;
}
.dialog .el-form-item{
margin-bottom: 20px;
.dialog .el-form-item {
margin-bottom: 20px;
}
</style>
</style>

View File

@ -3,11 +3,15 @@
<el-empty v-show="componentList.length == 0" :image-size="400"></el-empty>
<!-- <p class="title" style="margin-bottom: 20px;font-size: 20px;font-weight: 400;">数据看板</p> -->
<el-scrollbar class="scrollbar">
<div class="dataBoard" ref='dataBoard' v-if="activeName == 'second'">
<div class="dataBoard" ref="dataBoard" v-if="activeName == 'second'">
<!-- 断面 -->
<div class="plate1" ref="plate1">
<div :class="sectionData.length <= 2 ? 'sectionBox' : 'section'" ref="section"
v-for="(s, i) in sectionData" :key="s.analogAreaComponentId">
<div
:class="sectionData.length <= 2 ? 'sectionBox' : 'section'"
ref="section"
v-for="(s, i) in sectionData"
:key="s.analogAreaComponentId"
>
<template>
<div ref="sectionContent">
<div>
@ -17,17 +21,27 @@
<span class="downPull1" data-num="1" @click="sectionHandle(i)"></span>
</div>
<div v-for="o in s.children" :key="o.analogAreaComponentId">
<OD v-if="o.componentName.includes('OD')" :pageType="o.graphicType" triggerType="触发"
:componentName="o.componentName" :echartArr="o.presentationForm"
:dataArr="o.trigger" :title="o.componentName.split('_')[0]"
:chartName='o.combinationName' />
<typeChart v-else :pageType="o.graphicType" :triggerType="o.timeMode"
<OD
v-if="o.componentName.includes('OD')"
:pageType="o.graphicType"
triggerType="触发"
:componentName="o.componentName"
:echartArr="o.presentationForm"
:dataArr="o.trigger"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
/>
<typeChart
v-else
:pageType="o.graphicType"
:triggerType="o.timeMode"
:componentName="o.componentName"
:dataArr="o.timeMode == '触发' ? o.trigger : o.cycleTimeData"
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
:chartName='o.combinationName'
:typeValue="o.timeMode == '触发' ? typeValue : typeCycleTimeData" />
:echartArr="o.presentationForm"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
:typeValue="o.timeMode == '触发' ? typeValue : typeCycleTimeData"
/>
</div>
<!-- :data="triggerList.length != 0 ? triggerList : tableData" -->
</div>
@ -37,9 +51,9 @@
</div>
</el-scrollbar>
<!-- 详情框 -->
</div>
</div>
</template>
<!-- :data="triggerList.length != 0 ? tripHandle(o) : tableData" -->
<!-- :data="triggerList.length != 0 ? tripHandle(o) : tableData" -->
<script>
import typeChart from '../../components/target/typeChart.vue';
import OD from '../../components/target/OD.vue';
@ -80,7 +94,7 @@ export default {
default() {
return [];
}
},
}
},
data() {
return {
@ -302,8 +316,6 @@ export default {
}
],
idVal: '',
//
componentList: [],
@ -312,16 +324,12 @@ export default {
sectionData: [],
//
tableList: [],
// 线
headWay: [],
tripData: [],
sectionArr: [],
@ -334,11 +342,11 @@ export default {
},
created() {
this.idVal = this.$route.query.id;
getComponentSection({ VideoId: this.idVal }).then((res) => {
getComponentSection({ VideoId: this.idVal }).then(res => {
if (res.data.code == 200) {
console.log(res.data.data, '11111111111111111');
this.componentList = res.data.data
this.siftData()
this.componentList = res.data.data;
this.siftData();
//
// this.componentList.forEach((val) => {
// this.sectionArr.push(val.combinationName);
@ -357,18 +365,16 @@ export default {
} else if (res.data.code == 404) {
}
});
},
methods: {
siftData() {
this.componentList.forEach((val) => {
this.componentList.forEach(val => {
this.sectionArr.push(val.combinationName);
this.sectionArr = Array.from(new Set(this.sectionArr));
});
this.sectionData = this.sectionArr.map((item) => {
this.sectionData = this.sectionArr.map(item => {
item = { title: item, children: [] };
this.componentList.forEach((val) => {
this.componentList.forEach(val => {
if (item.title == val.combinationName) {
item.children.push(val);
}
@ -390,60 +396,46 @@ export default {
if (sectionBox[i] != undefined) {
sectionBox[i].style.height = 'auto';
}
} else {
downPulls1[i].style.cssText = 'transition: all 0.5s linear;';
sections[i].style.height = '500px';
if (sectionBox[i] != undefined) {
sectionBox[i].style.height = '48vh'
sectionBox[i].style.height = '48vh';
}
}
},
}
//
},
mounted() {
},
mounted() {},
watch: {
//
triggerData: {
handler(newVal, oldVal) {
},
handler(newVal, oldVal) {},
immediate: true
},
//
triggerListData: {
handler(newVal) {
this.triggerList = newVal
//
console.log(newVal, 'triggerlistData');
this.triggerList = newVal;
this.componentList.forEach(ele => {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = []
ele.trigger = [];
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
if (ele.trigger.length == 10) {
ele.trigger.pop()
ele.trigger.pop();
} else {
//
if (item.type_data != null) {
// console.log(item,'461461');
this.typeValue = item
}
ele.trigger.unshift(item)
this.typeValue = item;
ele.trigger.unshift(item);
}
}
})
})
});
});
},
immediate: true
},
@ -455,38 +447,38 @@ export default {
if (newVal.length != 0) {
this.componentList.forEach(ele => {
if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') {
ele.cycleTimeData = []
ele.cycleTimeData = [];
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期时刻' && ele.analogAreaGraphId == item.graphical_id) {
if (
ele.analogAreaComponentId == item.component_id &&
ele.timeMode == '周期时刻' &&
ele.analogAreaGraphId == item.graphical_id
) {
if (ele.cycleTimeData.length == 10) {
ele.cycleTimeData.slice(ele.cycleTimeData.length-1,0)
ele.cycleTimeData.slice(ele.cycleTimeData.length - 1, 0);
} else {
if(item.type_data!=null){
//
this.typeCycleTimeData = item
}
ele.cycleTimeData.unshift(item)
// if (item.type_data != null) {
//
this.typeCycleTimeData = item;
// }
ele.cycleTimeData.unshift(item);
}
}
})
})
});
});
console.log(this.sectionData, '455');
}
},
immediate: true
},
//
cycleStatistics:{
handler(newVal){
console.log(newVal,'周期统计');
cycleStatistics: {
handler(newVal) {
console.log(newVal, '周期统计');
}
}
},
}
};
</script>
@ -506,7 +498,7 @@ export default {
/deep/ .el-scrollbar__view {
display: inline-block !important;
width: 100%
width: 100%;
}
/deep/ .el-scrollbar__wrap {
@ -520,7 +512,6 @@ export default {
.dataBoard {
height: 100%;
}
}
.dataBoard .region,
@ -610,4 +601,4 @@ export default {
.active {
transition: all 0.5s linear;
}
</style>
</style>

View File

@ -15,12 +15,17 @@
v-if="videoUnityShow"
></iframe>
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none" ref="iframe"></iframe> -->
<el-empty :description="description" v-if="videoAnalysisShow">
</el-empty>
<el-empty :description="description" v-if="videoAnalysisShow"> </el-empty>
</div>
</el-tab-pane>
<el-tab-pane label="数据看板" name="second">
<dataBoard :activeName="activeName" :triggerData="triggerData" :triggerListData="triggerListData" :cycleTimeData='cycleTimeData' :cycleStatistics='cycleStatistics'></dataBoard>
<dataBoard
:activeName="activeName"
:triggerData="triggerData"
:triggerListData="triggerListData"
:cycleTimeData="cycleTimeData"
:cycleStatistics="cycleStatistics"
></dataBoard>
</el-tab-pane>
<el-tab-pane label="分析配置" name="third">
<analysisConfiguration :analysisConfigurationdata="analysisConfigurationdata"></analysisConfiguration>
@ -32,8 +37,16 @@
</el-tabs>
<!-- <el-button class="videoAnalysis" type="primary" size="mini" @click="videoAnalysisBtn" v-if="videoAnalysisShow" :disabled='disabledVideoAnalysis'
>视频分析</el-button> -->
<el-button class="trafficAnalysis" type="primary" plain size="mini" @click="trafficAnalysisBtn" v-if="trafficAnalysisShow" :disabled='disabledTrafficAnalysis'
>交通分析</el-button>
<el-button
class="trafficAnalysis"
type="primary"
plain
size="mini"
@click="trafficAnalysisBtn"
v-if="trafficAnalysisShow"
:disabled="disabledTrafficAnalysis"
>交通分析</el-button
>
</div>
<el-drawer
class="new-dialog"
@ -80,31 +93,42 @@
<el-checkbox v-for="item in typeData" :label="item" :key="item">{{ item }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="数值筛选:" v-if="componentForm.componentType != 'OD' &&componentForm.componentType != '类型'&&componentForm.componentType != '流量'">
<el-form-item
label="数值筛选:"
v-if="
componentForm.componentType != 'OD' &&
componentForm.componentType != '类型' &&
componentForm.componentType != '流量'
"
>
<el-input-number v-model="componentForm.startValue"></el-input-number>
<el-input-number v-model="componentForm.endValue" style="margin-left:5%"></el-input-number>
</el-form-item>
<el-form-item label="流量类型:" v-if="componentForm.componentType=='流量'">
<el-radio-group v-model="componentForm.FlowType" >
<el-radio label="出流"></el-radio>
<el-radio label="入流"></el-radio>
<el-form-item label="流量类型:" v-if="componentForm.componentType == '流量'">
<el-radio-group v-model="componentForm.FlowType">
<el-radio label="出流"></el-radio>
<el-radio label="入流"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="时间模式:">
<el-select v-model="componentForm.timeMode" placeholder="请选择时间模式">
<el-option label="触发" value="触发" v-if="componentForm.componentType != '延误'&&componentForm.componentType != '拥堵'"></el-option>
<el-option
label="触发"
value="触发"
v-if="componentForm.componentType != '延误' && componentForm.componentType != '拥堵'"
></el-option>
<el-option
label="周期时刻"
value="周期时刻"
v-if="
componentForm.componentType != '排队数' &&
componentForm.componentType != '排队数' &&
componentForm.componentType != '检测数' &&
componentForm.componentType != '延误' &&
componentForm.componentType != '拥堵'&&
componentForm.componentType != '拥堵' &&
componentForm.componentType != '流量'
"></el-option>
<el-option label="周期统计" value="周期统计" v-if="componentForm.componentType != 'OD'">
</el-option>
"
></el-option>
<el-option label="周期统计" value="周期统计" v-if="componentForm.componentType != 'OD'"> </el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="触发类型:" v-if="componentForm.timeModel=='touch'">
@ -119,12 +143,9 @@
<div style="display:inline">
<el-select v-model="componentForm.company" placeholder="请选择单位" @change="changeCompany">
<!-- <el-option v-for="item in timeSelect" :key="item.value" :label="item.label" :value="item.value"></el-option> -->
<el-option label="秒" value="秒" v-if="componentForm.timeMode != '周期统计'"></el-option>
<el-option
label="分钟"
value="分钟"
></el-option>
<el-option label="小时" value="小时" ></el-option>
<el-option label="秒" value="秒" v-if="componentForm.timeMode != '周期统计'"></el-option>
<el-option label="分钟" value="分钟"></el-option>
<el-option label="小时" value="小时"></el-option>
</el-select>
<el-slider v-model="componentForm.cycleInterval" :max="max"> </el-slider>
</div>
@ -207,8 +228,8 @@ export default {
dialogFormVisible: false,
areaComponent: false,
indexModule: false,
disabledTrafficAnalysis:true,
disabledVideoAnalysis:false,
disabledTrafficAnalysis: true,
disabledVideoAnalysis: false,
//
numberNew: 1,
speed: false,
@ -276,11 +297,10 @@ export default {
componentType: '',
typeFiltering: '',
typeData: [],
FlowType:'出流'
FlowType: '出流'
},
// typeData: ['', '', '', '', ''],
typeData:['机动车','非机动车','行人'],
typeData: ['机动车', '非机动车', '行人'],
//
presentation: ['数值', '表格', '时间曲线图', '均值图'],
trackForm: {
@ -328,29 +348,29 @@ export default {
analysisConfigurationdata: {},
//
triggerData: [],
triggerListData:[],
triggerListData: [],
//
cycleTimeData:[],
cycleTimeData: [],
//
cycleStatistics:[],
cycleStatistics: [],
//
videoType: '',
videoAnalysisShow: false,
trafficAnalysisShow: false,
//unity
videoUnityShow:true,
videoAnalysisSta:'',
analysis:{
trafficAnalysisPath1:'',
trafficAnalysisPath2:'',
videoAnalysisPath:'',
videoName:'',
videoPath:'',
videoTotalFrames:'',
videoType:'实时视频'
videoUnityShow: true,
videoAnalysisSta: '',
analysis: {
trafficAnalysisPath1: '',
trafficAnalysisPath2: '',
videoAnalysisPath: '',
videoName: '',
videoPath: '',
videoTotalFrames: '',
videoType: '实时视频'
},
description:'请等待排队',
ipData:''
description: '请等待排队',
ipData: ''
};
},
@ -361,8 +381,8 @@ export default {
//client.end();
},
created() {
window.OnScene = this.OnSceneN;
this.getAllSectionalData(this.$route.query.id);
window.OnScene = this.OnSceneN;
this.getAllSectionalData(this.$route.query.id);
this.VideoId = this.$route.query.id;
this.number = this.$route.query.num;
this.titName = this.$route.query.name;
@ -371,9 +391,9 @@ export default {
// window.getModifyTheName = this.getModifyTheNameN;
window.getSingleComponentId = this.getSingleComponentIdN;
window.getSimulationAreaEdit = this.getSimulationAreaEdit;
window.delSuccess= this.delSuccess;
window.delSuccess = this.delSuccess;
// console.log("id",id)
// console.log("num",num)
// console.log("name",name)
@ -383,31 +403,36 @@ export default {
if (this.$route.query.type == '实时视频') {
this.videoAnalysisShow = false;
this.trafficAnalysisShow = false;
this.createMqtt();
// document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
} else if (this.$route.query.type == '离线视频'){
} else if (this.$route.query.type == '离线视频') {
this.videoAnalysisShow = true;
this.trafficAnalysisShow = true;
this.getAnalysisStatus()
this.getAnalysisStatus();
// this.createMqtt();
// if(this.$route.query.status==''){
// }
// if(this.$route.query.status==''){
// // document.getElementById('mapModule').contentWindow.lixianVideo("");
// }else{
// }
// }
}
},
mounted() {
},
mounted() {},
methods: {
/** 创建mqtt */
createMqtt() {
//
this.topicSends = ['stream' + this.number, 'trajectory' + this.number, 'detection' + this.number,'trigger-'+ this.$route.query.id,'cycle_time-'+ this.$route.query.id,'cycle_statistics-'+ this.$route.query.id];
this.topicSends = [
'stream' + this.number,
'trajectory' + this.number,
'detection' + this.number,
'trigger-' + this.$route.query.id,
'cycle_time-' + this.$route.query.id,
'cycle_statistics-' + this.$route.query.id
];
window.PubScribe(this.topicSends, this.number, this.realInfo);
// mqtt = mqttConfig;
/*mqtt = new mqttConfig(this.topicSends);
@ -436,34 +461,34 @@ export default {
});*/
},
//
getAnalysisStatus(){
getAnalysisStatus() {
getVideoStatus(this.$route.query.id).then(res => {
console.log("res.data",res.data)
console.log('res.data', res.data);
//
if(res.data.data.videoAnalysisStatus == '未分析'){
this.disabledTrafficAnalysis= true
this.videoUnityShow = true
this.analysisData()
}else if(res.data.data.videoAnalysisStatus == '分析中'){
this.disabledVideoAnalysis= true
this.videoUnityShow = false
setTimeout(() => {
this.getAnalysisStatus()
}, 5000);
}else if(res.data.data.videoAnalysisStatus == '已分析'){
this.videoUnityShow = true
this.videoAnalysisSta = res.data.data.videoAnalysisStatus
this.disabledTrafficAnalysis= false
this.analysisData()
//
}else if(res.data.data.trafficAnalysisStatus=='未分析'){
this.disabledVideoAnalysis= true
}else if(res.data.data.trafficAnalysisStatus=='分析中'){
this.disabledVideoAnalysis= true
this.disabledTrafficAnalysis= true
}else if(res.data.data.videoAnalysisStatus == '已分析'||res.data.data.trafficAnalysisStatus == '已分析'){
this.disabledVideoAnalysis= false
this.disabledTrafficAnalysis= true
if (res.data.data.videoAnalysisStatus == '未分析') {
this.disabledTrafficAnalysis = true;
this.videoUnityShow = true;
this.analysisData();
} else if (res.data.data.videoAnalysisStatus == '分析中') {
this.disabledVideoAnalysis = true;
this.videoUnityShow = false;
setTimeout(() => {
this.getAnalysisStatus();
}, 5000);
} else if (res.data.data.videoAnalysisStatus == '已分析') {
this.videoUnityShow = true;
this.videoAnalysisSta = res.data.data.videoAnalysisStatus;
this.disabledTrafficAnalysis = false;
this.analysisData();
//
} else if (res.data.data.trafficAnalysisStatus == '未分析') {
this.disabledVideoAnalysis = true;
} else if (res.data.data.trafficAnalysisStatus == '分析中') {
this.disabledVideoAnalysis = true;
this.disabledTrafficAnalysis = true;
} else if (res.data.data.videoAnalysisStatus == '已分析' || res.data.data.trafficAnalysisStatus == '已分析') {
this.disabledVideoAnalysis = false;
this.disabledTrafficAnalysis = true;
}
});
},
@ -471,56 +496,56 @@ export default {
videoAnalysisBtn() {
startVideoAnalysis(this.$route.query.id).then(res => {
//
if(res.data.msg=='请求成功'){
if (res.data.msg == '请求成功') {
this.$message({
message: '启动成功',
type: 'success'
});
setTimeout(() => {
this.getAnalysisStatus()
}, 5000);
message: '启动成功',
type: 'success'
});
setTimeout(() => {
this.getAnalysisStatus();
}, 5000);
// if(this.videoAnalysisSta==''){
// }else if(this.videoAnalysisSta==''){
// this.description = ''
// setTimeout(() => {
// this.getAnalysisStatus()
// }, 5000);
// }, 5000);
// }else if(this.videoAnalysisSta==''){
// }
}
// }
}
});
},
//
trafficAnalysisBtn() {
startTrafficAnalysis(this.$route.query.id).then(res => {
//
console.log("res.data",res.data.data)
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: 'success'
});
document.getElementById('mapModule').contentWindow.addColor()
}else{
this.$message({
message: res.data.msg,
type: 'warning'
});
}
console.log('res.data', res.data.data);
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: 'success'
});
document.getElementById('mapModule').contentWindow.addColor();
} else {
this.$message({
message: res.data.msg,
type: 'warning'
});
}
});
},
//
analysisData(){
getAnalysisData(this.$route.query.id).then(res => {
console.log("res.data.data",res.data.data)
this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1
this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2
this.analysis.videoAnalysisPath = res.data.data.videoAnalysisPath
this.analysis.videoName = res.data.data.videoName
this.analysis.videoPath = res.data.data.videoPath
this.analysis.videoTotalFrames = res.data.data.videoTotalFrames
this.analysis.videoType=this.$route.query.type
analysisData() {
getAnalysisData(this.$route.query.id).then(res => {
console.log('res.data.data', res.data.data);
this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1;
this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2;
this.analysis.videoAnalysisPath = res.data.data.videoAnalysisPath;
this.analysis.videoName = res.data.data.videoName;
this.analysis.videoPath = res.data.data.videoPath;
this.analysis.videoTotalFrames = res.data.data.videoTotalFrames;
this.analysis.videoType = this.$route.query.type;
});
},
//mqtt
@ -534,7 +559,7 @@ export default {
realInfo(topic, message) {
switch (topic) {
//
case 'img'+this.number:
case 'img' + this.number:
try {
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
@ -542,7 +567,7 @@ export default {
const msg = JSON.parse(temp); //JSON
// console.log("msg",msg)
// document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg));
if (msg.rate == 'high') {
document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg));
} else {
@ -551,7 +576,7 @@ export default {
} catch (error) {}
break;
//
case 'stream'+this.number:
case 'stream' + this.number:
try {
const utf8decoder1 = new TextDecoder();
const u8arr = new Uint8Array(message);
@ -562,7 +587,7 @@ export default {
} catch (error) {}
break;
//
case 'trajectory'+this.number:
case 'trajectory' + this.number:
try {
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
@ -573,7 +598,7 @@ export default {
} catch (error) {}
break;
//
case 'detection'+this.number:
case 'detection' + this.number:
try {
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
@ -588,41 +613,38 @@ export default {
}
document.getElementById('mapModule').contentWindow.getChuFa(JSON.stringify(detId));
}
} catch (error) {}
break;
case 'trigger-'+this.$route.query.id:
try {
// console.log("trigger_msgN",message)
} catch (error) {}
break;
case 'trigger-' + this.$route.query.id:
try {
// console.log("trigger_msgN",message)
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
console.log("trigger_msgN",msgN)
this.triggerListData = msgN;
} catch (error) {}
break;
case 'cycle_time-'+this.$route.query.id:
try {
// console.log("trigger_msgN",message)
case 'cycle_time-' + this.$route.query.id:
try {
// console.log("trigger_msgN",message)
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
// console.log("trigger_msgN",msgN)
this.cycleTimeData = msgN;
} catch (error) {}
break;
case 'cycle_statistics-'+this.$route.query.id:
try {
// console.log("trigger_msgN",message)
case 'cycle_statistics-' + this.$route.query.id:
try {
// console.log("trigger_msgN",message)
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
// console.log("trigger_msgN",msgN)
this.cycleStatistics = msgN;
} catch (error) {}
break;
@ -643,23 +665,25 @@ export default {
//unity
OnSceneN() {
var ip = window.location.host;
this.ipData = "http://"+ip.split(":")[0]+':5000'
// document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
document.getElementById('mapModule').contentWindow.getIpData('http://172.16.1.168:5000');
if(this.$route.query.type=='离线视频'){
document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
}
document.getElementById('mapModule').contentWindow.postVideoId(JSON.stringify(this.$route.query.id+ ',' +this.$route.query.type));
this.ipData = 'http://' + ip.split(':')[0] + ':5000';
// document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
document.getElementById('mapModule').contentWindow.getIpData('http://172.16.1.168:5000');
if (this.$route.query.type == '离线视频') {
document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
}
document
.getElementById('mapModule')
.contentWindow.postVideoId(JSON.stringify(this.$route.query.id + ',' + this.$route.query.type));
},
//
delSuccess(){
if(this.$route.query.type=='离线视频'){
this.$message({
type: "warning",
message: "请点击交通分析,获取最新数据!",
showClose: true,
duration:0,
});
delSuccess() {
if (this.$route.query.type == '离线视频') {
this.$message({
type: 'warning',
message: '请点击交通分析,获取最新数据!',
showClose: true,
duration: 0
});
}
},
// //id
@ -682,14 +706,14 @@ export default {
this.componentForm.componentName = res.data.data.componentName;
if (res.data.data.timeMode != '') {
this.componentForm.timeMode = res.data.data.timeMode;
}else{
console.log("this.componentForm.timeMode",this.componentForm.timeMode);
console.log("this.componentForm.componentType",this.componentForm.componentType);
if(this.componentForm.componentType=='延误'||this.componentForm.componentType=='拥堵'){
console.log("this.componentForm.timeMode",this.componentForm.timeMode);
this.componentForm.timeMode = '周期统计'
}else{
this.componentForm.timeMode = '触发'
} else {
console.log('this.componentForm.timeMode', this.componentForm.timeMode);
console.log('this.componentForm.componentType', this.componentForm.componentType);
if (this.componentForm.componentType == '延误' || this.componentForm.componentType == '拥堵') {
console.log('this.componentForm.timeMode', this.componentForm.timeMode);
this.componentForm.timeMode = '周期统计';
} else {
this.componentForm.timeMode = '触发';
}
}
this.componentForm.componentParameterId = res.data.data.componentParameterId;
@ -786,12 +810,12 @@ export default {
}
if (res.data.data.timeMode != '') {
this.componentForm.timeMode = res.data.data.timeMode;
}else{
if(this.componentForm.componentType=='延误'||this.componentForm.componentType=='拥堵'){
this.componentForm.timeMode = '周期统计'
}else{
this.componentForm.timeMode = '触发'
}
} else {
if (this.componentForm.componentType == '延误' || this.componentForm.componentType == '拥堵') {
this.componentForm.timeMode = '周期统计';
} else {
this.componentForm.timeMode = '触发';
}
}
this.componentForm.componentName = res.data.data.componentName;
this.componentForm.componentParameterId = res.data.data.componentParameterId;
@ -945,7 +969,7 @@ export default {
message: res.data.msg,
type: 'success'
});
// setTimeout(() => {
// setTimeout(() => {
// this.$message({
// type: "warning",
// message: "",
@ -953,12 +977,14 @@ export default {
// duration:0,
// });
// }, 3000);
document.getElementById('mapModule').contentWindow.postFigureId(JSON.stringify(res.data.data));
document.getElementById('mapModule').contentWindow.postFigureName(
document
.getElementById('mapModule')
.contentWindow.postFigureName(
JSON.stringify(res.data.data + ',' + form.name + ',' + this.startFigureName + ',' + this.numberNew)
);
this.dialogFormVisible = false;
} else {
this.$message({
@ -1002,12 +1028,12 @@ export default {
message: res.data.msg,
type: 'success'
});
setTimeout(() => {
setTimeout(() => {
this.$message({
type: "warning",
message: "请点击交通分析,获取最新数据!",
showClose: true,
duration:0,
type: 'warning',
message: '请点击交通分析,获取最新数据!',
showClose: true,
duration: 0
});
}, 5000);
console.log('startFigureName', this.startFigureName);
@ -1047,8 +1073,7 @@ export default {
formData.append('endValue', componentForm.endValue);
formData.append('startValue', componentForm.startValue);
formData.append('timeMode', componentForm.timeMode);
formData.append('presentationForm', '矩阵图');
} else if (componentForm.componentType == '类型') {
//
@ -1075,7 +1100,7 @@ export default {
formData.append('startValue', componentForm.startValue);
formData.append('timeMode', componentForm.timeMode);
formData.append('presentationForm', componentForm.presentationForm);
formData.append('flowType', componentForm.FlowType);
formData.append('flowType', componentForm.FlowType);
}
axios({
method: 'post',