Browse Source

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

wangqin
hui 8 months ago
parent
commit
043857ad95
  1. 9
      ruoyi-ui/src/api/MonthlyEquipment/index.js
  2. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  3. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  4. 30
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceSummary/index.vue
  5. 73
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  6. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/assets/charts.js

9
ruoyi-ui/src/api/MonthlyEquipment/index.js

@ -53,3 +53,12 @@ export function getSystemStatusExport(query) {
} }
); );
} }
// 拖拽排序
export function getStatusRule(rule) {
return request({
url: "/system/status/rule?rule=" + rule,
method: "get",
});
}

5
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -51,7 +51,7 @@ import Intermodulation from "./../Dialogs/Intermodulation/index.vue";
import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue"; import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue";
import FatigueWakesUp from "./../Dialogs/FatigueWakesUp/index.vue"; import FatigueWakesUp from "./../Dialogs/FatigueWakesUp/index.vue";
import { addInGraphHandle } from "./utils/map" import { addInGraphHandle, markerClusterIns } from "./utils/map"
import { lngLatMap } from "./utils/buttonEvent"; import { lngLatMap } from "./utils/buttonEvent";
export default { export default {
@ -182,6 +182,9 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
this.emitter.off("selectedCompleted", this.selectedCompletedHandle); this.emitter.off("selectedCompleted", this.selectedCompletedHandle);
Object.keys(lngLatMap).forEach(key => delete lngLatMap[key]);
markerClusterIns.clear();
window.renderData = undefined;
}, },
methods: { methods: {
selectedCompletedHandle(item) { selectedCompletedHandle(item) {

9
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -39,7 +39,7 @@ export class MarkerCluster {
markerCluster; markerCluster;
infoWindow; infoWindow;
data = []; data = []; //标注集合
constructor() {} constructor() {}
@ -115,7 +115,7 @@ export class MarkerCluster {
window.totalPages = totalPages; window.totalPages = totalPages;
let num = (page - 1) * pageSize; let num = (page - 1) * pageSize;
function renderData(page) { function renderData(page) {
if (page < 1 || page > totalPages) return; if (!data || page < 1 || page > totalPages) return;
window.page = page; window.page = page;
const pageSize = window.pageSize; const pageSize = window.pageSize;
const dataContainer = document.getElementById("dataContainer"); const dataContainer = document.getElementById("dataContainer");
@ -250,7 +250,7 @@ export class MarkerCluster {
if (window.openInfoWindow) { if (window.openInfoWindow) {
// console.log("窗口位移结束", new Date()); // console.log("窗口位移结束", new Date());
window.openInfoWindow = false; window.openInfoWindow = false;
// window.infoWindow?.open?.(); // !window.infoWindow.getIsOpen() && window.infoWindow?.open?.();
} }
}); });
@ -391,6 +391,9 @@ export class MarkerCluster {
setData() { setData() {
this.markerCluster.setData(this.data); this.markerCluster.setData(this.data);
} }
clear() {
this.data = [];
}
} }
export function getContent(data) { export function getContent(data) {

30
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceSummary/index.vue

@ -113,6 +113,7 @@
<script> <script>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { getStatusRule } from "@/api/MonthlyEquipment";
export default { export default {
name: "", name: "",
components: { draggable }, components: { draggable },
@ -125,27 +126,22 @@ export default {
data() { data() {
return {}; return {};
}, },
inject: ["initDataList"],
watch: {}, watch: {},
created() {}, created() {},
methods: { methods: {
____onDragend(event) { ____onDragend() {
console.log("____onDragend", event);
let oldIndex = event.oldIndex; //
let newIndex = event.newIndex; //
let diff = Math.abs(newIndex - oldIndex); //
let index = this.dataList[oldIndex];
if (eval(oldIndex) > eval(newIndex)) {
for (let i = 0; i < diff; i++) {
this.dataList[oldIndex - i] = this.dataList[oldIndex - i - 1];
}
this.dataList[newIndex] = index;
} else {
for (let i = 0; i < diff; i++) {
this.dataList[oldIndex + i] = this.dataList[oldIndex + i + 1];
}
this.dataList[newIndex] = index;
}
console.log(789, this.dataList); console.log(789, this.dataList);
let data = [];
this.dataList.forEach((item, index) => {
data.push(item.title);
});
getStatusRule(data).then((res) => {
console.log(res);
if (res.code == 200) {
this.initDataList();
}
});
}, },
}, },
mounted() {}, mounted() {},

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

@ -125,7 +125,7 @@ import {
getSystemStatusTabList, getSystemStatusTabList,
getSystemStatusType, getSystemStatusType,
getSystemStatusExport, getSystemStatusExport,
} from "../../../../../api/MonthlyEquipment"; } from "@/api/MonthlyEquipment";
// import { download } from "../../../../../utils/request.js"; // import { download } from "../../../../../utils/request.js";
import Pagination from "@screen/components/Pagination.vue"; import Pagination from "@screen/components/Pagination.vue";
import InputSearch from "@screen/components/InputSearch/index.vue"; import InputSearch from "@screen/components/InputSearch/index.vue";
@ -180,11 +180,16 @@ export default {
interval: null, interval: null,
}; };
}, },
provide() {
return {
initDataList: this.initDevice,
};
},
destroyed() { destroyed() {
clearInterval(this.interval); clearInterval(this.interval);
}, },
methods: { methods: {
handleSizeChange(size){ handleSizeChange(size) {
this.pageSize = size; this.pageSize = size;
this.initData(); this.initData();
}, },
@ -295,28 +300,35 @@ export default {
pctOnl: Math.floor(100 * Math.random()) + "%", pctOnl: Math.floor(100 * Math.random()) + "%",
pctOffl: "25%", pctOffl: "25%",
pctLose: "15%", pctLose: "15%",
sumUseState: "90%" sumUseState: "90%",
}); });
}); });
return; return;
} }
let allList = []; let allList = [];
for (let key in res.data) { let sort = res.data["排序规则"].rule.split(",");
let val = res.data[key]; sort.forEach((i) => {
let item = { for (let key in res.data) {
title: key, let val = res.data[key];
total: val.sum, let item = {
pctOnl: val.sucessRate, title: key,
pctOffl: val.failRate, total: val.sum,
pctLose: val.lostRate, pctOnl: val.sucessRate,
sumUseState: val.sumUseState pctOffl: val.failRate,
}; pctLose: val.lostRate,
if (key.includes("全部设备")) { sumUseState: val.sumUseState,
allList.unshift(item); };
} else { if (i === key) {
allList.push(item); allList.push(item);
}
// if (key.includes("")) {
// allList.unshift(item);
// } else {
// allList.push(item);
// }
} }
} });
this.equipments = allList; this.equipments = allList;
}); });
}, },
@ -431,7 +443,8 @@ export default {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
flex:1; height: 0; flex: 1;
height: 0;
.tabs-lo { .tabs-lo {
display: inline-flex; display: inline-flex;
@ -537,16 +550,24 @@ export default {
.full_tab { .full_tab {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; flex-direction: column; flex: 1; display: flex;
::v-deep .el-tabs__header{} flex-direction: column;
::v-deep .el-tabs__content{ flex: 1; flex: 1;
.el-tab-pane{ width: 100%; height: 100%;} ::v-deep .el-tabs__header {
}
::v-deep .el-tabs__content {
flex: 1;
.el-tab-pane {
width: 100%;
height: 100%;
}
} }
} }
.tab_con{ display: flex; flex-direction: column;} .tab_con {
display: flex;
flex-direction: column;
}
.topdiv { .topdiv {
display: inline-flex; display: inline-flex;

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/assets/charts.js

@ -55,7 +55,7 @@ var options = {
" ", " ",
" ", " ",
" ", " ",
" ", // " ",
// "枢纽", // "枢纽",
// "立交", // "立交",
// "立交", // "立交",

Loading…
Cancel
Save