Browse Source

首页事件预警

wangqin
zhoule 7 months ago
parent
commit
0e5737da83
  1. 50
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue
  2. 24
      ruoyi-ui/src/views/JiHeExpressway/images/event/交通拥堵.svg
  3. 7
      ruoyi-ui/src/views/JiHeExpressway/images/event/行人.svg
  4. 22
      ruoyi-ui/src/views/JiHeExpressway/images/event/非机动车.svg

50
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue

@ -7,7 +7,17 @@
<div>
<Table :data="tableData" :show-header="false">
<ElTableColumn prop="remark" width="280" />
<ElTableColumn prop="remark" width="280">
<template slot-scope="scope">
<div class="leftColumn">
<div class="device-icon"
:style="{ backgroundImage: `url(${require(`@screen/images/event/${activeTab == 'first' ? (WarningType[scope.row.warningType] || '交通拥堵') : '交通拥堵'}.svg`)})` }" />
<p>{{ activeTab == 'first' ? WarningType[scope.row.warningType] : scope.row.stringEventType }}</p>
</div>
<P> {{ scope.row.remark }}</P>
</template>
</ElTableColumn>
</Table>
</div>
@ -24,10 +34,13 @@
import request from "@/utils/request";
import Table from '@screen/components/Table.vue';
import Pagination from '@screen/components/Pagination.vue';
import { WarningType } from "@screen/utils/enum.js";
export default {
data() {
return {
activeTab: "first",
WarningType,
tableData: [],
total: 10,
searchData: {
@ -53,9 +66,12 @@ export default {
getMainData() {
if (this.activeTab == 'first') {
request({
url: `perceivedEvents/warning/perceivedEventsList?pageNum=${this.searchData.pageNum}&pageSize=${this.searchData.pageSize}`,
url: `/perceivedEvents/warning/warningListPage?pageNum=${this.searchData.pageNum}&pageSize=${this.searchData.pageSize}`,
method: "POST",
data: {}
data: {
warningState: 1,
pageNum: 1, pageSize: 10
}
})
.then((result) => {
if (result.code != 200) return;
@ -71,7 +87,8 @@ export default {
.then((result) => {
if (result.code != 200) return;
result.rows.forEach(item => {
item.remark = item.occurrenceTime + " " + item.stakeMark + " " + item.direction + " 发生" + item.stringEventType + "( " + item.eventSubclass + ")事件"
item.remark = (item.occurrenceTime || '') + " " + (item.stakeMark || '') + " " + (item.direction || '') + " 发生" + (item.stringEventType || '') + "( " + (item.eventSubclass || '') + ")事件"
// item.remark = item.stakeMark + " " + item.direction + " " + item.stringEventType + "( " + item.eventSubclass + ")"
})
this.tableData = result.rows;
this.total = result.total;
@ -87,5 +104,28 @@ export default {
</script>
<style lang="scss" scoped>
.warning_list {}
.warning_list {
.leftColumn {
display: flex;
justify-content: center;
margin-right: 8px;
border: 1px solid #FF5F5F;
float: left;
p {
color: #FF5F5F;
font-size: 15px;
margin-right: 3px;
}
.device-icon {
height: 22px;
width: 22px;
background-repeat: no-repeat;
background-size: auto;
background-position: center;
}
}
}
</style>

24
ruoyi-ui/src/views/JiHeExpressway/images/event/交通拥堵.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.4 KiB

7
ruoyi-ui/src/views/JiHeExpressway/images/event/行人.svg

@ -0,0 +1,7 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame 10181">
<g id="Group 1142814237">
<path id="Vector" d="M13.3779 18.1716L13.119 17.6455L11.9421 21.1608C11.8483 21.4009 11.7215 21.6263 11.5655 21.8304L9.21156 25.2141C9.11074 25.3714 9.04393 25.5487 9.01552 25.7342C8.98712 25.9197 8.99778 26.1092 9.04679 26.2902C9.08788 26.4754 9.16535 26.6503 9.27455 26.8044C9.38376 26.9585 9.52245 27.0886 9.68233 27.1869C9.93838 27.3664 10.2422 27.4624 10.5533 27.4619C10.6589 27.4737 10.7655 27.4737 10.8711 27.4619C11.0643 27.4207 11.2469 27.3387 11.4071 27.2213C11.5672 27.104 11.7014 26.9538 11.8008 26.7804L14.0253 23.4326C14.298 22.997 14.5304 22.5367 14.7196 22.0575L15.367 20.2282L15.1904 20.1325C14.4165 19.6654 13.7882 18.9856 13.3779 18.1716ZM17.6385 9.35951C18.3388 9.36589 19.0131 9.09017 19.5138 8.59271C20.0145 8.09524 20.3008 7.41653 20.3101 6.70511C20.3078 5.98684 20.0252 5.29881 19.5245 4.79176C19.0237 4.28471 18.3455 4 17.6385 4C16.9315 4 16.2533 4.28471 15.7525 4.79176C15.2517 5.29881 14.9692 5.98684 14.9668 6.70511C14.9761 7.41654 15.2625 8.09525 15.7632 8.59272C16.2639 9.09019 16.9382 9.36589 17.6385 9.35951ZM20.1336 21.0292L18.0739 17.2151L18.0033 17.0955L17.8033 16.7966L17.9562 16.0194L18.6153 13.3172C18.801 12.4824 18.6589 11.607 18.2194 10.877C17.7799 10.1469 17.0775 9.61967 16.2614 9.40731C16.0029 9.322 15.733 9.27764 15.4611 9.27579C15.2073 9.24126 14.9491 9.26176 14.7037 9.33596C14.4582 9.41016 14.231 9.53636 14.037 9.70625L11.3772 12.2769C11.2291 12.4476 11.1026 12.6364 11.0005 12.8389L9.47047 16.115C9.39672 16.263 9.35407 16.4249 9.34522 16.5905C9.33637 16.756 9.36152 16.9217 9.41908 17.0769C9.47663 17.232 9.56533 17.3734 9.67954 17.4918C9.79374 17.6103 9.93096 17.7034 10.0825 17.7651C10.3859 17.9127 10.733 17.938 11.0541 17.8359C11.3751 17.7339 11.6461 17.512 11.8126 17.2151L13.3662 13.9031L13.8134 13.4726L13.425 15.1824C13.0366 16.6412 13.2249 18.7695 16.2614 20.4314L16.3556 20.4912L17.2618 22.1532C17.7165 23.6632 18.0355 25.2119 18.2151 26.7804C18.2405 26.9717 18.3062 27.1551 18.4077 27.3181C18.5093 27.4811 18.6443 27.6199 18.8036 27.725C19.0682 27.905 19.3797 28.0008 19.6981 28H19.8864C20.2691 27.9562 20.6217 27.7686 20.875 27.4739C21.0063 27.3079 21.1015 27.1155 21.1542 26.9094C21.207 26.7033 21.2161 26.4882 21.181 26.2783L20.6043 22.2369C20.5051 21.8135 20.3466 21.4068 20.1336 21.0292H20.1336ZM21.899 15.8879C21.8506 15.7387 21.7737 15.6006 21.6727 15.4816C21.5717 15.3626 21.4487 15.265 21.3105 15.1944L18.9567 13.9987L18.3446 16.5335L20.1571 17.514C20.3376 17.6277 20.545 17.6897 20.7574 17.6933C20.9607 17.6764 21.1577 17.6129 21.3335 17.5077C21.5094 17.4024 21.6595 17.2582 21.7727 17.0857C21.8859 16.9132 21.9592 16.7169 21.9872 16.5116C22.0152 16.3062 21.9971 16.0971 21.9343 15.8998L21.899 15.8879Z" fill="#FF5F5F"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

22
ruoyi-ui/src/views/JiHeExpressway/images/event/非机动车.svg

@ -0,0 +1,22 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame 10182">
<g id="&#233;&#161;&#181;&#233;&#157;&#162;-1">
<g id="&#233;&#166;&#150;&#233;&#161;&#181;-&#229;&#185;&#179;&#233;&#157;&#162;3">
<g id="&#231;&#188;&#150;&#231;&#187;&#132;-16&#229;&#164;&#135;&#228;&#187;&#189;">
<g id="1">
<g id="&#232;&#183;&#175;&#233;&#157;&#162;&#231;&#138;&#182;&#230;&#128;&#129;">
<g id="Frame" clip-path="url(#clip0_1136_5516)">
<path id="Vector" d="M10.4988 13.6273C9.82189 13.631 9.27448 14.0608 9.27448 14.591V16.0385C9.27448 16.1195 9.29224 16.199 9.31677 16.274C9.34131 16.352 9.38108 16.4263 9.42931 16.4945C9.44284 16.5148 9.45384 16.535 9.47076 16.5538C9.48854 16.5763 9.51137 16.598 9.53337 16.6198C9.55791 16.6445 9.5816 16.6685 9.60952 16.6932C9.62898 16.709 9.65182 16.7255 9.67213 16.7405C9.70682 16.766 9.74151 16.79 9.78043 16.8118C9.79904 16.823 9.81935 16.8328 9.83797 16.8425C9.90034 16.8733 9.96508 16.9001 10.0317 16.9228C10.0901 16.9415 10.1519 16.9573 10.2162 16.97C10.2263 16.9715 10.2356 16.9753 10.2466 16.9768C10.3236 16.9903 10.4017 16.9979 10.4801 16.9993H10.4759C10.4818 16.9985 10.4895 17 10.4971 17L10.5191 16.9985H10.5148C10.6683 16.9953 10.8202 16.9695 10.9641 16.922C10.9802 16.9168 10.9971 16.9093 11.014 16.9048C11.0639 16.886 11.1113 16.8642 11.157 16.8418C11.1773 16.8313 11.1968 16.8223 11.2154 16.811C11.2535 16.79 11.2898 16.7638 11.3237 16.7398C11.3449 16.724 11.366 16.709 11.3863 16.6925C11.4134 16.67 11.4379 16.6445 11.4624 16.619C11.4828 16.5973 11.5064 16.5755 11.5251 16.553C11.5411 16.5342 11.5513 16.5125 11.5657 16.4938C11.6643 16.3575 11.7182 16.1996 11.7214 16.0378V14.5903C11.723 14.0608 11.1756 13.6295 10.4988 13.6273ZM15.4391 5C15.4213 5 15.406 5.0015 15.3874 5.003L15.2309 5.00375C15.2191 5.00375 15.2081 5.0015 15.1962 5.0015C15.1793 5.0015 15.1649 5.00375 15.1505 5.00525L12.493 5.036L11.7171 6.878H9.28039L8.50369 5.036L5.84614 5.00525C5.83006 5.00375 5.81567 5.0015 5.80044 5.0015C5.7886 5.0015 5.7776 5.00375 5.76576 5.00375L5.61008 5.003C5.59317 5.0015 5.57624 5 5.55847 5C5.40796 5.00276 5.26479 5.05816 5.16018 5.15412C5.05557 5.25008 4.99801 5.37882 5.00005 5.51225V5.618C5.00005 5.89925 5.25134 6.13025 5.55846 6.13025C5.572 6.13025 5.58469 6.13025 5.59739 6.12875H5.76408C5.7759 6.12875 5.78691 6.13251 5.80046 6.13251C5.814 6.13251 5.82498 6.13025 5.83684 6.12875H8.05188L8.80574 8.201C8.76786 8.25681 8.7334 8.3144 8.70251 8.3735L7.7219 8.37575C7.71127 8.37585 7.70077 8.37781 7.69101 8.38153C7.68124 8.38525 7.6724 8.39065 7.66501 8.39741C7.65761 8.40418 7.6518 8.41218 7.64791 8.42095C7.64403 8.42972 7.64214 8.43908 7.64237 8.4485V10.0468C6.92744 10.9843 6.4147 12.8765 6.4147 13.6273C6.4147 14.6413 7.3547 16.2515 8.46139 16.2515H8.91996C8.88465 16.1466 8.86614 16.0378 8.86497 15.9283V14.3203C8.86497 13.7285 9.35654 13.2485 9.96149 13.2485H11.0403C11.6452 13.2485 12.1359 13.7285 12.1359 14.3203V15.9283C12.1359 16.04 12.1131 16.148 12.0809 16.2515H12.5387C13.6454 16.2515 14.5845 14.6398 14.5845 13.6273C14.5845 12.878 14.0718 10.9858 13.3568 10.0468V8.45C13.3572 8.44062 13.3554 8.43127 13.3516 8.42251C13.3478 8.41374 13.3421 8.40573 13.3348 8.39896C13.3274 8.39218 13.3186 8.38677 13.3089 8.38304C13.2992 8.37932 13.2887 8.37735 13.2782 8.37725L12.2975 8.37425C12.2671 8.31482 12.2323 8.2572 12.1935 8.20175L12.9482 6.1295H15.1624C15.1742 6.1295 15.1852 6.13326 15.1988 6.13326C15.2123 6.13326 15.2233 6.131 15.236 6.1295H15.4018C15.4154 6.131 15.4281 6.131 15.4416 6.131C15.7487 6.131 16 5.9 16 5.61875V5.513C15.9975 5.23099 15.7462 5 15.4391 5ZM10.4988 10.5433C9.67298 10.5395 9.00457 9.92375 9.00457 9.16625C9.00457 8.40876 9.67298 7.793 10.4988 7.78925C11.3245 7.793 11.9929 8.408 11.9929 9.16625C11.9929 9.92451 11.3245 10.5395 10.4988 10.5433Z" fill="#FF5F5F"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
<defs>
<clipPath id="clip0_1136_5516">
<rect width="12.3051" height="12.3051" fill="white" transform="translate(3.85547 4.6167)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

Loading…
Cancel
Save