系统名称修改

This commit is contained in:
zhanghan11 2024-07-30 14:37:10 +08:00
parent 0c93b0686f
commit 400aedb4b6

View File

@ -1,121 +1,93 @@
<template>
<div class="app-container home">
<el-row
:gutter="10"
class="firstrow"
>
<el-row :gutter="10" class="firstrow">
<!-- 设备概览-->
<el-col
:span="16"
class="eqinfo"
>
<el-col
:span="8"
class="total"
>
<el-col :span="16" class="eqinfo">
<el-col :span="8" class="total">
<img src=""/>
<span class="title">总设备</span>
<br/>
<span class="vlaue">{{eqNumTotal}}</span>
</el-col>
<el-col
:span="8"
class="run"
>
<el-col :span="8" class="run">
<span class="title">运行中设备</span>
<br/>
<span class="vlaue">{{eqNumRunning}}</span>
</el-col>
<el-col
:span="8"
class="notrun"
>
<el-col :span="8" class="notrun">
<span class="title">停运设备</span>
<br/>
<span class="vlaue">{{eqNumOff}}</span>
</el-col>
</el-col>
<!-- 欢迎-->
<el-col
:span="8"
class="welcome"
>
<el-col
:span="24"
class="title"
>
<el-col :span="8" class="welcome">
<el-col :span="24" class="title">
<span class="title1">欢迎登录</span>
<br/>
<span class="vlaue">设备预测性维护系统</span>
<span class="vlaue">设备健康管理系统</span>
</el-col>
</el-col>
</el-row>
<el-row
:gutter="20"
class="secendrow"
>
<el-col
:span="24"
class="chart1"
>
<el-card class="chart1">
<div
class="echarts-body"
ref="patrolChart"
>
<el-row :gutter="20" class="secendrow">
<el-col :span="16" class="chart1">
<div class="echarts-body" ref="averageRunningTimeEcharts">
{{ initAverageRunningTimeEcharts() }}
</div>
</el-card>
</el-col>
<el-col :span="8" class="mytask">
<div class="mytasktitle">
<span style="font-weight: bold;font-size: 18px">我的待办</span>
<span style="float: right;cursor: pointer;" @click="goMyTask">更多</span>
</div>
<el-table :data="taskList" :border="false" class="taskTable">
<el-table-column label="流程名称" align="center" prop="processName" :show-overflow-tooltip="true" />
<el-table-column label="任务名称" align="center" prop="taskName" :show-overflow-tooltip="true" />
<el-table-column label="发起人" align="center" prop="starter" :show-overflow-tooltip="true" />
<el-table-column label="任务时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true" />
</el-table>
</el-col>
</el-row>
<el-row
:gutter="20"
class="thirdrow"
>
<el-col
:span="8"
class="chart2"
>
<el-card class="chart2">
<div
class="echarts-body"
ref="classChart"
>
<el-row :gutter="20" class="thirdrow">
<el-col :span="16" class="chart2">
<div class="echarts-body" ref="shutdownRateEcharts">
{{ initShutdownRateEcharts() }}
</div>
</el-card>
</el-col>
<el-col
:span="8"
class="chart2"
>
<el-card class="chart2">
<div
class="echarts-body"
ref="locationChart"
>
<el-col :span="8" class="notice">
<div class="noticetitle">
<span style="font-weight: bold;font-size: 18px">公告信息</span>
</div>
</el-card>
</el-col>
<el-col
:span="8"
class="chart2"
>
<el-card class="chart2">
<div
class="echarts-body"
ref="fileChart"
>
</div>
</el-card>
<el-table :data="noticeList" :show-header="false">
<el-table-column
label="公告标题"
align="center"
prop="noticeTitle"
:show-overflow-tooltip="true"
/>
<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import * as echarts from 'echarts';
import { listMytask } from "@/api/flowable/mytask";
import { listNotice } from "@/api/system/notice";
import { queryEqNum , loadChartsData} from "@/api/index";
export default {
name: "Index",
dicts: ["sys_notice_type"],
dicts: ['sys_notice_type'],
data() {
return {
//
@ -124,184 +96,195 @@ export default {
eqNumRunning: 0,
//
eqNumOff: 0,
//
taskList: [],
taskTotal: 0,
taskQueryParams:{
pageNum: 1,
pageSize: 6
},
noticeList: [],
noticeTotal: 0,
noticeQueryParams:{
pageNum: 1,
pageSize: 7
},
//
averageRunningTimeEchart:{},
shutdownRateEchart:{}
};
},
created() {
this.getTaskList();
this.getEqInfo();
this.getNoticeList();
this.getChartsData();
},
methods: {
getTaskList(){
listMytask(this.taskQueryParams).then(response => {
this.taskList = response.rows;
this.taskTotal = response.total;
});
},
getNoticeList(){
listNotice(this.noticeQueryParams).then(response => {
this.noticeList = response.rows;
this.noticeTotal = response.total;
});
},
getEqInfo(){
queryEqNum().then((response) => {
queryEqNum().then(response => {
this.eqNumTotal = response.data.total;
this.eqNumRunning = response.data.run;
this.eqNumOff = response.data.notRun;
});
},
getChartsData() {
loadChartsData().then((response) => {
this.initPatrolChart(
response.data.monthList,
response.data.dailyList,
response.data.meterReadingList,
response.data.professionalList
);
this.initClassChart(response.data.classList);
this.initLocationChart(response.data.locationList);
this.initFileChart(response.data.fileList);
goMyTask(){
this.$router.push({
path: '/flowable/flowmanage/mytask/index',
});
},
initPatrolChart(monthList, dailyList, meterReadingList, professionalList) {
monthList = monthList.map((month) => month + "月");
let chart = echarts.init(this.$refs.patrolChart);
initAverageRunningTimeEcharts(){
let p = new Promise((resolve) => {
resolve()
})
p.then(() => {
this.averageRunningTimeEchart = echarts.init(this.$refs.averageRunningTimeEcharts)
let option = {
title:{
text: "近三月点巡检记录统计",
left: "center",
text:"设备日平均运行时长"
},
legend: {
orient: "vertical",
left: "left",
data: ["日常巡检", "抄表巡检", "专业巡检"],
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
xAxis: [
{
type: "category",
xAxis: {
type: 'category',
axisTick:{show:false},
data: monthList,
axisLabel:{interval: 0}
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
],
yAxis: [
{
type: "value",
//
grid:{
top: '18%',
left: '1%',
right: '1%',
bottom: '10%',
containLabel: true
},
yAxis: {
name: 'min',
type: 'value',
show: true,
axisLine:{show:false},//线
splitLine:{
lineStyle: {
type:'dashed'//线
},
show:true
}
},
],
series: [
{
name: "日常巡检",
type: "bar",
data: dailyList,
// data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
itemStyle: {
color: '#3E7BFA'
}
}
]
}
this.averageRunningTimeEchart.setOption(option);
})
},
{
name: "抄表巡检",
type: "bar",
data: meterReadingList,
},
{
name: "专业巡检",
type: "bar",
data: professionalList,
},
],
};
chart.setOption(option);
},
initClassChart(data) {
let chart = echarts.init(this.$refs.classChart);
initShutdownRateEcharts(){
let p = new Promise((resolve) => {
resolve()
})
p.then(() => {
this.shutdownRateEchart = echarts.init(this.$refs.shutdownRateEcharts);
let option = {
title:{
text: "设备分类统计",
left: "center",
text:"设备停机率"
},
label: { formatter: " {b}{d}%" },
tooltip: {
trigger: "item",
xAxis: {
type: 'category',
axisTick:{show:false},
axisLabel:{interval: 0}
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
legend: {
orient: "vertical",
left: "left",
//
grid:{
top: '18%',
left: '1%',
right: '1%',
bottom: '10%',
containLabel: true
},
yAxis: {
name: '%',
type: 'value',
show: true,
axisLine:{show:false},//线
splitLine:{
lineStyle: {
type:'dashed'//线
},
show:true
}
},
series: [
{
name: "设备分类",
type: "pie",
radius: "50%",
data: data,
emphasis: {
// data: [82, 93, 90, 93, 29, 33, 13],
type: 'line',
smooth: true,
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
color: '#3E7BFA'
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(62,123,250,0.3)'
},
{
offset: 1,
color: 'rgba(255,255,255,0.3)'
}
])
},
],
};
chart.setOption(option);
}
]
}
this.shutdownRateEchart.setOption(option);
})
},
initLocationChart(data) {
let chart = echarts.init(this.$refs.locationChart);
let option = {
title: {
text: "设备分布统计",
left: "center",
},
label: { formatter: " {b}{d}%" },
tooltip: {
trigger: "item",
},
legend: {
orient: "vertical",
left: "left",
getChartsData(){
loadChartsData().then(response => {
//
let option1 = {
xAxis: {
data: response.data.dateList
},
series: [
{
name: "设备分布",
type: "pie",
radius: "50%",
data: data,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
};
chart.setOption(option);
},
initFileChart(data) {
let chart = echarts.init(this.$refs.fileChart);
let option = {
title: {
text: "档案分类统计",
left: "center",
},
label: { formatter: " {b}{d}%" },
tooltip: {
trigger: "item",
},
legend: {
orient: "vertical",
left: "left",
data: response.data.runTimeList
}
]
}
this.averageRunningTimeEchart.setOption(option1);
let option2 = {
xAxis: {
data: response.data.dateList
},
series: [
{
name: "档案分类",
type: "pie",
radius: "50%",
data: data,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
};
chart.setOption(option);
},
},
data: response.data.shutdownRateList
}
]
}
this.shutdownRateEchart.setOption(option2);
});
}
}
};
</script>
@ -325,7 +308,7 @@ export default {
.vlaue{
font-size: 32px;
font-weight: bold;
color: #3e7bfa;
color: #3E7BFA;
left: 70px;
top: 60px;
position: relative;
@ -345,7 +328,7 @@ export default {
.vlaue{
font-size: 32px;
font-weight: bold;
color: #06c270;
color: #06C270;
left: 80px;
top: 60px;
position: relative;
@ -365,7 +348,7 @@ export default {
.vlaue{
font-size: 32px;
font-weight: bold;
color: #ff8800;
color: #FF8800;
left: 70px;
top: 60px;
position: relative;
@ -381,7 +364,7 @@ export default {
.title1{
font-size: 20px;
font-weight: bold;
color: #ffffff;
color: #FFFFFF;
left: 40px;
top: 50px;
position: relative;
@ -390,7 +373,7 @@ export default {
.vlaue{
font-size: 20px;
font-weight: bold;
color: #ffffff;
color: #FFFFFF;
left: -40px;
top: 60px;
position: relative;
@ -419,7 +402,6 @@ export default {
}
.thirdrow{
height: 383px;
margin-top: 20px;
.chart2{
height: 100%;
.echarts-body{
@ -427,13 +409,8 @@ export default {
width: 100%;
}
}
}
}
</style>
<style>
.el-card__body {
height: 100%;
width: 100%;
}
</style>