Browse Source

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

wangqin
qingzhengli 9 months ago
parent
commit
d803540f58
  1. 25
      ruoyi-ui/src/store/modules/menu.js
  2. 3
      ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue
  3. 4
      ruoyi-ui/src/views/JiHeExpressway/index.vue
  4. 30
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  5. 26
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  6. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js
  7. 77
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/heightway/index.vue

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

@ -1,12 +1,17 @@
const state = {
recentPages: [],
isRecentOpen:false,
isRecentOpen:"",
}
const mutations = {
saveRecent(state){
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
},
addRecent(state, item) {
if(state.recentPages.length == 0 ){
state.recentPages = JSON.parse(localStorage.getItem("recentPages") || "[]");
}
let temp;
state.recentPages.forEach((unit,index)=>{
if(unit.path == item.path){
@ -21,22 +26,38 @@ const state = {
state.recentPages.push(item);
}
mutations.saveRecent(state);
},
openRecent(state){
state.isRecentOpen = true;
localStorage.setItem("isRecentOpen", true);
},
closeRecent(state){
state.isRecentOpen = false;
localStorage.setItem("isRecentOpen", false);
},
removeRecent(state, item) {
let i = state.recentPages.findIndex(unit => unit.path == item.path);
state.recentPages.splice(i, 1);
mutations.saveRecent(state);
}
}
const getters = {
isRecentOpen(state){
if (state.isRecentOpen === ""){
state.isRecentOpen = localStorage.getItem("isRecentOpen") || false;
}
console.log(state.isRecentOpen);
return state.isRecentOpen;
}
}
export default {
namespaced: true,
state,
getters,
mutations,
}

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

@ -173,11 +173,8 @@ export default{
calcLastIndex(){
try{
this.widthArr.forEach((item, index) => {
console.log(this.widthArr , "this.widthArrthis.widthArr");
console.log(index, item, this.widthBox - this.posiLeft , item > (this.widthBox - this.posiLeft));
if (item > (this.widthBox - this.posiLeft)) { //posiLeft
this.lastIndex = index;
console.log(this.lastIndex , "lastIndexlastIndexlastIndexlastIndexlastIndexlastIndex")
// console.log(this.lastIndex , "this.lastIndex lastIndex lastIndex lastIndex")
throw new Error('找到lastIndex,退出循环')
}

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

@ -14,7 +14,7 @@
import HeaderMenu from "./components/HeaderMenu/index.vue";
import Adaptation from "./components/Adaptation.vue";
import getBoardBaseData from '@/common/getBoardBaseData'
import { mapState } from "vuex";
import { mapGetters } from "vuex";
export default {
name: "ji_ze_gao_su",
components: {
@ -47,7 +47,7 @@ export default {
}
},
computed:{
...mapState("menu",["isRecentOpen"]),
...mapGetters("menu",["isRecentOpen"]),
headerStyle(){
return {
width : `${this.header.originW}px`,

30
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -92,6 +92,7 @@ import FormTable from '../formTable/index';
import Button from '@screen/components/Buttons/Button.vue';
import request from '@/utils/request';
import { Message } from "element-ui";
import { throttle } from "lodash"
const optionsMap = {
1: {
@ -280,6 +281,11 @@ export default {
prop: 'visible',
event: 'close'
},
provide() {
return {
loadData: throttle(this.loadData, 1000)
}
},
props: {
visible: Boolean,
detail: {
@ -308,6 +314,7 @@ export default {
searchRule: 1,
qbb: ''
}],
deviceData: [],
eventOptions: [
{
value: 1,
@ -423,6 +430,16 @@ export default {
eventType: 1,
triggerMechanism: 1
}
this.secondFormData = [{
deviceType: 1,
searchRule: 1,
qbb: ''
}];
this.thirdFormData = [{
deviceType: 1,
searchRule: 1,
qbb: ''
}];
}
}
return this.visible;
@ -468,6 +485,19 @@ export default {
})
},
async loadData() {
if (this.deviceData.length <= 0) {
let result = await request({
url: `business/device/query?deviceType=2`,
method: "get",
})
if (result.code != 200) return Message.error(result?.msg);
console.log('123');
this.deviceData = result.data;
// return result.data;
}
return this.deviceData;
},
changeEventType(value = 1) {
this.mechanismOptions = optionsMap[this.formData.eventCategory || 1][value];
},

26
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -110,6 +110,7 @@ export default {
prop: 'visible',
event: 'update:value'
},
inject: ['loadData'],
props: {
visible: Boolean,
eventType: Number,
@ -229,22 +230,23 @@ export default {
index: 1
}
},
created() {
this.initData();
async created() {
let loadData = await this.loadData();
// console.log('aa',loadData)
this.sbOptions = loadData;
},
methods: {
initData() {
// request({
// url: `business/device/query?deviceType=2`,
// method: "get",
// }).then((result) => {
// if (result.code != 200) return Message.error(result?.msg);
// this.sbOptions = result.data;
request({
url: `business/device/query?deviceType=2`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.sbOptions = result.data;
}).catch(() => {
Message.error("查询可变信息标识失败");
})
// }).catch(() => {
// Message.error("");
// })
},
changeDeviceType(value) {

1
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js

@ -57,7 +57,6 @@ var options = {
},
formatter: (params) => {
let count = 0;
console.log("typeAnalysisData", typeAnalysisData);
typeAnalysisData.forEach((it) => {
count += it.value;
});

77
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/heightway/index.vue

@ -3,24 +3,45 @@
<WgtTitle :title="'交通路段状态'"></WgtTitle>
<div class="board">
<div class="searchPanel">
<div>起始桩号k</div>
<el-input class="inputZh" v-model="start" placeholder="55"></el-input>
<el-form :inline="true" :model="ruleForm" ref="ruleForm">
<el-form-item label="起始桩号:k" prop="start">
<!-- <div>起始桩号k</div> -->
<el-input
class="inputZh"
v-model="ruleForm.start"
placeholder="55"
></el-input>
<span>+</span>
</el-form-item>
<el-form-item label="" prop="start1">
<el-input
class="inputZh inputJl"
v-model="start1"
v-model="ruleForm.start1"
placeholder="378"
></el-input>
<div>结束桩号k</div>
<el-input class="inputZh" v-model="start2" placeholder="208"></el-input>
</el-form-item>
<el-form-item label="结束桩号:k" prop="start2">
<!-- <div>结束桩号k</div> -->
<el-input
class="inputZh"
v-model="ruleForm.start2"
placeholder="208"
></el-input>
<span>+</span>
</el-form-item>
<el-form-item label="" prop="start3">
<el-input
class="inputZh inputJl"
v-model="start3"
v-model="ruleForm.start3"
placeholder="153"
></el-input>
<div>路段方向</div>
<el-select v-model="area" class="selectRoad" placeholder="请选择">
</el-form-item>
<el-form-item label="路段方向:" prop="area">
<el-select
v-model="ruleForm.area"
class="selectRoad"
placeholder="请选择"
>
<el-option
v-for="item in areaOptions"
:key="item.value"
@ -29,10 +50,18 @@
>
</el-option>
</el-select>
<el-button type="primary" class="btnSearch" @click="onSubmit"
</el-form-item>
<el-form-item
><el-button type="primary" class="btnSearch" @click="onSubmit"
>搜索</el-button
>
<el-button class="btnReset">重置</el-button>
<el-button class="btnReset" @click="onClose"
>重置</el-button
></el-form-item
>
</el-form>
<!-- <div>路段方向</div> -->
</div>
<div class="tblResult">
<div class="tblTd">
@ -66,10 +95,13 @@ export default {
},
data() {
return {
ruleForm: {
start: "",
start1: "",
start2: "",
start3: "",
area: "济南",
},
areaOptions: [
{
value: "济南",
@ -80,7 +112,7 @@ export default {
label: "菏泽",
},
],
area: "济南",
list: [
{
name: "大学城-长清",
@ -131,7 +163,11 @@ export default {
created() {},
methods: {
onSubmit() {
console.log("submit!");
console.log("submit!", this.ruleForm);
},
onClose() {
this.$refs.ruleForm.resetFields();
console.log("submit!", this.ruleForm);
},
},
};
@ -149,6 +185,17 @@ export default {
color: #9f9f9f;
font-size: 12px;
}
::v-deep .searchPanel .el-form-item__label {
color: #fff;
font-weight: normal;
white-space: nowrap;
margin-left: -2px;
margin-right: -5px;
font-size: 13px;
line-height: 36px;
}
.heightway {
width: 100%;
.board {
@ -192,8 +239,8 @@ export default {
}
.inputJl {
// width: 60px;
margin-left: 5px;
margin-right: 10px;
// margin-left: 5px;
// margin-right: 10px;
}
.selectRoad {
width: 87px;
@ -207,7 +254,7 @@ export default {
}
.btnSearch {
background-color: #00b3cc;
margin-left: 10px;
// margin-left: 10px;
padding: 6px 15px;
font-size: 13px;
}

Loading…
Cancel
Save