10.26bug修改
This commit is contained in:
parent
246b730fd2
commit
8752eae7ed
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -258,7 +258,7 @@ export default {
|
|||
confine: true
|
||||
};
|
||||
series[0].data = newVal.map(val => {
|
||||
if (timeMode == '周期统计') {
|
||||
if (timeMode == '固定间隔') {
|
||||
return val.ave_headway;
|
||||
} else {
|
||||
return val.headway;
|
||||
|
@ -269,7 +269,7 @@ export default {
|
|||
this.name = "辆"
|
||||
series[0].data = newVal.map(val => {
|
||||
// return val.n_queue;
|
||||
if (timeMode == '周期统计') {
|
||||
if (timeMode == '固定间隔') {
|
||||
return val.ave_queue;
|
||||
} else {
|
||||
return val.n_queue;
|
||||
|
@ -278,7 +278,7 @@ export default {
|
|||
} else if (title === '检测数') {
|
||||
this.name = "辆"
|
||||
series[0].data = newVal.map(val => {
|
||||
if (timeMode == '周期统计') {
|
||||
if (timeMode == '固定间隔') {
|
||||
return val.ave_stay;
|
||||
} else {
|
||||
return val.n_stay;
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
|
||||
<div v-if="msg" class="regionBox">
|
||||
<!-- 触发 -->
|
||||
<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="steam_id" label="视频路"></el-table-column> -->
|
||||
<!-- <el-table-column align="center" prop="graphical_id" label="区域编号"></el-table-column> -->
|
||||
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
|
||||
|
@ -47,7 +47,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" prop="speed" label="空间平均速度"></el-table-column>
|
||||
</el-table>
|
||||
<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="steam_id" label="视频路"></el-table-column> -->
|
||||
<!-- <el-table-column align="center" prop="graphical_id" label="区域编号"></el-table-column> -->
|
||||
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
|
||||
|
@ -81,8 +81,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" prop="speed" label="空间平均速度"></el-table-column>
|
||||
</el-table>
|
||||
<!-- 周期统计 -->
|
||||
<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="zone_id" label="区域编号"></el-table-column> -->
|
||||
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
|
||||
<el-table-column align="center" prop="time" label="时间戳"></el-table-column>
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<!-- 触发 -->
|
||||
<!-- 实时触发 -->
|
||||
|
||||
<!-- 触发 -->
|
||||
<!-- 实时触发 -->
|
||||
<div v-if="msg">
|
||||
<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="steam_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>
|
||||
|
@ -46,8 +46,8 @@
|
|||
</el-table>
|
||||
|
||||
|
||||
<!-- 周期统计 -->
|
||||
<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="name" label="断面名称"></el-table-column>
|
||||
<el-table-column align="center" prop="time" label="时间戳"></el-table-column>
|
||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
|||
// if (this.dataList.length > 10) {
|
||||
// this.dataList = this.dataList.slice(-10);
|
||||
// }
|
||||
if (this.timeMode == "触发") {
|
||||
if (this.timeMode == "实时触发") {
|
||||
this.chartData.xData = [];
|
||||
this.chartData.yData = [];
|
||||
// debugger;
|
||||
|
@ -66,7 +66,7 @@ export default {
|
|||
this.chartData.xData.push(this.dataList[0].type_data[j].name);
|
||||
}
|
||||
}
|
||||
} else if (this.timeMode == "周期时刻") {
|
||||
} else if (this.timeMode == "固定时刻") {
|
||||
// for (let i = 0; i < this.dataList.length; i++) {
|
||||
// this.chartData.xData = [];
|
||||
// this.chartData.yData = [];
|
||||
|
@ -91,7 +91,7 @@ export default {
|
|||
this.chartData.xData.push(this.dataList[0].type_data[j].name);
|
||||
}
|
||||
}
|
||||
} else if (this.timeMode == "周期统计") {
|
||||
} else if (this.timeMode == "固定间隔") {
|
||||
// for (let i = 0; i < this.dataList.length; i++) {
|
||||
// this.chartData.xData = [];
|
||||
// this.chartData.yData = [];
|
||||
|
|
|
@ -62,7 +62,7 @@ export default {
|
|||
val = val.slice(-10);
|
||||
}
|
||||
if (val != null) {
|
||||
if (this.timeMode == "触发") {
|
||||
if (this.timeMode == "实时触发") {
|
||||
if (this.componentType == "车头时距") {
|
||||
this.chartData.xData = this.extractKeyValues(val, "time");
|
||||
this.chartData.yData = this.extractKeyValues(val, "headway");
|
||||
|
@ -104,7 +104,7 @@ export default {
|
|||
this.chartData.xData = this.extractKeyValues(val, "time");
|
||||
this.chartData.yData = this.extractKeyValues(val, "n_queue");
|
||||
}
|
||||
} else if (this.timeMode == "周期时刻") {
|
||||
} else if (this.timeMode == "固定时刻") {
|
||||
if (this.componentType == "车头时距") {
|
||||
this.chartData.xData = this.extractKeyValues(val, "time");
|
||||
this.chartData.yData = this.extractKeyValues(val, "headway");
|
||||
|
@ -146,7 +146,7 @@ export default {
|
|||
this.chartData.xData = this.extractKeyValues(val, "time");
|
||||
this.chartData.yData = this.extractKeyValues(val, "n_queue");
|
||||
}
|
||||
} else if (this.timeMode == "周期统计") {
|
||||
} else if (this.timeMode == "固定间隔") {
|
||||
if (this.componentType == "车头时距") {
|
||||
this.chartData.xData = this.extractKeyValues(val, "time");
|
||||
this.chartData.yData = this.extractKeyValues(val, "ave_headway");
|
||||
|
@ -255,7 +255,7 @@ export default {
|
|||
} else {
|
||||
seriesList = [
|
||||
{
|
||||
// name: '流量_1-zone2-曲线图-触发',
|
||||
// name: '流量_1-zone2-曲线图-实时触发',
|
||||
type: "line",
|
||||
data: this.chartData.yData.reverse(),
|
||||
symbolSize: 8, //标记的大小
|
||||
|
@ -320,7 +320,7 @@ export default {
|
|||
},
|
||||
// data: [
|
||||
// {
|
||||
// name: '流量_1-zone2-曲线图-触发',
|
||||
// name: '流量_1-zone2-曲线图-实时触发',
|
||||
// icon: 'circle'
|
||||
// }
|
||||
// ]
|
||||
|
|
|
@ -56,11 +56,11 @@ export default {
|
|||
initEcharts() {
|
||||
let seriesData = null;
|
||||
let myChart = this.chart;
|
||||
if (this.timeMode == "触发") {
|
||||
if (this.timeMode == "实时触发") {
|
||||
seriesData = null;
|
||||
this.renameField(this.dataList[0].type_data, "quantity", "value");
|
||||
seriesData = this.dataList[0].type_data;
|
||||
} else if (this.timeMode == "周期时刻") {
|
||||
} else if (this.timeMode == "固定时刻") {
|
||||
seriesData = null;
|
||||
// for (let i = 0; i < this.dataList.length; i++) {
|
||||
// this.renameField(this.dataList[0].type_data,'quantity','value')
|
||||
|
@ -73,7 +73,7 @@ export default {
|
|||
this.renameField(this.dataList[0].type_data, "quantity", "value");
|
||||
seriesData = this.dataList[0].type_data;
|
||||
}
|
||||
} else if (this.timeMode == "周期统计") {
|
||||
} else if (this.timeMode == "固定间隔") {
|
||||
seriesData = null;
|
||||
// for (let i = 0; i < this.dataList.length; i++) {
|
||||
// this.renameField(this.dataList[0].type_data, "quantity", "value");
|
||||
|
@ -123,7 +123,7 @@ export default {
|
|||
width: "80%",
|
||||
// data: [
|
||||
// {
|
||||
// name: '流量_1-zone2-饼状图-触发',
|
||||
// name: '流量_1-zone2-饼状图-实时触发',
|
||||
// icon: 'circle'
|
||||
// }
|
||||
// ]
|
||||
|
@ -147,7 +147,7 @@ export default {
|
|||
},
|
||||
series: [
|
||||
{
|
||||
name: "流量_1-zone2-饼状图-触发",
|
||||
name: "流量_1-zone2-饼状图-实时触发",
|
||||
type: "pie",
|
||||
center: ["50%", "55%"],
|
||||
radius: "70%",
|
||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
|||
},
|
||||
initEcharts() {
|
||||
let dataList = null;
|
||||
if (this.timeMode == "触发") {
|
||||
if (this.timeMode == "实时触发") {
|
||||
let dataOd = [];
|
||||
if (this.dataList.length > 0) {
|
||||
for (let i = 0; i < this.dataList.length; i++) {
|
||||
|
@ -77,7 +77,7 @@ export default {
|
|||
dataList = this.ODhanlde(dataOd);
|
||||
}
|
||||
}
|
||||
} else if (this.timeMode == "周期时刻") {
|
||||
} else if (this.timeMode == "固定时刻") {
|
||||
let dataOd = [];
|
||||
// for (let i = 0; i < this.dataList.length; i++) {
|
||||
// dataOd.push(this.dataList[0][0].ob_data);
|
||||
|
@ -92,7 +92,7 @@ export default {
|
|||
// dataOd.push(this.dataList[0][0].ob_data);
|
||||
// dataList = this.ODhanlde(dataOd);
|
||||
// }
|
||||
} else if (this.timeMode == "周期统计") {
|
||||
} else if (this.timeMode == "固定间隔") {
|
||||
let dataOd = [];
|
||||
// for (let i = 0; i < this.dataList.length; i++) {
|
||||
// dataOd.push(this.dataList[i].ob_data);
|
||||
|
|
|
@ -5,12 +5,16 @@
|
|||
<!-- 触发数据数值渲染 -->
|
||||
<div class="typeContent">
|
||||
<div v-if="newDataArr && newDataArr.length != 0 && newDataArr != undefined">
|
||||
<div v-if="title == '类型'" style="display:flex; flex-wrap: wrap;">
|
||||
<el-card v-for="(n, i) in newDataArr[0].type_data" :key="i"
|
||||
style="width: 150px; margin-bottom: 20px; text-align: center">
|
||||
<div v-if="title == '类型'" style="display: flex; flex-wrap: wrap">
|
||||
<el-card
|
||||
v-for="(n, i) in newDataArr[0].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: 30px; font-weight: bold">{{ n.quantity }}</span>
|
||||
<span style="font-size: 15px">{{ n.name }}</span
|
||||
><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{ n.quantity || n.quantity == 0 ? n.quantity : '-' }}</span>
|
||||
<!-- <span v-if="n.name=='速度'">km/h</span> -->
|
||||
</div>
|
||||
<div>
|
||||
|
@ -24,44 +28,67 @@
|
|||
<el-card v-show="echartArr.includes('数值')" style="width: 150px; margin-bottom: 20px; text-align: center">
|
||||
<div v-if="newDataArr && newDataArr.length != 0 && newDataArr != undefined">
|
||||
<div v-if="title == '类型'">
|
||||
<span style="font-size: 15px;">类型数量总和</span><br />
|
||||
<span style="font-size: 15px">类型数量总和</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">
|
||||
{{ getTotal(newDataArr) }}
|
||||
</span>
|
||||
</div>
|
||||
<div style="font-size: 30px; font-weight: bold"
|
||||
v-if="title == '速度' && dataArr.length != 0 && dataArr != undefined">
|
||||
<span style="font-size: 15px;">速度</span><br />
|
||||
|
||||
<div style="font-size: 30px; font-weight: bold" v-if="title == '速度' && dataArr.length != 0 && dataArr != undefined">
|
||||
<span style="font-size: 15px">速度</span><br />
|
||||
|
||||
<!-- <span style="font-size: 30px; font-weight: bold">{{ typeValue.speed }}</span> -->
|
||||
<span style="font-size: 30px; font-weight: bold">{{ newDataArr[0].speed }}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">km/h</span>
|
||||
<span style="font-size: 30px; font-weight: bold">
|
||||
<span v-if="(newDataArr[0].speed && newDataArr[0].speed != -1) || newDataArr[0].speed == 0">
|
||||
{{
|
||||
newDataArr[0].speed > 0 || newDataArr[0].speed == 0
|
||||
? newDataArr[0].speed
|
||||
: Math.abs(newDataArr[0].speed)
|
||||
}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</span>
|
||||
<span style="font-size: 20px; font-weight: 200">
|
||||
<span v-if="(newDataArr[0].speed && newDataArr[0].speed != -1) || newDataArr[0].speed == 0">
|
||||
{{ newDataArr[0].speed > 0 || newDataArr[0].speed == 0 ? 'km/h' : 'pix/s' }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div style="font-size: 30px; font-weight: bold"
|
||||
v-if="title == '流量' && dataArr.length != 0 && dataArr != undefined">
|
||||
<span style="font-size: 15px;">流量</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{ newDataArr[0].flow }}</span>
|
||||
<div style="font-size: 30px; font-weight: bold" v-if="title == '流量' && dataArr.length != 0 && dataArr != undefined">
|
||||
<span style="font-size: 15px">流量</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{
|
||||
newDataArr[0].flow || newDataArr[0].flow == 0 ? newDataArr[0].flow : '-'
|
||||
}}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</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">{{ newDataArr[0].headway }}</span>
|
||||
<span style="font-size: 15px">车头时距</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{
|
||||
newDataArr[0].headway || newDataArr[0].headway == 0
|
||||
? newDataArr[0].headway == -1
|
||||
? '-'
|
||||
: newDataArr[0].headway
|
||||
: '-'
|
||||
}}</span>
|
||||
<!-- <span style="font-size: 30px; font-weight: bold">100</span> -->
|
||||
<span style="font-size: 20px; font-weight: 200">秒</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">{{ queue }}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</span>
|
||||
<span style="font-size: 15px">排队数</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{ queue || queue == 0 ? queue : '-' }}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</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">{{ newDataArr[0].n_stay }}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</span>
|
||||
<span style="font-size: 15px">检测数</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{
|
||||
newDataArr[0].n_stay || newDataArr[0].n_stay == 0 ? newDataArr[0].n_stay : '-'
|
||||
}}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</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">{{ newDataArr[0].ave_delay }}</span>
|
||||
<span style="font-size: 15px">延误</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{
|
||||
newDataArr[0].ave_delay || newDataArr[0].ave_delay == 0 ? newDataArr[0].ave_delay : '-'
|
||||
}}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">秒</span>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -79,9 +106,17 @@
|
|||
<div class="tableTitle" v-if="newDataArr && newDataArr.length != 0">
|
||||
<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 + '-' + '表格' + '-' +
|
||||
triggerType }}</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 + '-' + '表格' + '-' + triggerType }}</span>
|
||||
</div>
|
||||
<div class="tableTime">
|
||||
{{ newDataArr[0].time ? newDataArr[0].time : '' }}
|
||||
|
@ -96,28 +131,67 @@
|
|||
</div>
|
||||
<div class="border" v-if="echartArr.includes('曲线图')">
|
||||
<detailDialog />
|
||||
<lineChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="newDataArr"
|
||||
:status="triggerType" :title="title" :typeValue="typeValue" ref="lineChartRef" />
|
||||
<lineChart
|
||||
:componentName="componentName"
|
||||
:chartName="chartName"
|
||||
:pageType="pageType"
|
||||
:list="newDataArr"
|
||||
:status="triggerType"
|
||||
:title="title"
|
||||
:typeValue="typeValue"
|
||||
ref="lineChartRef"
|
||||
/>
|
||||
</div>
|
||||
<div class="border" v-if="echartArr.includes('饼状图')">
|
||||
<detailDialog />
|
||||
<pieChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="newDataArr"
|
||||
:status="triggerType" :title="title" :typeValue="typeValue" ref="pieChartRef" />
|
||||
<pieChart
|
||||
:componentName="componentName"
|
||||
:chartName="chartName"
|
||||
:pageType="pageType"
|
||||
:list="newDataArr"
|
||||
:status="triggerType"
|
||||
:title="title"
|
||||
:typeValue="typeValue"
|
||||
ref="pieChartRef"
|
||||
/>
|
||||
</div>
|
||||
<div class="border" v-if="echartArr.includes('均值图')">
|
||||
<detailDialog />
|
||||
<avgChart ref="avgChartRef" :componentName="componentName" :chartName="chartName" :pageType="pageType"
|
||||
:list="newDataArr" :status="triggerType" :title="title" :typeValue="typeValue" />
|
||||
<avgChart
|
||||
ref="avgChartRef"
|
||||
:componentName="componentName"
|
||||
:chartName="chartName"
|
||||
:pageType="pageType"
|
||||
:list="newDataArr"
|
||||
:status="triggerType"
|
||||
:title="title"
|
||||
:typeValue="typeValue"
|
||||
/>
|
||||
</div>
|
||||
<div class="border" v-if="echartArr.includes('直方图')">
|
||||
<detailDialog />
|
||||
<barChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="newDataArr"
|
||||
:status="triggerType" :title="title" :typeValue="typeValue" ref="barChartRef" />
|
||||
<barChart
|
||||
:componentName="componentName"
|
||||
:chartName="chartName"
|
||||
:pageType="pageType"
|
||||
:list="newDataArr"
|
||||
:status="triggerType"
|
||||
:title="title"
|
||||
:typeValue="typeValue"
|
||||
ref="barChartRef"
|
||||
/>
|
||||
</div>
|
||||
<div class="border" v-if="echartArr.includes('矩阵图')">
|
||||
<detailDialog />
|
||||
<thermalChart :componentName="componentName" :pageType="pageType" :list="newDataArr"
|
||||
:status="triggerType" :title="title" :typeValue="typeValue" ref="ODChartRef" />
|
||||
<thermalChart
|
||||
:componentName="componentName"
|
||||
:pageType="pageType"
|
||||
:list="newDataArr"
|
||||
:status="triggerType"
|
||||
:title="title"
|
||||
:typeValue="typeValue"
|
||||
ref="ODChartRef"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -133,7 +207,7 @@ import regionTable from '../chart/regionTable.vue';
|
|||
import thermalChart from '../chart/thermalChart.vue';
|
||||
export default {
|
||||
name: 'typeChart', //类型组件
|
||||
props: ['typeValue', 'pageType', 'triggerType', 'dataArr', 'echartArr', 'componentName', 'title', 'chartName','startEndData'],
|
||||
props: ['typeValue', 'pageType', 'triggerType', 'dataArr', 'echartArr', 'componentName', 'title', 'chartName', 'startEndData'],
|
||||
components: {
|
||||
lineChart,
|
||||
barChart,
|
||||
|
@ -160,16 +234,12 @@ export default {
|
|||
newDataArr: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// 计算类型数量的总和
|
||||
getDataArr(val) {
|
||||
this.newDataArr = val
|
||||
this.getNewQueue(this.newDataArr)
|
||||
this.newDataArr = val;
|
||||
this.getNewQueue(this.newDataArr);
|
||||
},
|
||||
getTotal(dataArr) {
|
||||
if (this.title == '类型') {
|
||||
|
@ -179,33 +249,31 @@ export default {
|
|||
}
|
||||
},
|
||||
getNewQueue(val) {
|
||||
|
||||
if (val[0].n_queue) {
|
||||
this.queue = val[0].n_queue;
|
||||
}
|
||||
if (val[0].ave_queue) {
|
||||
}
|
||||
if (val[0].ave_queue) {
|
||||
this.queue = val[0].ave_queue;
|
||||
}
|
||||
if (val[0].headway) {
|
||||
}
|
||||
if (val[0].headway) {
|
||||
this.newDataArr[0].headway = val[0].headway;
|
||||
}
|
||||
if (val[0].ave_headway) {
|
||||
}
|
||||
if (val[0].ave_headway) {
|
||||
this.newDataArr[0].headway = val[0].ave_headway;
|
||||
}
|
||||
if (val[0].n_stay) {
|
||||
if (val[0].n_stay) {
|
||||
this.newDataArr[0].n_stay = val[0].n_stay;
|
||||
}
|
||||
if (val[0].ave_stay) {
|
||||
}
|
||||
if (val[0].ave_stay) {
|
||||
this.newDataArr[0].n_stay = val[0].ave_stay;
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 获取类型的总数量
|
||||
},
|
||||
mounted() { },
|
||||
mounted() {},
|
||||
watch: {
|
||||
// 监听触发数据
|
||||
// dataArr: {
|
||||
|
@ -215,7 +283,6 @@ export default {
|
|||
// this.getNewQueue(newVal);
|
||||
// }
|
||||
// },
|
||||
|
||||
// immediate: true
|
||||
// }
|
||||
// typeValue:{
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
:name="o.analogAreaComponentId">
|
||||
|
||||
<!--触发的组件 -->
|
||||
<typeChart ref="typeChartRef" v-if="o.timeMode === '触发'"
|
||||
<typeChart ref="typeChartRef" v-if="o.timeMode === '实时触发'"
|
||||
:pageType="o.graphicType" :triggerType="o.timeMode"
|
||||
:componentName="o.componentName" :dataArr="o.trigger"
|
||||
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
|
||||
:chartName="o.combinationName" :typeValue="typeTimeMode"
|
||||
:startEndData="{ start: o.startSectionNames, end: o.endSectionNames }" />
|
||||
<typeChart ref="typeChartRef1" v-if="o.timeMode === '周期时刻'"
|
||||
<typeChart ref="typeChartRef1" v-if="o.timeMode === '固定时刻'"
|
||||
:pageType="o.graphicType" :triggerType="o.timeMode"
|
||||
:componentName="o.componentName" :dataArr="o.cycleTimeData"
|
||||
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
|
||||
|
@ -40,9 +40,9 @@
|
|||
:startEndData="{ start: o.startSectionNames, end: o.endSectionNames }"
|
||||
/>
|
||||
|
||||
<!-- 周期统计的组件 -->
|
||||
<!-- 固定间隔的组件 -->
|
||||
<typeChart ref="typeChartRef2" style="width: 100%;"
|
||||
v-if="o.timeMode === '周期统计'" :pageType="o.graphicType"
|
||||
v-if="o.timeMode === '固定间隔'" :pageType="o.graphicType"
|
||||
:triggerType="o.timeMode" :componentName="o.componentName"
|
||||
:dataArr="o.cycleStatisticsData" :echartArr="o.presentationForm"
|
||||
:title="o.componentName.split('_')[0]" :chartName="o.combinationName"
|
||||
|
@ -87,14 +87,14 @@ export default {
|
|||
return [];
|
||||
}
|
||||
},
|
||||
// 周期时刻数据
|
||||
// 固定时刻数据
|
||||
cycleTimeData: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
//周期统计
|
||||
//固定间隔
|
||||
cycleStatisticsData: {
|
||||
type: Array,
|
||||
default() {
|
||||
|
@ -136,7 +136,7 @@ export default {
|
|||
|
||||
//触发的类型数值看板显示
|
||||
typeTimeMode: {},
|
||||
// 周期时刻的数值看板展示
|
||||
// 固定时刻的数值看板展示
|
||||
typeCycleTimeData: {},
|
||||
typeCycleStatistics: {},
|
||||
|
||||
|
@ -191,12 +191,12 @@ export default {
|
|||
if (item.title == val.combinationName) {
|
||||
this.classify.push(val);
|
||||
item.children.push(val);
|
||||
if (val.timeMode == '周期统计' || this.cycleStatisticsData.length == 0) {
|
||||
if (val.timeMode == '固定间隔' || this.cycleStatisticsData.length == 0) {
|
||||
|
||||
item.cycleStatisticsData = val.cycleStatisticsData
|
||||
|
||||
}
|
||||
if (val.timeMode == '周期时刻' || this.cycleTimeData.length == 0) {
|
||||
if (val.timeMode == '固定时刻' || this.cycleTimeData.length == 0) {
|
||||
item.cycleTimeData = val.cycleTimeData
|
||||
}
|
||||
}
|
||||
|
@ -278,8 +278,8 @@ export default {
|
|||
|
||||
if (newVal != undefined && newVal.length != 0) {
|
||||
newVal.forEach(ele => {
|
||||
if (ele.timeMode == '周期统计'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频",'周期统计')
|
||||
if (ele.timeMode == '固定间隔'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频",'固定间隔')
|
||||
this.$nextTick(() => {
|
||||
// var thatNN = this;
|
||||
ele.cycleStatisticsData.forEach(item => {
|
||||
|
@ -288,13 +288,13 @@ export default {
|
|||
}
|
||||
})
|
||||
if (this.$refs.typeChartRef2 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef2, ele.timeMode)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (ele.timeMode == '周期时刻'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频",'周期时刻')
|
||||
if (ele.timeMode == '固定时刻'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频",'固定时刻')
|
||||
this.$nextTick(() => {
|
||||
ele.cycleTimeData.forEach(item => {
|
||||
if (item.type_data != null) {
|
||||
|
@ -306,13 +306,13 @@ export default {
|
|||
|
||||
})
|
||||
if (this.$refs.typeChartRef1 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef1, ele.timeMode)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
if(ele.timeMode == '周期统计'&&this.$route.query.type=='离线视频'){
|
||||
if(ele.timeMode == '固定间隔'&&this.$route.query.type=='离线视频'){
|
||||
|
||||
if(this.cycleHistoryData.CycleStatisticsData!=undefined&&this.cycleHistoryData.CycleStatisticsData.lenght!=0){
|
||||
this.cycleHistoryData.CycleStatisticsData.forEach(ne => {
|
||||
|
@ -335,8 +335,8 @@ export default {
|
|||
|
||||
})
|
||||
if (this.$refs.typeChartRef2 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef2, '周期统计')
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef2, '固定间隔')
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -345,7 +345,7 @@ export default {
|
|||
|
||||
|
||||
|
||||
} if(ele.timeMode == '周期时刻'&&this.$route.query.type=='离线视频'){
|
||||
} if(ele.timeMode == '固定时刻'&&this.$route.query.type=='离线视频'){
|
||||
if(this.cycleHistoryData.CycleTimeData!=undefined &&this.cycleHistoryData.CycleTimeData.lenght!=0){
|
||||
this.cycleHistoryData.CycleTimeData.forEach(ne => {
|
||||
if(ne.component_id== ele.analogAreaComponentId ){
|
||||
|
@ -368,9 +368,9 @@ export default {
|
|||
}
|
||||
})
|
||||
if (this.$refs.typeChartRef1 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
|
||||
this.getRef(this.$refs.typeChartRef1, '周期时刻')
|
||||
this.getRef(this.$refs.typeChartRef1, '固定时刻')
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -408,8 +408,8 @@ export default {
|
|||
}
|
||||
})
|
||||
if (this.$refs.typeChartRef2 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef2, '周期统计')
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef2, '固定间隔')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -435,8 +435,8 @@ export default {
|
|||
|
||||
})
|
||||
if (this.$refs.typeChartRef1 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef1, '周期时刻')
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef1, '固定时刻')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -461,11 +461,11 @@ export default {
|
|||
var _this = this
|
||||
if (newVal.length != 0 && _this.sectionData) {
|
||||
_this.classify.forEach((ele, index) => {
|
||||
if (ele.trigger == undefined && ele.timeMode == '触发') {
|
||||
if (ele.trigger == undefined && ele.timeMode == '实时触发') {
|
||||
ele.trigger = [];
|
||||
}
|
||||
newVal.forEach(item => {
|
||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
|
||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '实时触发') {
|
||||
// console.log(ele.analogAreaComponentId, 'analogAreaComponentId');
|
||||
// console.log(item.component_id, 'component_id');
|
||||
if (ele.trigger.length == 10) {
|
||||
|
@ -492,7 +492,7 @@ export default {
|
|||
let itemTypeChart = _this.$refs.typeChartRef[i]
|
||||
if (itemTypeChart.dataArr != undefined && itemTypeChart.dataArr.length != 0) {
|
||||
if (itemTypeChart.echartArr.includes('时间曲线图')) {
|
||||
_this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine(_this.$refs.typeChartRef[i].dataArr, _this.$refs.typeChartRef[i].componentName.split('_')[0], '触发')
|
||||
_this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine(_this.$refs.typeChartRef[i].dataArr, _this.$refs.typeChartRef[i].componentName.split('_')[0], '实时触发')
|
||||
}
|
||||
if (itemTypeChart.echartArr.includes('数值')) {
|
||||
_this.$refs.typeChartRef[i].getDataArr(_this.$refs.typeChartRef[i].dataArr)
|
||||
|
@ -526,11 +526,11 @@ export default {
|
|||
},
|
||||
immediate: true
|
||||
},
|
||||
// 周期时刻的数据
|
||||
// 固定时刻的数据
|
||||
cycleTimeData: {
|
||||
handler(newVal) {
|
||||
// 监听到打印周期时刻数据
|
||||
// console.log(newVal, '周期时刻数据');
|
||||
// 监听到打印固定时刻数据
|
||||
// console.log(newVal, '固定时刻数据');
|
||||
|
||||
if (newVal != undefined && newVal.length != 0 && this.sectionData) {
|
||||
var thatN = this;
|
||||
|
@ -538,7 +538,7 @@ export default {
|
|||
|
||||
newVal.forEach(item => {
|
||||
|
||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期时刻') {
|
||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '固定时刻') {
|
||||
|
||||
if (ele.cycleTimeData.length == 10) {
|
||||
ele.cycleTimeData.pop();
|
||||
|
@ -554,7 +554,7 @@ export default {
|
|||
item.time = item.time.split('.')[0];
|
||||
}
|
||||
if (item.type_data != null) {
|
||||
// 周期时刻的类型数据
|
||||
// 固定时刻的类型数据
|
||||
thatN.typeCycleTimeData = item;
|
||||
}
|
||||
ele.cycleTimeData.unshift(item);
|
||||
|
@ -562,13 +562,13 @@ export default {
|
|||
// thatN.$nextTick(() => {
|
||||
if (thatN.$refs.typeChartRef1 != undefined) {
|
||||
// console.log("thatN.$refs.typeChartRef1",thatN.$refs.typeChartRef1)
|
||||
// 轮循周期时刻生成的各类组件
|
||||
// 轮循固定时刻生成的各类组件
|
||||
for (let i = 0; i < thatN.$refs.typeChartRef1.length; i++) {
|
||||
let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i]
|
||||
if (itemTypeChartRef1.length != 0 && itemTypeChartRef1.dataArr != undefined && itemTypeChartRef1.dataArr.length != 0) {
|
||||
|
||||
if (itemTypeChartRef1.echartArr.includes('时间曲线图')) {
|
||||
thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(thatN.$refs.typeChartRef1[i].dataArr, thatN.$refs.typeChartRef1[i].componentName.split('_')[0], '周期时刻')
|
||||
thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(thatN.$refs.typeChartRef1[i].dataArr, thatN.$refs.typeChartRef1[i].componentName.split('_')[0], '固定时刻')
|
||||
}
|
||||
if (itemTypeChartRef1.echartArr.includes('数值')) {
|
||||
thatN.$refs.typeChartRef1[i].getDataArr(thatN.$refs.typeChartRef1[i].dataArr)
|
||||
|
@ -605,26 +605,26 @@ export default {
|
|||
// _thatN.classify.forEach((ele, index) => {
|
||||
|
||||
// // newVal.forEach(item => {
|
||||
// if (ele.timeMode == '周期时刻') {
|
||||
// if (ele.timeMode == '固定时刻') {
|
||||
// if (ele.cycleTimeData.length == 10) {
|
||||
// ele.cycleTimeData.pop();
|
||||
// }
|
||||
// // item.time = item.time.split('.')[0];
|
||||
// // if (item.type_data != null) {
|
||||
// // // 周期时刻的类型数据
|
||||
// // // 固定时刻的类型数据
|
||||
// // _thatN.typeCycleTimeData = item;
|
||||
// // }
|
||||
// // ele.cycleTimeData.unshift(item);
|
||||
// // _thatN.$nextTick(() => {
|
||||
// if (_thatN.$refs.typeChartRef1 != undefined) {
|
||||
// // console.log("thatN.$refs.typeChartRef1",_thatN.$refs.typeChartRef1)
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
// // 轮循固定时刻生成的各类组件
|
||||
// for (let i = 0; i < _thatN.$refs.typeChartRef1.length; i++) {
|
||||
// let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i]
|
||||
// if (itemTypeChartRef1.length != 0 && itemTypeChartRef1.dataArr != undefined && itemTypeChartRef1.dataArr.length != 0) {
|
||||
|
||||
// if (itemTypeChartRef1.echartArr.includes('时间曲线图')) {
|
||||
// _thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(_thatN.$refs.typeChartRef1[i].dataArr, _thatN.$refs.typeChartRef1[i].componentName.split('_')[0], '周期时刻')
|
||||
// _thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(_thatN.$refs.typeChartRef1[i].dataArr, _thatN.$refs.typeChartRef1[i].componentName.split('_')[0], '固定时刻')
|
||||
// }
|
||||
// if (itemTypeChartRef1.echartArr.includes('数值')) {
|
||||
// _thatN.$refs.typeChartRef1[i].getDataArr(_thatN.$refs.typeChartRef1[i].dataArr)
|
||||
|
@ -657,15 +657,15 @@ export default {
|
|||
},
|
||||
immediate: true
|
||||
},
|
||||
//周期统计
|
||||
//固定间隔
|
||||
cycleStatisticsData: {
|
||||
handler(newVal) {
|
||||
console.log("周期统计", newVal)
|
||||
console.log("固定间隔", newVal)
|
||||
if (newVal != undefined && newVal.length != 0 && this.sectionData) {
|
||||
var that = this;
|
||||
that.classify.forEach((ele, index) => {
|
||||
newVal.forEach(item => {
|
||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期统计') {
|
||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '固定间隔') {
|
||||
if (ele.cycleStatisticsData.length == 10) {
|
||||
ele.cycleStatisticsData.pop();
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ export default {
|
|||
|
||||
if (itemTypeChartRef2.length != 0 && itemTypeChartRef2.dataArr != undefined && itemTypeChartRef2.dataArr.length != 0) {
|
||||
if (itemTypeChartRef2.echartArr.includes('时间曲线图')) {
|
||||
that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef2[i].dataArr, that.$refs.typeChartRef2[i].componentName.split('_')[0], '周期统计')
|
||||
that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef2[i].dataArr, that.$refs.typeChartRef2[i].componentName.split('_')[0], '固定间隔')
|
||||
}
|
||||
if (itemTypeChartRef2.echartArr.includes('数值')) {
|
||||
that.$refs.typeChartRef2[i].getDataArr(that.$refs.typeChartRef2[i].dataArr)
|
||||
|
@ -723,7 +723,7 @@ export default {
|
|||
|
||||
// var _that = this
|
||||
// _that.classify.forEach(ele => {
|
||||
// if (ele.timeMode == '周期统计') {
|
||||
// if (ele.timeMode == '固定间隔') {
|
||||
// if (ele.cycleStatisticsData.length == 10) {
|
||||
// ele.cycleStatisticsData.pop();
|
||||
// }
|
||||
|
@ -739,7 +739,7 @@ export default {
|
|||
// if (itemTypeChartRef2.length != 0 && itemTypeChartRef2.dataArr != undefined && itemTypeChartRef2.dataArr.length != 0) {
|
||||
// // this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0])
|
||||
// if (itemTypeChartRef2.echartArr.includes('时间曲线图')) {
|
||||
// _that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(_that.$refs.typeChartRef2[i].dataArr, _that.$refs.typeChartRef2[i].componentName.split('_')[0], '周期统计')
|
||||
// _that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(_that.$refs.typeChartRef2[i].dataArr, _that.$refs.typeChartRef2[i].componentName.split('_')[0], '固定间隔')
|
||||
// }
|
||||
// if (itemTypeChartRef2.echartArr.includes('数值')) {
|
||||
// _that.$refs.typeChartRef2[i].getDataArr(_that.$refs.typeChartRef2[i].dataArr)
|
||||
|
|
5134
src/views/index.vue
5134
src/views/index.vue
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue