Browse Source

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

wangqin
王钦 7 months ago
parent
commit
707c58fceb
  1. 24
      ruoyi-ui/src/views/JiHeExpressway/components/Card2/Card.vue
  2. 237
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue
  3. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/index.vue

24
ruoyi-ui/src/views/JiHeExpressway/components/Card2/Card.vue

@ -1,5 +1,5 @@
<template> <template>
<div class='Card'> <div class="Card">
<Title :title="title"> <Title :title="title">
<template #suffix> <template #suffix>
<slot name="title-suffix" /> <slot name="title-suffix" />
@ -12,27 +12,31 @@
</template> </template>
<script> <script>
import Title from "@screen/components/Title/index.vue" import Title from "@screen/components/Title/index.vue";
export default { export default {
name: 'Card', name: "Card",
components: { components: {
Title Title,
}, },
props: { props: {
title: { title: {
type: String type: String,
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.Card { .Card {
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
background: linear-gradient(180deg, rgba(6, 66, 88, 0) 0%, rgba(6, 66, 88, .4) 93%); background: linear-gradient(
180deg,
rgba(6, 66, 88, 0) 0%,
rgba(6, 66, 88, 0.4) 93%
);
display: flex; display: flex;
flex-direction: column; flex-direction: column;

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

@ -1,38 +1,69 @@
<template> <template>
<Card class='DisposalProcess' title="处置过程"> <Card class="DisposalProcess" title="处置过程">
<template #title-suffix> <template #title-suffix>
<ButtonGradient class="title-button"> <ButtonGradient class="title-button"> 事件解除 </ButtonGradient>
事件解除 <ButtonGradient class="title-button"> 协同调度 </ButtonGradient>
</ButtonGradient> <ButtonGradient class="title-button"> 无需清障 </ButtonGradient>
<ButtonGradient class="title-button"> <ButtonGradient class="title-button"> 重要事件上报 </ButtonGradient>
协同调度 <ButtonGradient class="title-button"> 路赔 </ButtonGradient>
</ButtonGradient> <ButtonGradient
<ButtonGradient class="title-button"> class="title-button special-button"
无需清障 @click.native="handleFullHeight"
</ButtonGradient> >
<ButtonGradient class="title-button">
重要事件上报
</ButtonGradient>
<ButtonGradient class="title-button">
路赔
</ButtonGradient>
<ButtonGradient class="title-button special-button" @click.native="handleFullHeight">
<template #prefix> <template #prefix>
<div class="icon" <div
:style="{ backgroundImage: `url(${require(`./images/${isFullHeight ? 'reduce' : 'zoom'}.svg`)})` }" /> class="icon"
:style="{
backgroundImage: `url(${require(`./images/${
isFullHeight ? 'reduce' : 'zoom'
}.svg`)})`,
}"
/>
</template> </template>
</ButtonGradient> </ButtonGradient>
</template> </template>
<TimeLine1 :data="timeLine1List" :filterDistance="filterDistance" /> <TimeLine1 :data="timeLine1List" :filterDistance="filterDistance" />
<TimeLine2 :data="timeLine2List" style="flex: 1;" /> <TimeLine2 :data="timeLine2List" style="flex: 1" />
<div v-if="!timeLine2List.length" class="no-data">暂无数据</div> <div v-if="!timeLine2List.length" class="no-data">暂无数据</div>
<div class="bottom"> <div class="bottom">
<ElSelect value="" placeholder="请选择关键点" /> <ElSelect v-model="processId" placeholder="请选择关键点">
<RadioGroup :options="[{ key: 'input', label: '输入' }, { key: 'upload', label: '上传' }]" v-model="testRadio" <ElOption
type="button" /> v-for="item in options"
<ElInput v-model="test" placeholder="请输入调度指令" /> :key="item.nodeNode"
<ButtonGradient class="title-button special-button"> :label="item.processNode"
:value="item.nodeNode"
>
</ElOption>
</ElSelect>
<RadioGroup
:options="[
{ key: 'input', label: '输入' },
{ key: 'upload', label: '上传' },
]"
v-model="testRadio"
type="button"
/>
<ElInput
v-if="testRadio == 'input'"
class="input"
v-model="context"
placeholder="请输入调度指令"
/>
<el-upload
v-if="testRadio == 'upload'"
class="input"
:headers="headers"
:action="uploadImgUrl"
:file-list="fileList"
:show-file-list="false"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
accept=".jpg,.jpeg,.png,.mp4"
>
<el-button class="input">点击上传</el-button>
</el-upload>
<ButtonGradient class="title-button special-button" @click="onSubmit">
发送 发送
</ButtonGradient> </ButtonGradient>
<ButtonGradient class="title-button special-button"> <ButtonGradient class="title-button special-button">
@ -43,19 +74,19 @@
</template> </template>
<script> <script>
import Card from "@screen/components/Card2/Card.vue";; import Card from "@screen/components/Card2/Card.vue";
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue'; import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
import { getToken } from "@/utils/auth";
import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index"; import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index"; import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import { provideMixin } from "./../../mixin" import { provideMixin } from "./../../mixin";
import { timeLine2List } from "./data"; import { timeLine2List } from "./data";
import request from "@/utils/request"; import request from "@/utils/request";
export default { export default {
name: 'DisposalProcess', name: "DisposalProcess",
inject: ["adpScale"], inject: ["adpScale"],
mixins: [provideMixin], mixins: [provideMixin],
components: { components: {
@ -65,12 +96,13 @@ export default {
TimeLine2, TimeLine2,
RadioGroup, RadioGroup,
}, },
emit: ['fullHeight'], emit: ["fullHeight"],
data() { data() {
return { return {
test: null, test: null,
testRadio: "input", testRadio: "input",
timeLine1List: [], timeLine1List: [],
// timeLine2List: Array.from({ length: 6 }).map(() => ({ // timeLine2List: Array.from({ length: 6 }).map(() => ({
// title: "", // title: "",
// time: "2023-12-21 16:35:44", // time: "2023-12-21 16:35:44",
@ -79,66 +111,136 @@ export default {
// posts: '' // posts: ''
// })), // })),
timeLine2List: [], timeLine2List: [],
isFullHeight: false isFullHeight: false,
} options: [],
processId: "",
context: "",
headers: {
Authorization: "Bearer " + getToken(),
},
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
fileList: [],
fileType: ["bmp", "gif", "jpg", "jpeg", "png", "mp4", "avi", "xmvb"],
imageUrl: "",
};
}, },
methods: { methods: {
filterDistance(distance) { filterDistance(distance) {
return 1 / this.adpScale.scaleX * distance return (1 / this.adpScale.scaleX) * distance;
}, },
handleFullHeight() { handleFullHeight() {
this.isFullHeight = !this.isFullHeight; this.isFullHeight = !this.isFullHeight;
this.$emit('fullHeight', 'CrowdnessIndicatorRankings') this.$emit("fullHeight", "CrowdnessIndicatorRankings");
}, },
async detailChange(data) { async detailChange(id) {
const timelineData = await this.getDetail(data); const timelineData = await this.getDetail(id);
let processIdMap = {};
let processIdMap = {}
this.timeLine2List = timelineData.map(item => { this.timeLine2List = timelineData.map((item) => {
processIdMap[item.processId] = new Date(
processIdMap[item.processId] = new Date(item.operationTime).toLocaleTimeString(); item.operationTime
).toLocaleTimeString();
return { return {
// title: "", // title: "",
time: item.operationTime ? new Date(item.operationTime).toLocaleString() : null, time: item.operationTime
? new Date(item.operationTime).toLocaleString()
: null,
name: item.operator, name: item.operator,
desc: item.context, desc: item.context,
// posts: '' // posts: ''
}
});
this.timeLine1List = data.processConfigList.map((item) => {
return {
time: processIdMap[item.nodeNode],
label: item.processNode,
isActive: !!processIdMap[item.nodeNode],
}; };
}); });
// this.timeLine1List = data.processConfigList.map((item) => {
// return {
// time: processIdMap[item.nodeNode],
// label: item.processNode,
// isActive: !!processIdMap[item.nodeNode],
// };
// });
}, },
getDetail(data) { getDetail(id) {
return request({ return request({
url: `/system/process/list`, url: `/system/process/list`,
method: "GET", method: "GET",
params: { params: {
eventId: data.id eventId: id,
} },
})
.then((result) => {
return result || [];
})
.catch((err) => []);
},
//
getProcessNode(eventId) {
return request({
url:
`/dc/system/event/getProcessNode/` +
"1a91d65cc31f4a9d90122888edb31043",
method: "GET",
}) })
.then((result) => { .then((result) => {
if (result.code != 200) return []; if (result.code != 200) return [];
this.timeLine1List = result.data.map((item) => {
return result.rows || [] 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) => []); .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",
processId: this.processId,
context: this.context,
file: this.imageUrl,
type: type.join(","),
},
})
.then((result) => {
if (result.code != 200) return [];
this.getProcessNode();
this.detailChange("1a91d65cc31f4a9d90122888edb31043");
})
.catch((err) => []);
},
},
async mounted() {
// this.getProcessNode();
// await this.detailChange("1a91d65cc31f4a9d90122888edb31043");
},
};
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.DisposalProcess { .DisposalProcess {
::v-deep { ::v-deep {
.content { .content {
display: flex; display: flex;
@ -153,15 +255,24 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
width: 20px; width: 20px;
height: 20px; height: 20px;
transition: all .3s linear; transition: all 0.3s linear;
} }
} }
.bottom { .bottom {
display: grid; display: grid;
grid-template-columns: .5fr auto 1fr 90px 90px; grid-template-columns: 0.5fr auto 1fr 90px 90px;
width: 100%; width: 100%;
gap: 6px; gap: 6px;
} }
.input {
background-color: #0d5f79;
color: #f4f4f4;
border-radius: 2px;
line-height: 5px;
height: 26px;
font-size: 14px;
border: 0;
}
} }
</style> </style>

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

@ -1,5 +1,5 @@
<template> <template>
<div class="CommandDispatch" :style="{ '--row': row , 'height': '100%'}"> <div class="CommandDispatch" :style="{ '--row': row, height: '100%' }">
<component <component
:is="key" :is="key"
v-for="(_, key) in gridAreaMap" v-for="(_, key) in gridAreaMap"
@ -24,8 +24,8 @@ const components = files.keys().reduce((components, key) => {
const originGridArea = { const originGridArea = {
EventInformation: "1 / 1 / span 12 / 1", // 1 EventInformation: "1 / 1 / span 12 / 1", // 1
DispatchLiaison: "13 / 1 / span 11 / 2", // 2 DispatchLiaison: "13 / 1 / span 8 / 2", // 213 / 1 / span 11 / 2
TrafficControl: "24 / 1 / span 10 / 2", //3 TrafficControl: "21 / 1 / span 13 / 2", //324 / 1 / span 10 / 2
CrowdnessIndicatorRankings: "1 / 2 / span 12 / 2", // / 1 CrowdnessIndicatorRankings: "1 / 2 / span 12 / 2", // / 1
DisposalProcess: "13 / 2 / span 21 / 2", //2 DisposalProcess: "13 / 2 / span 21 / 2", //2
RealTimeVideo: "1 / 3 / span 9 / 3", //1 RealTimeVideo: "1 / 3 / span 9 / 3", //1
@ -42,7 +42,7 @@ export default {
props: { props: {
detailId: { detailId: {
type: [String, Number], type: [String, Number],
default: '96b9918efc01488cb22fa1d9d3236dfd', default: "96b9918efc01488cb22fa1d9d3236dfd",
}, },
}, },
provide() { provide() {
@ -73,16 +73,20 @@ export default {
}) })
.then((result) => { .then((result) => {
if (result.code != 200) return; if (result.code != 200) return;
console.log(result.data) console.log(result.data);
this.provideData.detail = result.data; this.provideData.detail = result.data;
if(['设备设施隐患','非法上路','施工建设','服务区异常'].includes(result.data.eventName)){ if (
const gridArea = {...originGridArea} ["设备设施隐患", "非法上路", "施工建设", "服务区异常"].includes(
result.data.eventName
)
) {
const gridArea = { ...originGridArea };
// //
gridArea['DispatchLiaison'] = '13 / 1 / span 21 / 2' gridArea["DispatchLiaison"] = "10 / 1 / span 20 / 2";
delete gridArea.TrafficControl; delete gridArea.TrafficControl;
if(['设备设施隐患','非法上路'].includes(result.data.eventName)){ if (["设备设施隐患", "非法上路"].includes(result.data.eventName)) {
// //
gridArea['RealTimeVideo'] = '1 / 3 / span 16 / 3' gridArea["RealTimeVideo"] = "1 / 3 / span 17 / 3";
delete gridArea.ReleaseInformation; delete gridArea.ReleaseInformation;
} }

Loading…
Cancel
Save