Browse Source

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

wangqin
zhoule 9 months ago
parent
commit
6ca71ab095
  1. 2
      ruoyi-ui/src/layout/index.vue
  2. 2
      ruoyi-ui/src/router/routerCreater.js
  3. 4
      ruoyi-ui/src/store/index.js
  4. 22
      ruoyi-ui/src/store/modules/menu.js
  5. 8
      ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js
  6. 1
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
  7. 1
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue
  8. 19
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/index.vue
  9. 89
      ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue
  10. 1
      ruoyi-ui/src/views/JiHeExpressway/components/empty.vue
  11. 7
      ruoyi-ui/src/views/JiHeExpressway/index.vue
  12. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/developing.vue
  13. 3
      ruoyi-ui/src/views/event/event/dispatchYuan.vue

2
ruoyi-ui/src/layout/index.vue

@ -274,8 +274,6 @@ export default {
},
},
created() {
console.log(this.titleHeader, "this.titleHeader");
console.log(this.$route.path, "路由");
if (this.$route.path == "/tunnel") {
if (
this.sideTheme == "theme-blue" ||

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

@ -34,7 +34,7 @@ function processNode(node) {
path: item.path || "",
title: item.title,
name: item.name,
meta: { menuId : prev + "_" + ids.join("-") }
meta: { menuId : prev + "_" + ids.join("-"), title : item.title}
};
if (item.redirect) {

4
ruoyi-ui/src/store/index.js

@ -9,6 +9,7 @@ import settings from './modules/settings'
import wsData from './modules/wsData'
import getters from './getters'
import manage from './modules/manage'
import menu from './modules/menu'
Vue.use(Vuex)
@ -21,7 +22,8 @@ const store = new Vuex.Store({
permission,
settings,
wsData,
manage
manage,
menu,
},
getters
})

22
ruoyi-ui/src/store/modules/menu.js

@ -0,0 +1,22 @@
const state = {
recentPages: []
}
const mutations = {
addRecent(state, item) {
if (state.recentPages.find(unit => unit.path == item.path)) return;
state.recentPages.push(item);
},
removeRecent(state, item) {
let i = state.recentPages.findIndex(unit => unit.path == item.path);
state.recentPages.splice(i, 1);
}
}
export default {
namespaced: true,
state,
mutations,
}

8
ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js

@ -132,11 +132,12 @@ export const startStation = {
},
},
key: "startStakeMark[0]",
default:55,
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.startStakeMark[1]?.trim()) return false
if (!((value+'')?.trim() && data.startStakeMark[1]?.trim())) return false
else return true
}
}
@ -149,6 +150,7 @@ export const startStation = {
color: "#3DE8FF",
},
},
default: 378,
key: "startStakeMark[1]"
},
],
@ -170,11 +172,12 @@ export const endStation = {
},
},
key: "endStakeMark[0]",
default: 208,
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.endStakeMark[1]?.trim()) return false
if (!((value + '')?.trim() && data.endStakeMark[1]?.trim())) return false
else return true
}
}
@ -187,6 +190,7 @@ export const endStation = {
color: "#3DE8FF",
},
},
default: 153,
key: "endStakeMark[1]",
},
],

1
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue

@ -228,7 +228,6 @@ export default {
* @type {{ callback?: (value: any) => boolean; type?: "phone"; message: string; }[]}
*/
const rules = item.rules || [];
for (let index = 0; index < rules.length; index++) {
const rule = rules[index];
// true false

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

@ -79,6 +79,7 @@ export default {
}
}
this.$emit("onChange", node, key);
console.log(node , "菜单点击++========");
}
}
};

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

