Browse Source

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

wangqin
qingzhengli 7 months ago
parent
commit
c96b521750
  1. 47
      ruoyi-ui/src/api/commandDispatch/index.js
  2. 172
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/LineClick/index.vue
  3. 169
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue
  4. 41
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue
  5. 55
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
  6. 356
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue
  7. 192
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue
  8. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  9. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  10. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  11. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  12. 4
      ruoyi-ui/vue.config.js

47
ruoyi-ui/src/api/commandDispatch/index.js

@ -1,7 +1,7 @@
import request from "@/utils/request";
// 查询事件气象
export function WeatherForecast(lng, lat) {
export function getWeatherForecast(lng, lat) {
return request({
url:
"/weatherForecast/queryTheSpecifiedLatitudeAndLongitudeWeather/" +
@ -13,10 +13,53 @@ export function WeatherForecast(lng, lat) {
}
// 查询调度联络
export function commandDispatch(data) {
export function postCommandDispatch(data) {
return request({
url: "/business/warning/commandAndDispatch",
method: "post",
data,
});
}
// 处置过程节点
export function getProcessNode(eventId) {
return request({
url: "/dc/system/event/getProcessNode/" + eventId,
method: "get",
});
}
// 处置过程记录
export function getProcessList(eventId) {
return request({
url: "/system/process/list/?eventId=" + eventId,
method: "get",
});
}
// 处置过程发送
export function postProcess(data) {
return request({
url: "/system/process",
method: "post",
data,
});
}
// 解除事件
export function postCompleteEvent(data) {
return request({
url: "/dc/system/event/completeEvent",
method: "post",
data,
});
}
// 无需清障
export function postNoSkipClear(data) {
return request({
url: "/dc/system/event/skipClear",
method: "post",
data,
});
}

172
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/LineClick/index.vue

@ -1,5 +1,5 @@
<template>
<div :class='["TimeLine1", { "auto-size": autoSize }]' ref="TimeLine1Ref">
<div :class="['TimeLine1', { 'auto-size': autoSize }]" ref="TimeLine1Ref">
<!-- 节点 -->
<div class="node" v-for="(item, index) in data" :key="index" ref="nodeRefs">
<span class="top-label keep-ratio-bottom">
@ -8,33 +8,49 @@
</slot>
</span>
<div class="center">
<div class="line" v-if="!index" :style="{ width: `${nodeLinesWidth[-1]}px` }" />
<div class="circle keep-ratio" :style="{ '--active-color': !item.isActive ? normalColor : activeColor }">
</div>
<div class="line" :style="{
width: `${nodeLinesWidth[index]}px`,
borderImage: getBorderImageStyle(item),
}" />
<div
class="line"
v-if="!index"
:style="{ width: `${nodeLinesWidth[-1]}px` }"
/>
<div
class="circle keep-ratio"
:style="{
'--active-color': !item.isActive ? normalColor : activeColor,
}"
></div>
<div
class="line"
:style="{
width: `${nodeLinesWidth[index]}px`,
borderImage: getBorderImageStyle(item),
}"
/>
</div>
<slot name="bottom-label" :data="item">
<div class="bottom keep-ratio" @click="onClick(item)"
:style="{ backgroundImage: `url(${require(`./images/bg${item.isActive ? '-active' : ''}.svg`)})` }">
<div
class="bottom keep-ratio"
@click="onClick(item)"
:style="{
backgroundImage: `url(${require(`./images/bg${
item.isActive ? '-active' : ''
}.svg`)})`,
}"
>
{{ item.label }}
</div>
</slot>
</div>
</div>
</template>
<script>
function getPositionAtCenter(element) {
const { top, left } = element.getBoundingClientRect();
return {
x: left,
y: top
y: top,
};
}
@ -42,73 +58,87 @@ function getDistanceBetweenElements(domA, domB) {
const domAPosition = getPositionAtCenter(domA);
const domBPosition = getPositionAtCenter(domB);
return Math.hypot(domAPosition.x - domBPosition.x, domAPosition.y - domBPosition.y);
return Math.hypot(
domAPosition.x - domBPosition.x,
domAPosition.y - domBPosition.y
);
}
export default {
name: 'TimeLine1',
name: "TimeLine1",
props: {
data: {
type: Array,
default: () => Array.from({ length: 15 }).map(() => ({
time: "16.36",
label: "阿发",
isActive: false
}))
default: () =>
Array.from({ length: 15 }).map(() => ({
time: "16.36",
label: "阿发",
isActive: false,
})),
},
activeColor: {
type: String,
default: "#39D5BF"
default: "#39D5BF",
},
normalColor: {
type: String,
default: "#ccc"
default: "#ccc",
},
lineActiveColor: {
type: String,
default: "linear-gradient(90deg, rgba(59, 216, 188, 1), rgba(29, 171, 215, 1)}) 2 2"
default:
"linear-gradient(90deg, rgba(59, 216, 188, 1), rgba(29, 171, 215, 1)}) 2 2",
},
lineNormalColor: {
type: String,
default: null
default: null,
},
//
autoSize: {
type: Boolean,
default: true
default: true,
},
filterDistance: {
type: Function,
default: null
}
default: null,
},
},
data() {
return {
nodeLinesWidth: {}
}
nodeLinesWidth: {},
};
},
watch: {
data: {
handler(data) {
let needFilter = false
let needFilter = false;
const nodeLinesWidth = [];
const filterDistance = num => needFilter ? this.filterDistance(num) : num;
const filterDistance = (num) =>
needFilter ? this.filterDistance(num) : num;
const removeDistance = 20 + 4 * 2;
function getDistance(index) {
return filterDistance(getDistanceBetweenElements(
this.$refs.nodeRefs[index].querySelector('.center'),
this.$refs.nodeRefs[index + 1].querySelector('.center'))
) - removeDistance
};
return (
filterDistance(
getDistanceBetweenElements(
this.$refs.nodeRefs[index].querySelector(".center"),
this.$refs.nodeRefs[index + 1].querySelector(".center")
)
) - removeDistance
);
}
function getSpecialDistance(index) {
return filterDistance(getDistanceBetweenElements(
this.$refs.nodeRefs[index].parentElement,
this.$refs.nodeRefs[index].querySelector('.center'))
) - removeDistance
return (
filterDistance(
getDistanceBetweenElements(
this.$refs.nodeRefs[index].parentElement,
this.$refs.nodeRefs[index].querySelector(".center")
)
) - removeDistance
);
}
const getLineWidths = () => {
@ -117,52 +147,60 @@ export default {
data.forEach((_, index) => {
if (index === data.length - 1) {
if (this.autoSize) {
nodeLinesWidth[-1] = getSpecialDistance.call(this, 0)
nodeLinesWidth[data.length - 1] = getSpecialDistance.call(this, data.length - 1)
nodeLinesWidth[-1] = getSpecialDistance.call(this, 0);
nodeLinesWidth[data.length - 1] = getSpecialDistance.call(
this,
data.length - 1
);
}
return
};
return;
}
nodeLinesWidth[index] = getDistance.call(this, index);
});
this.nodeLinesWidth = nodeLinesWidth;
}
};
this.$nextTick(() => {
const timeLine1RefDom = this.$refs.TimeLine1Ref;
if (timeLine1RefDom.clientWidth != timeLine1RefDom.getBoundingClientRect().width) {
needFilter = true
if (
timeLine1RefDom.clientWidth !=
timeLine1RefDom.getBoundingClientRect().width
) {
needFilter = true;
}
getLineWidths();
})
});
},
immediate: true
}
immediate: true,
},
},
methods: {
getBorderImageStyle(item) {
const linearColor = item.isActive ? (this.lineActiveColor || `${this.activeColor}, ${this.activeColor}`) : (this.lineNormalColor || `${this.normalColor}, ${this.normalColor}`)
const linearColor = item.isActive
? this.lineActiveColor || `${this.activeColor}, ${this.activeColor}`
: this.lineNormalColor || `${this.normalColor}, ${this.normalColor}`;
return `linear-gradient(90deg, ${linearColor}) 2 2`
return `linear-gradient(90deg, ${linearColor}) 2 2`;
},
onClick(item) {
this.data.forEach(it => {
this.data.forEach((it) => {
if (it.id == item.id) {
it.isActive = true;
} else {
it.isActive = false;
}
})
this.$emit('update:tableData', item.id);
});
this.$emit("update:tableData", item.id);
// console.log('data', item)
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
div.auto-size {
justify-content: space-between;
overflow: hidden;
@ -187,7 +225,7 @@ div.auto-size {
font-size: 14px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
color: #ffffff;
display: flex;
flex-wrap: nowrap;
overflow: auto;
@ -215,7 +253,7 @@ div.auto-size {
position: relative;
.circle {
border: 1px solid var(--active-color, #39D5BF);
border: 1px solid var(--active-color, #39d5bf);
border-radius: 50%;
width: 15px;
height: 15px;
@ -230,19 +268,23 @@ div.auto-size {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background-color: var(--active-color, #39D5BF);
background-color: var(--active-color, #39d5bf);
}
}
.line {
position: absolute;
height: 0px;
opacity: 1;
border: 2px solid;
//border-image: linear-gradient(90deg, rgba(59, 216, 188, 1), rgba(29, 171, 215, 1)) 2 2;
border-image: linear-gradient(90deg, rgb(204, 204, 204), rgb(204, 204, 204)) 2 / 1 / 0 stretch;
border-image: linear-gradient(
90deg,
rgb(204, 204, 204),
rgb(204, 204, 204)
)
2 / 1 / 0 stretch;
&:first-child {
right: calc(50% + 8px + 6px);
}

169
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue

@ -1,5 +1,5 @@
<template>
<div :class='["TimeLine1", { "auto-size": autoSize }]' ref="TimeLine1Ref">
<div :class="['TimeLine1', { 'auto-size': autoSize }]" ref="TimeLine1Ref">
<!-- 节点 -->
<div class="node" v-for="(item, index) in data" :key="index" ref="nodeRefs">
<span class="top-label keep-ratio-bottom">
@ -8,33 +8,48 @@
</slot>
</span>
<div class="center">
<div class="line" v-if="!index" :style="{ width: `${nodeLinesWidth[-1]}px` }" />
<div class="circle keep-ratio" :style="{ '--active-color': !item.isActive ? normalColor : activeColor }">
</div>
<div class="line" :style="{
width: `${nodeLinesWidth[index]}px`,
borderImage: getBorderImageStyle(item),
}" />
<div
class="line"
v-if="!index"
:style="{ width: `${nodeLinesWidth[-1]}px` }"
/>
<div
class="circle keep-ratio"
:style="{
'--active-color': !item.isActive ? normalColor : activeColor,
}"
></div>
<div
class="line"
:style="{
width: `${nodeLinesWidth[index]}px`,
borderImage: getBorderImageStyle(item),
}"
/>
</div>
<slot name="bottom-label" :data="item">
<div class="bottom keep-ratio"
:style="{ backgroundImage: `url(${require(`./images/bg${item.isActive ? '-active' : ''}.svg`)})` }">
<div
class="bottom keep-ratio"
:style="{
backgroundImage: `url(${require(`./images/bg${
item.isActive ? '-active' : ''
}.svg`)})`,
}"
>
{{ item.label }}
</div>
</slot>
</div>
</div>
</template>
<script>
function getPositionAtCenter(element) {
const { top, left } = element.getBoundingClientRect();
return {
x: left,
y: top
y: top,
};
}
@ -42,73 +57,87 @@ function getDistanceBetweenElements(domA, domB) {
const domAPosition = getPositionAtCenter(domA);
const domBPosition = getPositionAtCenter(domB);
return Math.hypot(domAPosition.x - domBPosition.x, domAPosition.y - domBPosition.y);
return Math.hypot(
domAPosition.x - domBPosition.x,
domAPosition.y - domBPosition.y
);
}
export default {
name: 'TimeLine1',
name: "TimeLine1",
props: {
data: {
type: Array,
default: () => Array.from({ length: 15 }).map(() => ({
time: "16.36",
label: "阿发",
isActive: false
}))
default: () =>
Array.from({ length: 15 }).map(() => ({
time: "16.36",
label: "阿发",
isActive: false,
})),
},
activeColor: {
type: String,
default: "#39D5BF"
default: "#39D5BF",
},
normalColor: {
type: String,
default: "#ccc"
default: "#ccc",
},
lineActiveColor: {
type: String,
default: "linear-gradient(90deg, rgba(59, 216, 188, 1), rgba(29, 171, 215, 1)}) 2 2"
default:
"linear-gradient(90deg, rgba(59, 216, 188, 1), rgba(29, 171, 215, 1)}) 2 2",
},
lineNormalColor: {
type: String,
default: null
default: null,
},
//
autoSize: {
type: Boolean,
default: true
default: true,
},
filterDistance: {
type: Function,
default: null
}
default: null,
},
},
data() {
return {
nodeLinesWidth: {}
}
nodeLinesWidth: {},
};
},
watch: {
data: {
handler(data) {
let needFilter = false
let needFilter = false;
const nodeLinesWidth = [];
const filterDistance = num => needFilter ? this.filterDistance(num) : num;
const filterDistance = (num) =>
needFilter ? this.filterDistance(num) : num;
const removeDistance = 20 + 4 * 2;
function getDistance(index) {
return filterDistance(getDistanceBetweenElements(
this.$refs.nodeRefs[index].querySelector('.center'),
this.$refs.nodeRefs[index + 1].querySelector('.center'))
) - removeDistance
};
return (
filterDistance(
getDistanceBetweenElements(
this.$refs.nodeRefs[index].querySelector(".center"),
this.$refs.nodeRefs[index + 1].querySelector(".center")
)
) - removeDistance
);
}
function getSpecialDistance(index) {
return filterDistance(getDistanceBetweenElements(
this.$refs.nodeRefs[index].parentElement,
this.$refs.nodeRefs[index].querySelector('.center'))
) - removeDistance
return (
filterDistance(
getDistanceBetweenElements(
this.$refs.nodeRefs[index].parentElement,
this.$refs.nodeRefs[index].querySelector(".center")
)
) - removeDistance
);
}
const getLineWidths = () => {
@ -117,41 +146,49 @@ export default {
data.forEach((_, index) => {
if (index === data.length - 1) {
if (this.autoSize) {
nodeLinesWidth[-1] = getSpecialDistance.call(this, 0)
nodeLinesWidth[data.length - 1] = getSpecialDistance.call(this, data.length - 1)
nodeLinesWidth[-1] = getSpecialDistance.call(this, 0);
nodeLinesWidth[data.length - 1] = getSpecialDistance.call(
this,
data.length - 1
);
}
return
};
return;
}
nodeLinesWidth[index] = getDistance.call(this, index);
});
this.nodeLinesWidth = nodeLinesWidth;
}
};
this.$nextTick(() => {
const timeLine1RefDom = this.$refs.TimeLine1Ref;
if (timeLine1RefDom.clientWidth != timeLine1RefDom.getBoundingClientRect().width) {
needFilter = true
if (
timeLine1RefDom.clientWidth !=
timeLine1RefDom.getBoundingClientRect().width
) {
needFilter = true;
}
getLineWidths();
})
});
},
immediate: true
}
immediate: true,
},
},
methods: {
getBorderImageStyle(item) {
const linearColor = item.isActive ? (this.lineActiveColor || `${this.activeColor}, ${this.activeColor}`) : (this.lineNormalColor || `${this.normalColor}, ${this.normalColor}`)
const linearColor = item.isActive
? this.lineActiveColor || `${this.activeColor}, ${this.activeColor}`
: this.lineNormalColor || `${this.normalColor}, ${this.normalColor}`;
return `linear-gradient(90deg, ${linearColor}) 2 2`
}
}
}
return `linear-gradient(90deg, ${linearColor}) 2 2`;
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
div.auto-size {
justify-content: space-between;
overflow: hidden;
@ -176,7 +213,7 @@ div.auto-size {
font-size: 14px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
color: #ffffff;
display: flex;
flex-wrap: nowrap;
overflow: auto;
@ -192,8 +229,9 @@ div.auto-size {
min-width: 90px;
.top-label {
line-height: 16px;
height: 24px;
line-height: 12px;
height: 20px;
text-align: center;
}
.center {
@ -202,9 +240,10 @@ div.auto-size {
justify-content: center;
gap: 6px;
position: relative;
margin-top: 5px;
.circle {
border: 1px solid var(--active-color, #39D5BF);
border: 1px solid var(--active-color, #39d5bf);
border-radius: 50%;
width: 15px;
height: 15px;
@ -219,17 +258,21 @@ div.auto-size {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background-color: var(--active-color, #39D5BF);
background-color: var(--active-color, #39d5bf);
}
}
.line {
position: absolute;
height: 0px;
opacity: 1;
border: 2px solid;
border-image: linear-gradient(90deg, rgba(59, 216, 188, 1), rgba(29, 171, 215, 1)) 2 2;
border-image: linear-gradient(
90deg,
rgba(59, 216, 188, 1),
rgba(29, 171, 215, 1)
)
2 2;
&:first-child {
right: calc(50% + 8px + 6px);

41
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue

@ -1,7 +1,11 @@
<template>
<Card class="CrowdnessIndicatorRankings border" title="拥挤度指标排名情况">
<div class="map">
<AMapContainer ref="AMapContainerRef" v-if="delayLoad" style="z-index: 9" />
<AMapContainer
ref="AMapContainerRef"
v-if="delayLoad"
style="z-index: 9"
/>
</div>
<div class="right border">
<div
@ -11,16 +15,21 @@
@click="handleClick(item)"
>
<div
v-if="item.key === 'bar'"
class="label"
slot="reference"
:style="{
backgroundImage: `url(${require(`./images/${item.key}${
isActive(item) ? '-active' : ''
}.svg`)})`,
}"
v-if="item.key === 'bar'"
class="label"
slot="reference"
:style="{
backgroundImage: `url(${require(`./images/${item.key}${
isActive(item) ? '-active' : ''
}.svg`)})`,
}"
/>
<ElPopover v-else trigger="manual" :value="isActive(item)" placement="left">
<ElPopover
v-else
trigger="manual"
:value="isActive(item)"
placement="left"
>
<div v-if="item.key === 'weather'" class="weather">
<span>天气{{ weatherData.text }}</span>
<span>能见度{{ weatherData.vis }}公里</span>
@ -51,7 +60,7 @@
import Card from "@screen/components/Card2/Card.vue";
import AMapContainer from "@screen/pages/Home/components/AMapContainer/index.vue";
import { provideMixin } from "./../../mixin";
import { WeatherForecast } from "@/api/commandDispatch";
import { getWeatherForecast } from "@/api/commandDispatch";
import * as echarts from "echarts";
import { StatChartOption } from "./charts";
@ -106,7 +115,7 @@ export default {
if (findIndex === -1) this.active.push(item.key);
else this.active.splice(findIndex, 1);
if (item.key === "weather") {
this.getWeatherForecast();
this.getWeather();
} else if (item.key === "pie") {
this.$nextTick(() => {
const statChart = echarts.init(
@ -114,12 +123,12 @@ export default {
);
statChart.setOption(StatChartOption);
});
} else if (item.key === 'bar'){
this.$refs.AMapContainerRef.showRoadConditions(findIndex === -1)
} else if (item.key === "bar") {
this.$refs.AMapContainerRef.showRoadConditions(findIndex === -1);
}
},
getWeatherForecast() {
WeatherForecast(117.2, 36.65).then((res) => {
getWeather() {
getWeatherForecast(117.2, 36.65).then((res) => {
this.weatherData =
res.data.weatherInTheAreaWhereTheIncidentOccurred.now;
console.log("气象", res);

55
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue

@ -9,22 +9,23 @@
<div class="dispatch-item">
<span class="label">业务单位</span>
<span class="value">{{
dispatchData.organizationName ? dispatchData.organizationName : "-"
dispatchData.deptName ? dispatchData.deptName : "-"
}}</span>
</div>
<div class="dispatch-item">
<div>
<span class="label">值班领导</span>
<span class="value">{{
dispatchData.shiftsName ? dispatchData.shiftsName : "-"
}}</span>
</div>
<div>
<span class="label">值班领导</span>
<span class="value" v-for="item in dispatchData.shifts">
姓名{{ item.shiftsName ? item.shiftsName : "-" }} 电话{{
item.shiftsNumber ? item.shiftsNumber : "-"
}}</span
>
<!-- <div>
<span class="label">手机号</span>
<span class="value">{{
dispatchData.shiftsNumber ? dispatchData.shiftsNumber : "-"
}}</span>
</div>
</div> -->
</div>
<div class="dispatch-item">
<span class="label">调度人员</span>
@ -68,7 +69,7 @@ import Card from "@screen/components/Card2/Card.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import { provideMixin } from "./../../mixin";
import { commandDispatch } from "@/api/commandDispatch";
import { postCommandDispatch } from "@/api/commandDispatch";
import StatsDialogVisible from "./StatsDialogVisible/index.vue";
import request from "@/utils/request";
@ -99,29 +100,31 @@ export default {
},
getCommandDispatch() {
let data = {
stakeMark: "K099+750",
stakeMark: "K100+100",
id: "96b9918efc01488cb22fa1d9d3236dfd",
};
commandDispatch(data).then((res) => {
res.data.forEach((element) => {
if (element.vehiclesMap.length > 0) {
element.vehiclesMap.forEach((item) => {
this.vehicleTypeList.forEach((i) => {
if (item.vehicleType == i.dictValue) {
item.vehicleText = "(" + i.dictLabel + ")";
}
});
});
}
});
this.dispatchList = res.data;
this.dispatchData = res.data[0];
postCommandDispatch(data).then((res) => {
// res.data.forEach((element) => {
// if (element.vehiclesMap.length > 0) {
// element.vehiclesMap.forEach((item) => {
// this.vehicleTypeList.forEach((i) => {
// if (item.vehicleType == i.dictValue) {
// item.vehicleText = "" + i.dictLabel + "";
// }
// });
// });
// }
// });
// this.dispatchList = res.data;
this.dispatchData = res.data.resource;
console.log(" this.dispatchData", this.dispatchData);
});
},
getVehicleTypeList() {
if (this.vehicleTypeList.length) return;
request({
url: `/system/dict/data/type/sys_vehicle_type`,
url: `/system/dict/data/type/vehicle_type`,
method: "GET",
params: {},
})

356
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue

@ -0,0 +1,356 @@
<template>
<Dialog v-model="modelVisible" title="收费站管制统计" style="width: 100%">
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import InputSearch from "@screen/components/InputSearch/index.vue";
import Table from "@screen/components/Table.vue";
import { selectTollStation } from "@/api/event/governanceAnalysis";
import request from "@/utils/request";
export default {
name: "StatsDetail",
components: {
Dialog,
InputSearch,
Table,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
},
data() {
return {
num: 0,
tableData: [],
weatherNum: [],
startTime: "",
endTime: "",
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
searchType: 1,
controlType: 1,
facilityIds: [],
facilityTableData: [],
searchFormList: [
{
label: "查询条件:",
key: "searchType",
required: true,
isAlone: true,
type: "RadioGroup",
default: 1,
options: {
type: "circle",
options: [
{
key: 1,
label: "站点",
},
{
key: 2,
label: "原因",
},
],
},
},
{
label: "事件类型:",
key: "controlType",
required: true,
isAlone: true,
type: "RadioGroup",
visible: (data) => {
if (data.searchType == 2) {
return true;
}
},
default: 1,
options: {
type: "circle",
options: [
{
key: 1,
label: "收费站封闭",
},
{
key: 2,
label: "收费站限行",
},
],
},
},
{
label: "选择站点:",
key: "facilityId",
required: true,
type: "Select",
options: {
multiple: true,
options: [],
},
default: [],
visible: (data) => {
if (data.searchType == 1) {
return true;
}
},
},
{
label: "日期:",
key: "date",
required: true,
type: "datePicker",
default: "",
options: {
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
valueFormat: "yyyy-MM-dd",
type: "daterange",
},
},
],
queryParams: {},
};
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
methods: {
getFacilityList() {
Promise.allSettled([
//
request({
url: `/business/facility/query`,
method: "get",
}),
]).then((res) => {
if (res[0].status === "fulfilled" && res[0].value.code == 200) {
// this.searchFormList[2].options.options = res[0].value.data.map(
// (item) => ({
// key: item.id,
// label: item.facilityName,
// })
// );
let dataList = [];
res[0].value.data.forEach((item) => {
if (item.facilityType == 1) {
dataList.push({
key: item.id,
label: item.facilityName,
});
}
});
this.searchFormList[2].options.options = dataList;
this.facilityIds = res[0].value.data.map((item) => item.id);
this.searchFormList[2].default = dataList.map((item) => item.key);
console.log(56, this.searchFormList[2].default);
let currentMonth = moment().format("YYYY-MM");
let currentDate = moment().format("YYYY-MM-DD");
this.queryParams = {
searchType: 1,
facilityId: this.facilityIds,
date: [currentMonth + "-01", currentDate],
};
this.searchFormList[3].default = [currentMonth + "-01", currentDate];
this.getSelectTollStation(this.queryParams);
}
});
},
// handleResetForm(data) {
// this.getSelectTollStation(data);
// },
handleSearch(data, value) {
console.log(888, data, value);
if (value == "reset") {
data = this.queryParams;
}
this.getSelectTollStation(data);
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (this.searchType == 2) {
if (!row.causeTypeName) {
if (columnIndex === 0) {
return [1, 2];
} else if (columnIndex === 1) {
return [0, 0];
}
}
if (row.controlCauseName === "恶劣天气") {
if (columnIndex === 0) {
console.log(this.weatherNum.length);
if (rowIndex === 0) {
return [this.weatherNum.length, 1];
} else if (rowIndex <= this.weatherNum.length) {
return [0, 0];
}
// if (rowIndex === 2) {
// return [7, 1];
// }
// else if (rowIndex === 3) {
// return [0, 0];
// } else if (rowIndex === 4) {
// return [0, 0];
// }
// else if (rowIndex === 5) {
// return [0, 0];
// }
// else if (rowIndex === 6) {
// return [0, 0];
// }
// else if (rowIndex === 7) {
// return [0, 0];
// }
// else if (rowIndex === 8) {
// return [0, 0];
// }
}
// this.weatherNum = 0
}
}
},
getSelectTollStation(data) {
let startTime = "";
let endTime = "";
if (data) {
startTime = data.date[0] + " 00:00:00";
endTime = data.date[1] + " 23:59:59";
} else {
startTime = new Date("2024-01-01 11:12:21");
startTime = new Date("2024-01-26 11:12:36");
}
var formData = new FormData();
this.searchType = data.searchType;
this.controlType = data.controlType;
if (data.searchType == 1) {
formData.append("facilityId", data.facilityId);
} else {
formData.append("controlType", data.controlType);
}
formData.append("searchType", data.searchType);
formData.append("startTime", startTime);
formData.append("endTime", endTime);
let weatherData = [];
let otherData = [];
selectTollStation(formData).then((res) => {
if (data.searchType == 2) {
this.weatherNum = [];
res.data.forEach((item) => {
if (item.causeTypeName) {
this.weatherNum.push(item.causeTypeName);
weatherData.push(item);
} else {
otherData.push(item);
}
});
this.tableData = weatherData.concat(otherData);
} else {
res.data.forEach((item) => {
item.total =
item.facilityClose +
item.facilityRestriction +
item.facilityInterval;
});
this.facilityTableData = res.data;
}
});
},
},
mounted() {
this.getFacilityList();
},
};
</script>
<style lang="scss" scoped>
.dialog {
min-height: 800px;
}
.search {
display: flex;
flex-direction: row-reverse;
}
::v-deep .is-scrolling-none {
background: #0b6581;
}
::v-deep .el-table__empty-text {
color: #3ae0f8;
}
.StatsDetail {
// height: 770px;
margin: 20px 0;
width: 100%;
display: flex;
gap: 5px;
}
.el-table {
border: 1px solid #07aec6;
background: #0b6581;
}
::v-deep .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
background: #0b6581;
border: 1px solid #07aec6;
}
::v-deep .el-table th.el-table__cell > .cell {
color: #3de8ff;
}
::v-deep .el-table thead.is-group th.el-table__cell {
background: #0b6581;
border: 1px solid #07aec6;
}
// ::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell {
border: 1px solid #07aec6;
background: #1b586d;
color: #fff;
}
::v-deep .el-table tr {
border: 1px solid #07aec6;
background-color: #0b6581;
}
::v-deep
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background: #1b586d;
border: 1px solid #07aec6;
}
::v-deep .el-table::before,
.el-table--group::after,
.el-table--border::after {
background: none;
}
</style>

192
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue

@ -1,9 +1,13 @@
<template>
<Card class="DisposalProcess" title="处置过程">
<template #title-suffix>
<ButtonGradient class="title-button" @click=""> 事件解除 </ButtonGradient>
<ButtonGradient class="title-button" @click="handleEventRelieve">
事件解除
</ButtonGradient>
<!-- <ButtonGradient class="title-button"> 协同调度 </ButtonGradient> -->
<ButtonGradient class="title-button" @click=""> 无需清障 </ButtonGradient>
<ButtonGradient class="title-button" @click="handleNoWrecker">
无需清障
</ButtonGradient>
<ButtonGradient class="title-button"> 重要事件上报 </ButtonGradient>
<!-- <ButtonGradient class="title-button"> 路赔 </ButtonGradient> -->
<ButtonGradient
@ -71,6 +75,11 @@
</ButtonGradient> -->
</div>
</Card>
<DialogVisible
:visible="dialogVisible"
:data="dispatchList"
@update:value="handleClose"
/>
</template>
<script>
@ -80,6 +89,14 @@ import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/inde
import { getToken } from "@/utils/auth";
import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import DialogVisible from "./DialogVisible/index.vue";
import {
getProcessNode,
getProcessList,
postProcess,
postCompleteEvent,
postNoSkipClear,
} from "@/api/commandDispatch";
import { provideMixin } from "./../../mixin";
import { timeLine2List } from "./data";
@ -95,21 +112,16 @@ export default {
TimeLine1,
TimeLine2,
RadioGroup,
DialogVisible,
},
emit: ["fullHeight"],
data() {
return {
dialogVisible: true,
eventId: "1a91d65cc31f4a9d90122888edb31043",
test: null,
testRadio: "input",
timeLine1List: [],
// timeLine2List: Array.from({ length: 6 }).map(() => ({
// title: "",
// time: "2023-12-21 16:35:44",
// name: "",
// desc: "",
// posts: ''
// })),
timeLine2List: [],
isFullHeight: false,
options: [],
@ -133,108 +145,114 @@ export default {
this.$emit("fullHeight", "CrowdnessIndicatorRankings");
},
//
getProcess(eventId) {
getProcessNode(this.eventId).then((result) => {
console.log("处置过程节点", result);
if (result.code != 200) return [];
this.timeLine1List = result.data.map((item) => {
return {
time: item.operationTime,
label: item.processNode,
isActive: item.status == 1 ? true : false,
};
});
this.options = result.data.filter((item) => {
item.status == 0;
return item;
});
});
},
//
async detailChange(id) {
const timelineData = await this.getDetail(id);
let processIdMap = {};
getProcessList(id).then((result) => {
console.log("处置过程记录", result);
this.timeLine2List = result.map((item) => {
processIdMap[item.processId] = new Date(
item.operationTime
).toLocaleTimeString();
this.timeLine2List = timelineData.map((item) => {
processIdMap[item.processId] = new Date(
item.operationTime
).toLocaleTimeString();
return {
// title: "",
time: item.operationTime
? new Date(item.operationTime).toLocaleString()
: null,
name: item.operator,
desc: item.context,
// posts: ''
};
return {
// title: "",
time: item.operationTime
? new Date(item.operationTime).toLocaleString()
: null,
name: item.operator,
desc: item.context,
// posts: ''
};
});
});
// this.timeLine1List = data.processConfigList.map((item) => {
// return {
// time: processIdMap[item.nodeNode],
// label: item.processNode,
// isActive: !!processIdMap[item.nodeNode],
// };
// });
},
getDetail(id) {
return request({
url: `/system/process/list`,
method: "GET",
params: {
eventId: id,
},
})
.then((result) => {
return result || [];
})
.catch((err) => []);
},
//
getProcessNode(eventId) {
return request({
url:
`/dc/system/event/getProcessNode/` +
"1a91d65cc31f4a9d90122888edb31043",
method: "GET",
})
.then((result) => {
if (result.code != 200) return [];
this.timeLine1List = result.data.map((item) => {
return {
time: item.operationTime,
label: item.processNode,
isActive: item.status == 1 ? true : false,
};
});
this.options = result.data.filter((item) => {
item.status == 0;
return item;
});
})
.catch((err) => []);
},
//
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
this.imageUrl = res.url;
},
//
handleUploadError() {
this.$message.error("上传失败");
},
containsArrayElement(str, arr) {
return arr.filter((element) => str.includes(element));
},
//
onSubmit() {
let type = this.containsArrayElement(this.imageUrl, this.fileType);
console.log(type);
request({
url: `/system/process`,
method: "POST",
data: {
eventId: "1a91d65cc31f4a9d90122888edb31043",
if (this.context || this.imageUrl) {
let type = this.containsArrayElement(this.imageUrl, this.fileType);
let data = {
eventId: this.eventId,
processId: this.processId,
context: this.context,
file: this.imageUrl,
type: type.join(","),
},
})
.then((result) => {
source: 1,
};
postProcess(data).then((result) => {
if (result.code != 200) return [];
this.getProcessNode();
this.detailChange("1a91d65cc31f4a9d90122888edb31043");
})
.catch((err) => []);
this.getProcess();
this.detailChange(this.eventId);
});
} else {
this.$message.warning("调度指令不能为空");
}
},
//
handleEventRelieve() {
let data = new FormData();
data.append("eventId", this.eventId);
postCompleteEvent(data).then((result) => {
if (result.code != 200) return [];
this.$message.success("事件解除成功");
});
},
//
handleNoWrecker() {
let data = new FormData();
data.append("eventId", this.eventId);
postNoSkipClear(data).then((result) => {
if (result.code != 200) return [];
this.$message.success("操作成功");
});
},
handleClick() {
this.dialogVisible = true;
},
handleClose() {
this.dialogVisible = false;
},
},
async mounted() {
this.getProcessNode();
await this.detailChange("1a91d65cc31f4a9d90122888edb31043");
this.getProcess();
await this.detailChange(this.eventId);
},
};
</script>
@ -261,7 +279,7 @@ export default {
.bottom {
display: grid;
grid-template-columns: 0.5fr auto 1fr 90px 90px;
grid-template-columns: 0.5fr auto 1fr 90px;
width: 100%;
gap: 6px;
}

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

@ -136,9 +136,10 @@ export default {
url: `/system/process/list`,
method: "get",
params: { eventId: this.formData.id },
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
const rows = result.rows;
}).then((rows) => {
console.log('rows',rows)
// if (result.code != 200) return Message.error(result?.msg);
// const rows = result.rows;
this.timeLine1List = [];
this.timeLine2List = [];
@ -171,6 +172,28 @@ export default {
});
});
},
getProcessNode() {
return request({
url:
`/dc/system/event/getProcessNode/${this.formData.id}`,
method: "GET",
})
.then((result) => {
if (result.code != 200) return [];
// this.timeLine1List = result.data.map((item) => {
// return {
// time: item.operationTime,
// label: item.processNode,
// isActive: item.status == 1 ? true : false,
// };
// });
// this.options = result.data.filter((item) => {
// item.status == 0;
// return item;
// });
})
.catch((err) => []);
},
onCloseAddNew() {
this.isShowDialog = false;
},

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

@ -945,7 +945,7 @@ export const tabConfigList = [
},
{
label: "限制类型:",
key: "dcEventAccident.limitedType",
key: "dcEventTrafficControl.limitedType",
required: true,
type: "select",
options: {
@ -963,7 +963,7 @@ export const tabConfigList = [
},
{
label: "车辆类型:",
key: "dcEventAccident.vehicleType",
key: "dcEventTrafficControl.vehicleType",
required: true,
type: "select",
options: {

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

@ -162,7 +162,7 @@ export default {
formData.lang = "";
}
if (this.index == 2 && formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId.join(',');
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = ''
}

29
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

@ -290,24 +290,25 @@ export default {
initDevice() {
//线线
if (process.env.NODE_ENV == "development") {
this.equipments = [];
this.equipSeries.forEach((item) => {
this.equipments.push({
title: item,
total: Math.floor(Math.random() * 600) + 800,
pctOnl: Math.floor(100 * Math.random()) + "%",
pctOffl: "25%",
pctLose: "15%",
sumUseState: "90%",
});
});
return;
}
// if (process.env.NODE_ENV == "development") {
// this.equipments = [];
// this.equipSeries.forEach((item) => {
// this.equipments.push({
// title: item,
// total: Math.floor(Math.random() * 600) + 800,
// pctOnl: Math.floor(100 * Math.random()) + "%",
// pctOffl: "25%",
// pctLose: "15%",
// sumUseState: "90%",
// });
// });
// return;
// }
getSystemStatusType().then((res) => {
let allList = [];
let sort = res.data["排序规则"].rule.split(",");
console.log("sort", sort);
sort.forEach((i) => {
for (let key in res.data) {
let val = res.data[key];

4
ruoyi-ui/vue.config.js

@ -52,8 +52,8 @@ module.exports = {
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦
target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝

Loading…
Cancel
Save