Browse Source

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

wangqin
qingzhengli 8 months ago
parent
commit
6085f71d51
  1. 9
      ruoyi-ui/src/api/MonthlyEquipment/index.js
  2. 30
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceSummary/index.vue
  3. 73
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  4. 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",
});
}

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

@ -113,6 +113,7 @@
<script>
import draggable from "vuedraggable";
import { getStatusRule } from "@/api/MonthlyEquipment";
export default {
name: "",
components: { draggable },
@ -125,27 +126,22 @@ export default {
data() {
return {};
},
inject: ["initDataList"],
watch: {},
created() {},
methods: {
____onDragend(event) {
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;
}
____onDragend() {
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() {},

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

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