Browse Source

bug

wangqin
zhoule 9 months ago
parent
commit
833fdeba42
  1. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  2. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js
  4. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/index.vue
  5. 162
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue

47
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -34,8 +34,9 @@
<div class="body"> <div class="body">
<div> <div>
<WgtTitle :title="'感知事件趋势分析'"></WgtTitle> <WgtTitle :title="'感知事件趋势分析'"></WgtTitle>
<Empty v-show="!chart1List || chart1List.length <= 0" text="暂无数据..."></Empty> <!-- <Empty v-show="!chart1List || chart1List.length <= 0" text="暂无数据..."></Empty> -->
<div v-show="chart1List || chart1List.length > 0" id="chart1" class="btnChart" /> <!-- <div v-show="chart1List || chart1List.length > 0" id="chart1" class="btnChart" />-->
<div id="chart1" class="btnChart" />
</div> </div>
<div> <div>
@ -249,6 +250,43 @@ export default {
let data = res.data; let data = res.data;
chart1.series[0].data = []; chart1.series[0].data = [];
chart1.xAxis.data = []; chart1.xAxis.data = [];
//
if (this.type == "month") {
let daysInMonth = moment(this.dateTime, "YYYY-MM").daysInMonth();
let sData = {};
data.forEach(it => sData[parseInt(it.day.slice(-2))] = it.number)
let pData = []
for (let index = 1; index <= daysInMonth; index++) {
pData.push({
day: index,
number: sData[index] || 0
})
}
data = pData;
}
//
if (this.type == "quarter") {
let quarterMap = {
1: [1, 2, 3],
2: [4, 5, 6],
3: [7, 8, 9],
4: [10, 11, 12],
};
let sData = {}
data.forEach(it => sData[it.month] = it.number);
let pData = []
for (let index = 0; index < 3; index++) {
let month = quarterMap[this.quarter][index];
pData.push({
month: month,
number: sData[month] || 0
})
}
data = pData;
}
if (data.length > 0) { if (data.length > 0) {
const maxObject = data.reduce((prev, current) => const maxObject = data.reduce((prev, current) =>
current.number > prev.number ? current : prev current.number > prev.number ? current : prev
@ -261,10 +299,11 @@ export default {
xData.push(it.month + "月"); xData.push(it.month + "月");
} }
if (this.type == "month") { if (this.type == "month") {
xData.push(it.day.split("-")[2] + "日"); // xData.push(it.day.split("-")[2] + "");
xData.push(it.day + "日");
} }
if (this.type == "date") { if (this.type == "date") {
xData.push(it.time.split(" ")[1] + "时"); xData.push(it.time + "时");
} }
if (this.type == "quarter") { if (this.type == "quarter") {
xData.push(it.month + "月"); xData.push(it.month + "月");

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/index.vue

@ -52,9 +52,10 @@ export default {
let texts = []; let texts = [];
let datas = []; let datas = [];
data.forEach((it) => { data.forEach((it,index) => {
if(index > 9) return;
texts.push(it.sectionName); texts.push(it.sectionName);
datas.push(it.number); datas.push(it.number2);
}); });
chartsStatistics.yAxis[0].data = texts; chartsStatistics.yAxis[0].data = texts;

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js

@ -82,6 +82,8 @@ var options = {
show: true, show: true,
color: "#fff", color: "#fff",
fontSize: 10, fontSize: 10,
// interval: 0,
// rotate: -20
}, },
}, },
yAxis: [ yAxis: [

8
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/index.vue

@ -47,15 +47,15 @@ export default {
let texts = []; let texts = [];
let datas = []; let datas = [];
const maxObject = data.reduce((prev, current) => const maxObject = data.reduce((prev, current) =>
current.number > prev.number ? current : prev current.number2 > prev.number2 ? current : prev
); );
data.forEach((it) => { data.forEach((it) => {
texts.push(it.sectionName); texts.push(it.sectionName);
if (it.number == maxObject.number) { if (it.number2 == maxObject.number2) {
datas.push({ datas.push({
value: it.number, value: it.number2,
itemStyle: { itemStyle: {
color: { color: {
type: "linear", type: "linear",
@ -80,7 +80,7 @@ export default {
}); });
} else { } else {
datas.push({ datas.push({
value: it.number, value: it.number2,
itemStyle: { itemStyle: {
borderRadius: 6, borderRadius: 6,
}, },

162
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue

@ -36,7 +36,7 @@
<!-- 分页 --> <!-- 分页 -->
<div class="footer"> <div class="footer">
<Pagination @current-change="getData" @size-change="onSizeChange" width="'100%'" :page-sizes="[10, 20, 30, 40, 50]" <Pagination @current-change="getData" @size-change="onSizeChange" width="'100%'" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize" :current-page.sync="pageNum" layout="total, sizes, prev, pager, next" :total="50"> :page-size="pageSize" :current-page.sync="pageNum" layout="total, sizes, prev, pager, next" :total="10">
</Pagination> </Pagination>
</div> </div>
</div> </div>
@ -61,164 +61,44 @@ export default {
return { return {
tableData: [{ tableData: [{
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '大学城-长活'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '长湑-孝里'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '孝里-平阴北平阴北-平阴'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '平阴-平阴南'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '平阴南-东平'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '平明-平阴南'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '平明南-东平'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '孝里-平阴北平明北-平明'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '平阴-平阴南'
}, { }, {
date: '2023-12-31 13:00:00', date: '2023-12-31 13:00:00',
name: '2640.78m', name: '畅通',
address: 'K100+000-K110+000' address: '平阴-平阴南'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, , {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, {
date: '2023-12-31 13:00:00',
name: '2640.78m',
address: 'K100+000-K110+000'
}, },
], ],
formList: [], formList: [],

Loading…
Cancel
Save