Browse Source

新增页面

wangqin
zhoule 1 year ago
parent
commit
1944027e97
  1. 3
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue
  2. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  3. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  4. 55
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  5. 35
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  6. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/chargeableOperations/components/monthlyAnalysis/assets/charts.js
  7. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue

3
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue

@ -31,7 +31,8 @@ export default {
for (const key in callbacks) { for (const key in callbacks) {
result[key] = (...args) => callbacks[key](...args, { result[key] = (...args) => callbacks[key](...args, {
data: this.getFormData(), data: this.getFormData(),
formList: this.parent.formList formList: this.parent.formList,
self: this
}) })
} }

47
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js

@ -1,4 +1,5 @@
import { options } from "runjs"; import request from '@/utils/request'
import { Message } from "element-ui";
export const source = { export const source = {
label: "来源:", label: "来源:",
@ -713,6 +714,42 @@ export const locationMode = {
{ key: "4", label: "收费站" }, { key: "4", label: "收费站" },
], ],
}, },
ons: {
change(value, ...args) {
const { formList } = args.slice(-1)[0];
let facilityType = 1;
if (value == 2) {
facilityType = 6;
} else if (value == 3) {
facilityType = 3;
} else if (value == 4) {
facilityType = 1;
}
if(value && value != 1){
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
request({
url: `/business/facility/query?facilityType=${facilityType}`,
method: "get"
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let lwss = [];
result.data.forEach(it => lwss.push({ key: it.id, label: it.facilityName}))
formList.forEach((it) => {
if(it.key == "dcEventAccident.facilityId" || it.key == "dcEventVehicleAccident.facilityId"){
it.options.options = lwss;
}
});
}).catch((err) => {
console.log('err',err)
Message.error("查询失败", err);
})
}
},
},
}; };
export const route = { export const route = {
@ -1130,7 +1167,7 @@ export const congestionCause = {
label: "备注项添加", label: "备注项添加",
}, },
], ],
2 : [ 2: [
{ {
key: "1", key: "1",
label: "主线车流量大", label: "主线车流量大",
@ -1139,9 +1176,9 @@ export const congestionCause = {
key: "2", key: "2",
label: "收费站出口车流量大导致主线压车", label: "收费站出口车流量大导致主线压车",
}, },
] ],
} };
config.options.options = (value != 1 ? ad[1] : ad[2]); config.options.options = value != 1 ? ad[1] : ad[2];
}, },
}, },
}; };

36
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js

