设备详情数据接口对接与样式更新

This commit is contained in:
zhangjunwen 2024-10-12 14:46:00 +08:00
parent 05af698650
commit d33a19bcc1
3 changed files with 374 additions and 186 deletions

View File

@ -112,3 +112,12 @@ export function getWorkData(params) {
params: params, params: params,
}); });
} }
// 根据设备id获取最新数据
export function getAllNewestData(params) {
return request({
url: "/data/query/getAllNewestData",
method: "get",
params: params,
});
}

View File

@ -183,7 +183,10 @@
label="故障类型" label="故障类型"
> >
<template v-slot="scope"> <template v-slot="scope">
<dict-tag :type="DICT_TYPE.FAULT_TYPE" :value="scope.row.faultType"/> <dict-tag
:type="DICT_TYPE.FAULT_TYPE"
:value="scope.row.faultType"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -191,7 +194,10 @@
label="进度" label="进度"
> >
<template v-slot="scope"> <template v-slot="scope">
<dict-tag :type="DICT_TYPE.MAINTENANCE_STATUS" :value="scope.row.status"/> <dict-tag
:type="DICT_TYPE.MAINTENANCE_STATUS"
:value="scope.row.status"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -238,14 +244,14 @@ import {
getMaintenanceOrderCount, getMaintenanceOrderCount,
getAlarmList, getAlarmList,
getCustomerDistribution, getCustomerDistribution,
getCustomerDistributionByProvinceCode getCustomerDistributionByProvinceCode,
} from '@/api/system/largeScreen/largeScreen'; } from "@/api/system/largeScreen/largeScreen";
import { DICT_TYPE } from "@/utils/dict"; import { DICT_TYPE } from "@/utils/dict";
export default { export default {
computed: { computed: {
DICT_TYPE() { DICT_TYPE() {
return DICT_TYPE return DICT_TYPE;
} },
}, },
data() { data() {
return { return {
@ -255,7 +261,7 @@ export default {
dataCount: { dataCount: {
customerCount: 0, customerCount: 0,
equipCount: 0, equipCount: 0,
onlineEquipCount: 0 onlineEquipCount: 0,
}, },
loading1: false, loading1: false,
equipList: [], equipList: [],
@ -281,24 +287,24 @@ export default {
}, },
methods: { methods: {
initData() { initData() {
getEquipInfoList().then(res=>{ getEquipInfoList().then((res) => {
this.equipList = res.data; this.equipList = res.data;
}) });
getDataCount().then(res=>{ getDataCount().then((res) => {
this.dataCount = res.data; this.dataCount = res.data;
}) });
getMaintenanceOrder().then(res => { getMaintenanceOrder().then((res) => {
this.maintenanceList = res.data; this.maintenanceList = _.take(res.data, 3);
}) });
getMaintenanceOrderCount().then(res=>{ getMaintenanceOrderCount().then((res) => {
this.orderList = res.data this.orderList = res.data;
}) });
getAlarmList().then(res=>{ getAlarmList().then((res) => {
this.alarmList = res.data this.alarmList = res.data;
}) });
getFaultDataList().then(res=>{ getFaultDataList().then((res) => {
this.faultList = res.data; this.faultList = res.data;
}) });
}, },
closePanel() { closePanel() {
this.showPanel = false; this.showPanel = false;
@ -310,60 +316,60 @@ export default {
return "fault-mark" + (index + 1); return "fault-mark" + (index + 1);
}, },
async getFaultChart() { async getFaultChart() {
await getFaultDataList().then(res=>{ await getFaultDataList().then((res) => {
this.faultList = res.data; this.faultList = res.data;
}) });
this.initFaultChart(this.faultList); this.initFaultChart(this.faultList);
}, },
initFaultChart(data) { initFaultChart(data) {
let p = new Promise((resolve) => { let p = new Promise((resolve) => {
resolve(); resolve();
}); });
let chartData = [] let chartData = [];
data.forEach(item=>{ data.forEach((item) => {
const fault = { const fault = {
name: item.faultLabel, name: item.faultLabel,
value: item.faultCount value: item.faultCount,
}; };
chartData.push(fault) chartData.push(fault);
}) });
p.then(() => { p.then(() => {
this.faultChart = echarts.init(this.$refs.faultChart); this.faultChart = echarts.init(this.$refs.faultChart);
let option = { let option = {
tooltip: { tooltip: {
trigger: 'item' trigger: "item",
}, },
legend: { legend: {
orient: 'vertical', orient: "vertical",
right: 10, right: 10,
top: 'center', top: "center",
textStyle: { textStyle: {
color:'#fff' color: "#fff",
} },
}, },
series: [ series: [
{ {
name: 'Access From', name: "Access From",
type: 'pie', type: "pie",
radius: ['40%', '70%'], radius: ["40%", "70%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
label: { label: {
show: false, show: false,
position: 'center' position: "center",
}, },
emphasis: { emphasis: {
label: { label: {
show: false, show: false,
fontSize: 40, fontSize: 40,
fontWeight: 'bold' fontWeight: "bold",
} },
}, },
labelLine: { labelLine: {
show: false show: false,
}, },
data: chartData data: chartData,
} },
] ],
}; };
this.faultChart.setOption(option); this.faultChart.setOption(option);
}); });
@ -372,9 +378,9 @@ export default {
async getAlarmCharts() { async getAlarmCharts() {
// let chart1 = echarts.init(this.$refs.chart1); // let chart1 = echarts.init(this.$refs.chart1);
// chart1.showLoading(); // chart1.showLoading();
await getAlarmDataList().then(res=>{ await getAlarmDataList().then((res) => {
this.alarmData = res.data; this.alarmData = res.data;
}) });
this.initAlarmCharts(this.alarmData); this.initAlarmCharts(this.alarmData);
}, },
initAlarmCharts(data) { initAlarmCharts(data) {
@ -454,9 +460,9 @@ export default {
}); });
}, },
async getCompanyAndEquipGrowTrend() { async getCompanyAndEquipGrowTrend() {
await getCompanyAndEquipCreate().then(res => { await getCompanyAndEquipCreate().then((res) => {
this.companyAndEquipCreate = res.data; this.companyAndEquipCreate = res.data;
}) });
this.initTrendChart(this.companyAndEquipCreate); this.initTrendChart(this.companyAndEquipCreate);
}, },
initTrendChart(data) { initTrendChart(data) {
@ -638,7 +644,7 @@ export default {
this.provinceName.push(e.provinceName); this.provinceName.push(e.provinceName);
}); });
} }
}) });
// // console.log("selectData:", selectData); // // console.log("selectData:", selectData);
// // console.log("showdata:", showdata); // // console.log("showdata:", showdata);
// }); // });
@ -792,9 +798,9 @@ export default {
var panel = document.getElementById("popPanel"); var panel = document.getElementById("popPanel");
panel.style.left = dx + "px"; panel.style.left = dx + "px";
panel.style.top = dy + "px"; panel.style.top = dy + "px";
getCustomerDistributionByProvinceCode(e.data.code).then(res=>{ getCustomerDistributionByProvinceCode(e.data.code).then((res) => {
this.customerEquNumList = res.data; this.customerEquNumList = res.data;
}) });
} }
}); });
}); });

