diff --git a/ruoyi-ui/src/api/commandDispatch/index.js b/ruoyi-ui/src/api/commandDispatch/index.js index 4016b54c..3b48be4b 100644 --- a/ruoyi-ui/src/api/commandDispatch/index.js +++ b/ruoyi-ui/src/api/commandDispatch/index.js @@ -21,6 +21,15 @@ export function postCommandDispatch(data) { }); } +// 提交智能调度 +export function postUpdateSource(data) { + return request({ + url: "/business/warning/updateSource", + method: "post", + data, + }); +} + // 处置过程节点 export function getProcessNode(eventId) { return request({ diff --git a/ruoyi-ui/src/router/routerCreater.js b/ruoyi-ui/src/router/routerCreater.js index c912b31d..132a42d4 100644 --- a/ruoyi-ui/src/router/routerCreater.js +++ b/ruoyi-ui/src/router/routerCreater.js @@ -9,32 +9,31 @@ Vue.use(Router); import menuData from "@/common/menuData"; // 公共路由 -import {constantRoutes} from "./index.js"; +import { constantRoutes } from "./index.js"; -let ids = []; //层级id列表,每级菜单记录一个id,供菜单回显使用 +let ids = []; //层级id列表,每级菜单记录一个id,供菜单回显使用 let prev = ""; //前缀,用来区分左右侧菜单 let level = 0; //当前正在处理的菜单层级 let deltaLvl = 1; //已递归进入的菜单层级,用于编辑完当前菜单后返回时使用 -let counter = {} //记录左右侧菜单的下一个可用索引 +let counter = {}; //记录左右侧菜单的下一个可用索引 function processNode(node) { - let arr = []; node.forEach((item, index) => { - - if(level == 0 ){ //处理顶级菜单,加前缀、按照前缀分别计算下一个可用索引记录到counter中 + if (level == 0) { + //处理顶级菜单,加前缀、按照前缀分别计算下一个可用索引记录到counter中 prev = item.position.substring(0, 1); //取到前缀 - counter[prev] == undefined ? counter[prev] = 0 : ""; + counter[prev] == undefined ? (counter[prev] = 0) : ""; ids = [counter[prev]]; - counter[prev] ++; - }else{ - ids[level] = index; //如果不是顶级菜单,直接将“下一个可用索引”存到ids列表里 + counter[prev]++; + } else { + ids[level] = index; //如果不是顶级菜单,直接将“下一个可用索引”存到ids列表里 } let temp = { path: item.path || "", title: item.title, name: item.name, - meta: { menuId : prev + "_" + ids.join("-"), title : item.title} + meta: { menuId: prev + "_" + ids.join("-"), title: item.title }, }; if (item.redirect) { @@ -45,20 +44,23 @@ function processNode(node) { if (!item.component) { temp.component = compX; } else { + console.log(item.component); temp.component = (resolve) => require(["@/views/JiHeExpressway/pages/" + item.component], resolve); //views/visualization/pages/${item.component} } if (item.children && item.children.length > 0) { - level ++; - if (index == (node.length - 1)){ //处理最后一项菜单还有children、无法返回上一层的情况 - deltaLvl ++; //记录的是“最后一项有children”的层级的累计数量 + level++; + if (index == node.length - 1) { + //处理最后一项菜单还有children、无法返回上一层的情况 + deltaLvl++; //记录的是“最后一项有children”的层级的累计数量 } temp.children = processNode(item.children); - } else if (index == (node.length - 1)) { //当前层级已处理到最后一项、且最后一项无children时返回 + } else if (index == node.length - 1) { + //当前层级已处理到最后一项、且最后一项无children时返回 level -= deltaLvl; - ids.splice(deltaLvl*-1, deltaLvl); //返回后,摘出ids里对应数量的层级数 - deltaLvl = 1 + ids.splice(deltaLvl * -1, deltaLvl); //返回后,摘出ids里对应数量的层级数 + deltaLvl = 1; } arr.push(temp); }); @@ -70,8 +72,8 @@ let routes = [ { path: "/index", name: "index", - redirect:{ - path:"/home" + redirect: { + path: "/home", }, component: () => import("@/views/JiHeExpressway/index"), // children: childrenRoutes @@ -80,11 +82,11 @@ let routes = [ { path: "/", name: "root", - redirect:{ - path:"/home" - } + redirect: { + path: "/home", + }, }, - ...constantRoutes + ...constantRoutes, ]; export default new Router({ base: "/", diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue index 41e56224..2b34438d 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue @@ -230,7 +230,8 @@ div.auto-size { .top-label { line-height: 12px; - height: 20px; + height: 60px; + font-size: 12px; text-align: center; } @@ -240,7 +241,7 @@ div.auto-size { justify-content: center; gap: 6px; position: relative; - margin-top: 5px; + // margin-top: 5px; .circle { border: 1px solid var(--active-color, #39d5bf); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue index a040701e..92c48579 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue @@ -22,11 +22,13 @@ @@ -87,12 +78,15 @@ export default { dispatchData: [], dispatchList: [], vehicleTypeList: [], + staff: [], + vehicle: [], statsDialogVisible: false, + employeesChoice: [], + vehiclesChoice: [], }; }, methods: { handleClick() { - console.log("-------"); this.statsDialogVisible = true; }, handleClose() { @@ -104,20 +98,39 @@ export default { id: "96b9918efc01488cb22fa1d9d3236dfd", }; 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; + res.data.listData?.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.listData; this.dispatchData = res.data.resource; - console.log(" this.dispatchData", this.dispatchData); + res.data.resource.resource.forEach((element) => { + if (element.dispatchType == 1) { + this.staff.push(element); + } else { + this.vehicle.push(element); + } + }); + this.vehicleTypeList.forEach((i) => { + this.vehicle.forEach((item) => { + if (item.resourceName == i.dictValue) { + item.vehicleText = "(" + i.dictLabel + ")"; + } + }); + }); + res.data.employeesChoice.forEach((element) => { + this.employeesChoice.push(element.id); + }); + res.data.vehiclesChoice.forEach((element) => { + this.vehiclesChoice.push(element.id); + }); }); }, getVehicleTypeList() { @@ -157,16 +170,28 @@ export default { width: 100%; align-items: flex-start; margin: 15px 0; - div { - width: 50%; - } + .label { - font-size: 14px; + font-size: 13px; color: #38d2e7; } .value { - font-size: 14px; + width: 85%; + font-size: 13px; color: #fff; + display: flex; + flex-wrap: wrap; + .value-item { + width: 50%; + margin-bottom: 5px; + .scheduling { + margin-left: 5px; + } + // display: flex; + // .name { + // width: 50px; + // } + } } } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue deleted file mode 100644 index e94afeb8..00000000 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue +++ /dev/null @@ -1,356 +0,0 @@ - - - - - diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue index 712972aa..fa2838e4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue @@ -75,11 +75,11 @@ --> - + /> --> diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/mixin.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/mixin.js index f819b034..86072d72 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/mixin.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/mixin.js @@ -11,7 +11,7 @@ export const provideMixin = { if (!data) return; this.detailData = data; - this.detailChange?.(data); + this.detailChange?.(data.eventId); }, immediate: true, }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue index cbd6026f..73709718 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue @@ -1,46 +1,109 @@ @@ -83,7 +146,7 @@ export default { activeName: String, formData: { type: Object, - default: () => { }, + default: () => {}, }, }, data() { diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 12505ec7..dae05292 100644 --- a/ruoyi-ui/vue.config.js +++ b/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`, //王家宝