Compare commits

...

2 Commits

  1. 53
      ruoyi-ui/src/common/menuData.js
  2. 35
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue
  3. 100
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue
  4. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
  5. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
  6. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue
  7. 56
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue
  8. 86
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/index.vue

53
ruoyi-ui/src/common/menuData.js

@ -36,7 +36,7 @@ export default [
path: "/perception/trafficSituation", path: "/perception/trafficSituation",
name: "perceptionTrafficSituation", name: "perceptionTrafficSituation",
component: "perception/trafficSituation/index.vue", component: "perception/trafficSituation/index.vue",
} },
], ],
}, },
{ {
@ -113,14 +113,14 @@ export default [
path: "/control/device/strategy", path: "/control/device/strategy",
name: "controlDeviceStrategy", name: "controlDeviceStrategy",
component: "control/device/strategy/index.vue", component: "control/device/strategy/index.vue",
} },
], ],
}, },
{ {
title: "扫码报警", title: "扫码报警",
name: "controlQR", name: "controlQR",
path: "/control/qrCode", path: "/control/qrCode",
component: "control/qrCode/index.vue" component: "control/qrCode/index.vue",
}, },
{ {
title: "非机预警", title: "非机预警",
@ -137,9 +137,9 @@ export default [
name: "controlManualStatistic", name: "controlManualStatistic",
path: "/control/manual/statistic", path: "/control/manual/statistic",
component: "control/manual/statistic/index.vue", component: "control/manual/statistic/index.vue",
} },
] ],
} },
], ],
}, },
{ {
@ -149,40 +149,43 @@ export default [
path: "/maintain", path: "/maintain",
children: [ children: [
{ {
title:"收费运营", title: "收费运营",
name:"fee", name: "fee",
path: "/maintain/fee", path: "/maintain/fee",
component: "maintenanceOperations/chargeableOperations/index.vue" component: "maintenanceOperations/chargeableOperations/index.vue",
},{ },
title:"智能养护", {
name:"smart", title: "智能养护",
children:[ name: "smart",
children: [
{ {
title: "统计分析", title: "统计分析",
name: "smartStatistic", name: "smartStatistic",
path: "/maintain/smart/statistic", path: "/maintain/smart/statistic",
component: "maintenanceOperations/smart/statisticalAnalysis/index.vue", component:
"maintenanceOperations/smart/statisticalAnalysis/index.vue",
}, },
{ {
title: "网络拓扑", title: "网络拓扑",
name: "smartTopology", name: "smartTopology",
path: "/maintain/smart/topology", path: "/maintain/smart/topology",
component: "maintenanceOperations/smart/topology/index.vue" component: "maintenanceOperations/smart/topology/index.vue",
}, },
{ {
title: "设备管理", title: "设备管理",
name: "smartDeviceMange", name: "smartDeviceMange",
path: "/maintain/smart/manage", path: "/maintain/smart/manage",
component: "maintenanceOperations/smart/manage/index.vue" component: "maintenanceOperations/smart/manage/index.vue",
} },
] ],
}, { },
{
title: "边坡光伏", title: "边坡光伏",
name: "photovoltaic", name: "photovoltaic",
path: "/maintain/photovoltaic", path: "/maintain/photovoltaic",
component: "developing.vue" component: "developing.vue",
} },
] ],
}, },
{ {
title: "公众服务", title: "公众服务",
@ -225,7 +228,7 @@ export default [
title: "信息发布管理", title: "信息发布管理",
name: "InformationReleaseManagement", name: "InformationReleaseManagement",
path: "/service/InformationReleaseManagement", path: "/service/InformationReleaseManagement",
component: "service/InformationReleaseManagement/index.vue" component: "service/InformationReleaseManagement/index.vue",
}, },
{ {
title: "公众服务统计", title: "公众服务统计",
@ -271,8 +274,8 @@ export default [
name: "roadNet", name: "roadNet",
path: "/datav/roadNet", path: "/datav/roadNet",
component: "datav/roadNet/index.vue", component: "datav/roadNet/index.vue",
hide:true hide: true,
} },
], ],
}, },
{ {

35
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue

@ -6,12 +6,30 @@
<span class="name">{{ data.name }}</span> <span class="name">{{ data.name }}</span>
<span class="posts">{{ data.posts }}</span> <span class="posts">{{ data.posts }}</span>
</div> </div>
<div class="desc" v-if="data.processId">节点{{ data.processName }}</div>
<img
v-if="
data.type == 'bmp' ||
data.type == 'jpg' ||
data.type == 'jpeg' ||
data.type == 'png'
"
:src="data.url"
/>
{{ data.url }}
<video
v-if="data.type == 'mp4' || data.type == 'avi' || data.type == 'xmvb'"
:src="data.url"
>
<!-- <source :src="data.desc" /> -->
</video>
<!-- <div class="desc">{{ data.desc }}</div> --> <!-- <div class="desc">{{ data.desc }}</div> -->
<div class="desc" v-html="data.desc" /> <div v-if="data.type == 'text'" class="desc" v-html="data.desc" />
</div> </div>
</template> </template>
<script> <script>
import Video from "@screen/components/VideoMulti";
export default { export default {
name: "DescCard", name: "DescCard",
props: { props: {
@ -20,6 +38,21 @@ export default {
default: () => ({}), default: () => ({}),
}, },
}, },
watch: {
"data.type": {
handler(newValue, oldValue) {
if (newValue != "text") {
this.data.url = process.env.VUE_APP_BASE_API + this.data.desc;
console.log("this.data.url", this.data.url);
}
},
deep: true,
immediate: true,
},
},
components: {
Video,
},
}; };
</script> </script>

100
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue

@ -1,15 +1,28 @@
<template> <template>
<Card class='DeviceControl' title="设备管控"> <Card class="DeviceControl" title="设备管控">
<div class="container"> <div class="container">
<el-row v-for="(item, index) in tableData" :key="index" class="rowBlock"> <el-row v-for="(item, index) in tableData" :key="index" class="rowBlock">
<ScopeTable :tableInfo="item" :index="index" @onAdd="onAdd" @onDel="onDel"></ScopeTable> <ScopeTable
:tableInfo="item"
:index="index"
@onAdd="onAdd"
@onDel="onDel"
></ScopeTable>
</el-row> </el-row>
</div> </div>
<div class="foot"> <div class="foot">
<ButtonGradient class="special-button" style="background: rgb(229, 68, 73);" @click.native="handleSubmit(1)"> <ButtonGradient
class="special-button"
style="background: rgb(229, 68, 73)"
@click.native="handleSubmit(1)"
>
一键控制 一键控制
</ButtonGradient> </ButtonGradient>
<ButtonGradient class="special-button" style="background: rgb(250, 152, 56);" @click.native="handleSubmit(2)"> <ButtonGradient
class="special-button"
style="background: rgb(250, 152, 56)"
@click.native="handleSubmit(2)"
>
一键恢复 一键恢复
</ButtonGradient> </ButtonGradient>
</div> </div>
@ -17,50 +30,48 @@
</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 ScopeTable from "./components/ScopeTable.vue"; import ScopeTable from "./components/ScopeTable.vue";
import { provideMixin } from "./../../mixin" import { provideMixin } from "./../../mixin";
import { defaultTableInfo } from "./data"; import { defaultTableInfo } from "./data";
import { Message } from 'element-ui' import { Message } from "element-ui";
import request from "@/utils/request"; import request from "@/utils/request";
export default { export default {
name: 'DeviceControl', name: "DeviceControl",
mixins: [provideMixin], mixins: [provideMixin],
components: { components: {
Card, Card,
ScopeTable, ScopeTable,
ButtonGradient ButtonGradient,
}, },
data() { data() {
return { return {
planId: '', planId: "",
tableData: [] tableData: [],
} };
},
watch: {
},
mounted() {
}, },
watch: {},
mounted() {},
methods: { methods: {
detailChange(eventId) { detailChange(eventId) {
this.initData(this.detailData); this.initData(this.detailData);
}, },
initData(eventInfo) { initData(eventInfo) {
console.log('eventInfo', eventInfo) console.log("eventInfo", eventInfo);
request({ request({
url: `business/plans/list/event/type`, url: `business/plans/list/event/type`,
method: "post", method: "post",
data: { ...eventInfo } data: { ...eventInfo },
}) })
.then((result) => { .then((result) => {
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;
if (data.length == 0) { if (data.length == 0) {
this.tableData = [{ ...defaultTableInfo }]; this.tableData = [{ ...defaultTableInfo }];
return Message.warning('该事件暂无处置预案') return Message.warning("该事件暂无处置预案");
}; }
let dcExecuteAction = data[0].dcExecuteAction || []; let dcExecuteAction = data[0].dcExecuteAction || [];
this.planId = data[0].id; this.planId = data[0].id;
@ -70,23 +81,22 @@ export default {
let action = { ...it }; let action = { ...it };
if (it.executeConfig) { if (it.executeConfig) {
let executeConfig = JSON.parse(it.executeConfig); let executeConfig = JSON.parse(it.executeConfig);
let execute = this.mapKeys(executeConfig, 'zx_'); let execute = this.mapKeys(executeConfig, "zx_");
action = { ...action, ...execute }; action = { ...action, ...execute };
} }
if (it.recoverConfig) { if (it.recoverConfig) {
let recoverConfig = JSON.parse(it.recoverConfig); let recoverConfig = JSON.parse(it.recoverConfig);
let recover = this.mapKeys(recoverConfig, 'hf_'); let recover = this.mapKeys(recoverConfig, "hf_");
action = { ...action, ...recover }; action = { ...action, ...recover };
} }
if (it.deviceList) { if (it.deviceList) {
action.devList = it.deviceList action.devList = it.deviceList.split(",").map((str) => str);
.split(",")
.map((str) => str);
} }
dcArr.push(action); dcArr.push(action);
}); });
this.tableData = dcArr.length == 0 ? [{ ...defaultTableInfo }] : dcArr; this.tableData =
dcArr.length == 0 ? [{ ...defaultTableInfo }] : dcArr;
console.log("tableData", this.tableData); console.log("tableData", this.tableData);
}) })
@ -102,27 +112,28 @@ export default {
}, {}); }, {});
}, },
onAdd() { onAdd() {
this.tableData.push({ ...defaultTableInfo }) this.tableData.push({ ...defaultTableInfo });
}, },
onDel(index) { onDel(index) {
if (this.tableData.length <= 1) { if (this.tableData.length <= 1) {
return Message.warning('最后一项不可删除!'); return Message.warning("最后一项不可删除!");
} }
this.tableData.splice(index, 1) this.tableData.splice(index, 1);
}, },
handleSubmit(value = 1) { handleSubmit(value = 1) {
let dcArr = []; let dcArr = [];
this.tableData.forEach(item => { this.tableData.forEach((item) => {
let dcData = { let dcData = {
deviceType: item.deviceType, deviceType: item.deviceType,
searchRule: item.searchRule, searchRule: item.searchRule,
number: item.number number: item.number,
} };
if (item.devList && item.devList.length > 0) { if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(","); dcData.deviceList = item.devList.join(",");
} }
let zxData = {}, hfData = {}; let zxData = {},
Object.keys(item).forEach(key => { hfData = {};
Object.keys(item).forEach((key) => {
if (/^zx_/.test(key)) { if (/^zx_/.test(key)) {
let keyName = key.substring(3); let keyName = key.substring(3);
zxData[keyName] = item[key]; zxData[keyName] = item[key];
@ -131,7 +142,7 @@ export default {
let keyName = key.substring(3); let keyName = key.substring(3);
hfData[keyName] = item[key]; hfData[keyName] = item[key];
} }
}) });
if (item.deviceType == 12) { if (item.deviceType == 12) {
zxData = this.formatData(zxData); zxData = this.formatData(zxData);
hfData = this.formatData(hfData); hfData = this.formatData(hfData);
@ -140,19 +151,19 @@ export default {
dcData.recoverConfig = JSON.stringify(hfData); dcData.recoverConfig = JSON.stringify(hfData);
dcArr.push(dcData); dcArr.push(dcData);
}) });
let reqData = { let reqData = {
operationType: value, //1- 2- operationType: value, //1- 2-
dcEmergencyPlans: { dcEmergencyPlans: {
id: this.planId, id: this.planId,
dcExecuteAction: dcArr dcExecuteAction: dcArr,
}, },
dcEvent: { dcEvent: {
id: this.detailData.id, id: this.detailData.id,
eventType: this.detailData.eventType, eventType: this.detailData.eventType,
stakeMark: this.detailData.stakeMark, stakeMark: this.detailData.stakeMark,
direction: this.detailData.direction == "菏泽方向" ? '1': '3', direction: this.detailData.direction == "菏泽方向" ? "1" : "3",
}, },
}; };
console.log("reqData", reqData); console.log("reqData", reqData);
@ -169,14 +180,13 @@ export default {
}) })
.catch(() => { .catch(() => {
Message.error("提交失败"); Message.error("提交失败");
}) });
}, },
}, },
};
}
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.DeviceControl { .DeviceControl {
::v-deep { ::v-deep {
.content { .content {
@ -186,7 +196,7 @@ export default {
} }
.container { .container {
flex:1; flex: 1;
min-height: 300px; min-height: 300px;
overflow-y: auto; overflow-y: auto;
@ -195,12 +205,11 @@ export default {
padding: 5px 10px; padding: 5px 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.foot { .foot {
display: flex; display: flex;
height:'100px'; height: "100px";
justify-content: space-evenly; justify-content: space-evenly;
margin-top: 10px; margin-top: 10px;
.special-button { .special-button {
@ -214,6 +223,5 @@ export default {
} }
} }
} }
} }
</style> </style>

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

@ -222,6 +222,15 @@ export default {
background: #1b586d; background: #1b586d;
color: #fff; color: #fff;
} }
::v-deep .el-table td.el-table__cell div {
line-height: 30px;
}
::v-deep .el-checkbox-group {
text-align: left;
.el-checkbox {
min-width: 70px;
}
}
::v-deep .el-table tr { ::v-deep .el-table tr {
border: 1px solid #07aec6; border: 1px solid #07aec6;

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

@ -18,7 +18,10 @@
</div> </div>
<div class="dispatch-item"> <div class="dispatch-item">
<span class="label">值班领导</span> <span class="label">值班领导</span>
<div class="value"> <div
class="value"
v-if="dispatchData.shifts && dispatchData.shifts.length > 0"
>
<div v-for="item in dispatchData.shifts" class="value-item"> <div v-for="item in dispatchData.shifts" class="value-item">
<span class="shiftsName">{{ item.shiftsName }}</span> <span class="shiftsName">{{ item.shiftsName }}</span>
<span class="shiftsNumber">{{ item.shiftsNumber }}</span> <span class="shiftsNumber">{{ item.shiftsNumber }}</span>
@ -27,24 +30,27 @@
> --> > -->
</div> </div>
</div> </div>
<div class="value" v-else>-</div>
</div> </div>
<div class="dispatch-item"> <div class="dispatch-item">
<span class="label">路管人员</span> <span class="label">路管人员</span>
<div class="value"> <div class="value" v-if="staff && staff.length > 0">
<div v-for="item in staff" class="value-item"> <div v-for="item in staff" class="value-item">
<span class="shiftsName">{{ item.resourceName }}</span> <span class="shiftsName">{{ item.resourceName }}</span>
<span class="shiftsNumber">{{ item.resourceValue }}</span> <span class="shiftsNumber">{{ item.resourceValue }}</span>
</div> </div>
</div> </div>
<div class="value" v-else>-</div>
</div> </div>
<div class="dispatch-item"> <div class="dispatch-item">
<span class="label">救援车辆</span> <span class="label">救援车辆</span>
<div class="value"> <div class="value" v-if="vehicle && vehicle.length > 0">
<div v-for="item in vehicle" class="value-item"> <div v-for="item in vehicle" class="value-item">
<span class="shiftsName">{{ item.resourceValue }}</span> <span class="shiftsName">{{ item.resourceValue }}</span>
<span class="shiftsNumber">{{ item.vehicleText }}</span> <span class="shiftsNumber">{{ item.vehicleText }}</span>
</div> </div>
</div> </div>
<div class="value" v-else>-</div>
</div> </div>
</div> </div>
<StatsDialogVisible <StatsDialogVisible
@ -81,7 +87,7 @@ export default {
data() { data() {
return { return {
provideDetail: null, provideDetail: null,
dispatchData: [], dispatchData: {},
dispatchList: [], dispatchList: [],
vehicleTypeList: [], vehicleTypeList: [],
staff: [], staff: [],
@ -124,9 +130,11 @@ export default {
} }
}); });
this.dispatchList = res.data.listData; this.dispatchList = res.data.listData;
this.dispatchData = res.data.resource; console.log("调度联络返回============", res.data);
this.dispatchData = res.data.resource ? res.data.resource : {};
this.staff = []; this.staff = [];
this.vehicle = []; this.vehicle = [];
if (res.data && res.data.resource && res.data.resource.resource) {
res.data.resource.resource.forEach((element) => { res.data.resource.resource.forEach((element) => {
if (element.dispatchType == 1) { if (element.dispatchType == 1) {
this.staff.push(element); this.staff.push(element);
@ -134,6 +142,8 @@ export default {
this.vehicle.push(element); this.vehicle.push(element);
} }
}); });
}
this.vehicleTypeList.forEach((i) => { this.vehicleTypeList.forEach((i) => {
this.vehicle.forEach((item) => { this.vehicle.forEach((item) => {
if (item.resourceName == i.dictValue) { if (item.resourceName == i.dictValue) {
@ -193,7 +203,7 @@ export default {
color: #38d2e7; color: #38d2e7;
} }
.value { .value {
width: 85%; width: 80%;
font-size: 13px; font-size: 13px;
color: #fff; color: #fff;
display: flex; display: flex;

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

@ -226,7 +226,7 @@
<Button <Button
v-if="type != 3" v-if="type != 3"
style="background: #39d5bf" style="background: #39d5bf"
@click.native="handleInitData(2)" @click.native="handleInitData(2, 1)"
>重新生成</Button >重新生成</Button
> >
<Button style="background: #3de8ff" @click.native="handlePreview" <Button style="background: #3de8ff" @click.native="handlePreview"
@ -652,9 +652,10 @@ export default {
}; };
}, },
watch: { watch: {
async "provideData.detail"(newValue, oldValue) { "provideData.detail"(newValue, oldValue) {
this.provideDetail = newValue; this.provideDetail = newValue;
this.eventId = newValue.id; this.eventId = newValue.id;
console.log("+++++++++++++++");
this.initData(); this.initData();
this.getReportData(); this.getReportData();
this.getImportantFileStatus(); this.getImportantFileStatus();
@ -828,6 +829,7 @@ export default {
}, },
// //
getImportantFileStatus() { getImportantFileStatus() {
console.log("getImportantFileStatus");
importantFileStatus(this.eventId).then((res) => { importantFileStatus(this.eventId).then((res) => {
this.type = res.data; this.type = res.data;
this.$emit("update:type", this.type); this.$emit("update:type", this.type);
@ -840,6 +842,7 @@ export default {
deventImportantFileList(this.eventId, type).then((res) => { deventImportantFileList(this.eventId, type).then((res) => {
if (res.length > 0) { if (res.length > 0) {
this.formFileData = res[0]; this.formFileData = res[0];
console.log(789, res);
if (type == "1" || type == "2") { if (type == "1" || type == "2") {
this.renewedList = res; this.renewedList = res;
} }
@ -849,13 +852,13 @@ export default {
}); });
}, },
// //
handleInitData(type) { handleInitData(type, source) {
let data = new FormData(); let data = new FormData();
data.append("eventId", this.eventId); data.append("eventId", this.eventId);
data.append("type", type); data.append("type", type);
getEventImportantFile(data).then((res) => { getEventImportantFile(data).then((res) => {
this.formFileData = res.data; this.formFileData = res.data;
if (type == "2") { if (type == "2" && source == "1") {
this.newType = 1; this.newType = 1;
this.renewedList.push(res.data); this.renewedList.push(res.data);
this.pageNum = this.renewedList.length; this.pageNum = this.renewedList.length;

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

@ -13,7 +13,9 @@
<ButtonGradient <ButtonGradient
v-if=" v-if="
detailData.eventState != 2 && detailData.eventState != 2 &&
(detailData.eventType == 2 || detailData.eventType == 6) (detailData.eventType == 1 ||
detailData.eventType == 2 ||
detailData.eventType == 6)
" "
class="title-button" class="title-button"
@click="handleNoWrecker" @click="handleNoWrecker"
@ -22,7 +24,10 @@
无需清障 无需清障
</ButtonGradient> </ButtonGradient>
<ButtonGradient <ButtonGradient
v-if="detailData.eventState != 2 && detailData.eventType == 4" v-if="
detailData.eventState != 2 &&
(detailData.eventType == 1 || detailData.eventType == 4)
"
class="title-button" class="title-button"
@click="handleClick" @click="handleClick"
> >
@ -99,7 +104,7 @@
:on-error="handleUploadError" :on-error="handleUploadError"
accept=".jpg,.jpeg,.png,.mp4" accept=".jpg,.jpeg,.png,.mp4"
> >
<el-button class="input">点击上传</el-button> <el-button class="input">{{ imageName }}</el-button>
</el-upload> </el-upload>
<ElSelect <ElSelect
:disabled="detailData.eventState == 2" :disabled="detailData.eventState == 2"
@ -185,6 +190,8 @@ export default {
isFullHeight: false, isFullHeight: false,
options: [], options: [],
processId: "", processId: "",
processName: "",
processType: "",
context: "", context: "",
text: "", text: "",
phrasesOptions: [], phrasesOptions: [],
@ -195,14 +202,22 @@ export default {
fileList: [], fileList: [],
fileType: ["bmp", "gif", "jpg", "jpeg", "png", "mp4", "avi", "xmvb"], fileType: ["bmp", "gif", "jpg", "jpeg", "png", "mp4", "avi", "xmvb"],
imageUrl: "", imageUrl: "",
imageName: "点击上传",
}; };
}, },
watch: { watch: {
processId(newVlaue, oldValue) { processId(newVlaue, oldValue) {
this.options.forEach((element) => { this.options.forEach((element) => {
if (newVlaue == element.nodeNode) { if (newVlaue == element.nodeNode) {
if (element.commonPhrases) { if (element.commonPhrases != "undefined") {
this.phrasesOptions = element.commonPhrase.split(","); console.log("element", element, element.commonPhrases);
this.phrasesOptions =
element?.commonPhrases.length > 0
? element?.commonPhrases.split(",")
: [];
console.log("this.phrasesOptions", this.phrasesOptions);
this.processName = element.processNode;
this.processType = 1;
} }
} }
}); });
@ -215,7 +230,9 @@ export default {
async "provideData.detail"(newValue, oldValue) { async "provideData.detail"(newValue, oldValue) {
this.provideDetail = newValue; this.provideDetail = newValue;
this.eventId = newValue.id; this.eventId = newValue.id;
this.getProcess();
await this.disposalRecords(this.eventId); await this.disposalRecords(this.eventId);
// console.log("", this.provideDetail); // console.log("", this.provideDetail);
}, },
}, },
@ -267,6 +284,9 @@ export default {
name: item.operatorName, name: item.operatorName,
desc: item.context, desc: item.context,
source: item.source, source: item.source,
processId: item.processId,
processName: item.processName,
type: item.type,
// posts: '' // posts: ''
}; };
}); });
@ -276,7 +296,8 @@ export default {
// //
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
this.$message.success("上传成功"); this.$message.success("上传成功");
this.imageUrl = res.url; this.imageName = res.originalFilename;
this.imageUrl = res.fileName;
}, },
// //
@ -290,19 +311,36 @@ export default {
// //
onSubmit() { onSubmit() {
if (this.context || this.imageUrl) { if (this.context || this.imageUrl) {
let content = "";
if (this.testRadio == "input") {
content = this.context;
} else {
content = this.imageUrl;
}
let type = this.containsArrayElement(this.imageUrl, this.fileType); let type = this.containsArrayElement(this.imageUrl, this.fileType);
let data = { let data = {
eventId: this.eventId, eventId: this.eventId,
processId: this.processId, processId: this.processId,
context: this.context, processName: this.processName,
file: this.imageUrl, context: content,
type: type.join(","), // file: this.imageUrl,
type: type ? type.join(",") : "text",
source: 1, source: 1,
processType: this.processType,
}; };
postProcess(data).then((result) => { postProcess(data).then((result) => {
if (result.code != 200) return []; if (result.code != 200) return [];
this.getProcess(); this.getProcess();
this.disposalRecords(this.eventId); this.disposalRecords(this.eventId);
this.processId = "";
this.processName = "";
this.testRadio = "input";
this.context = "";
this.imageUrl = "";
this.imageName = "点击上传";
this.fileType = [];
this.text = "";
this.$message.success("发送成功");
}); });
} else { } else {
this.$message.warning("调度指令不能为空"); this.$message.warning("调度指令不能为空");

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

@ -1,6 +1,5 @@
<template> <template>
<div class='emergencyProcessManagement'> <div class="emergencyProcessManagement">
<!-- 搜索栏 --> <!-- 搜索栏 -->
<div class="filter"> <div class="filter">
<div> <div>
@ -16,7 +15,6 @@
</template> </template>
新增 新增
</ButtonGradient> --> </ButtonGradient> -->
</div> </div>
</div> </div>
@ -29,47 +27,69 @@
<ElTableColumn label="操作" width="210"> <ElTableColumn label="操作" width="210">
<template slot-scope="scope"> <template slot-scope="scope">
<!--<ElButton type="text" style="color: #00D1FF;" @click="showDisposal(scope.row.eventType)">流程配置</ElButton>--> <!--<ElButton type="text" style="color: #00D1FF;" @click="showDisposal(scope.row.eventType)">流程配置</ElButton>-->
<ElButton type="text" style="color: #00EBC1;" @click="showPhrases(scope.row)">常用语</ElButton> <ElButton
type="text"
style="color: #00ebc1"
@click="showPhrases(scope.row)"
>常用语</ElButton
>
</template> </template>
</ElTableColumn> </ElTableColumn>
</Table> </Table>
</div> </div>
<!-- 配置常用户弹窗 --> <!-- 配置常用户弹窗 -->
<CommonPhrases :visible="isShowPhrases" :eventType="eventType" :process="process" @update:value="onClosePhrases" <CommonPhrases
@update:phrasesData="onUpdatePhrasesData" @reInitData="initData" /> :visible="isShowPhrases"
:eventType="eventType"
:process="process"
@update:value="onClosePhrases"
@update:phrasesData="onUpdatePhrasesData"
@reInitData="initData"
/>
<!-- "流程配置"弹出框 --> <!-- "流程配置"弹出框 -->
<DisposalProcess :visible="isShowDisposal" :eventType="eventType" :phrasesData="phrasesData" <DisposalProcess
@update:value="onCloseDisposal" @reInitData="initData" /> :visible="isShowDisposal"
:eventType="eventType"
:phrasesData="phrasesData"
@update:value="onCloseDisposal"
@reInitData="initData"
/>
<!-- 分页 --> <!-- 分页 -->
<div class="footer"> <div class="footer">
<Pagination @current-change="initData" @size-change="onSizeChange" width="'100%'" :page-sizes="[10, 20, 30, 40, 50]" <Pagination
:page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" layout="total, sizes, prev, pager, next" @current-change="initData"
:total="total"> @size-change="onSizeChange"
width="'100%'"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="searchData.pageSize"
:current-page.sync="searchData.pageNum"
layout="total, sizes, prev, pager, next"
:total="total"
>
</Pagination> </Pagination>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Pagination from '@screen/components/Pagination.vue'; import Pagination from "@screen/components/Pagination.vue";
import Table from '@screen/components/Table.vue'; import Table from "@screen/components/Table.vue";
import CommonPhrases from './commonPhrases'; import CommonPhrases from "./commonPhrases";
import DisposalProcess from './disposalProcess'; import DisposalProcess from "./disposalProcess";
import request from "@/utils/request"; import request from "@/utils/request";
import { Message } from 'element-ui' import { Message } from "element-ui";
export default { export default {
name: 'emergencyProcessManagement', name: "emergencyProcessManagement",
components: { components: {
ButtonGradient, ButtonGradient,
Pagination, Pagination,
Table, Table,
CommonPhrases, CommonPhrases,
DisposalProcess DisposalProcess,
}, },
data() { data() {
return { return {
@ -83,8 +103,8 @@ export default {
pageNum: 1, pageNum: 1,
}, },
phrasesData: [], phrasesData: [],
process: [] process: [],
} };
}, },
created() { created() {
this.initData(); this.initData();
@ -113,18 +133,18 @@ export default {
}, },
showPhrases(data) { showPhrases(data) {
if (data?.processConfigList.length <= 0) { if (data?.processConfigList.length <= 0) {
Message.warning('请先配置流程!'); Message.warning("请先配置流程!");
return; return;
} }
let process = [] let process = [];
data.processConfigList.forEach(it => { data.processConfigList.forEach((it) => {
process.push({ process.push({
id: it.id, id: it.id,
commonPhrases: it.commonPhrases, commonPhrases: it.commonPhrases,
label: it.processNode, label: it.processNode,
isActive: false, isActive: false,
}) });
}) });
this.process = process; this.process = process;
this.isShowPhrases = true; this.isShowPhrases = true;
this.eventType = data.eventType; this.eventType = data.eventType;
@ -134,19 +154,19 @@ export default {
this.eventType = eventType; this.eventType = eventType;
}, },
onClosePhrases() { onClosePhrases() {
this.isShowPhrases = false this.isShowPhrases = false;
}, },
onCloseDisposal() { onCloseDisposal() {
this.isShowDisposal = false; this.isShowDisposal = false;
}, },
onUpdatePhrasesData(phrasesData) { onUpdatePhrasesData(phrasesData) {
this.phrasesData = phrasesData; this.phrasesData = phrasesData;
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.emergencyProcessManagement { .emergencyProcessManagement {
padding: 21px; padding: 21px;
@ -163,7 +183,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
>div { > div {
display: flex; display: flex;
gap: 6px; gap: 6px;
} }

Loading…
Cancel
Save