View File

@ -60,7 +60,10 @@
<div>{{ item.value }}</div> <div>{{ item.value }}</div>
</div> </div>
</div> </div>
<div v-if="!techParamsList.length" style="text-align: center"> <div
v-if="!techParamsList.length"
style="text-align: center"
>
暂无数据 暂无数据
</div> </div>
</div> </div>
@ -76,28 +79,28 @@
<div class="status-info"> <div class="status-info">
<div class="status-detail"> <div class="status-detail">
<span class="status-title">加工总件数</span> <span class="status-title">加工总件数</span>
<span><span class="status-num">118</span><span class="status-title"> </span></span> <span><span class="status-num">{{ totalProcess }}</span><span class="status-title"> </span></span>
</div> </div>
<span class="total-icon"></span> <span class="total-icon"></span>
</div> </div>
<div class="status-info"> <div class="status-info">
<div class="status-detail"> <div class="status-detail">
<span class="status-title">加工时长</span> <span class="status-title">加工时长</span>
<span><span class="status-num">2.5</span><span class="status-title"> 小时</span></span> <span><span class="status-num">{{workTime}}</span><span class="status-title"> 小时</span></span>
</div> </div>
<span class="time-icon"></span> <span class="time-icon"></span>
</div> </div>
<div class="status-info"> <div class="status-info">
<div class="status-detail"> <div class="status-detail">
<span class="status-title">通电时间</span> <span class="status-title">通电时间</span>
<span class="status-num">13:00:00</span> <span><span class="status-num">{{powerTime}}</span><span class="status-title"> 小时</span></span>
</div> </div>
<span class="power-icon"></span> <span class="power-icon"></span>
</div> </div>
<div class="status-info"> <div class="status-info">
<div class="status-detail"> <div class="status-detail">
<span class="status-title">加工件数</span> <span class="status-title">加工件数</span>
<span><span class="status-num">36</span><span class="status-title"> </span></span> <span><span class="status-num">{{processNum}}</span><span class="status-title"> </span></span>
</div> </div>
<span class="work-icon"></span> <span class="work-icon"></span>
</div> </div>
@ -173,59 +176,79 @@
<div> <div>
<el-row> <el-row>
<el-col <el-col
:span="6" :span="12"
style="height: 100%" style="height: 100%; text-align: -webkit-center;"
> >
<div <div
id="xtxdl" id="xtxdl"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>X轴推屑电流</span></div> <div style="height:10%;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>推屑1电流</span></div>
</el-col> </el-col>
<el-col <el-col
:span="6" :span="12"
style="height: 100%" style="height: 100%;text-align: -webkit-center;"
> >
<div <div
id="ytxdl" id="ytxdl"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴推屑电流</span></div> <div style="height:10%;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>推屑2电流</span></div>
</el-col> </el-col>
<el-col <!-- <el-col
:span="6" :span="8"
style="height: 100%" style="height: 100%;text-align: -webkit-center;"
> >
<div <div
id="yzdsz" id="yzdsz"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴振动熵值</span></div> <div style="height:10%;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>液压1</span></div>
</el-col> </el-col> -->
<el-col <!-- <el-col
:span="6" :span="8"
style="height: 100%" style="height: 100%"
> >
<div <div
id="ymczs" id="ymczs"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴脉冲振动指数</span></div> <div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>液压2</span></div>
</el-col> </el-col> -->
</el-row> </el-row>
</div> </div>
<div> <el-row> <div> <el-row>
<el-col <el-col
:span="8" :span="8"
style="height: 100%" style="height: 100%;text-align: -webkit-center;"
>
<div
id="yzdsz"
style="height: 90%"
></div>
<div style="height:10%;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>液压1</span></div>
</el-col>
<el-col
:span="8"
style="height: 100%;text-align: -webkit-center;"
>
<div
id="ymczs"
style="height: 90%"
></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>液压2</span></div>
</el-col>
<el-col
:span="8"
style="height: 100%;text-align: -webkit-center;"
> >
<div <div
id="xrhyy" id="xrhyy"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴脉冲振动指数</span></div> <div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>液压3</span></div>
</el-col> </el-col>
<el-col <!-- <el-col
:span="8" :span="8"
style="height: 100%" style="height: 100%"
> >
@ -244,39 +267,123 @@
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴脉冲振动指数</span></div> <div style="height:10%;text-align: center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴脉冲振动指数</span></div>
</el-col> </el-col> -->
</el-row></div> </el-row></div>
<div class="equip_icon"></div> <!-- <div class="equip_icon"></div> -->
<div>
<el-col
:span="6"
style="height: 100%"
>
<div
id="xptemp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>X+温度</span></div>
</el-col>
<el-col
:span="6"
style="height: 100%"
>
<div
id="xntemp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>X-温度</span></div>
</el-col>
<el-col
:span="6"
style="height: 100%"
>
<div
id="x0temp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>X0温度</span></div>
</el-col>
<el-col
:span="6"
style="height: 100%"
>
<div
id="yptemp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y+温度</span></div>
</el-col>
</div>
<div>
<el-col
:span="6"
style="height: 100%"
>
<div
id="yntemp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y-温度</span></div>
</el-col>
<el-col
:span="6"
style="height: 100%"
>
<div
id="y0temp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y0温度</span></div>
</el-col>
<el-col
:span="6"
style="height: 100%"
>
<div
id="zptemp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Z+温度</span></div>
</el-col>
<el-col
:span="6"
style="height: 100%"
>
<div
id="zntemp"
style="height: 90%"
></div>
<div style="text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Z-温度</span></div>
</el-col>
</div>
<div> <div>
<el-col <el-col
:span="8" :span="8"
style="height: 100%" style="height: 100%"
> >
<div <div
id="xzzcwd" id="z0temp"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>X轴轴承温度</span></div> <div style="margin-right:15%;text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Z0温度</span></div>
</el-col>
<el-col
:span="8"
style="height: 100%;"
>
<div
id="cr1temp"
style="height: 90%"
></div>
<div style="margin-right:13%;text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>排屑1温度</span></div>
</el-col> </el-col>
<el-col <el-col
:span="8" :span="8"
style="height: 100%" style="height: 100%"
> >
<div <div
id="yzzcwd" id="cr2temp"
style="height: 90%" style="height: 90%"
></div> ></div>
<div style="height:10%;text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Y轴轴承温度</span></div> <div style="margin-right:13%;text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>排屑2温度</span></div>
</el-col>
<el-col
:span="8"
style="height: 100%"
>
<div
id="zzzcwd"
style="height: 90%"
></div>
<div style="height:10%;text-align:center;font-size: 16px;color:#26DE86"><span style='cursor:pointer;'>Z轴轴承温度</span></div>
</el-col> </el-col>
</div> </div>
</div> </div>
@ -342,9 +449,16 @@
import { merge } from "lodash"; import { merge } from "lodash";
import * as EquipAlarmDataApi from "@/api/system/alarm/equipalarmdata"; import * as EquipAlarmDataApi from "@/api/system/alarm/equipalarmdata";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {getEquipCascader, getEquipInfoDetails} from "@/api/system/equip/equipInfo"; import {
import {getAlarmCountByEquipId, getAlarmDataTimeLineByEquipId} from "@/api/system/alarm/alarmdata"; getEquipCascader,
getEquipInfoDetails,
} from "@/api/system/equip/equipInfo";
import {
getAlarmCountByEquipId,
getAlarmDataTimeLineByEquipId,
} from "@/api/system/alarm/alarmdata";
import { getMaintenanceCountByEquipId } from "@/api/system/maintenance/maintenance"; import { getMaintenanceCountByEquipId } from "@/api/system/maintenance/maintenance";
import { getAllNewestData } from "@/api/data/query.js";
export default { export default {
name: "EquipDetail2", name: "EquipDetail2",
dicts: ["equip_tags", "equip_class", "equip_status"], dicts: ["equip_tags", "equip_class", "equip_status"],
@ -366,6 +480,15 @@ export default {
echarts6: null, echarts6: null,
echarts7: null, echarts7: null,
timeLineList: [], timeLineList: [],
currentData: null,
hyData: null,
tempData: null,
aclrData: null,
fanucData: null,
totalProcess: 0,
workTime: 0.0,
powerTime: 0.0,
processNum: 0,
}; };
}, },
created() { created() {
@ -373,21 +496,20 @@ export default {
this.initEquipDetails(); this.initEquipDetails();
}, },
mounted() { mounted() {
this.initCharts(); // this.initTempCharts();
this.initTempCharts();
}, },
computed: {}, computed: {},
watch: {}, watch: {},
methods: { methods: {
initEquipDetails() { initEquipDetails() {
getEquipCascader().then(res=>{ getEquipCascader().then((res) => {
res.forEach(item=>{ res.forEach((item) => {
if (item.children == null) { if (item.children == null) {
item.disabled = true; item.disabled = true;
} else { } else {
item.disabled = false; item.disabled = false;
} }
}) });
this.options = res; this.options = res;
if (this.$route.query.equipId != null) { if (this.$route.query.equipId != null) {
this.cascaderValue = this.$route.query.equipId; this.cascaderValue = this.$route.query.equipId;
@ -395,46 +517,64 @@ export default {
this.getAlarmCountByEquipId(this.$route.query.equipId); this.getAlarmCountByEquipId(this.$route.query.equipId);
this.getMaintenanceCountByEquipId(this.$route.query.equipId); this.getMaintenanceCountByEquipId(this.$route.query.equipId);
this.getAlarmDataTimeLineByEquipId(this.$route.query.equipId); this.getAlarmDataTimeLineByEquipId(this.$route.query.equipId);
this.getAllData(this.$route.query.equipId);
this.cascaderDisabled = true; this.cascaderDisabled = true;
} else { } else {
this.options.every(item => { this.options.every((item) => {
if (item.disabled === false) { if (item.disabled === false) {
this.cascaderValue = item.children[0].id; this.cascaderValue = item.children[0].id;
this.getEquipDetails(item.children[0].id); this.getEquipDetails(item.children[0].id);
this.getAlarmCountByEquipId(item.children[0].id); this.getAlarmCountByEquipId(item.children[0].id);
this.getMaintenanceCountByEquipId(item.children[0].id); this.getMaintenanceCountByEquipId(item.children[0].id);
this.getAlarmDataTimeLineByEquipId(item.children[0].id); this.getAlarmDataTimeLineByEquipId(item.children[0].id);
this.getAllData(item.children[0].id);
this.cascaderDisabled = false; this.cascaderDisabled = false;
return false; return false;
} }
}) });
} }
}) });
}, },
// //
getMaintenanceCountByEquipId(equipId) { getMaintenanceCountByEquipId(equipId) {
getMaintenanceCountByEquipId(equipId).then(res=>{ getMaintenanceCountByEquipId(equipId).then((res) => {
this.faultTimes = res.data; this.faultTimes = res.data;
}) });
}, },
// //
getAlarmCountByEquipId(equipId) { getAlarmCountByEquipId(equipId) {
getAlarmCountByEquipId(equipId).then(res=>{ getAlarmCountByEquipId(equipId).then((res) => {
this.alarmTimes = res.data; this.alarmTimes = res.data;
}) });
}, },
// //
getAlarmDataTimeLineByEquipId(equipId) { getAlarmDataTimeLineByEquipId(equipId) {
getAlarmDataTimeLineByEquipId(equipId).then(res=>{ getAlarmDataTimeLineByEquipId(equipId).then((res) => {
this.timeLineList = res.data; this.timeLineList = res.data;
}) });
},
//
getAllData(equipId) {
getAllNewestData({ equipId: equipId }).then((res) => {
this.currentData = res.data.current;
this.hyData = res.data.hy;
this.tempData = res.data.temp;
this.aclrData = res.data.aclr;
this.fanucData = res.data.fanuc;
this.totalProcess = this.fanucData.total_process;
this.workTime = (this.fanucData.work_time / 60.0).toFixed(1);
this.powerTime = (this.fanucData.power_time / 60.0).toFixed(1);
this.processNum = this.fanucData.process_num;
this.initCharts();
this.initTempCharts();
});
}, },
getEquipDetails(id) { getEquipDetails(id) {
getEquipInfoDetails(id).then(res => { getEquipInfoDetails(id).then((res) => {
console.log("res.data", res.data); console.log("res.data", res.data);
this.equipInfo = res.data; this.equipInfo = res.data;
this.techParamsList = res.data.paramList; this.techParamsList = res.data.paramList;
}) });
}, },
async getEquipAlarmList() { async getEquipAlarmList() {
var equipAlarmQuery = { var equipAlarmQuery = {
@ -449,10 +589,11 @@ export default {
}, },
handleChange(value) { handleChange(value) {
if (value.length > 0) { if (value.length > 0) {
this.getEquipDetails(value[1]) this.getEquipDetails(value[1]);
this.getAlarmCountByEquipId(value[1]); this.getAlarmCountByEquipId(value[1]);
this.getMaintenanceCountByEquipId(value[1]); this.getMaintenanceCountByEquipId(value[1]);
this.getAlarmDataTimeLineByEquipId(value[1]); this.getAlarmDataTimeLineByEquipId(value[1]);
this.getAllData(value[1]);
} else { } else {
this.$message.error("请选择一个设备"); this.$message.error("请选择一个设备");
} }
@ -482,8 +623,8 @@ export default {
this.generateGaugeOption({ this.generateGaugeOption({
color: ["26DE86", "93DDBA"], color: ["26DE86", "93DDBA"],
bgColor: "023E44", bgColor: "023E44",
name: "X轴排屑电流", name: "排屑1电流",
value: 70, value: this.currentData.chip_removal_1,
limit: 250, limit: 250,
unit: "A", unit: "A",
}), }),
@ -500,8 +641,8 @@ export default {
this.generateGaugeOption({ this.generateGaugeOption({
color: ["26AE86", "45678E"], color: ["26AE86", "45678E"],
bgColor: "AAAAA", bgColor: "AAAAA",
name: "y轴排屑电流", name: "排屑2电流",
value: 70, value: this.currentData.chip_removal_2,
limit: 250, limit: 250,
unit: "A", unit: "A",
}), }),
@ -518,8 +659,8 @@ export default {
this.generateGaugeOption({ this.generateGaugeOption({
color: ["B07709", "EDBA58"], color: ["B07709", "EDBA58"],
bgColor: "846528", bgColor: "846528",
name: "y轴振动熵值", name: "液压1",
value: 80, value: this.hyData.hy_1,
limit: 250, limit: 250,
unit: "G/S", unit: "G/S",
}), }),
@ -536,8 +677,8 @@ export default {
this.generateGaugeOption({ this.generateGaugeOption({
color: ["707709", "7DBA58"], color: ["707709", "7DBA58"],
bgColor: "A46528", bgColor: "A46528",
name: "Y轴脉冲指数", name: "液压2",
value: 125, value: this.hyData.hy_2,
limit: 250, limit: 250,
unit: "GS", unit: "GS",
}), }),
@ -554,8 +695,8 @@ export default {
this.generateGaugeOption({ this.generateGaugeOption({
color: ["FA604C", "F63319"], color: ["FA604C", "F63319"],
bgColor: "C51D07", bgColor: "C51D07",
name: "x轴润滑液压", name: "液压3",
value: 125, value: this.hyData.hy_3,
limit: 250, limit: 250,
unit: "bar", unit: "bar",
}), }),
@ -566,56 +707,88 @@ export default {
this.echarts5 && this.echarts5.resize(); this.echarts5 && this.echarts5.resize();
}); });
const yrhyy = document.getElementById("yrhyy"); // const yrhyy = document.getElementById("yrhyy");
this.echarts6 = echarts.init(yrhyy); // this.echarts6 = echarts.init(yrhyy);
this.echarts6.setOption( // this.echarts6.setOption(
this.generateGaugeOption({ // this.generateGaugeOption({
color: ["E5F72E", "BFD109"], // color: ["E5F72E", "BFD109"],
bgColor: "A5B505", // bgColor: "A5B505",
name: "y轴润滑液压", // name: "y",
value: 103, // value: 103,
limit: 250, // limit: 250,
unit: "bar", // unit: "bar",
}), // }),
true, // true,
true // true
); // );
window.addEventListener("resize", () => { // window.addEventListener("resize", () => {
this.echarts6 && this.echarts6.resize(); // this.echarts6 && this.echarts6.resize();
}); // });
const zrhyy = document.getElementById("zrhyy"); // const zrhyy = document.getElementById("zrhyy");
this.echarts7 = echarts.init(zrhyy); // this.echarts7 = echarts.init(zrhyy);
this.echarts7.setOption( // this.echarts7.setOption(
this.generateGaugeOption({ // this.generateGaugeOption({
color: ["E5F72E", "BFD109"], // color: ["E5F72E", "BFD109"],
bgColor: "A5B505", // bgColor: "A5B505",
name: "z轴润滑液压", // name: "z",
value: 99, // value: 99,
limit: 250, // limit: 250,
unit: "bar", // unit: "bar",
}), // }),
true, // true,
true // true
); // );
window.addEventListener("resize", () => { // window.addEventListener("resize", () => {
this.echarts7 && this.echarts7.resize(); // this.echarts7 && this.echarts7.resize();
}); // });
}, },
initTempCharts() { initTempCharts() {
// domecharts // domecharts
var myChart1 = echarts.init(document.getElementById("xzzcwd")); var myChart1 = echarts.init(document.getElementById("xptemp"));
var option1 = this.tempOption(20.3); var option1 = this.tempOption(this.tempData.xp_temp);
myChart1.setOption(option1); myChart1.setOption(option1);
var myChart2 = echarts.init(document.getElementById("yzzcwd")); var myChart2 = echarts.init(document.getElementById("xntemp"));
var option2 = this.tempOption(50.5); var option2 = this.tempOption(this.tempData.xn_temp);
myChart2.setOption(option2); myChart2.setOption(option2);
var myChart3 = echarts.init(document.getElementById("zzzcwd")); var myChart3 = echarts.init(document.getElementById("x0temp"));
var option3 = this.tempOption(65.5); var option3 = this.tempOption(this.tempData.x0_temp);
myChart3.setOption(option3); myChart3.setOption(option3);
var myChart4 = echarts.init(document.getElementById("yptemp"));
var option4 = this.tempOption(this.tempData.yp_temp);
myChart4.setOption(option4);
var myChart5 = echarts.init(document.getElementById("yntemp"));
var option5 = this.tempOption(this.tempData.yn_temp);
myChart5.setOption(option5);
var myChart6 = echarts.init(document.getElementById("y0temp"));
var option6 = this.tempOption(this.tempData.y0_temp);
myChart6.setOption(option6);
var myChart7 = echarts.init(document.getElementById("zptemp"));
var option7 = this.tempOption(this.tempData.zp_temp);
myChart7.setOption(option7);
var myChart8 = echarts.init(document.getElementById("zntemp"));
var option8 = this.tempOption(this.tempData.zn_temp);
myChart8.setOption(option8);
var myChart9 = echarts.init(document.getElementById("z0temp"));
var option9 = this.tempOption(this.tempData.z0_temp);
myChart9.setOption(option9);
var myChart10 = echarts.init(document.getElementById("cr1temp"));
var option10 = this.tempOption(this.tempData.cr1_temp);
myChart10.setOption(option10);
var myChart11 = echarts.init(document.getElementById("cr2temp"));
var option11 = this.tempOption(this.tempData.cr2_temp);
myChart11.setOption(option11);
}, },
tempOption(data) { tempOption(data) {
@ -688,7 +861,7 @@ export default {
// 06010 // 06010
var option = { var option = {
grid: { grid: {
x: 90, //y x: 65, //y
y: -150, //topx y: -150, //topx
x2: -120, //y x2: -120, //y
y2: 20, //bottomx y2: 20, //bottomx
@ -902,7 +1075,7 @@ export default {
center: ["50%", "60%"], center: ["50%", "60%"],
startAngle: 220, startAngle: 220,
endAngle: -40, endAngle: -40,
min: 0, min: -10,
max: option.limit, max: option.limit,
splitNumber: 12, splitNumber: 12,
progress: { progress: {
@ -1236,7 +1409,7 @@ $bordercolor: #ddd;
} }
.main-content { .main-content {
display: grid; display: grid;
grid-template-rows: 20% 20% 40% 20%; grid-template-rows: 20% 20% 20% 20% 20%;
background: url("../../../../assets/images/equipdetails/middle_back.png") background: url("../../../../assets/images/equipdetails/middle_back.png")
no-repeat center center; no-repeat center center;
background-size: cover; background-size: cover;