@ -67,7 +67,43 @@ export const tabConfigList = [
return true; return true;
} }
return false; return false;
},
ons: {
change(value, ...args) {
const { formList } = args.slice(-1)[0];
let facilityType = 1;
if (value == 2) {
facilityType = 6;
} else if (value == 3) {
facilityType = 3;
} else if (value == 4) {
facilityType = 1;
} }
if(value && value != 1){
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
// request({
// url: `/business/facility/query?facilityType=${facilityType}`,
// method: "get"
// }).then((result) => {
// if (result.code != 200) return Message.error(result?.msg);
// let lwss = [];
// result.data.forEach(it => lwss.push({ key: it.id, label: it.facilityName}))
// formList.forEach((it) => {
// if(it.key == "dcEventAccident.facilityId" || it.key == "dcEventVehicleAccident.facilityId"){
// it.options.options = lwss;
// }
// });
// }).catch((err) => {
// console.log('err',err)
// Message.error("查询失败", err);
// })
}
},
},
}, },
{ {
label: "匝道:", label: "匝道:",

55
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue

@ -49,7 +49,8 @@ export default {
tabConfigList, tabConfigList,
index: 1, index: 1,
roads: [], roads: [],
direction: [] direction: [],
lwss: []
} }
}, },
created() { created() {
@ -77,6 +78,7 @@ export default {
methods: { methods: {
initData() { initData() {
return Promise.all([ return Promise.all([
//
request({ request({
url: `/business/road/query`, url: `/business/road/query`,
method: "get", method: "get",
@ -85,10 +87,10 @@ export default {
result.data.forEach(it => { result.data.forEach(it => {
this.roads.push({ key: it.id, label: it.roadName }) this.roads.push({ key: it.id, label: it.roadName })
}) })
}) }).catch((err) => {
.catch((err) => {
Message.error("查询失败", err); Message.error("查询失败", err);
}), }),
//
request({ request({
url: `/system/dict/data/type/iot_event_direction`, url: `/system/dict/data/type/iot_event_direction`,
method: "get", method: "get",
@ -97,40 +99,26 @@ export default {
result.data.forEach(it => { result.data.forEach(it => {
this.direction.push({ key: it.dictValue, label: it.dictLabel }) this.direction.push({ key: it.dictValue, label: it.dictLabel })
}) })
}) }).catch((err) => {
.catch((err) => {
Message.error("查询失败", err); Message.error("查询失败", err);
}) }),
]) // 1 2 3 4 5 6
},
handleChange({ index }) {
// console.log('index',index)
this.index = index;
let formConfig = tabConfigList[index].formConfig;
if (index == 0 || index == 1 || index == 7) {
let fwq = [];
request({ request({
url: `/business/facility/query?facilityType=6`, url: `/business/facility/query`,
method: "get" method: "get"
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.data.forEach(it => { result.data.forEach(it => this.lwss.push({ key: it.id, label: it.facilityName, type: facilityType }))
fwq.push({ key: it.id, label: it.facilityName }) }).catch((err) => {
})
})
.catch((err) => {
Message.error("查询失败", err); Message.error("查询失败", err);
});
formConfig.list.forEach(it => {
if (it.key === 'dcEventServiceArea.facilityId' || it.key === 'dcEventAccident.facilityId') {
it.options.options = fwq;
}
}) })
} ])
},
handleChange({ index }) {
// console.log('index',index)
this.index = index;
let formConfig = tabConfigList[index].formConfig;
formConfig.list.forEach(it => { formConfig.list.forEach(it => {
if (it.key == 'direction') { if (it.key == 'direction') {
@ -139,6 +127,15 @@ export default {
if (it.key == 'roadId') { if (it.key == 'roadId') {
it.options.options = this.roads; it.options.options = this.roads;
} }
if (index == 7 || it.key === 'dcEventServiceArea.facilityId') {
it.options.options = this.lwss.filter(ss => ss.type == 6);
}
// if (index == 0 || index == 1 || index == 7) {
// if (it.key === 'dcEventAccident.facilityId' || it.key === 'dcEventVehicleAccident.facilityId' || it.key === 'dcEventServiceArea.facilityId') {
// it.options.options = this.lwss.filter(ss => ss.type == 6);
// }
// }
}) })
this.formConfig = formConfig; this.formConfig = formConfig;

35
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js

@ -1,6 +1,35 @@
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import { merge, cloneDeep } from "lodash"; import { merge, cloneDeep } from "lodash";
const station = {
label: "桩号:",
key: "stakeMark",
required: true,
type: "MultipleLabelItem",
options: {
options: [
{
prefix: {
text: "K",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[0]",
},
{
prefix: {
text: "+",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[1]",
},
],
},
};
export const tabMap = { export const tabMap = {
"-1": { "-1": {
state: 5, state: 5,
@ -86,7 +115,7 @@ export const gjSearchFormList = [
}, },
}, },
{ {
...PresetFormItems.station, ...station,
label: "桩号:", label: "桩号:",
required: false, required: false,
}, },
@ -142,11 +171,11 @@ export const gzSearchFormList = [
}, },
}, },
{ {
...PresetFormItems.station, ...station,
label: "开始桩号:", label: "开始桩号:",
required: false, required: false,
}, },
merge(cloneDeep(PresetFormItems.station), { merge(cloneDeep(station), {
options: { options: {
options: [ options: [
{ {

5
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/chargeableOperations/components/monthlyAnalysis/assets/charts.js

@ -4,6 +4,7 @@ var data1 = [5, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 15];
var data2 = [5, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 15]; var data2 = [5, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 15];
var options = { var options = {
tooltip: { tooltip: {
show:true
// trigger: "axis", // trigger: "axis",
// backgroundColor: 'rgba(17,95,182,0.5)', // backgroundColor: 'rgba(17,95,182,0.5)',
// textStyle: { // textStyle: {
@ -238,6 +239,8 @@ var options = {
}, },
symbolPosition: "end", symbolPosition: "end",
data: data1, data: data1,
tooltip: {
show:false}
}, },
{ {
name: "增涨率", name: "增涨率",
@ -269,6 +272,8 @@ var options = {
opacity: 0.7, opacity: 0.7,
}, },
data: [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18], data: [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18],
tooltip: {
show:false}
}, },
], ],
}; };

6
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue

@ -14,14 +14,14 @@
<el-table :border="false" :data="tableData" style="width: 100%"> <el-table :border="false" :data="tableData" style="width: 100%">
<el-table-column prop="nem" label="" width="30"> <el-table-column prop="nem" label="" width="30">
</el-table-column> </el-table-column>
<el-table-column prop="address" label="桩号范围"> <el-table-column prop="address" label="路段名称">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="能见度" class-name="showClass"> <el-table-column prop="name" label="指标名称" class-name="showClass">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="showClass">{{ scope.row.name }}</span> <span class="showClass">{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="发生时间"> <el-table-column prop="date" label="统计时间">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>

Loading…
Cancel
Save