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..37f0652e 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: 35px; + 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/components/TimeLine/TimeLine2/DescCard.vue b/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue index 775eb2c9..a229b4e1 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue @@ -1,5 +1,5 @@