diff --git a/ruoyi-ui/src/common/menuData.js b/ruoyi-ui/src/common/menuData.js index c5517702..2e53651d 100644 --- a/ruoyi-ui/src/common/menuData.js +++ b/ruoyi-ui/src/common/menuData.js @@ -36,7 +36,7 @@ export default [ path: "/perception/trafficSituation", name: "perceptionTrafficSituation", component: "perception/trafficSituation/index.vue", - } + }, ], }, { @@ -88,12 +88,12 @@ export default [ name: "emergencyProcessManagement", component: "control/event/emergencyProcessManagement/index.vue", }, - { - title: "指挥调度", - path: "/control/event/commandDispatch", - name: "commandDispatch", - component: "control/event/commandDispatch/index.vue", - }, + // { + // title: "指挥调度", + // path: "/control/event/commandDispatch", + // name: "commandDispatch", + // component: "control/event/commandDispatch/index.vue", + // }, { title: "管控事件分析", path: "/control/event/governanceAnalysis", @@ -113,14 +113,14 @@ export default [ path: "/control/device/strategy", name: "controlDeviceStrategy", component: "control/device/strategy/index.vue", - } + }, ], }, { title: "扫码报警", name: "controlQR", path: "/control/qrCode", - component: "control/qrCode/index.vue" + component: "control/qrCode/index.vue", }, { title: "非机预警", @@ -137,9 +137,9 @@ export default [ name: "controlManualStatistic", path: "/control/manual/statistic", component: "control/manual/statistic/index.vue", - } - ] - } + }, + ], + }, ], }, { @@ -149,40 +149,43 @@ export default [ path: "/maintain", children: [ { - title:"收费运营", - name:"fee", + title: "收费运营", + name: "fee", path: "/maintain/fee", - component: "maintenanceOperations/chargeableOperations/index.vue" - },{ - title:"智能养护", - name:"smart", - children:[ + component: "maintenanceOperations/chargeableOperations/index.vue", + }, + { + title: "智能养护", + name: "smart", + children: [ { - title: "统计分析", - name: "smartStatistic", - path: "/maintain/smart/statistic", - component: "maintenanceOperations/smart/statisticalAnalysis/index.vue", + title: "统计分析", + name: "smartStatistic", + path: "/maintain/smart/statistic", + component: + "maintenanceOperations/smart/statisticalAnalysis/index.vue", }, { title: "网络拓扑", name: "smartTopology", path: "/maintain/smart/topology", - component: "maintenanceOperations/smart/topology/index.vue" + component: "maintenanceOperations/smart/topology/index.vue", }, { title: "设备管理", name: "smartDeviceMange", path: "/maintain/smart/manage", - component: "maintenanceOperations/smart/manage/index.vue" - } - ] - }, { + component: "maintenanceOperations/smart/manage/index.vue", + }, + ], + }, + { title: "边坡光伏", name: "photovoltaic", path: "/maintain/photovoltaic", - component: "developing.vue" - } - ] + component: "developing.vue", + }, + ], }, { title: "公众服务", @@ -225,10 +228,10 @@ export default [ title: "信息发布管理", name: "InformationReleaseManagement", path: "/service/InformationReleaseManagement", - component: "service/InformationReleaseManagement/index.vue" - }, - { - title: "公众服务统计", + component: "service/InformationReleaseManagement/index.vue", + }, + { + title: "公众服务统计", name: "publicService", path: "/service/publicService", component: "service/publicService/index.vue", @@ -271,8 +274,8 @@ export default [ name: "roadNet", path: "/datav/roadNet", component: "datav/roadNet/index.vue", - hide:true - } + hide: true, + }, ], }, { diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 160652a3..7eed341a 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -90,6 +90,20 @@ const constantRoutes = [ } ] }, + { + path: '/control//event', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'commandDispatch', + component: () => import('@/views/JiHeExpressway/pages/control/event/commandDispatch/index'), + name: 'commandDispatch', + meta: { title: '指挥调度', icon: 'user' } + } + ] + }, // { // path: '/system/user-auth', // component: Layout, @@ -223,4 +237,4 @@ const constantRoutes = [ ] -export { constantRoutes }; \ No newline at end of file +export { constantRoutes }; diff --git a/ruoyi-ui/src/store/modules/menu.js b/ruoyi-ui/src/store/modules/menu.js index bd024a7c..0af83a09 100644 --- a/ruoyi-ui/src/store/modules/menu.js +++ b/ruoyi-ui/src/store/modules/menu.js @@ -3,7 +3,7 @@ const state = { recentPages: [], isRecentOpen:"", } - + const mutations = { saveRecent(state){ localStorage.setItem("recentPages", JSON.stringify(state.recentPages)); @@ -25,8 +25,11 @@ const state = { if (!temp){ item.active = true; state.recentPages.push(item); + } else { + let i = state.recentPages.findIndex(unit => unit.path == item.path); + item.isPinned = state.recentPages[i].isPinned + state.recentPages[i] = item; } - mutations.saveRecent(state); }, @@ -65,7 +68,7 @@ const state = { } } - + const getters = { isRecentOpen(state){ if (state.isRecentOpen === ""){ @@ -80,4 +83,4 @@ const getters = { state, getters, mutations, - } \ No newline at end of file + } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue index 1506a111..8aa137f6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue @@ -105,7 +105,6 @@ export default { }, methods: { close() { - console.log("------"); this.modelVisible = false; }, updateDialogVisible(bool) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue b/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue index 0f6271d5..cda97021 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue @@ -1,32 +1,32 @@ diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue index c76bd11a..b8ce4ed6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue @@ -151,24 +151,46 @@ export default { if (!this.checkList.length) return Message.error("请至少选择一个广播设备!"); + const devices = []; + const functions = []; + for(let i of this.checkList){ + const d = _.find(this.musicList,{otherConfig:i}) + devices.push({ + "id": d.id, + "iotDeviceId": d.iotDeviceId, + "deviceType": d.deviceType + }) + + functions.push({ + "functionId": "A1", + "params": { + "name": "task-3", + "outVol": "" + this.dataForm.outVol, + "priority": "" + this.dataForm.priority, + "text": this.dataForm.content.trim(), + "repeatTimes": "" + this.dataForm.repeatTimes, + "termList": [ + { + ...JSON.parse(i) + } + ], + "functionType": "startPaTts" + } + + }) + } this.submitting = true; request({ - url: `/broadcast/broadcastFunctionCall`, + url: `/business/device/batchFunctions`, method: "post", data: { - name: "task-3", - outVol: "" + this.dataForm.outVol, - priority: "" + this.dataForm.priority, - text: this.dataForm.content.trim(), - repeatTimes: "" + this.dataForm.repeatTimes, - termList: this.checkList.map((str) => JSON.parse(str)), - functionType: "startPaTts", + devices,functions }, }) .then((data) => { // console.log(data); - if (data.retCode == "0") { + if (data.code == "200") { Message.success("广播设置成功!"); this.modelVisible = false; } else { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue new file mode 100644 index 00000000..4cc6af4e --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue @@ -0,0 +1,262 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue new file mode 100644 index 00000000..196c47df --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js new file mode 100644 index 00000000..1820068a --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js @@ -0,0 +1,44 @@ +export const devicesFormList = [ + { + label: "设备内温度过高", + key: `theInternalTemperatureOfTheDeviceOverheats`, + // text: "-", + gridColumn: 2, + }, + { + label: "阵列电压", + key: `arrayVoltage`, + // text: "-", + gridColumn: 2, + }, + { + label: "阵列电流", + key: `arrayCurrent`, + // text: "-", + gridColumn: 2, + }, + { + label: "发电功率L", + key: `generatingPowerL`, + text: "-", + gridColumn: 2, + }, + { + label: "发电功率H", + key: `generatingPowerH`, + text: "-", + gridColumn: 2, + }, + { + label: "负载电压", + key: `loadVoltage`, + text: "-", + gridColumn: 2, + }, + { + label: "负载电流", + key: `loadCurrent`, + text: "-", + gridColumn: 2, + }, +]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue new file mode 100644 index 00000000..476c0f97 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue @@ -0,0 +1,188 @@ + + + + + +../mixin../mixin../mixin diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue index 91566e7f..658580c6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue @@ -102,14 +102,14 @@ export default { let times = [], datas = []; qsData.rows.forEach(item => { if (lastPath == 'deviceHour') { - times.push(item.timeSlot); + times.push(item.date); } else if (lastPath == 'deviceDay') { times.push(new Date(item.date).format('dd')); } else if (lastPath == 'deviceYears') { times.push(new Date(item.month).format('MM')); } - datas.push(this.btnType == 1 ? item.avgTemperature : item.avgVisibility) + datas.push(this.btnType == 1 ? item.temperature : item.visibility) }) // console.log('datas',datas) @@ -121,8 +121,8 @@ export default { lineChartOption.xAxis.name = '月' } lineChartOption.xAxis.data = times; - lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米'; - lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)' + lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '千米'; + lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(千米)' lineChartOption.series[0].data = datas; const chartIns = echarts.init(this.$refs.LineChartRef); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RemoteMachine/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RemoteMachine/components/DeviceParams.vue index dc8d4b51..3886a99c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RemoteMachine/components/DeviceParams.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RemoteMachine/components/DeviceParams.vue @@ -65,7 +65,7 @@ export default { for (const key in deviceInfo.formatValue) { // electricity 电流 // voltage 电压 - if (key.includes('electricity')) { + if (key.includes('voltage')) { const args = key.match(/[a-z]+|[0-9]+$/g); const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_'); @@ -80,7 +80,7 @@ export default { { label: '电流', key: `${prefix}_electricity_${num}`, - text: deviceInfo.formatValue[key], + text: deviceInfo.formatValue[`${prefix}_electricity_${num}`], gridColumn: 2, state: deviceInfo.value[key] > 0 } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue index dc8d4b51..3886a99c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue @@ -65,7 +65,7 @@ export default { for (const key in deviceInfo.formatValue) { // electricity 电流 // voltage 电压 - if (key.includes('electricity')) { + if (key.includes('voltage')) { const args = key.match(/[a-z]+|[0-9]+$/g); const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_'); @@ -80,7 +80,7 @@ export default { { label: '电流', key: `${prefix}_electricity_${num}`, - text: deviceInfo.formatValue[key], + text: deviceInfo.formatValue[`${prefix}_electricity_${num}`], gridColumn: 2, state: deviceInfo.value[key] > 0 } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js index 13dd9f9e..c118c862 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js @@ -25,10 +25,13 @@ export const dialogDelayVisible = { computed: { obverseVisible: { set(bool) { - try { - typeof this.visibleClose === "function" && this.visibleClose?.(bool); - } catch (error) {} - + if(this.visibleClose){ + try { + typeof this.visibleClose === "function" && this.visibleClose?.(bool); + } catch (error) {} + + } + setTimeout(() => { this.$emit("change", bool); }, 180); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue index 1bd6844e..169cbc77 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue @@ -53,6 +53,7 @@ import RoadNetworkFacilities from "./../Dialogs/RoadNetworkFacilities/index.vue" import SmartDevice from "./../Dialogs/SmartDevice/index.vue"; import RemoteMachine from "./../Dialogs/RemoteMachine/index.vue"; import SolarEnergy from "./../Dialogs/SolarEnergy/index.vue"; +import ConfluenceArea from "./../Dialogs/ConfluenceArea/index.vue"; import Intermodulation from "./../Dialogs/Intermodulation/index.vue"; import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue"; import MeteorologicalDetection from "./../Dialogs/MeteorologicalDetection/index.vue"; @@ -79,7 +80,8 @@ export default { FatigueWakesUp, RoadNetworkFacilities, RemoteMachine, - MeteorologicalDetection + MeteorologicalDetection, + ConfluenceArea }, data() { return { @@ -246,7 +248,7 @@ export default { const key = getHandleDeviceType(item) || `${this.active}/${item.title}`; const status = item.status; - + console.log(item.status,'------------') if (!status) { //开启 this.nowSelected = item.title; this.nowSelectedCompleted = false; @@ -479,4 +481,4 @@ export default { } } } - +../Dialogs/ConfluenceArea/index.vue diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index b863512a..8fa15c98 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -57,6 +57,7 @@ export const DeviceForMap = { }, 合流区: { deviceType: "8", + dialog:"ConfluenceArea", }, 护栏碰撞: { deviceType: "6", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue index acf49709..9b84a6b8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue @@ -4,10 +4,11 @@ + style="width: 123px;"> + @@ -302,9 +303,7 @@ export default { watch: { 'tableInfo.deviceType': { async handler(newValue) { - console.log('aaaaaaaaaaaaaaaaaa', newValue) await this.loadData(newValue); - console.log('bbbbbbbbbbb', this.sbOptions) }, immediate: true, } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue index 95953434..83aa5bd4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue @@ -1,15 +1,28 @@ - \ No newline at end of file + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue index 437333ca..c7050b1c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue @@ -222,6 +222,15 @@ export default { background: #1b586d; color: #fff; } +::v-deep .el-table td.el-table__cell div { + line-height: 30px; +} +::v-deep .el-checkbox-group { + text-align: left; + .el-checkbox { + min-width: 70px; + } +} ::v-deep .el-table tr { border: 1px solid #07aec6; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue index 4ea38237..6e3654f9 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue @@ -18,7 +18,10 @@
值班领导: -
+
{{ item.shiftsName }}: {{ item.shiftsNumber }} @@ -27,24 +30,27 @@ > -->
+
-
路管人员: -
+
{{ item.resourceName }}: {{ item.resourceValue }}
+
-
救援车辆: -
+
{{ item.resourceValue }} {{ item.vehicleText }}
+
-
{ - if (element.dispatchType == 1) { - this.staff.push(element); - } else { - this.vehicle.push(element); - } - }); + if (res.data && res.data.resource && res.data.resource.resource) { + res.data.resource.resource.forEach((element) => { + if (element.dispatchType == 1) { + this.staff.push(element); + } else { + this.vehicle.push(element); + } + }); + } + this.vehicleTypeList.forEach((i) => { this.vehicle.forEach((item) => { if (item.resourceName == i.dictValue) { @@ -193,7 +203,7 @@ export default { color: #38d2e7; } .value { - width: 85%; + width: 80%; font-size: 13px; color: #fff; display: flex; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue index eda86500..8ff821d1 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue @@ -226,7 +226,7 @@
@@ -28,48 +26,70 @@ - + - - + - diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue index 7a7ae814..7fc80fed 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue @@ -485,6 +485,7 @@ export default { }, ], weatherList: [], + sort:['长清区','平阴县','东平县','汶上县','梁山县','嘉祥县','巨野县','郓城县'] }; }, @@ -503,28 +504,10 @@ export default { getWeatherFacts().then((response) => { let obj = response.data; let data = []; - for (let key in obj) { - // if (key === "weatherFacts1") { - // obj[key].name = "长清区"; - // } else if (key === "weatherFacts2") { - // obj[key].name = "平阴县"; - // } else if (key === "weatherFacts3") { - // obj[key].name = "东平县"; - // } else if (key === "weatherFacts4") { - // obj[key].name = "汶上县"; - // } else if (key === "weatherFacts5") { - // obj[key].name = "梁山县"; - // } else if (key === "weatherFacts6") { - // obj[key].name = "嘉祥县"; - // } else if (key === "weatherFacts7") { - // obj[key].name = "巨野县"; - // } else if (key === "weatherFacts8") { - // obj[key].name = "郓城县"; - // } - data.push(obj[key]); + for(let i of this.sort){ + data.push(_.find(obj,{name:i})) } this.weatherList = data; - // console.log("weatherList", this.weatherList); }); }, // 按小时查询天气 @@ -533,30 +516,12 @@ export default { let obj = response.data; let data = []; for (let key in obj) { - // if (key === "hourlyWeather1") { - // console.log("obj[key]", obj[key][id - 1]); - // obj[key][id - 1].name = "长清区"; - // } else if (key === "hourlyWeather2") { - // obj[key][id - 1].name = "平阴县"; - // } else if (key === "hourlyWeather3") { - // obj[key][id - 1].name = "东平县"; - // } else if (key === "hourlyWeather4") { - // obj[key][id - 1].name = "汶上县"; - // } else if (key === "hourlyWeather5") { - // obj[key][id - 1].name = "梁山县"; - // } else if (key === "hourlyWeather6") { - // obj[key][id - 1].name = "嘉祥县"; - // } else if (key === "hourlyWeather7") { - // obj[key][id - 1].name = "巨野县"; - // } else if (key === "hourlyWeather8") { - // obj[key][id - 1].name = "郓城县"; - // } - data.push(obj[key]); + data.push(obj[key][id-1]); } let newData = []; - data.forEach((item) => { - newData.push(item[id - 1]); - }); + for(let i of this.sort){ + newData.push(_.find(data,{name:i})) + } this.weatherList = newData; }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue index cfe0df0f..0609ad9f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue @@ -33,6 +33,12 @@ + + +