代码提交
This commit is contained in:
parent
e2d194eab3
commit
0548069a08
|
@ -463,6 +463,9 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
&-bottom {
|
&-bottom {
|
||||||
height: vh(288);
|
height: vh(288);
|
||||||
|
.switch::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.switch {
|
.switch {
|
||||||
margin-top: vh(16);
|
margin-top: vh(16);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -471,8 +474,10 @@ onMounted(() => {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-content: space-between;
|
align-content: space-between;
|
||||||
|
overflow: scroll;
|
||||||
&-item {
|
&-item {
|
||||||
width: vw(392);
|
width: vw(392);
|
||||||
|
margin-bottom: vh(12);
|
||||||
height: vh(92);
|
height: vh(92);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: vh(8) vw(16);
|
padding: vh(8) vw(16);
|
||||||
|
|
|
@ -139,12 +139,15 @@ function drawHealthIndex(list) {
|
||||||
"rgba(174, 211, 255, 0.7)",
|
"rgba(174, 211, 255, 0.7)",
|
||||||
];
|
];
|
||||||
let result = []
|
let result = []
|
||||||
|
let total = 0
|
||||||
for (let key in list) {
|
for (let key in list) {
|
||||||
if (key !== "错误总数") {
|
if (key !== "错误总数") {
|
||||||
result.push({
|
result.push({
|
||||||
name: key,
|
name: key,
|
||||||
value: list[key],
|
value: list[key],
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
total = list[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let dom = document.querySelector("#healthIndex");
|
let dom = document.querySelector("#healthIndex");
|
||||||
|
@ -186,6 +189,9 @@ function drawHealthIndex(list) {
|
||||||
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
||||||
padding: [8, 10], //内边距
|
padding: [8, 10], //内边距
|
||||||
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
||||||
|
formatter: function (params) {
|
||||||
|
return params.name + ': ' + total*params.value
|
||||||
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
orient: "vertical",
|
orient: "vertical",
|
||||||
|
@ -319,12 +325,15 @@ function drawSpareParts(list) {
|
||||||
"rgba(174, 211, 255, 0.7)",
|
"rgba(174, 211, 255, 0.7)",
|
||||||
];
|
];
|
||||||
let result = []
|
let result = []
|
||||||
|
let total = 0
|
||||||
for (let key in list) {
|
for (let key in list) {
|
||||||
if (key !== "总数") {
|
if (key !== "总数") {
|
||||||
result.push({
|
result.push({
|
||||||
name: key,
|
name: key,
|
||||||
value: list[key],
|
value: list[key],
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
total = list[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let dom = document.querySelector("#spareParts");
|
let dom = document.querySelector("#spareParts");
|
||||||
|
@ -342,6 +351,7 @@ function drawSpareParts(list) {
|
||||||
shadowBlur: 40,
|
shadowBlur: 40,
|
||||||
borderWidth: 10,
|
borderWidth: 10,
|
||||||
shadowColor: "rgba(0, 0, 0, 0)", //边框阴影
|
shadowColor: "rgba(0, 0, 0, 0)", //边框阴影
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
let placeHolderStyle = {
|
let placeHolderStyle = {
|
||||||
|
@ -366,6 +376,9 @@ function drawSpareParts(list) {
|
||||||
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
||||||
padding: [8, 10], //内边距
|
padding: [8, 10], //内边距
|
||||||
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
||||||
|
formatter: function (params) {
|
||||||
|
return params.name + ': ' + total*params.value
|
||||||
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
orient: "vertical",
|
orient: "vertical",
|
||||||
|
|
|
@ -36,9 +36,7 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span> 维护计划 </span>
|
<span> 维护计划 </span>
|
||||||
<el-select
|
<el-select
|
||||||
@change="
|
@change="getMaintenancePlanData()"
|
||||||
getMaintenancePlanData();
|
|
||||||
"
|
|
||||||
clearable
|
clearable
|
||||||
v-model="planParams.facName"
|
v-model="planParams.facName"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
@ -52,10 +50,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-bottom-table">
|
<div class="box-content-bottom-table">
|
||||||
<el-table
|
<el-table :data="tableList" style="width: 100%">
|
||||||
:data="tableList"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-table-column prop="keepPlanTime" label="计划时间" />
|
<el-table-column prop="keepPlanTime" label="计划时间" />
|
||||||
<el-table-column prop="facCode" label="设备编码" />
|
<el-table-column prop="facCode" label="设备编码" />
|
||||||
<el-table-column prop="facName" label="设备名称" />
|
<el-table-column prop="facName" label="设备名称" />
|
||||||
|
@ -91,11 +86,14 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import { onMounted, ref, nextTick, reactive } from "vue";
|
import { onMounted, ref, nextTick, reactive } from "vue";
|
||||||
import { countKeepRecord ,getMaintenancePlan,allDeviceNames} from "@/api/equipmentManagement/index";
|
import {
|
||||||
|
countKeepRecord,
|
||||||
|
getMaintenancePlan,
|
||||||
|
allDeviceNames,
|
||||||
|
} from "@/api/equipmentManagement/index";
|
||||||
const emit = defineEmits(["closeMaintenance"]);
|
const emit = defineEmits(["closeMaintenance"]);
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
|
||||||
emit("closeMaintenance", -1);
|
emit("closeMaintenance", -1);
|
||||||
}
|
}
|
||||||
const tableList = ref([
|
const tableList = ref([
|
||||||
|
@ -136,12 +134,15 @@ function drawLeftChart(list) {
|
||||||
"rgba(174, 211, 255, 0.7)",
|
"rgba(174, 211, 255, 0.7)",
|
||||||
];
|
];
|
||||||
let result = [];
|
let result = [];
|
||||||
|
let total = 0;
|
||||||
for (let key in list) {
|
for (let key in list) {
|
||||||
if (key != "总数") {
|
if (key != "总数") {
|
||||||
result.push({
|
result.push({
|
||||||
name: key,
|
name: key,
|
||||||
value: list[key],
|
value: list[key],
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
total = list[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let dom = document.querySelector("#pieChart1");
|
let dom = document.querySelector("#pieChart1");
|
||||||
|
@ -181,6 +182,9 @@ function drawLeftChart(list) {
|
||||||
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
||||||
padding: [8, 10], //内边距
|
padding: [8, 10], //内边距
|
||||||
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
||||||
|
formatter: function (params) {
|
||||||
|
return params.name + ': ' + total*params.value
|
||||||
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
orient: "vertical",
|
orient: "vertical",
|
||||||
|
@ -281,7 +285,7 @@ function drawLeftChart(list) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
})
|
}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
@ -299,12 +303,15 @@ function drawRightChart(list) {
|
||||||
"rgba(174, 211, 255, 0.7)",
|
"rgba(174, 211, 255, 0.7)",
|
||||||
];
|
];
|
||||||
let result = [];
|
let result = [];
|
||||||
|
let total = 0
|
||||||
for (let key in list) {
|
for (let key in list) {
|
||||||
if (key != "总数") {
|
if (key != "总数") {
|
||||||
result.push({
|
result.push({
|
||||||
name: key,
|
name: key,
|
||||||
value: list[key],
|
value: list[key],
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
total = list[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let dom = document.querySelector("#pieChart2");
|
let dom = document.querySelector("#pieChart2");
|
||||||
|
@ -343,6 +350,9 @@ function drawRightChart(list) {
|
||||||
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
backgroundColor: "rgba(0,0,0,0.7)", // 背景
|
||||||
padding: [8, 10], //内边距
|
padding: [8, 10], //内边距
|
||||||
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
extraCssText: "box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);", //添加阴影
|
||||||
|
formatter: function (params) {
|
||||||
|
return params.name + ': ' + total*params.value
|
||||||
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
orient: "vertical",
|
orient: "vertical",
|
||||||
|
@ -358,7 +368,6 @@ function drawRightChart(list) {
|
||||||
},
|
},
|
||||||
itemWidth: 8,
|
itemWidth: 8,
|
||||||
itemHeight: 8,
|
itemHeight: 8,
|
||||||
|
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
@ -460,45 +469,45 @@ function drawRightChart(list) {
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const value1 = ref(new Date())
|
const value1 = ref(new Date());
|
||||||
const value2 = ref(new Date())
|
const value2 = ref(new Date());
|
||||||
|
|
||||||
// 保养计划接口
|
// 保养计划接口
|
||||||
function maintenancePlan() {
|
function maintenancePlan() {
|
||||||
let params = {
|
let params = {
|
||||||
year:value2.value.getFullYear(),
|
year: value2.value.getFullYear(),
|
||||||
status:false
|
status: false,
|
||||||
}
|
};
|
||||||
countKeepRecord(params).then((res) => {
|
countKeepRecord(params).then((res) => {
|
||||||
drawRightChart(res.result);
|
drawRightChart(res.result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 已完成维保计划接口
|
// 已完成维保计划接口
|
||||||
function completedMaintenancePlan(){
|
function completedMaintenancePlan() {
|
||||||
let params = {
|
let params = {
|
||||||
year:value1.value.getFullYear(),
|
year: value1.value.getFullYear(),
|
||||||
status:true
|
status: true,
|
||||||
}
|
};
|
||||||
countKeepRecord(params).then((res) => {
|
countKeepRecord(params).then((res) => {
|
||||||
drawLeftChart(res.result);
|
drawLeftChart(res.result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const planParams = reactive({
|
const planParams = reactive({
|
||||||
pageIndex:1,
|
pageIndex: 1,
|
||||||
pageSize:3,
|
pageSize: 3,
|
||||||
facName:''
|
facName: "",
|
||||||
})
|
});
|
||||||
const total = ref(0)
|
const total = ref(0);
|
||||||
// 维护计划接口
|
// 维护计划接口
|
||||||
function getMaintenancePlanData(){
|
function getMaintenancePlanData() {
|
||||||
getMaintenancePlan(planParams).then(res=>{
|
getMaintenancePlan(planParams).then((res) => {
|
||||||
total.value = res.result.totalNum
|
total.value = res.result.totalNum;
|
||||||
tableList.value = res.result.data
|
tableList.value = res.result.data;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const allName = ref([])
|
const allName = ref([]);
|
||||||
// 获取所有设备名称
|
// 获取所有设备名称
|
||||||
function getAllDeviceNames() {
|
function getAllDeviceNames() {
|
||||||
allDeviceNames().then((res) => {
|
allDeviceNames().then((res) => {
|
||||||
|
@ -508,11 +517,11 @@ function getAllDeviceNames() {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
maintenancePlan();
|
maintenancePlan();
|
||||||
|
|
||||||
completedMaintenancePlan()
|
completedMaintenancePlan();
|
||||||
|
|
||||||
getMaintenancePlanData()
|
getMaintenancePlanData();
|
||||||
|
|
||||||
getAllDeviceNames()
|
getAllDeviceNames();
|
||||||
// drawRightChart();
|
// drawRightChart();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -700,7 +709,7 @@ onMounted(() => {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: vw(40) !important;
|
left: vw(40) !important;
|
||||||
}
|
}
|
||||||
:deep(.el-input__inner){
|
:deep(.el-input__inner) {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
|
@ -719,8 +728,8 @@ onMounted(() => {
|
||||||
)
|
)
|
||||||
1 1;
|
1 1;
|
||||||
}
|
}
|
||||||
:deep(.el-input){
|
:deep(.el-input) {
|
||||||
width: vw(160);
|
width: vw(160);
|
||||||
height: vh(28);
|
height: vh(28);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue