Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
刘朋 1 year ago
parent
commit
b06c3e818a
  1. 2
      ruoyi-ui/src/api/event/perceiveEvent.js
  2. 23
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue
  5. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  6. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  7. 1383
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  8. 39
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  10. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  11. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsDay/assets/charts.js
  12. 282
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue
  13. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js
  14. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue
  15. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js
  16. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts3.js
  17. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index copy.vue
  18. 542
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  19. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js
  20. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/assets/charts.js
  21. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js
  22. 280
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherInfoQuery/components/TemperatureTrend/assets/charts.js
  23. 290
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherInfoQuery/components/visibilityTrends/assets/charts.js
  24. 187
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/classification/index.vue
  25. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/assets/charts.js
  26. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/situation/index.vue
  27. 79
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorAnalysis/components/trafficIndicators/assets/chartsRadar.js
  28. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorAnalysis/components/trafficIndicators/index.vue

2
ruoyi-ui/src/api/event/perceiveEvent.js

@ -165,7 +165,7 @@ export function geTwarningTotal(query) {
export function getRoadSectionList(query) { export function getRoadSectionList(query) {
//system/status/tablist //system/status/tablist
return request({ return request({
url: '/business/roadSection/list', url: '/business/roadSection/listAll',
method: 'get', method: 'get',
params: { params: {
...query, ...query,

23
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue

@ -2,7 +2,7 @@
<BorderRadiusImage class='RoadStateCard' borderRadius="2px" <BorderRadiusImage class='RoadStateCard' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px"> borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<div class="left"> <div class="left">
<img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png` )"> <img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)">
<!-- <img :src="require(`./test.png`)"> --> <!-- <img :src="require(`./test.png`)"> -->
</div> </div>
<div class="right"> <div class="right">
@ -15,10 +15,10 @@
<div class="controls"> <div class="controls">
<Button :style="{ background: firstBtnColor, width: '50%' }" <Button :style="{ background: firstBtnColor, width: '50%' }"
@click.native="$emit('firstBtnClick', cardData.id)">{{ @click.native="$emit('firstBtnClick', cardData.id)">{{
firstBtnText getFirstBtnText(cardData.state)
}}</Button> }}</Button>
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor, width: '50%' }" <Button v-if="cardData.state == 4" :style="{ background: lastBtnColor, width: '50%' }"
@click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText @click.native="$emit('lastBtnClick', cardData.id)">{{ getLastBtnText(cardData.state)
}}</Button> }}</Button>
</div> </div>
</div> </div>
@ -82,7 +82,7 @@ export default {
]) ])
} }
}, },
data(){ data() {
return { return {
picUrl: './test.png' picUrl: './test.png'
} }
@ -94,6 +94,19 @@ export default {
}, },
created() { created() {
this.statusMap = statusMap; this.statusMap = statusMap;
},
methods: {
getFirstBtnText(state) {
let text = '详情';
if(state == 5) text = '去确认'
if(state == 4) text = '详情'
if(state == 3) text = '处置记录'
return text;
},
getLastBtnText(state) {
let text = '去处置';
return text;
},
} }
} }
</script> </script>

6
ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="video-container"> <div class="video-container">
<div class="header"> <div class="header" v-if="showHeader">
<div class="left"> <div class="left">
<div class="radio"> <div class="radio">
<span @click="active = 'img'" :class="{ active: active === 'img' }">图像</span> <span @click="active = 'img'" :class="{ active: active === 'img' }">图像</span>
@ -46,6 +46,10 @@ export default {
rangeIndex: { rangeIndex: {
type: Number, type: Number,
default: 0 default: 0
},
showHeader: {
type: Boolean,
default: true
} }
}, },
data() { data() {

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue

@ -29,8 +29,8 @@ export default {
pictures: { pictures: {
type: Array, type: Array,
default: () => [ default: () => [
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", // "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
"https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg", // "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
// "require('@screen/images/shareWith/message-active.svg')", // "require('@screen/images/shareWith/message-active.svg')",
// "require('@screen/images/shareWith/message.svg')", // "require('@screen/images/shareWith/message.svg')",
// "require('@screen/images/shareWith/website-active.svg')", // "require('@screen/images/shareWith/website-active.svg')",

29
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -1,21 +1,23 @@
<template> <template>
<Dialog v-model="modelVisible" title="事件详情"> <Dialog v-model="modelVisible" title="事件详情">
<div class="EventDetail"> <div class="EventDetail" :style="{ height: (activeName == '-1' || activeName == '0') ? '380px' : '768px'}">
<Form :formList="formList" :dFormData="formData" label-width="100px" /> <Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic"> <div class="video-pic">
<Video style="height: 100%;" /> <Video style="height: 100%;" :showHeader="activeName != '-1'"/>
<Video v-if="activeName != '-1'" style="height: 100%;" />
<Carousel style="flex: 1" :pictures="formData.pictures"/> <Carousel v-else style="flex: 1" :pictures="formData.pictures"/>
</div> </div>
<TimeLine1 :data="timeLine1List" /> <TimeLine1 v-if="activeName == '1' || activeName == '2'" :data="timeLine1List" />
<TimeLine2 :data="timeLine2List" style="flex: 1;" /> <TimeLine2 v-if="activeName == '1' || activeName == '2'" :data="timeLine2List" style="flex: 1;" />
</div> </div>
<template #footer> <template #footer>
<Button style="padding: 0 24px;" @click.native="modelVisible = false">确认</Button> <Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;" @click.native="modelVisible = false">误报</Button>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }" @click.native="modelVisible = false"> 取消</Button> <Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }" @click.native="modelVisible = false">取消</Button>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;" @click.native="modelVisible = false">确认</Button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -50,6 +52,7 @@ export default {
}, },
props: { props: {
visible: Boolean, visible: Boolean,
activeName: String,
formData: { formData: {
type: Object, type: Object,
default: () => { } default: () => { }
@ -89,6 +92,11 @@ export default {
}, },
methods: { methods: {
getProcess() { getProcess() {
if(this.activeName == '-1' || this.activeName == '0'){
this.timeLine1List = [];
this.timeLine2List = [];
return;
}
let directionFlg = true; let directionFlg = true;
@ -146,13 +154,14 @@ export default {
display: flex; display: flex;
gap: 9px; gap: 9px;
width: 836px; width: 836px;
height: 768px; // height: 768px;
flex-direction: column; flex-direction: column;
.video-pic { .video-pic {
display: flex; display: flex;
height: 150px; height: 190px;
gap: 15px gap: 15px;
justify-content: space-around;
} }
} }
</style> </style>

20
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js

@ -716,7 +716,13 @@ export const locationMode = {
}, },
ons: { ons: {
change(value, ...args) { change(value, ...args) {
const { formList } = args.slice(-1)[0]; const { data, formList } = args.slice(-1)[0];
if(data.dcEventAccident) {
data.dcEventAccident.facilityId = null;
}
if(data.dcEventVehicleAccident) {
data.dcEventVehicleAccident.facilityId = null;
}
let facilityType = 1; let facilityType = 1;
if (value == 2) { if (value == 2) {
@ -744,7 +750,7 @@ export const locationMode = {
}).catch((err) => { }).catch((err) => {
console.log('err',err) console.log('err',err)
Message.error("查询失败", err); Message.error("查询失败1", err);
}) })
} }
@ -1129,9 +1135,9 @@ export const congestionCause = {
}, },
ons: { ons: {
input(value, ...args) { input(value, ...args) {
console.log(value); // console.log(value);
const { formList } = args.slice(-1)[0]; const { formList } = args.slice(-1)[0];
const config = formList.find((it) => it.key == "xxyy"); const config = formList.find((it) => it.key == "detailedReasons");
let ad = { let ad = {
1: [ 1: [
{ {
@ -1181,4 +1187,10 @@ export const congestionCause = {
config.options.options = value != 1 ? ad[1] : ad[2]; config.options.options = value != 1 ? ad[1] : ad[2];
}, },
}, },
visible: (data) => {
if (data?.eventSubclass != '4-1') {
return false;
}
return true;
},
}; };

1383
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js

File diff suppressed because it is too large

39
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue

@ -88,7 +88,7 @@ export default {
this.roads.push({ key: it.id, label: it.roadName }) this.roads.push({ key: it.id, label: it.roadName })
}) })
}).catch((err) => { }).catch((err) => {
Message.error("查询失败", err); Message.error("查询失败4", err);
}), }),
// //
request({ request({
@ -100,7 +100,7 @@ export default {
this.direction.push({ key: it.dictValue, label: it.dictLabel }) this.direction.push({ key: it.dictValue, label: it.dictLabel })
}) })
}).catch((err) => { }).catch((err) => {
Message.error("查询失败", err); Message.error("查询失败5", err);
}), }),
// 1 2 3 4 5 6 // 1 2 3 4 5 6
request({ request({
@ -108,9 +108,10 @@ export default {
method: "get" method: "get"
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.data.forEach(it => this.lwss.push({ key: it.id, label: it.facilityName, type: facilityType })) result.data.forEach(it => this.lwss.push({ key: it.id, label: it.facilityName, type: it.facilityType }))
}).catch((err) => { }).catch((err) => {
Message.error("查询失败", err); console.log('err', err)
Message.error("查询失败6", err);
}) })
]) ])
@ -148,9 +149,15 @@ export default {
if (this.index == 0 || this.index == 1) { if (this.index == 0 || this.index == 1) {
formData.lang = formData.lang.join(',') formData.lang = formData.lang.join(',')
} }
if (this.index == 9) { if (formData.endStakeMark) {
let endStakeMark = formData.endStakeMark; let endStakeMark = formData.endStakeMark;
formData.dcEventAbnormalWeather.endStakeMark = (endStakeMark && endStakeMark.length > 0) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : ''; let strMark = (endStakeMark && endStakeMark.length > 0) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : '';
if (this.index == 3) {
formData.dcEventTrafficCongestion.endStakeMark = strMark;
}
if (this.index == 9) {
formData.dcEventAbnormalWeather.endStakeMark = strMark;
}
formData.endStakeMark = ''; formData.endStakeMark = '';
} }
// console.log('formData',formData) // console.log('formData',formData)
@ -163,19 +170,17 @@ export default {
data: { data: {
...formData, ...formData,
eventType: Number(this.index) + 1, eventType: Number(this.index) + 1,
stakeMark: (stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '', stakeMark: stakeMark ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
} }
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
}).catch(() => {
Message.error("提交失败");
}).finally(() => {
this.submitting = false;
}) })
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
}).finally(() => {
this.submitting = false;
})
}) })

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js

@ -109,7 +109,7 @@ export const gjSearchFormList = [
required: false, required: false,
type: "datePicker", type: "datePicker",
options: { options: {
type: "daterange", type: "datetimerange",
format: "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss", valueFormat: "yyyy-MM-dd HH:mm:ss",
}, },

20
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -43,7 +43,7 @@
</div> </div>
<!-- "详情"弹出框 --> <!-- "详情"弹出框 -->
<EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" @update:value="handleClose" /> <EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" :activeName="activeName" @update:value="handleClose" />
<!-- "新增"弹出框 --> <!-- "新增"弹出框 -->
<FormEvent :visible="isShowAddNew" @close="onCloseAddNew" /> <FormEvent :visible="isShowAddNew" @close="onCloseAddNew" />
</div> </div>
@ -87,6 +87,11 @@ const directionMapping = {
'2': '中', '2': '中',
'3': '下行' '3': '下行'
} }
const gzDirectionMapping = {
'1': '菏泽方向',
'2': '双向',
'3': '济南方向'
}
const warningStateMapping = { const warningStateMapping = {
1: '上报', 1: '上报',
2: '已完成', 2: '已完成',
@ -184,7 +189,7 @@ export default {
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => { result.rows.forEach(it => {
it.stringEventSource = warningSourceMapping[it.warningSource]; it.stringEventSource = it?.warningSource ? warningSourceMapping[it?.warningSource] : '';
it.stringDirection = directionMapping[it.direction] || it.direction; it.stringDirection = directionMapping[it.direction] || it.direction;
it.startTime = it.warningTime; it.startTime = it.warningTime;
@ -205,6 +210,13 @@ export default {
params: this.searchData, params: this.searchData,
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.stringDirection = gzDirectionMapping[it.direction] || it.direction;
// if (it.otherConfig) {
// let otherConfig = JSON.parse(it.otherConfig);
// it.pictures = otherConfig.pictures || [];
// }
})
this.data = result.rows; this.data = result.rows;
this.total = result.total; this.total = result.total;
}); });
@ -290,7 +302,7 @@ export default {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
let data = result.data; let data = result.data;
data.stringEventSource = warningSourceMapping[data.warningSource]; data.stringEventSource = data?.warningSource ? warningSourceMapping[data.warningSource] : '';
data.direction = directionMapping[data.direction] || data.direction; data.direction = directionMapping[data.direction] || data.direction;
data.startTime = data.warningTime; data.startTime = data.warningTime;
data.stringEventState = warningStateMapping[data.warningState]; data.stringEventState = warningStateMapping[data.warningState];
@ -341,7 +353,7 @@ export default {
...this.searchData, ...this.searchData,
eventType: data.eventType, eventType: data.eventType,
eventSources: data.eventSources, eventSources: data.eventSources,
warningSource: data.warningSource, warningSource: data?.warningSource || '',
direction: data.direction, direction: data.direction,
startTime: daterange && daterange.length > 0 ? daterange[0] : "", startTime: daterange && daterange.length > 0 ? daterange[0] : "",
endTime: daterange && daterange.length > 0 ? daterange[1] : "", endTime: daterange && daterange.length > 0 ? daterange[1] : "",

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsDay/assets/charts.js

@ -49,7 +49,7 @@ var options = {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "(件)", name: "(起) ",
nameTextStyle: { nameTextStyle: {
color: "#E5E7E8", color: "#E5E7E8",
fomtSize: 10, fomtSize: 10,

282
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue

@ -1,39 +1,86 @@
<template> <template>
<div class='congestion'> <div class="congestion">
<WgtTitle :title="'事件分析'"></WgtTitle> <WgtTitle :title="'事件分析'"></WgtTitle>
<div class="main-board"> <div class="main-board">
<div class="board board-m"> <div class="board board-m">
<div class="searchPanel_1"> <div class="searchPanel_1">
<!-- <el-from ref="form"> --> <!-- <el-from ref="form"> -->
<RadioGroup :options="[{ key: '1', label: '菏泽' }, { key: '3', label: '济南' }]" v-model="direction" <RadioGroup
type="button" /> :options="[
<el-select v-model="type" size="mini" class="selectRoad" placeholder="请选择"> { key: '1', label: '菏泽' },
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"> { key: '3', label: '济南' },
]"
v-model="direction"
type="button"
/>
<el-select
v-model="type"
size="mini"
class="selectRoad"
placeholder="请选择"
>
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="quarter" size="medium" v-if="type == '3'" class="selectRoad-medium" placeholder="请选择"> <el-select
<el-option v-for="item in quarterOptions" :key="item.value" :label="item.label" :value="item.value"> v-model="quarter"
size="medium"
v-if="type == '3'"
class="selectRoad-medium"
placeholder="请选择"
style="width: 140px"
>
<el-option
v-for="item in quarterOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-quarter-picker size="mini" class="selectRoad" style="width:180px;" v-if="type == '3'" v-model="dateTime" <!-- <el-quarter-picker size="mini" class="selectRoad" style="width:180px;" v-if="type == '3'" v-model="dateTime"
aria-placeholder="请选季度" /> --> aria-placeholder="请选季度" /> -->
<el-date-picker size="mini" v-if="type != '3'" class="selectRoad" v-model="dateTime" style="width:140px;" <el-date-picker
:type="type == 1 ? 'date' : type == 2 ? 'month' : type == 4 ? 'year' : ''" placeholder="请选择" /> size="mini"
v-if="type != '3'"
class="selectRoad"
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery" v-model="dateTime"
icon="el-icon-search">查询</el-button> style="width: 140px"
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="handleClear">重置</el-button> :type="
type == 1 ? 'date' : type == 2 ? 'month' : type == 4 ? 'year' : ''
"
placeholder="请选择"
/>
<el-button
type="primary"
size="mini"
class="btnSearch"
@click="searchQuery"
icon="el-icon-search"
>查询</el-button
>
<el-button
class="btnReset"
size="mini"
icon="el-icon-refresh-left"
@click="handleClear"
>重置</el-button
>
<!-- </el-from> --> <!-- </el-from> -->
</div> </div>
<div class="charts keep-ratio " id="chart1"></div> <div class="charts keep-ratio" id="chart1"></div>
</div> </div>
<div class="board board-l"> <div class="board board-l">
<div class="charts keep-ratio " id="chart2"></div> <div class="charts keep-ratio" id="chart2"></div>
</div> </div>
<div class="board board-s"> <div class="board board-s">
<div class="charts keep-ratio " id="chart3"></div> <div class="charts keep-ratio" id="chart3"></div>
</div> </div>
</div> </div>
</div> </div>
@ -42,18 +89,22 @@
<script> <script>
import moment from "moment"; import moment from "moment";
import WgtTitle from "@screen/pages/perception/widgets/title"; import WgtTitle from "@screen/pages/perception/widgets/title";
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue'; import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import chartsStatistics from "./assets/charts"; import chartsStatistics from "./assets/charts";
import chartsStatistics2 from "./assets/charts2"; import chartsStatistics2 from "./assets/charts2";
import chartsStatistics3 from "./assets/charts3"; import chartsStatistics3 from "./assets/charts3";
import { selectRoadSection, selectEventType, selectAccidentVehicle } from "@/api/event/governanceAnalysis" import {
selectRoadSection,
selectEventType,
selectAccidentVehicle,
} from "@/api/event/governanceAnalysis";
export default { export default {
name: 'postTrendsMonth', name: "postTrendsMonth",
components: { components: {
WgtTitle, WgtTitle,
RadioGroup RadioGroup,
}, },
data() { data() {
return { return {
@ -61,109 +112,108 @@ export default {
type: "1", type: "1",
typeOptions: [ typeOptions: [
{ {
label: '年', label: "年",
value: '4' value: "4",
}, },
{ {
label: '月', label: "月",
value: '2' value: "2",
}, },
{ {
label: '日', label: "日",
value: '1' value: "1",
}, },
{ {
label: '季', label: "季",
value: '3' value: "3",
} },
], ],
quarter: '1', quarter: "1",
quarterOptions: [ quarterOptions: [
{ {
label: "第一季度", label: "第一季度",
value: "1" value: "1",
}, },
{ {
label: "第二季度", label: "第二季度",
value: "2" value: "2",
}, },
{ {
label: "第三季度", label: "第三季度",
value: "3" value: "3",
}, },
{ {
label: "第四季度", label: "第四季度",
value: "4" value: "4",
} },
], ],
dateTime: "2024-01-01 00:00:00" dateTime: "2024-01-01 00:00:00",
} };
}, },
async created() { async created() {
await this.searchQuery() await this.searchQuery();
}, },
methods: { methods: {
getSelectRoadSection(formData) { getSelectRoadSection(formData) {
return selectRoadSection(formData).then((res) => { return selectRoadSection(formData).then((res) => {
// console.log("", res.data) // console.log("", res.data)
let sectionNameData = [] let sectionNameData = [];
let avgNumData = [] let avgNumData = [];
let lastNumData = [] let lastNumData = [];
let numData = [] let numData = [];
let mileageData = [] let mileageData = [];
res.data.forEach(item => { res.data.forEach((item) => {
avgNumData.push(item.avgNum) avgNumData.push(item.avgNum);
lastNumData.push(item.lastNum) lastNumData.push(item.lastNum);
numData.push(item.num) numData.push(item.num);
mileageData.push(item.mileage) mileageData.push(item.mileage);
sectionNameData.push(item.section_name) sectionNameData.push(item.section_name);
}); });
chartsStatistics.series[0].data = numData // chartsStatistics.series[0].data = numData; //
chartsStatistics.series[1].data = avgNumData // chartsStatistics.series[1].data = avgNumData; //
chartsStatistics.series[2].data = lastNumData // chartsStatistics.series[2].data = lastNumData; //
chartsStatistics.series[3].data = mileageData // chartsStatistics.series[3].data = mileageData; //
chartsStatistics.xAxis.data = sectionNameData chartsStatistics.xAxis.data = sectionNameData;
}) });
}, },
getSelectEventType(formData) { getSelectEventType(formData) {
return selectEventType(formData).then((res) => { return selectEventType(formData).then((res) => {
// console.log("_____________", res.data) // console.log("_____________", res.data)
let lastAvgTimeData = [] let lastAvgTimeData = [];
let avgTimeData = [] let avgTimeData = [];
let numData = [] let numData = [];
let lastNumData = [] let lastNumData = [];
let eventSubclassData = [] let eventSubclassData = [];
res.data.forEach((item) => { res.data.forEach((item) => {
lastAvgTimeData.push(item.lastAvgTime) lastAvgTimeData.push(item.lastAvgTime);
numData.push(item.num) numData.push(item.num);
avgTimeData.push(item.avgTime) avgTimeData.push(item.avgTime);
lastNumData.push(item.lastNum) lastNumData.push(item.lastNum);
eventSubclassData.push(item.eventSubclassName) eventSubclassData.push(item.eventSubclassName);
chartsStatistics2.series[0].data = numData // chartsStatistics2.series[0].data = numData; //
chartsStatistics2.series[1].data = lastNumData // chartsStatistics2.series[1].data = lastNumData; //
chartsStatistics2.series[2].data = avgTimeData // chartsStatistics2.series[2].data = avgTimeData; //
chartsStatistics2.series[3].data = lastAvgTimeData // chartsStatistics2.series[3].data = lastAvgTimeData; //
chartsStatistics2.xAxis.data = eventSubclassData chartsStatistics2.xAxis.data = eventSubclassData;
}) });
});
})
}, },
getSelectAccidentVehicle(formData) { getSelectAccidentVehicle(formData) {
return selectAccidentVehicle(formData).then((res) => { return selectAccidentVehicle(formData).then((res) => {
// console.log("______", res.data) // console.log("______", res.data)
let typeNameData = [] let typeNameData = [];
let numData = [] let numData = [];
let avgTimeData = [] let avgTimeData = [];
res.data.forEach((item) => { res.data.forEach((item) => {
typeNameData.push(item.typeName) typeNameData.push(item.typeName);
numData.push(item.num) numData.push(item.num);
avgTimeData.push(item.avgTime) avgTimeData.push(item.avgTime);
}) });
chartsStatistics3.series[0].data = numData // chartsStatistics3.series[0].data = numData; //
chartsStatistics3.series[1].data = avgTimeData // chartsStatistics3.series[1].data = avgTimeData; //
chartsStatistics3.xAxis.data = typeNameData chartsStatistics3.xAxis.data = typeNameData;
}) });
}, },
async searchQuery() { async searchQuery() {
let startTime = ""; let startTime = "";
@ -171,16 +221,16 @@ export default {
let year = moment().year(); let year = moment().year();
// console.log(year, this.quarter); // console.log(year, this.quarter);
if (this.quarter == 1) { if (this.quarter == 1) {
startTime = `${year}-01-01 00:00:00` startTime = `${year}-01-01 00:00:00`;
} else if (this.quarter == 2) { } else if (this.quarter == 2) {
startTime = `${year}-04-01 00:00:00` startTime = `${year}-04-01 00:00:00`;
} else if (this.quarter == 3) { } else if (this.quarter == 3) {
startTime = `${year}-07-01 00:00:00` startTime = `${year}-07-01 00:00:00`;
} else { } else {
startTime = `${year}-10-01 00:00:00` startTime = `${year}-10-01 00:00:00`;
} }
} else { } else {
startTime = moment(this.dateTime).format('YYYY-MM-DD HH:mm:ss') startTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss");
} }
// let data = { // let data = {
// direction: this.direction, // direction: this.direction,
@ -191,38 +241,35 @@ export default {
formData.append("direction", this.direction); formData.append("direction", this.direction);
formData.append("type", this.type); formData.append("type", this.type);
formData.append("startTime", startTime); formData.append("startTime", startTime);
await this.getSelectRoadSection(formData) await this.getSelectRoadSection(formData);
await this.getSelectEventType(formData) await this.getSelectEventType(formData);
await this.getSelectAccidentVehicle(formData) await this.getSelectAccidentVehicle(formData);
this.renderCharts() this.renderCharts();
}, },
handleClear() { handleClear() {
this.direction = "1" this.direction = "1";
this.type = "1" this.type = "1";
this.quarter = "1" this.quarter = "1";
this.dateTime = "2024-01-01 00:00:00" this.dateTime = "2024-01-01 00:00:00";
}, },
renderCharts() { renderCharts() {
this.$nextTick(() => { this.$nextTick(() => {
var myChart = echarts.init(document.getElementById('chart1')); var myChart = echarts.init(document.getElementById("chart1"));
myChart.setOption(chartsStatistics); myChart.setOption(chartsStatistics);
var myChart1 = echarts.init(document.getElementById('chart2')); var myChart1 = echarts.init(document.getElementById("chart2"));
myChart1.setOption(chartsStatistics2); myChart1.setOption(chartsStatistics2);
var myChart2 = echarts.init(document.getElementById('chart3')); var myChart2 = echarts.init(document.getElementById("chart3"));
myChart2.setOption(chartsStatistics3); myChart2.setOption(chartsStatistics3);
}); });
}, },
}, },
mounted() { mounted() {},
};
},
}
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.congestion { .congestion {
width: 100%; width: 100%;
@ -245,7 +292,6 @@ export default {
.board-s { .board-s {
width: calc(100% / 6 * 1) !important; width: calc(100% / 6 * 1) !important;
} }
.board { .board {
@ -257,7 +303,12 @@ export default {
border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px;
opacity: 1; opacity: 1;
border: 1px solid; border: 1px solid;
border-image: linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0)) 1 1; border-image: linear-gradient(
360deg,
rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0)
)
1 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -298,7 +349,7 @@ export default {
.selectRoad { .selectRoad {
width: 89px; width: 89px;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
@ -310,7 +361,7 @@ export default {
.selectRoad-medium { .selectRoad-medium {
width: 120px; width: 120px;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
@ -321,20 +372,17 @@ export default {
} }
.btnSearch { .btnSearch {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
margin-left: 10px; margin-left: 10px;
border-color: transparent; border-color: transparent;
} }
.btnReset { .btnReset {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
;
border-color: transparent; border-color: transparent;
color: white; color: white;
} }
} }
} }
} }

6
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js

@ -55,7 +55,7 @@ var options = {
}); });
return `{ast|${obj[0].name}} {bst|${Math.round( return `{ast|${obj[0].name}} {bst|${Math.round(
(obj[0].value / count) * 100 (obj[0].value / count) * 100
)}%} {cst|${obj[0].value}}`; )}%} {cst|${obj[0].value}}`;
}, },
data: echartsData?.map((x) => x), data: echartsData?.map((x) => x),
}, },
@ -66,7 +66,7 @@ var options = {
{ {
name: "", name: "",
type: "pie", type: "pie",
radius: "120px", radius: "60px",
width: "200px", width: "200px",
center: ["130px", "50%"], center: ["130px", "50%"],
roseType: "radius", roseType: "radius",
@ -111,7 +111,7 @@ var options = {
{ {
name: "", name: "",
type: "pie", type: "pie",
radius: "130px", radius: "70px",
hoverAnimation: false, hoverAnimation: false,
emphasis: { scale: false }, emphasis: { scale: false },
center: ["130px", "50%"], center: ["130px", "50%"],

9
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue

@ -66,6 +66,7 @@ export default {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
let it = data[i]; let it = data[i];
if (it.warningState == 1) { if (it.warningState == 1) {
// it.number = 86;
echartsData.push({ echartsData.push({
name: "上报", name: "上报",
value: it.number value: it.number
@ -141,10 +142,10 @@ export default {
context.lineWidth = 1; // 线 context.lineWidth = 1; // 线
// //
drawRoundRect(context, 242, 36, 180, 24, 12, gr) drawRoundRect(context, 230, 36, 180, 24, 12, gr)
drawRoundRect(context, 242, 63, 180, 24, 12, gr) drawRoundRect(context, 230, 63, 180, 24, 12, gr)
drawRoundRect(context, 242, 90, 180, 24, 12, gr) drawRoundRect(context, 230, 90, 180, 24, 12, gr)
drawRoundRect(context, 242, 117, 180, 24, 12, gr) drawRoundRect(context, 230, 117, 180, 24, 12, gr)
}); });
}); });
}, },

12
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js

@ -60,7 +60,7 @@ nameList.map((item, index) => {
var options = { var options = {
grid: { grid: {
top: "7%", //上边距 top: "15%", //上边距
right: "0", //右边距 right: "0", //右边距
left: "0", //左边距 left: "0", //左边距
bottom: "2%", //下边距 bottom: "2%", //下边距
@ -88,14 +88,14 @@ var options = {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "", name: "(起) ",
splitNumber: 5, splitNumber: 5,
nameTextStyle: { nameTextStyle: {
color: "#B6E6FF", color: "#fff",
fontSize: 10, fontSize: 10,
fontFamily: "Source Han Sans CN-Regular", // fontFamily: "Source Han Sans CN-Regular",
align: "left", // align: "left",
verticalAlign: "center", // verticalAlign: "center",
}, },
axisLabel: { axisLabel: {
fontSize: "10px", fontSize: "10px",

4
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts3.js

@ -53,13 +53,13 @@ let options = {
{ {
name: "(起) ", name: "(起) ",
nameTextStyle: { nameTextStyle: {
color: "#E5E7E8", color: "#fff",
fomtSize: 10, fomtSize: 10,
}, },
min: 0, min: 0,
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: "#1C82C5", color: "#fff",
}, },
}, },
splitLine: { splitLine: {

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

@ -437,7 +437,7 @@ export default {
getRoadSectionList().then(res => { getRoadSectionList().then(res => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
let rows = res.rows; let rows = res.data;
this.dataList = []; this.dataList = [];
rows.forEach(it => { rows.forEach(it => {
this.dataList.push({ this.dataList.push({

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

@ -1,125 +1,224 @@
<template> <template>
<div class='congestion'> <div class="congestion">
<div class="board"> <div class="board">
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex" /> <ProgressBar
class="keep-ratio"
@selectItem="selectProgress"
:dataList="dataList"
:selectIndex="selectIndex"
/>
<div class="searchPanel"> <div class="searchPanel">
<RadioGroup :options="[{ key: '1', label: '菏泽' }, { key: '3', label: '济南' }]" v-model="direction" type="button" /> <RadioGroup
<el-select v-model="type" size="mini" class="selectRoad" placeholder="请选择"> :options="[
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"> { key: '1', label: '菏泽' },
{ key: '3', label: '济南' },
]"
v-model="direction"
type="button"
/>
<el-select
v-model="type"
size="mini"
class="selectRoad"
placeholder="请选择"
>
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="quarter" size="medium" v-if="type == 'quarter'" class="selectRoad-medium" placeholder="请选择"> <el-select
<el-option v-for="item in quarterOptions" :key="item.value" :label="item.label" :value="item.value" v-model="quarter"
style="width:140px;"> size="medium"
v-if="type == 'quarter'"
class="selectRoad-medium"
placeholder="请选择"
>
<el-option
v-for="item in quarterOptions"
:key="item.value"
:label="item.label"
:value="item.value"
style="width: 140px"
>
</el-option> </el-option>
</el-select> </el-select>
<el-date-picker size="mini" v-if="type != 'quarter'" class="selectRoad" v-model="dateTime" style="width:140px;" <el-date-picker
:type="type == 'date' ? 'date' : type == 'month' ? 'month' : type == 'year' ? 'year' : ''" placeholder="请选择" size="mini"
:clearable="false" /> v-if="type != 'quarter'"
class="selectRoad"
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery" icon="el-icon-search">查询</el-button> v-model="dateTime"
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button> style="width: 140px"
:type="
type == 'date'
? 'date'
: type == 'month'
? 'month'
: type == 'year'
? 'year'
: ''
"
placeholder="请选择"
:clearable="false"
/>
<el-button
type="primary"
size="mini"
class="btnSearch"
@click="searchQuery"
icon="el-icon-search"
>查询</el-button
>
<el-button
class="btnReset"
size="mini"
icon="el-icon-refresh-left"
@click="onReset"
>重置</el-button
>
</div> </div>
</div> </div>
<div class="body"> <div class="body">
<div> <div>
<WgtTitle :title="'感知事件趋势分析'"></WgtTitle> <WgtTitle :title="'感知事件趋势分析'"></WgtTitle>
<Empty v-show="!chart1List || chart1List.length <= 0" text="暂无数据..."></Empty> <Empty
<div v-show="chart1List || chart1List.length > 0" id="chart1" class="btnChart" /> v-show="!chart1List || chart1List.length <= 0"
text="暂无数据..."
></Empty>
<div
v-show="chart1List || chart1List.length > 0"
id="chart1"
class="btnChart"
/>
</div> </div>
<div> <div>
<WgtTitle :title="'感知事件类型分析'"></WgtTitle> <WgtTitle :title="'感知事件类型分析'"></WgtTitle>
<Empty v-show="!chart2List || chart2List.length <= 0" text="暂无数据..."></Empty> <Empty
<div id="chart2" class="btnChart" /> v-show="!chart2List || chart2List.length <= 0"
text="暂无数据..."
></Empty>
<div
v-show="chart2List || chart2List.length > 0"
id="chart2"
class="btnChart"
/>
</div> </div>
<div> <div>
<WgtTitle :title="'桩号范围内事件分析趋势'"></WgtTitle> <WgtTitle :title="'桩号范围内事件分析趋势'"></WgtTitle>
<Empty v-show="!chart3List || chart3List.length <= 0" text="暂无数据..."></Empty> <Empty
<div id="chart3" class="btnChart" /> v-show="!chart3List || chart3List.length <= 0"
text="暂无数据..."
></Empty>
<div
v-show="chart3List || chart3List.length > 0"
id="chart3"
class="btnChart"
/>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script>
import WgtTitle from '../../../widgets/title' <script>
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue'; import WgtTitle from "../../../widgets/title";
import ProgressBar from './progressBar'; import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
import ProgressBar from "./progressBar";
import * as echarts from "echarts"; import * as echarts from "echarts";
import chart1 from "./assets/charts"; import chart1 from "./assets/charts";
import chart2 from "./assets/charts2"; import chart2 from "./assets/charts2";
import chart3 from "./assets/charts3"; import chart3 from "./assets/charts3";
import ElQuarterPicker from './ElQuarterPicker' import ElQuarterPicker from "./ElQuarterPicker";
import { getWarningTrend, getWarningSectionType, getSectionMarkNumber, getRoadSectionList } from '../../../../../../../api/event/perceiveEvent'; import {
getWarningTrend,
getWarningSectionType,
getSectionMarkNumber,
getRoadSectionList,
} from "../../../../../../../api/event/perceiveEvent";
const drawRoundRect = (ctx, x, y, width, height, radius, gr) => { const drawRoundRect = (ctx, x, y, width, height, radius, gr) => {
// ctx, x, y, , , // ctx, x, y, , ,
ctx.beginPath(); ctx.beginPath();
ctx.fillStyle = gr; ctx.fillStyle = gr;
ctx.arc(x + radius, y + radius, radius, Math.PI, Math.PI * 3 / 2); ctx.arc(x + radius, y + radius, radius, Math.PI, (Math.PI * 3) / 2);
ctx.lineTo(width - radius + x, y); ctx.lineTo(width - radius + x, y);
ctx.arc(width - radius + x, radius + y, radius, Math.PI * 3 / 2, Math.PI * 2); ctx.arc(
width - radius + x,
radius + y,
radius,
(Math.PI * 3) / 2,
Math.PI * 2
);
ctx.lineTo(width + x, height + y - radius); ctx.lineTo(width + x, height + y - radius);
ctx.arc(width - radius + x, height - radius + y, radius, 0, Math.PI * 1 / 2); ctx.arc(
width - radius + x,
height - radius + y,
radius,
0,
(Math.PI * 1) / 2
);
ctx.lineTo(radius + x, height + y); ctx.lineTo(radius + x, height + y);
ctx.arc(radius + x, height - radius + y, radius, Math.PI * 1 / 2, Math.PI); ctx.arc(radius + x, height - radius + y, radius, (Math.PI * 1) / 2, Math.PI);
ctx.closePath(); ctx.closePath();
//ctx.stroke(); //ctx.stroke();
ctx.fill() ctx.fill();
} };
export default { export default {
name: 'EventQuery', name: "EventQuery",
components: { components: {
WgtTitle, WgtTitle,
ProgressBar, ProgressBar,
ElQuarterPicker, ElQuarterPicker,
RadioGroup RadioGroup,
}, },
data() { data() {
return { return {
typeOptions: [ typeOptions: [
{ {
value: 'year', value: "year",
label: '年' label: "年",
}, { },
value: 'month', {
label: '月' value: "month",
label: "月",
}, },
{ {
value: 'date', value: "date",
label: '日' label: "日",
}, },
{ {
value: 'quarter', value: "quarter",
label: '季' label: "季",
}], },
quarter: '1', ],
quarter: "1",
quarterOptions: [ quarterOptions: [
{ {
label: "第一季度", label: "第一季度",
value: "1" value: "1",
}, },
{ {
label: "第二季度", label: "第二季度",
value: "2" value: "2",
}, },
{ {
label: "第三季度", label: "第三季度",
value: "3" value: "3",
}, },
{ {
label: "第四季度", label: "第四季度",
value: "4" value: "4",
} },
], ],
dateTime: "2024", dateTime: "2024",
direction: '1', direction: "1",
dataList: [], dataList: [],
selectIndex: 3, selectIndex: 3,
selectId: 3, selectId: 3,
@ -128,36 +227,70 @@ export default {
chart2List: [], chart2List: [],
chart3List: [], chart3List: [],
list: [ list: [
{ name: '大学城-长清', direction: '济南方向', state: "正常", speed: '108.14km/h', follow: '161' }, {
{ name: '大学城-长清', direction: '济南方向', state: "正常", speed: '108.14km/h', follow: '161' }, name: "大学城-长清",
{ name: '大学城-长清', direction: '济南方向', state: "正常", speed: '108.14km/h', follow: '161' }, direction: "济南方向",
{ name: '大学城-长清', direction: '济南方向', state: "正常", speed: '108.14km/h', follow: '161' }, state: "正常",
{ name: '大学城-长清', direction: '济南方向', state: "正常", speed: '108.14km/h', follow: '161' }, speed: "108.14km/h",
{ name: '大学城-长清', direction: '济南方向', state: "正常", speed: '108.14km/h', follow: '161' } follow: "161",
] },
} {
}, name: "大学城-长清",
created() { direction: "济南方向",
state: "正常",
speed: "108.14km/h",
follow: "161",
},
{
name: "大学城-长清",
direction: "济南方向",
state: "正常",
speed: "108.14km/h",
follow: "161",
},
{
name: "大学城-长清",
direction: "济南方向",
state: "正常",
speed: "108.14km/h",
follow: "161",
},
{
name: "大学城-长清",
direction: "济南方向",
state: "正常",
speed: "108.14km/h",
follow: "161",
},
{
name: "大学城-长清",
direction: "济南方向",
state: "正常",
speed: "108.14km/h",
follow: "161",
},
],
};
}, },
created() {},
methods: { methods: {
selectProgress(item, index,) { selectProgress(item, index) {
this.selectIndex = index this.selectIndex = index;
this.selectId = item.id; this.selectId = item.id;
this.searchQuery() this.searchQuery();
}, },
onReset() { onReset() {
this.direction = '1'; this.direction = "1";
this.type = "year"; this.type = "year";
this.dateTime = '2024'; this.dateTime = "2024";
this.selectId = this.dataList[0].id; this.selectId = this.dataList[0].id;
this.selectIndex = 1 this.selectIndex = 1;
}, },
searchQuery() { searchQuery() {
let startTime = ""; let startTime = "";
let qType = this.type == 'date' ? 'day' : this.type; let qType = this.type == "date" ? "day" : this.type;
if (this.type == "quarter") { if (this.type == "quarter") {
console.log('dateTime', this.quarter) console.log("dateTime", this.quarter);
// let year = moment().year(); // let year = moment().year();
// if (this.quarter == 1) { // if (this.quarter == 1) {
// startTime = `${year}-01-01 00:00:00` // startTime = `${year}-01-01 00:00:00`
@ -169,30 +302,31 @@ export default {
// startTime = `${year}-10-01 00:00:00` // startTime = `${year}-10-01 00:00:00`
// } // }
} else { } else {
startTime = moment(this.dateTime).format('YYYY-MM-DD HH:mm:ss') startTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss");
} }
console.log("startTime", startTime) console.log("startTime", startTime);
// //
getWarningTrend({ getWarningTrend({
"type": qType, type: qType,
"sectionId": this.selectId, sectionId: this.selectId,
"createTime": startTime, createTime: startTime,
"direction": this.direction, direction: this.direction,
"quarter": this.quarter quarter: this.quarter,
}).then(res => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.chart1List = res.data this.chart1List = res.data;
let data = res.data; let data = res.data;
chart1.series[0].data = []; chart1.series[0].data = [];
chart1.xAxis.data = []; chart1.xAxis.data = [];
if (data.length > 0) { if (data.length > 0) {
const maxObject = data.reduce((prev, current) => (current.number > prev.number ? current : prev)); const maxObject = data.reduce((prev, current) =>
current.number > prev.number ? current : prev
);
let xData = []; let xData = [];
let numbers = []; let numbers = [];
data.forEach(it => { data.forEach((it) => {
if (this.type == "year") { if (this.type == "year") {
xData.push(it.month + "月"); xData.push(it.month + "月");
} }
@ -203,42 +337,45 @@ export default {
xData.push(it.time.split(" ")[1] + "时"); xData.push(it.time.split(" ")[1] + "时");
} }
if (this.type == "quarter") { if (this.type == "quarter") {
xData.push(it.month + '月'); xData.push(it.month + "月");
} }
if (it.number == maxObject.number) { if (it.number == maxObject.number) {
numbers.push({ numbers.push({
value: it.number, value: it.number,
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: "linear",
x: 0, x: 0,
y: 0, y: 0,
x2: 0, x2: 0,
y2: 1, y2: 1,
colorStops: [{ colorStops: [
offset: 0, color: '#FFB904' // 0% {
}, { offset: 0,
offset: 1, color: '#FF6969' // 100% color: "#FFB904", // 0%
}], },
global: false // false {
offset: 1,
color: "#FF6969", // 100%
},
],
global: false, // false
}, },
borderRadius: 6 borderRadius: 6,
} },
}); });
} else { } else {
numbers.push({ numbers.push({
value: it.number, value: it.number,
itemStyle: { itemStyle: {
borderRadius: 6 borderRadius: 6,
} },
}); });
} }
});
})
chart1.xAxis.data = xData; chart1.xAxis.data = xData;
chart1.series[0].data = numbers; chart1.series[0].data = numbers;
} }
} }
this.myChart1.setOption(chart1); this.myChart1.setOption(chart1);
@ -246,17 +383,17 @@ export default {
// //
getWarningSectionType({ getWarningSectionType({
"type": qType, type: qType,
"sectionId": this.selectId, sectionId: this.selectId,
"createTime": startTime, createTime: startTime,
"direction": this.direction, direction: this.direction,
"quarter": this.quarter quarter: this.quarter,
}).then(res => { }).then((res) => {
chart2.series[0].data = []; chart2.series[0].data = [];
if (res.code == 200) { if (res.code == 200) {
let types = []; let types = [];
let numbers = []; let numbers = [];
this.chart2List = res.data this.chart2List = res.data;
let data = res.data.warningTypeList; let data = res.data.warningTypeList;
let total = res.data.total; let total = res.data.total;
@ -291,13 +428,13 @@ export default {
numbers.push({ numbers.push({
name: types[types.length - 1], name: types[types.length - 1],
value: it.number value: it.number,
}); });
}) });
chart2.legend.data = types; chart2.legend.data = types;
chart2.legend.formatter = function (name) { chart2.legend.formatter = function (name) {
let total = 0 let total = 0;
let target let target;
for (let i = 0; i < numbers.length; i++) { for (let i = 0; i < numbers.length; i++) {
total += numbers[i].value; total += numbers[i].value;
if (types[i] == name) { if (types[i] == name) {
@ -305,11 +442,11 @@ export default {
} }
} }
var arr = [ var arr = [
'{a|' + name + '}', "{a|" + name + "}",
'{b|' + ((target / total) * 100).toFixed(2) + '%} ', "{b|" + ((target / total) * 100).toFixed(2) + "%} ",
"{c|" + target + "}", "{c|" + target + "}",
] ];
return arr.join(' ') return arr.join(" ");
}; };
chart2.title.text = `{zb|${total}}`; chart2.title.text = `{zb|${total}}`;
@ -335,23 +472,26 @@ export default {
// }) // })
} }
this.myChart2.setOption(chart2); this.myChart2.setOption(chart2);
});
})
// //
getSectionMarkNumber({ getSectionMarkNumber({
"type": qType, type: qType,
"sectionId": this.selectId, sectionId: this.selectId,
"createTime": startTime, createTime: startTime,
"direction": this.direction, direction: this.direction,
"quarter": this.quarter quarter: this.quarter,
}).then(res => { }).then((res) => {
chart3.series[0].data = []; chart3.series[0].data = [];
chart3.series[1].data = []; chart3.series[1].data = [];
chart3.xAxis.data = []; chart3.xAxis.data = [];
if (res.code == 200 && res.data.length > 0) { if (res.code == 200 && res.data.length > 0) {
this.chart3List = res.data this.chart3List = res.data;
let data = res.data; let data = res.data;
const maxObject = data.filter(it => it.sectionNumber > 0).reduce((prev, current) => (current.sectionNumber > prev.sectionNumber ? current : prev)); const maxObject = data
.filter((it) => it.sectionNumber > 0)
.reduce((prev, current) =>
current.sectionNumber > prev.sectionNumber ? current : prev
);
let zhs = []; let zhs = [];
let values1 = []; let values1 = [];
let values2 = []; let values2 = [];
@ -366,32 +506,36 @@ export default {
value: it.sectionNumber, value: it.sectionNumber,
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: "linear",
x: 0, x: 0,
y: 0, y: 0,
x2: 0, x2: 0,
y2: 1, y2: 1,
colorStops: [{ colorStops: [
offset: 0, color: '#01D5BC' // 0% {
}, { offset: 0,
offset: 1, color: '#003B4E' // 100% color: "#01D5BC", // 0%
}], },
global: false // false {
offset: 1,
color: "#003B4E", // 100%
},
],
global: false, // false
}, },
borderRadius: 6 borderRadius: 6,
}, },
}) });
} else { } else {
values1.push({ values1.push({
value: it.sectionNumber, value: it.sectionNumber,
itemStyle: { itemStyle: {
borderRadius: 6 borderRadius: 6,
}, },
}) });
} }
} }
}) });
chart3.xAxis.data = zhs; chart3.xAxis.data = zhs;
chart3.series[0].data = values1; chart3.series[0].data = values1;
@ -399,7 +543,7 @@ export default {
} }
this.myChart3.setOption(chart3); this.myChart3.setOption(chart3);
}) });
// if (this.type == "day") // if (this.type == "day")
// this.type = "date"; // this.type = "date";
}, },
@ -407,19 +551,18 @@ export default {
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
getRoadSectionList().then((res) => {
getRoadSectionList().then(res => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
let rows = res.rows; let rows = res.data;
this.dataList = []; this.dataList = [];
rows.forEach(it => { rows.forEach((it) => {
this.dataList.push({ this.dataList.push({
title: it.sectionName.split("-")[0], title: it.sectionName.split("-")[0],
id: it.id, id: it.id,
}); });
}) });
console.log("dataList", this.dataList) console.log("dataList", this.dataList);
// if (rows.length > 0) { // if (rows.length > 0) {
// let lastRoad = rows[rows.length - 1].sectionName.split("-")[1]; // let lastRoad = rows[rows.length - 1].sectionName.split("-")[1];
// this.dataList.push({ // this.dataList.push({
@ -427,21 +570,17 @@ export default {
// id: rows[rows.length - 1].id, // id: rows[rows.length - 1].id,
// }); // });
// } // }
} }
this.searchQuery(); this.searchQuery();
});
var myChart1 = echarts.init(document.getElementById("chart1"));
})
var myChart1 = echarts.init(document.getElementById('chart1'));
myChart1.setOption(chart1); myChart1.setOption(chart1);
var myChart2 = echarts.init(document.getElementById('chart2')); var myChart2 = echarts.init(document.getElementById("chart2"));
myChart2.setOption(chart2); myChart2.setOption(chart2);
var myChart3 = echarts.init(document.getElementById('chart3')); var myChart3 = echarts.init(document.getElementById("chart3"));
myChart3.setOption(chart3); myChart3.setOption(chart3);
this.myChart1 = myChart1; this.myChart1 = myChart1;
this.myChart2 = myChart2; this.myChart2 = myChart2;
this.myChart3 = myChart3; this.myChart3 = myChart3;
@ -449,11 +588,11 @@ export default {
const domMap = document.getElementById("chart2"); const domMap = document.getElementById("chart2");
let parentDiv = domMap.firstChild; let parentDiv = domMap.firstChild;
// canvas // canvas
let canvas = document.createElement('canvas'); let canvas = document.createElement("canvas");
canvas.width = parentDiv.offsetWidth; canvas.width = parentDiv.offsetWidth;
canvas.height = parentDiv.offsetHeight; canvas.height = parentDiv.offsetHeight;
parentDiv.appendChild(canvas); parentDiv.appendChild(canvas);
const context = canvas.getContext('2d'); const context = canvas.getContext("2d");
context.lineWidth = 1; // 线 context.lineWidth = 1; // 线
// //
@ -510,15 +649,13 @@ export default {
// gr.addColorStop(1, 'rgba(92,197,255,0)'); // gr.addColorStop(1, 'rgba(92,197,255,0)');
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); // gr.addColorStop(0, 'rgba(92,197,255,0.5)');
// drawRoundRect(context, 416, 208, 140, 24, 12, gr); // drawRoundRect(context, 416, 208, 140, 24, 12, gr);
}); });
}); });
}, },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.congestion { .congestion {
width: 100%; width: 100%;
position: relative; position: relative;
@ -529,12 +666,21 @@ export default {
justify-content: space-evenly; justify-content: space-evenly;
font-size: 14px; font-size: 14px;
>div { > div {
width: 33%; width: 33%;
height: 470px; height: 470px;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%); background: linear-gradient(
180deg,
rgba(6, 66, 88, 0.2) 0%,
#064258 100%
);
border: 1px solid; border: 1px solid;
border-image: linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0)) 1 1; border-image: linear-gradient(
360deg,
rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0)
)
1 1;
} }
:nth-child(1) { :nth-child(1) {
@ -555,7 +701,6 @@ export default {
width: 90%; width: 90%;
margin: 95px auto 0; margin: 95px auto 0;
} }
} }
.board { .board {
@ -607,7 +752,7 @@ export default {
.selectRoad { .selectRoad {
width: 100px; width: 100px;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
@ -619,7 +764,7 @@ export default {
.selectRoad-medium { .selectRoad-medium {
width: 120px; width: 120px;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
@ -630,19 +775,17 @@ export default {
} }
.btnSearch { .btnSearch {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
margin-left: 10px; margin-left: 10px;
border-color: transparent; border-color: transparent;
} }
.btnReset { .btnReset {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
;
border-color: transparent; border-color: transparent;
color: white; color: white;
} }
} }
} }
} }
@ -653,13 +796,54 @@ export default {
</style> </style>
<style lang="scss"> <style lang="scss">
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today span, div.el-popover:has(> .el-date-picker)
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell, div
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span, .el-picker-panel__body
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell, .el-picker-panel__content
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span, table
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell { tr
color: #fff td.today
span,
div.el-popover:has(> .el-date-picker)
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell,
div.el-picker-panel.el-date-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-picker-panel.el-date-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell,
div.el-picker-panel.el-date-range-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-picker-panel.el-date-range-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell {
color: #fff;
} }
</style> </style>

3
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js

@ -77,7 +77,6 @@ var options = {
tooltip: { tooltip: {
confine: true, confine: true,
textStyle: { textStyle: {
fontSize: 10, // 字体大小
color: "#333", color: "#333",
}, },
color: "#333", color: "#333",
@ -135,7 +134,7 @@ var options = {
var arr = [ var arr = [
"{ast|" + name + "}", "{ast|" + name + "}",
"{bst|" + (target * 100).toFixed(0) + "% }", "{bst|" + (target * 100).toFixed(0) + "% }",
"{cst|" + target+ "件}", "{cst|" + target + "起}",
]; ];
return arr.join(" "); return arr.join(" ");
}, },

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

@ -145,7 +145,7 @@ var options = {
], ],
}, },
yAxis: { yAxis: {
name: "() ", name: "() ",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fomtSize: 10, fomtSize: 10,

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

@ -63,7 +63,7 @@ var options = {
// console.log(obj); // console.log(obj);
return `{ast|${obj[0].name}} {bst|${ return `{ast|${obj[0].name}} {bst|${
Math.round((obj[0].value / count) * 100) || 0 Math.round((obj[0].value / count) * 100) || 0
}%} {cst|${obj[0].value}}`; }%} {cst|${obj[0].value}}`;
}, },
// data: typeAnalysisData?.map(x => x.name), // data: typeAnalysisData?.map(x => x.name),
}, },

280
ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherInfoQuery/components/TemperatureTrend/assets/charts.js

@ -1,148 +1,152 @@
import * as echarts from "echarts"; import * as echarts from "echarts";
var options = { var options = {
tooltip: {
color: ["#5090FF", "#01B3E4"], show: true,
grid: { trigger: "axis",
left: "2%", },
right: "5%", color: "#FFD15C",
bottom: "10%", grid: {
top: "10%", left: "2%",
containLabel: true, right: "5%",
}, bottom: "10%",
legend: { top: "10%",
icon: 'rect', containLabel: true,
top: '0%', },
right: '5%', legend: {
data: ['实时数据'], icon: "rect",
itemWidth:18, top: "0%",
itemHeight: 5, right: "5%",
itemGap: 30, data: ["实时数据"],
itemStyle:{ itemWidth: 18,
color:"#FFD15C", itemHeight: 5,
}, itemGap: 30,
textStyle: { // itemStyle: {
fontSize: 12, // color: "#FFD15C",
color: '#fff', // },
padding: [0, 0, 0, 10], textStyle: {
}, fontSize: 12,
}, color: "#fff",
xAxis: { padding: [0, 0, 0, 10],
type: "category", },
axisLine: { },
lineStyle: { xAxis: {
color: "#BDD8FB", type: "category",
fontSize: 12, axisLine: {
}, lineStyle: {
color: "#FFD15C",
}, },
axisLabel: { },
// interval:0, axisLabel: {
color: "#BDD8FB", // interval:0,
fontSize: 12, color: "#fff",
}, fontSize: 10,
axisTick: { },
show: false, axisTick: {
show: false,
},
data: [
"00:00",
"01:00",
"02:00",
"03:00",
"04:00",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00",
"21:00",
"22:00",
"23:00",
],
},
yAxis: {
type: "value",
min: 0,
max: 40,
minInterval: 1,
nameTextStyle: {
fontSize: 10,
color: "#fff",
align: "center",
},
splitLine: {
lineStyle: {
color: "rgba(255, 255, 255, 0.15)",
// type: 'dashed', // dotted 虚线
}, },
},
splitArea: { show: false },
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
fontSize: 10,
fontFamily: "Bebas",
color: "#fff",
},
},
series: [
{
type: "line",
// symbol: "none",
showSymbol: false,
smooth: true, // 是否曲线
name: "实时数据", // 图例对应类别
data: [ data: [
"00:00", 12, 12, 23, 23, 30, 12, 26, 28, 31, 23, 25, 12, 18, 18, 18, 18, 23, 21,
"01:00", 20, 20, 20, 20, 20, 22, 22, 12, 12, 12,
"02:00", ], // 纵坐标数据
"03:00", lineStyle: {
"04:00", color: "#FFD15C",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00",
"21:00",
"22:00",
"23:00",
],
},
yAxis: {
type: "value",
min: 0,
max:40,
minInterval: 1,
nameTextStyle: {
fontSize: 12,
color: "#BDD8FB",
align: "center",
},
splitLine: {
lineStyle: {
color: "rgba(255, 255, 255, 0.15)",
// type: 'dashed', // dotted 虚线
},
}, },
splitArea: { show: false }, areaStyle: {
axisLine: { // 区域颜色
show: false, // color: new graphic.LinearGradient(0, 0, 0, 1, [
}, // {
axisTick: { // offset: 0,
show: false, // color: "#5090FF",
}, // },
axisLabel: { // {
fontSize: 12, // offset: 1,
fontFamily: "Bebas", // color: "#1057E5",
color: "#BDD8FB", // },
}, // ]),
}, color: {
series: [ type: "linear",
{ x: 0, //右
type: "line", y: 0, //下
// symbol: "none", x2: 0, //左
showSymbol: false, y2: 1, //上
smooth: true, // 是否曲线 colorStops: [
name: "实时数据", // 图例对应类别 {
data: [12, 12, 23, 23, 30, 12, 26,28, 31, 23, 25, 12, 18, 18,18, 18, 23, 21, 20, 20, 20,20, 20, 22, 22, 12, 12, 12], // 纵坐标数据 offset: 0.1,
lineStyle :{ color: "#FFD15C99", // 0% 处的颜色
color:"#FFD15C" },
}, {
areaStyle: { offset: 1,
// 区域颜色 opacity: 0.01,
// color: new graphic.LinearGradient(0, 0, 0, 1, [ color: "#FFD15C01", // 100% 处的颜色
// {
// offset: 0,
// color: "#5090FF",
// },
// {
// offset: 1,
// color: "#1057E5",
// },
// ]),
color: {
type: 'linear',
x: 0, //右
y: 0, //下
x2: 0, //左
y2: 1, //上
colorStops: [
{
offset: 0.1,
color: '#FFD15C99' // 0% 处的颜色
},
{
offset: 1,
opacity:0.01,
color: '#FFD15C01' // 100% 处的颜色
}
]
}, },
}, ],
},
}, },
},
], ],
}; };
export default options; export default options;

290
ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherInfoQuery/components/visibilityTrends/assets/charts.js

@ -1,154 +1,156 @@
import * as echarts from "echarts"; import * as echarts from "echarts";
var options = { var options = {
color: "#0783FA",
color: ["#5090FF", "#01B3E4"], tooltip: {
tooltip: { show: true,
trigger: "axis", trigger: "axis",
backgroundColor: "rgba(0,0,0,.6)", // backgroundColor: "rgba(0,0,0,.6)",
borderColor: "rgba(147, 235, 248, .8)", // borderColor: "rgba(147, 235, 248, .8)",
textStyle: { // textStyle: {
color: "#FFF", // color: "#FFF",
}, // },
}, },
grid: { grid: {
left: "2%", left: "2%",
right: "5%", right: "5%",
bottom: "10%", bottom: "10%",
top: "10%", top: "10%",
containLabel: true, containLabel: true,
}, },
legend: { legend: {
icon: 'rect', icon: "rect",
top: '0%', top: "0%",
right: '5%', right: "5%",
data: ['实时数据'], data: ["实时数据"],
itemWidth:18, itemWidth: 18,
itemHeight: 5, itemHeight: 5,
itemGap: 30, itemGap: 30,
textStyle: { textStyle: {
fontSize: 12, fontSize: 10,
color: '#C9D2FA', color: "#fff",
padding: [0, 0, 0, 10], padding: [0, 0, 0, 10],
}, },
}, },
xAxis: { xAxis: {
type: "category", type: "category",
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: "#BDD8FB", color: "#0783FA",
fontSize: 12, fontSize: 10,
},
}, },
axisLabel: { },
// interval:0, axisLabel: {
color: "#BDD8FB", // interval:0,
fontSize: 12, color: "#fff",
}, fontSize: 10,
axisTick: { },
show: false, axisTick: {
show: false,
},
data: [
"00:00",
"01:00",
"02:00",
"03:00",
"04:00",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00",
"21:00",
"22:00",
"23:00",
],
},
yAxis: {
type: "value",
min: 0,
max: 40,
minInterval: 5,
splitNumber: 5,
nameTextStyle: {
fontSize: 12,
color: "#BDD8FB",
align: "center",
},
splitLine: {
lineStyle: {
color: "rgba(255, 255, 255, 0.15)",
// type: 'dashed', // dotted 虚线
}, },
},
splitArea: { show: false },
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
fontSize: 10,
fontFamily: "Bebas",
color: "#fff",
},
},
series: [
{
type: "line",
// symbol: "none",
showSymbol: false,
smooth: true, // 是否曲线
name: "实时数据", // 图例对应类别
data: [ data: [
"00:00", 12, 12, 23, 23, 30, 12, 26, 28, 31, 23, 25, 12, 18, 18, 18, 18, 23, 21,
"01:00", 20, 20, 20, 20, 20, 22, 22, 12, 12, 12,
"02:00", ], // 纵坐标数据
"03:00", lineStyle: {
"04:00", color: "#0783FA",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00",
"21:00",
"22:00",
"23:00",
],
},
yAxis: {
type: "value",
min: 0,
max:40,
minInterval: 5,
splitNumber:5,
nameTextStyle: {
fontSize: 12,
color: "#BDD8FB",
align: "center",
},
splitLine: {
lineStyle: {
color: "rgba(255, 255, 255, 0.15)",
// type: 'dashed', // dotted 虚线
},
}, },
splitArea: { show: false }, areaStyle: {
axisLine: { // 区域颜色
show: false, // color: new graphic.LinearGradient(0, 0, 0, 1, [
}, // {
axisTick: { // offset: 0,
show: false, // color: "#5090FF",
}, // },
axisLabel: { // {
fontSize: 12, // offset: 1,
fontFamily: "Bebas", // color: "#1057E5",
color: "#BDD8FB", // },
}, // ]),
}, color: {
series: [ type: "linear",
{ x: 0, //右
type: "line", y: 0, //下
// symbol: "none", x2: 0, //左
showSymbol: false, y2: 1, //上
smooth: true, // 是否曲线 colorStops: [
name: "实时数据", // 图例对应类别 {
data: [12, 12, 23, 23, 30, 12, 26,28, 31, 23, 25, 12, 18, 18,18, 18, 23, 21, 20, 20, 20,20, 20, 22, 22, 12, 12, 12], // 纵坐标数据 offset: 0.1,
lineStyle :{ color: "#0783FA99", // 0% 处的颜色
color:"#0783FA" },
}, {
areaStyle: { offset: 1,
// 区域颜色 opacity: 0.01,
// color: new graphic.LinearGradient(0, 0, 0, 1, [ color: "#0783FA01", // 100% 处的颜色
// {
// offset: 0,
// color: "#5090FF",
// },
// {
// offset: 1,
// color: "#1057E5",
// },
// ]),
color: {
type: 'linear',
x: 0, //右
y: 0, //下
x2: 0, //左
y2: 1, //上
colorStops: [
{
offset: 0.1,
color: '#0783FA99' // 0% 处的颜色
},
{
offset: 1,
opacity:0.01,
color: '#0783FA01' // 100% 处的颜色
}
]
}, },
}, ],
},
}, },
},
], ],
}; };
export default options; export default options;

187
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/classification/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div class='classification'> <div class="classification">
<WgtTitle :title="'全路车流量状况'"></WgtTitle> <WgtTitle :title="'全路车流量状况'"></WgtTitle>
<div class="board"> <div class="board">
<!-- <div v-for="(item, index) in list" class="list"> <!-- <div v-for="(item, index) in list" class="list">
@ -14,65 +14,85 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<div id="classification" class="keep-ratio" > <div id="classification" class="keep-ratio"></div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import WgtTitle from '../../../widgets/title' import WgtTitle from "../../../widgets/title";
import chartsStatistics from "./assets/charts"; import chartsStatistics from "./assets/charts";
const drawRoundRect = ( ctx, x, y, width, height, radius ) => { const drawRoundRect = (ctx, x, y, width, height, radius) => {
// ctx, x, y, , , // ctx, x, y, , ,
ctx.beginPath(); ctx.beginPath();
ctx.arc(x + radius, y + radius, radius, Math.PI, Math.PI * 3 / 2); ctx.arc(x + radius, y + radius, radius, Math.PI, (Math.PI * 3) / 2);
ctx.lineTo(width - radius + x, y); ctx.lineTo(width - radius + x, y);
ctx.arc(width - radius + x, radius + y, radius, Math.PI * 3 / 2, Math.PI * 2); ctx.arc(
ctx.lineTo(width + x, height + y - radius); width - radius + x,
ctx.arc(width - radius + x, height - radius + y, radius, 0, Math.PI * 1 / 2); radius + y,
ctx.lineTo(radius + x, height +y); radius,
ctx.arc(radius + x, height - radius + y, radius, Math.PI * 1 / 2, Math.PI); (Math.PI * 3) / 2,
ctx.closePath(); Math.PI * 2
);
ctx.lineTo(width + x, height + y - radius);
ctx.arc(
width - radius + x,
height - radius + y,
radius,
0,
(Math.PI * 1) / 2
);
ctx.lineTo(radius + x, height + y);
ctx.arc(radius + x, height - radius + y, radius, (Math.PI * 1) / 2, Math.PI);
ctx.closePath();
//ctx.stroke(); //ctx.stroke();
ctx.fill() ctx.fill();
} };
export default { export default {
name: 'Classification', name: "Classification",
components: { components: {
WgtTitle WgtTitle,
}, },
data() { data() {
return { return {
list:[ list: [
{label:'客车',value:63,detail:[ {
{ color:"#FF5A62", label: '客1', value: '13456', perce: '34.2' }, label: "客车",
{ color:"#23E7B2",label: '客2', value: '13456', perce: '34.2' }, value: 63,
{ color:"#0294FF",label: '客3', value: '13456', perce: '34.2' }, detail: [
] { color: "#FF5A62", label: "客1", value: "13456", perce: "34.2" },
}, {label:'货车',value:63,detail:[ { color: "#23E7B2", label: "客2", value: "13456", perce: "34.2" },
{ color:"#FF5A62",label: '货1', value: '13456', perce: '34.2' }, { color: "#0294FF", label: "客3", value: "13456", perce: "34.2" },
{ color:"#23E7B2",label: '货2', value: '13456', perce: '34.2' }, ],
{ color:"#0294FF",label: '货3', value: '13456', perce: '34.2' }, },
] {
}, {label:'专车',value:63,detail:[ label: "货车",
{ color:"#FF5A62",label: '专1', value: '13456', perce: '34.2' }, value: 63,
{ color:"#23E7B2",label: '专2', value: '13456', perce: '34.2' }, detail: [
{ color:"#0294FF",label: '专3', value: '13456', perce: '34.2' }, { color: "#FF5A62", label: "货1", value: "13456", perce: "34.2" },
] { color: "#23E7B2", label: "货2", value: "13456", perce: "34.2" },
} { color: "#0294FF", label: "货3", value: "13456", perce: "34.2" },
] ],
} },
{
label: "专车",
value: 63,
detail: [
{ color: "#FF5A62", label: "专1", value: "13456", perce: "34.2" },
{ color: "#23E7B2", label: "专2", value: "13456", perce: "34.2" },
{ color: "#0294FF", label: "专3", value: "13456", perce: "34.2" },
],
},
],
};
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
var myChart0 = echarts.init(document.getElementById('classification')); var myChart0 = echarts.init(document.getElementById("classification"));
myChart0.setOption(chartsStatistics); myChart0.setOption(chartsStatistics);
// var myChart1 = echarts.init(document.getElementById('busEchartBox1')); // var myChart1 = echarts.init(document.getElementById('busEchartBox1'));
// myChart1.setOption(chartsStatistics); // myChart1.setOption(chartsStatistics);
@ -80,40 +100,35 @@ export default {
// myChart2.setOption(chartsStatistics); // myChart2.setOption(chartsStatistics);
const domMap = document.getElementById("classification"); const domMap = document.getElementById("classification");
let parentDiv = domMap.firstChild; let parentDiv = domMap.firstChild;
// canvas // canvas
let canvas = document.createElement('canvas'); let canvas = document.createElement("canvas");
canvas.width = parentDiv.offsetWidth; canvas.width = parentDiv.offsetWidth;
canvas.height =parentDiv.offsetHeight; canvas.height = parentDiv.offsetHeight;
parentDiv.appendChild(canvas); parentDiv.appendChild(canvas);
const context = canvas.getContext('2d'); const context = canvas.getContext("2d");
// //
var gr = context.createLinearGradient(247, 63, 450, 0); var gr = context.createLinearGradient(247, 63, 450, 0);
// //
gr.addColorStop(1, 'rgba(92,197,255,0)'); gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, 'rgba(92,197,255,0.5)'); gr.addColorStop(0, "rgba(92,197,255,0.5)");
context.fillStyle = gr context.fillStyle = gr;
context.lineWidth = 1; // 线 context.lineWidth = 1; // 线
for (var i = 0;i < 8;i++) for (var i = 0; i < 8; i++)
// //
drawRoundRect(context, 340, 50 + 34 * i, 300, 24, 12) drawRoundRect(context, 340, 50 + 34 * i, 300, 24, 12);
}); });
}); });
}, },
created() { created() {},
methods: {},
}, };
methods: {
}
}
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.classification { .classification {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -122,24 +137,28 @@ export default {
height: 400px; height: 400px;
width: 100%; width: 100%;
padding: 0px 30px; padding: 0px 30px;
background: linear-gradient(180deg, rgba(6,66,88,0.2) 0%, #064258 100%); background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%);
border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px;
opacity: 1; opacity: 1;
border: 1px solid; border: 1px solid;
border-image: linear-gradient(360deg, rgba(55, 231, 255,0.3), rgba(55, 231, 255, 0)) 1 1; border-image: linear-gradient(
360deg,
rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0)
)
1 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
#classification { #classification {
display: inline-flex; display: inline-flex;
width:100%; width: 100%;
height:350px; height: 350px;
} }
.title { .title {
background:url('./assets/bg.png') no-repeat; background: url("./assets/bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 209px; width: 209px;
height: 30px; height: 30px;
@ -147,34 +166,34 @@ export default {
line-height: 30px; line-height: 30px;
} }
} }
.list{ .list {
display: flex; display: flex;
justify-content:center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
} }
.charts{ .charts {
height:164px; height: 164px;
width: 164px; width: 164px;
} }
.detail{ .detail {
width:100%; width: 100%;
} }
.detailItem{ .detailItem {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
letter-spacing: 2px; letter-spacing: 2px;
} }
.detailItem span{ .detailItem span {
color: #37E7FF; color: #37e7ff;
} }
.tag{ .tag {
background-color: #FF5A62; background-color: #ff5a62;
width: 6px; width: 6px;
height: 6px; height: 6px;
border-radius: 50%; border-radius: 50%;
margin-right: 5px; margin-right: 5px;
} }
}</style> }
</style>

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/assets/charts.js

@ -87,7 +87,7 @@ var options = {
], ],
yAxis: [ yAxis: [
{ {
name: "车流量", name: "车流量 ",
type: "value", type: "value",
// max: 300, // max: 300,
interval: 50, interval: 50,

1
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/situation/index.vue

@ -90,6 +90,7 @@ export default {
text-align: center; text-align: center;
background-color: #00b3cc; background-color: #00b3cc;
margin-right: 10px; margin-right: 10px;
cursor: pointer;
} }
.checked { .checked {
background-color: #c87800 !important; background-color: #c87800 !important;

79
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorAnalysis/components/trafficIndicators/assets/chartsRadar.js

@ -0,0 +1,79 @@
import * as echarts from "echarts";
let options = {
legend: {
show: false,
},
radar: [
{
indicator: [
{ text: "Indicator1" },
{ text: "Indicator2" },
{ text: "Indicator3" },
],
center: ["50%", "55%"],
radius: 70,
startAngle: 90,
splitNumber: 4,
shape: "circle",
axisName: {
formatter: "{value}",
color: "#428BD4",
},
splitArea: {
areaStyle: {
color: ["#0987CD", "#0A7BB9", "#0B6A9C", "#0D5173"],
// opacity: 0.3,
},
},
axisLine: {
show: false,
},
splitLine: {
show: false,
},
},
],
series: [
{
type: "radar",
color: "#07A3FB",
emphasis: { show: false },
symbol: "none",
lineStyle: {
show: false,
color: "none",
},
data: [
{
value: [1, 5, 1],
name: "Data B",
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0.1,
color: "#DC6A00", // 0% 处的颜色
},
{
offset: 0.5,
color: "#5D887C", // 100% 处的颜色
},
{
offset: 1,
color: "#099CCD", // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
},
],
},
],
};
export default options;

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorAnalysis/components/trafficIndicators/index.vue

@ -158,6 +158,7 @@ import * as echarts from "echarts";
import chart1 from "./assets/charts"; import chart1 from "./assets/charts";
import chart2 from "./assets/charts2"; import chart2 from "./assets/charts2";
import chart3 from "./assets/charts3"; import chart3 from "./assets/charts3";
import chartsRadar from "./assets/chartsRadar";
import ElQuarterPicker from "./ElQuarterPicker"; import ElQuarterPicker from "./ElQuarterPicker";
const drawRoundRect = (ctx, x, y, width, height, radius, gr) => { const drawRoundRect = (ctx, x, y, width, height, radius, gr) => {
@ -345,9 +346,9 @@ export default {
var myChart1 = echarts.init(document.getElementById("chart1")); var myChart1 = echarts.init(document.getElementById("chart1"));
myChart1.setOption(chart1); myChart1.setOption(chart1);
var myChart2 = echarts.init(document.getElementById("chart2")); var myChart2 = echarts.init(document.getElementById("chart2"));
myChart2.setOption(chart2); myChart2.setOption(chartsRadar);
var myChart3 = echarts.init(document.getElementById("chart3")); var myChart3 = echarts.init(document.getElementById("chart3"));
myChart3.setOption(chart2); myChart3.setOption(chartsRadar);
const domMap = document.getElementById("chart2"); const domMap = document.getElementById("chart2");
let parentDiv = domMap.firstChild; let parentDiv = domMap.firstChild;

Loading…
Cancel
Save