@@ -183,7 +183,10 @@
label="故障类型"
>
-
+
-
+
@@ -238,24 +244,24 @@ import {
getMaintenanceOrderCount,
getAlarmList,
getCustomerDistribution,
- getCustomerDistributionByProvinceCode
-} from '@/api/system/largeScreen/largeScreen';
-import {DICT_TYPE} from "@/utils/dict";
+ getCustomerDistributionByProvinceCode,
+} from "@/api/system/largeScreen/largeScreen";
+import { DICT_TYPE } from "@/utils/dict";
export default {
computed: {
DICT_TYPE() {
- return DICT_TYPE
- }
+ return DICT_TYPE;
+ },
},
data() {
return {
- alarmList:[],
- companyAndEquipCreate:[],
- alarmData:{},
+ alarmList: [],
+ companyAndEquipCreate: [],
+ alarmData: {},
dataCount: {
customerCount: 0,
equipCount: 0,
- onlineEquipCount: 0
+ onlineEquipCount: 0,
},
loading1: false,
equipList: [],
@@ -280,25 +286,25 @@ export default {
this.initData();
},
methods: {
- initData(){
- getEquipInfoList().then(res=>{
+ initData() {
+ getEquipInfoList().then((res) => {
this.equipList = res.data;
- })
- getDataCount().then(res=>{
+ });
+ getDataCount().then((res) => {
this.dataCount = res.data;
- })
- getMaintenanceOrder().then(res => {
- this.maintenanceList = res.data;
- })
- getMaintenanceOrderCount().then(res=>{
- this.orderList = res.data
- })
- getAlarmList().then(res=>{
- this.alarmList = res.data
- })
- getFaultDataList().then(res=>{
+ });
+ getMaintenanceOrder().then((res) => {
+ this.maintenanceList = _.take(res.data, 3);
+ });
+ getMaintenanceOrderCount().then((res) => {
+ this.orderList = res.data;
+ });
+ getAlarmList().then((res) => {
+ this.alarmList = res.data;
+ });
+ getFaultDataList().then((res) => {
this.faultList = res.data;
- })
+ });
},
closePanel() {
this.showPanel = false;
@@ -309,61 +315,61 @@ export default {
changeMark(index) {
return "fault-mark" + (index + 1);
},
- async getFaultChart(){
- await getFaultDataList().then(res=>{
+ async getFaultChart() {
+ await getFaultDataList().then((res) => {
this.faultList = res.data;
- })
+ });
this.initFaultChart(this.faultList);
},
- initFaultChart(data){
+ initFaultChart(data) {
let p = new Promise((resolve) => {
resolve();
});
- let chartData = []
- data.forEach(item=>{
+ let chartData = [];
+ data.forEach((item) => {
const fault = {
name: item.faultLabel,
- value: item.faultCount
+ value: item.faultCount,
};
- chartData.push(fault)
- })
+ chartData.push(fault);
+ });
p.then(() => {
this.faultChart = echarts.init(this.$refs.faultChart);
let option = {
tooltip: {
- trigger: 'item'
+ trigger: "item",
},
legend: {
- orient: 'vertical',
+ orient: "vertical",
right: 10,
- top: 'center',
+ top: "center",
textStyle: {
- color:'#fff'
- }
+ color: "#fff",
+ },
},
series: [
{
- name: 'Access From',
- type: 'pie',
- radius: ['40%', '70%'],
+ name: "Access From",
+ type: "pie",
+ radius: ["40%", "70%"],
avoidLabelOverlap: false,
label: {
show: false,
- position: 'center'
+ position: "center",
},
emphasis: {
label: {
show: false,
fontSize: 40,
- fontWeight: 'bold'
- }
+ fontWeight: "bold",
+ },
},
labelLine: {
- show: false
+ show: false,
},
- data: chartData
- }
- ]
+ data: chartData,
+ },
+ ],
};
this.faultChart.setOption(option);
});
@@ -372,9 +378,9 @@ export default {
async getAlarmCharts() {
// let chart1 = echarts.init(this.$refs.chart1);
// chart1.showLoading();
- await getAlarmDataList().then(res=>{
+ await getAlarmDataList().then((res) => {
this.alarmData = res.data;
- })
+ });
this.initAlarmCharts(this.alarmData);
},
initAlarmCharts(data) {
@@ -454,9 +460,9 @@ export default {
});
},
async getCompanyAndEquipGrowTrend() {
- await getCompanyAndEquipCreate().then(res => {
+ await getCompanyAndEquipCreate().then((res) => {
this.companyAndEquipCreate = res.data;
- })
+ });
this.initTrendChart(this.companyAndEquipCreate);
},
initTrendChart(data) {
@@ -618,7 +624,7 @@ export default {
});
p.then(async () => {
const _this = this;
- echarts.registerMap("china", {geoJSON: chinaMap});
+ echarts.registerMap("china", { geoJSON: chinaMap });
this.myChart = echarts.init(this.$refs.mapChart);
let showdata = [];
await getCustomerDistribution().then((res) => {
@@ -638,7 +644,7 @@ export default {
this.provinceName.push(e.provinceName);
});
}
- })
+ });
// // console.log("selectData:", selectData);
// // console.log("showdata:", showdata);
// });
@@ -792,9 +798,9 @@ export default {
var panel = document.getElementById("popPanel");
panel.style.left = dx + "px";
panel.style.top = dy + "px";
- getCustomerDistributionByProvinceCode(e.data.code).then(res=>{
+ getCustomerDistributionByProvinceCode(e.data.code).then((res) => {
this.customerEquNumList = res.data;
- })
+ });
}
});
});
diff --git a/imt-ui/src/views/system/equip/equipdetails/index.vue b/imt-ui/src/views/system/equip/equipdetails/index.vue
index aac7d8a..3151858 100644
--- a/imt-ui/src/views/system/equip/equipdetails/index.vue
+++ b/imt-ui/src/views/system/equip/equipdetails/index.vue
@@ -60,7 +60,10 @@
{{ item.value }}