@ -1,5 +1,6 @@
<template>
<nav class="header">
<div class="header">
<div class="headerNavi">
<Clock class="time"></Clock>
<!-- 左侧菜单 -->
<CustomMenu :menuData="menuLeft" @onChange="onChange" prefix="l" :activeIndex="activeIndex" class="leftMenu">
@ -13,16 +14,16 @@
<CustomMenu :menuData="menuRight" @onChange="onChange" prefix="r" :activeIndex="activeIndex" class="rightMenu">
</CustomMenu>
<UserArea class="topButton"></UserArea>
</nav>
</div>
<RecentPages class="recent"></RecentPages>
</div>
</template>
<script>
import menuData from "@/common/menuData";
import CustomMenu from "./CustomMenu.vue";
import Clock from "./Clock.vue";
import UserArea from './UserArea.vue'
/**
*
*/
import RecentPages from "../RecentPages/index.vue";
export default {
name: "HeaderMenu",
@ -36,7 +37,8 @@ export default {
components: {
CustomMenu,
Clock,
UserArea
UserArea,
RecentPages
},
emit: ["change"],
created() {
@ -67,6 +69,7 @@ export default {
</script>
<style lang="less" scoped>
.header{
.headerNavi { height: 68px;
display: flex;
// justify-content: space-between;
align-items: center;
@ -159,4 +162,8 @@ export default {
}
}
}
.recent{
height: 32px;
}
}
</style>

89
ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue

@ -0,0 +1,89 @@
<template>
<div class="recent_pages">
<h4>最近使用:</h4>
<div class="history_buttons">
<div class="unit" :class="isActive(item) ? 'active' : ''" v-for="item in recentPages">
<p class="btn_main" @click="onClickItem(item)" :key="item.path">{{
item.title
}}</p>
<p class="btn_close" @click="onRemoveItem(item)">x</p>
</div>
</div>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
export default{
data(){
return {}
},
computed:{
...mapState("menu", ["recentPages"])
},
watch:{
$route:{
handler(newV){
this.addRecent({
title : newV.meta.title,
path : newV.path
});
},
immediate : true
}
},
methods:{
...mapMutations("menu", ["addRecent","removeRecent"]),
onClickItem(item){
this.$route.path != item.path && this.$router.push(item.path);
},
onRemoveItem(item){
this.removeRecent(item);
if(this.$route.path == item.path){
if(this.recentPages.length){
this.$router.push(this.recentPages[this.recentPages.length-1].path)
}else{
this.$router.push("/")
}
}
},
isActive(item) {
return this.$route.path == item.path;
}
}
}
</script>
<style lang="scss" scoped>
.recent_pages{
display: flex; flex-direction: row; align-items:stretch;
h4{ width: 100px; height: 32px; line-height: 32px; text-align: center; margin: 0; padding: 0; font-weight: bold;}
.history_buttons {
flex: 1;
display: flex;
flex-direction: row;
.unit {
cursor: default; margin-right: 3px;
position: relative;
height: 30px;
background-color: #048;
&.active {
background-color: #09C;
color: #FFF;
}
.btn_main {
height: 30px;
line-height: 30px;
padding: 0 12px
}
.btn_close {
background-color: #C00;
position: absolute;
right: 0;
top: 0;
}
}
}
}
</style>

1
ruoyi-ui/src/views/JiHeExpressway/components/empty.vue

@ -19,7 +19,6 @@ export default {
}
},
mounted() {
console.log(this.$route)
}
}
</script>

7
ruoyi-ui/src/views/JiHeExpressway/index.vue

@ -12,24 +12,23 @@
<script>
import HeaderMenu from "./components/HeaderMenu/index.vue";
import Adaptation from "./components/Adaptation.vue";
import getBoardBaseData from '@/common/getBoardBaseData'
export default {
name: "ji_ze_gao_su",
components: {
HeaderMenu,
Adaptation
Adaptation,
// ...modules
},
data() {
return {
isShowContent:false,
headerHeight:68,
headerHeight:100,
header: {
scale: 1,
originW: 1920,
originH: 68
originH: 100 //10068
},
};
},

1
ruoyi-ui/src/views/JiHeExpressway/pages/developing.vue

@ -11,7 +11,6 @@ export default {
components: {
},
mounted() {
console.log(this.$route)
}
}
</script>

3
ruoyi-ui/src/views/event/event/dispatchYuan.vue

@ -711,8 +711,6 @@ export default {
},
deviceStatusChangeLog(event) {
// console.log(event, "websockt");
console.log(event, "已执行");
console.log(this.$route.query.id, "this.$route.query.id");
for (let item of event) {
if (this.$route.query.id == item.eventId) {
this.zxList.unshift(item);
@ -721,7 +719,6 @@ export default {
},
},
async created() {
console.log(this.$route.query.id, "this.$route.query.id");
await this.getEqTypeStateIcon();
// await this.getTunnelData();

Loading…
Cancel
Save