Browse Source

修改

wangqin
hui 9 months ago
parent
commit
f0d5b90aa6
  1. 42
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  2. 31
      ruoyi-ui/src/router/routerCreater.js
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue
  4. 6
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/index.vue
  5. 2
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  6. 34
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  7. 10
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
  8. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

42
ruoyi-ui/src/assets/styles/JiHeExpressway.scss

@ -141,6 +141,7 @@
// 导航菜单
.el-menu--popup {
border-radius: 0;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.5) 0%, #064258 93%);
border: 1px solid;
@ -150,6 +151,25 @@
rgba(55, 231, 255, 0)
)
10 10;
@mixin activeBtn {
color: #fff;
background: linear-gradient(90deg,
rgba(164, 255, 250, 0) 0%,
rgba(164, 255, 250, 0.42) 50%,
rgba(164, 255, 250, 0) 100%);
border: 1px solid;
border-image: linear-gradient(90deg,
rgba(190, 255, 246, 0.03) 0%,
rgba(190, 255, 246, 1) 50%,
rgba(190, 255, 246, 0.03) 100%) 1 1;
p {
color: #fff;
}
}
.el-submenu__title {
}
@ -171,26 +191,16 @@
}
&:hover{
color: #fff;
background: linear-gradient(
90deg,
rgba(164, 255, 250, 0) 0%,
rgba(164, 255, 250, 0.42) 50%,
rgba(164, 255, 250, 0) 100%
);
border: 1px solid;
border-image: linear-gradient(
90deg,
rgba(190, 255, 246, 0.03) 0%,
rgba(190, 255, 246, 1) 50%,
rgba(190, 255, 246, 0.03) 100%
)
1 1;
@include activeBtn;
}
p {
color: #fff;
color: #00d1ff;
}
}
.el-menu-item.menuActive, .menuActive .el-submenu__title{
@include activeBtn;
}
.el-menu-item.is-active,
.el-submenu__title.is-active {
color: #fff;

31
ruoyi-ui/src/router/routerCreater.js

@ -10,14 +10,33 @@ import menuData from "@/common/menuData";
// 公共路由
import {constantRoutes} from "./index.js";
let ids = []; //层级id列表,每级菜单记录一个id,供菜单回显使用
let prev = ""; //前缀,用来区分左右侧菜单
let level = 0; //当前正在处理的菜单层级
let deltaLvl = 1; //已递归进入的菜单层级,用于编辑完当前菜单后返回时使用
let counter = {} //记录左右侧菜单的下一个可用索引
function processNode(node) {
let arr = [];
node.forEach((item) => {
node.forEach((item, index) => {
if(level == 0 ){ //处理顶级菜单,加前缀、按照前缀分别计算下一个可用索引记录到counter中
prev = item.position.substring(0, 1); //取到前缀
counter[prev] == undefined ? counter[prev] = 0 : "";
ids = [counter[prev]];
counter[prev] ++;
}else{
ids[level] = index; //如果不是顶级菜单,直接将“下一个可用索引”存到ids列表里
}
let temp = {
path: item.path || "",
title: item.title,
name: item.name,
meta: { menuId : prev + "_" + ids.join("-") }
};
if (item.redirect) {
temp.redirect = {
name: item.redirect,
@ -31,7 +50,15 @@ function processNode(node) {
}
if (item.children && item.children.length > 0) {
level ++;
if (index == (node.length - 1)){ //处理最后一项菜单还有children、无法返回上一层的情况
deltaLvl ++; //记录的是“最后一项有children”的层级的累计数量
}
temp.children = processNode(item.children);
} else if (index == (node.length - 1)) { //当前层级已处理到最后一项、且最后一项无children时返回
level -= deltaLvl;
ids.splice(deltaLvl*-1, deltaLvl); //返回后,摘出ids里对应数量的层级数
deltaLvl = 1
}
arr.push(temp);
});
@ -52,7 +79,7 @@ let routes = [
},
{
path: "/",
name: "index",
name: "root",
redirect:{
path:"/home"
}

6
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue

@ -6,20 +6,20 @@
<!-- 第二层菜单 -->
<template v-for="(item1, index1) in item.children">
<component :index="prefix + '_' + index + '-' + index1" v-if="item1.children" is="el-submenu">
<component :index="prefix + '_' + index + '-' + index1" v-if="item1.children" is="el-submenu" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index + '-' + index1) }">
<template slot="title">
<p index="1">{{ item1.title }}</p>
</template>
<!-- 第三层菜单 -->
<template v-for="(item2, index2) in item1.children">
<component :index="prefix + '_' + index + '-' + index1 + '-' + index2" is="el-menu-item">{{
<component :index="prefix + '_' + index + '-' + index1 + '-' + index2" is="el-menu-item" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index + '-' + index1 + '-' + index2) }">{{
item2.title }}
</component>
</template>
</component>
<component :index="prefix + '_' + index + '-' + index1" v-else is="el-menu-item">{{ item1.title
<component :index="prefix + '_' + index + '-' + index1" v-else is="el-menu-item" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index + '-' + index1) }">{{ item1.title
}}
</component>
</template>

6
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/index.vue

@ -40,6 +40,7 @@ export default {
},
emit: ["change"],
created() {
this.activeIndex = this.$route.meta.menuId;
this.menuLeft = [];
this.menuRight = [];
menuData.forEach(item => {
@ -51,10 +52,13 @@ export default {
});
// this.changeMenu(this.menuLeft[0]);
},
mounted(){
// this.activeIndex = "l_2-0-3";
// console.log(this.activeIndex);
},
methods: {
onChange(item, activeIndex) {
this.activeIndex = activeIndex;
console.log(this.activeIndex);
// this.$router.push(item.name);
this.$emit("onChange", item)
}

2
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue

@ -9,7 +9,7 @@
<div class="dialogCloseButton"></div>
</div>
<el-card>
<BoardTplPreview style="height: 200px; width: 100%;" :boardWH="screenSize" :tpl="dataForm"></BoardTplPreview>
<BoardTplPreview style="width: 100%;" :boardWH="screenSize" :tpl="dataForm"></BoardTplPreview>
</el-card>
<el-card>
<el-form :model="dataForm" :rules="dataRule" label-width="110px" ref="dataForm" size="mini">

34
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue

@ -1,6 +1,6 @@
<template>
<div class="boardPreview" ref="compBox">
<div class="boardBox" :style="boardStyle">
<div class="boardBox" :style="boardStyle" v-if="isReady">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item" v-if="(index + 1) <= lineTotal">
</p>
</div>
@ -11,6 +11,7 @@ export default {
name:"BoardPreview",
data(){
return {
isReady: false,
boardStyle:null,
boardTxtStyle:null,
contentArr:{
@ -53,21 +54,28 @@ export default {
methods:{
setStyle() {
this.$nextTick(() => {
let boxW = this.$refs["compBox"].clientWidth;
let boxH = this.$refs["compBox"].clientHeight;
let conW = this.tpl.displayAreaWidth;
let conH = this.tpl.displayAreaHeight;
let arr = this.boardWH.split("*");
let scale = 1;
if (conW / conH > boxW / boxH) {
scale = boxW / conW;
if (boxH > 20) { //>020
if (arr[0] / arr[1] > boxW / boxH) {
scale = boxW / arr[0];
} else {
scale = boxH / conH;
scale = boxH / arr[1];
}
} else {
if (arr[0] > boxW) {
scale = boxW / arr[0];
}
}
this.boardStyle = {
width: `${conW * scale}px`,
height: `${conH * scale}px`,
width: `${arr[0] * scale}px`,
height: `${arr[1] * scale}px`,
"background-color":`${this.tpl.backgroundColor}px`,
"align-items" : ['flex-start', 'flex-end', 'center'][this.tpl.verticalAlignment]
"align-items" : ['flex-start', 'flex-end', 'center'][this.tpl.verticalAlignment] //formatStyle
}
let fontSize = 0;
if (_.isString(this.tpl.fontSize)) {
@ -76,12 +84,14 @@ export default {
fontSize = this.tpl.fontSize;
}
this.boardTxtStyle = {
"color": "#" + this.tpl.foregroundColor,
"color": "#" + this.tpl.foregroundColor, //fontColor
"font-size": `${fontSize*scale}px`,
"font-family": this.fontTypeDic[this.tpl.font || '3'],
"font-family": this.fontTypeDic[this.tpl.font || '3'], //fontType
"min-height": `${fontSize * scale}px`
}
this.lineTotal = Math.floor(conH / fontSize);
this.lineTotal = Math.floor(arr[1] / fontSize);
this.isReady = true;
})
}
}

10
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue

@ -1,6 +1,6 @@
<template>
<div class="boardPreview" ref="compBox">
<div class="boardBox" :style="boardStyle">
<div class="boardBox" :style="boardStyle" v-if="isReady">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item" v-if="(index+1)<=lineTotal">
</p>
</div>
@ -11,6 +11,7 @@ export default {
name:"BoardPreview",
data(){
return {
isReady:false,
boardStyle:null,
boardTxtStyle:null,
contentArr:{
@ -57,11 +58,17 @@ export default {
let boxH = this.$refs["compBox"].clientHeight;
let arr = this.boardWH.split("*");
let scale = 1;
if(boxH>20){ //>020
if (arr[0] / arr[1] > boxW / boxH) {
scale = boxW / arr[0];
} else {
scale = boxH / arr[1];
}
}else{
if(arr[0] > boxW){
scale = boxW/arr[0];
}
}
this.boardStyle = {
width: `${arr[0] * scale}px`,
@ -81,6 +88,7 @@ export default {
"min-height": `${fontSize * scale}px`,
}
this.lineTotal = Math.floor(arr[1]/ fontSize);
this.isReady = true;
})
}
}

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

@ -17,7 +17,8 @@
@click="SystemStatusExport">导出Excel</el-button>
</div>
<div class="right-div">
<InputSearch :formList="searchFormList" @handleSearch="handleSearch" :placeholder="searchText" />
<InputSearch :formList="searchFormList" @handleSearch="handleSearch" />
<!-- :placeholder="searchText" -->
</div>
</div>
<div class="queryChart">

2
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

@ -135,7 +135,7 @@ export default {
return params
},
async handleDelete(data) {
await confirm({ message: "确定删除该关键词?" });
await confirm({ message: "是否要删除该敏感词?" });
request({
url: `/business/dcInfoBoardVocabulary/${data.id}`,

Loading…
Cancel
Save