You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2324 lines
88 KiB
Vue

<template>
<v-scale-screen width="1920" height="1080" :fullScreen="false">
<div class="app-container home" style="">
<div class="head">
<div class="head-content">
<div class="title">榄菊设备管理云平台</div>
</div>
<div class="head-logo">
<img src="../../../assets/images/logo.png" alt="" />
</div>
<div class="back">
<el-button @click="back()" type="primary" icon="el-icon-s-home"></el-button>
</div>
</div>
<div class="content-top">
<div class="factory">
<div class="selectborder">
<select v-model="selectxt" class="select1" @change="selectline(selectxt)">
<option :key="index" :value="x.parentName" v-for="(x, index) in getLineList">
{{ x.deptName }}
</option>
<!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> -->
</select>
</div>
<!-- <div class="selectborder selectborder1">
<select v-model="selectxtclasses" class="select1" @change="selectline2(selectxtclasses)">
<option :key="index" :value="x.shiftId" v-for="(x, index) in classesList">
{{ x.shiftDesc }}
</option>
</select>
</div> -->
</div>
<div class="timebox">
<div class="time">
{{ gettimedata }}
</div>
</div>
</div>
<div class="content">
<div class="itemtop">
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">检验统计</div>
</div>
<div class="equipmentinfobox">
<div class="box">
<div class="number">
<span class="number1">
15000
</span>
</div>
<div class="name2">
今日生产数量
</div>
</div>
<div class="box">
<div class="number">
<span class="number1" style="color: #66FFFF;">
12000
</span>
</div>
<div class="name2">
今日已检数量
</div>
</div>
<div class="box">
<div class="number">
<span class="number1" style="color: #FF4D4F;">
3000
</span>
</div>
<div class="name2">
今日异常数量
</div>
</div>
</div>
<div class="equipmentinfobox1">
<div class="box">
<div class="number">
<span class="number1">
15000
</span>
</div>
<div class="name2">
本月生产数量
</div>
</div>
<div class="box">
<div class="number">
<span class="number1" style="color: #FF4D4F;">
3000
</span>
</div>
<div class="name2">
本月异常数量
</div>
</div>
</div>
<div class="bigechartbox">
<div class="echartbox" id="echart1"
style="margin: auto; margin-top: 10px;width: 128px; height: 128px">
</div>
<div class="echartbox" id="echart4"
style="margin: auto; margin-top: 10px;width: 128px; height: 128px">
</div>
<div class="title1">
今日合格率
</div>
<div class="title2">
本月合格率
</div>
</div>
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">质量异常信息</div>
</div>
<div class="table-tbody">
<div class="item" :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px"
:key="index" v-for="(n, index) in getlist">
<div class="icon">
</div>
<div class="itemname1">
产品1直径过大
</div>
<div class="itemname2">
张三 2023.10.30
</div>
</div>
</div>
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">不良类型占比</div>
</div>
<div id="echart2" style="margin: auto; width: 425px; height: 410.26px;top: -10px;"></div>
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">产品不合格数量对比</div>
</div>
<div id="echart3" style="margin: auto; width: 395px; height: 400.26px"></div>
</div>
</div>
<div class="itembottom">
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">产品异常趋势</div>
</div>
<div id="echart5" style="margin: auto; width: 900px; height:304.15px"></div>
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">产品不同工序异常对比</div>
</div>
<div id="echart6" style="margin: auto; width: 395px; height: 400.26px"></div>
</div>
</div>
</div>
<!-- <div class="item"></div> -->
<!-- <div class="item"></div> -->
</div>
</v-scale-screen>
</template>
<script>
import {
getBoardFactory,
getMesBoardEquProductionToday,
getBoardShifts,
getRepairWorkOrder,
getEquipmentInfo,
getRepairQuantity,
equipmentIntactRate,
equipmentStability,
} from "@/api/kanban/equipment";
import * as echarts from "echarts";
import moment from "moment";
// import Echarts3D from "./echarts3d.vue";
// import Echarts3D2 from "./echarts3d2.vue";
export default {
name: "Index",
components: {
},
data() {
return {
gettimedata: "",
selectxt: null,
selectxtclasses: null,
getLineList: [],
classesList: [],
number1: 0,
number2: 0,
number3: 0,
number4: 0,
nameList: [
"成型机一",
"成型机二",
"成型机三",
"成型机四",
"成型机五",
"成型机六",
"成型机五",
"成型机六",
],
valueList: [1639, 1422, 1306, 1131, 1040, 732, 1040, 732],
optionDatalist1: [],
optionDatalist2: [],
optionDatalist3: [],
optionDatalist4: [],
colorlist: ["#005aff", "#f8b551"],
datetime: null,
time1: null,
getlist: [
{
},
{
},
{
},
{
},
{
},
],
repairlist: [],
equipmentlist: [],
equipmentrepairlist: [],
equipmentstabilizelist: [],
equipmentinfo: [],
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "中山恒阳工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "999",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "中山小榄工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1000",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "内委虚拟工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1001",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "中山雅黛工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1010",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "中山雅黛工厂(OEM业务)",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1011",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "重庆榄菊工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1020",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "江西榄菊工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1030",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "安徽榄菊工厂",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1040",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "安徽榄菊工厂(OEM业务)",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1041",
// "children": []
// },
};
},
created() { },
destroyed() {
clearInterval(this.time1);
this.time1 = null;
},
mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
//console.log('zhuanhuahou',this.dateRangeone)
// this.getdatalist(this.selectxt)
this.selectFactorylist();
this.initChart1()
this.gettime();
},
methods: {
back() {
this.$router.push({ path: "/index" });
},
gettime() {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
setInterval(() => {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
}, 1000);
},
selectFactorylist() {
const _this = this;
getBoardFactory({
factory: null,
}).then((response) => {
if (response.data) {
_this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName;
}
});
},
initChart1() {
const _this = this
let intactRate = 0
let numberAngle = 180
if (_this.equipmentinfo.intactRate) {
intactRate = _this.equipmentinfo.intactRate
numberAngle = parseInt(_this.equipmentinfo.intactRate) * 1.8 - 180
}
var myChart1 = echarts.init(document.querySelector("#echart1"));
var option1 = {
//提示框组件。开发实际中去掉了指针,提示框可以不用设置。
tooltip: {
formatter: "{a} <br/>{b} : {c}%",
},
grid: {
},
//下面属性才是仪表盘的核心!!反正我是这么认为的!!!
series: [
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 60,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "50%"],
//仪表盘轴线相关配置。
name: "内层盘",
type: "gauge",
axisLine: {
lineStyle: {
width: 10,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#334046",
},
{
offset: 1,
color: "#334046",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#fff",
width: 1,
},
length: 6,
splitNumber: 1,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
data: [
{
show: false,
value: "0",
},
],
detail: {
show: 0,
},
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 60,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 45,
center: ["50%", "50%"],
//仪表盘轴线相关配置。
name: "内层盘",
type: "gauge",
axisLine: {
lineStyle: {
width: 10,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#4789E1",
},
{
offset: 1,
color: "#4789E1",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#fff",
width: 1,
},
length: 6,
splitNumber: 1,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
data: [
{
show: false,
value: "0",
},
],
detail: {
show: 0,
},
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 40,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "50%"],
//仪表盘轴线相关配置。
name: "内层盘",
type: "gauge",
axisLine: {
lineStyle: {
width: 5,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.1,
color: "#334046",
},
{
offset: 0.6,
color: "#334046",
},
{
offset: 1,
color: "#334046",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#334046",
width: 1,
},
length: 4,
splitNumber: 1,
distance: 0,
show: true,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: true,
valueAnimation: true,
formatter: "{value}%",
offsetCenter: [0, "10%"],
textStyle: {
color: "#fff",
fontSize: 25,
},
},
data: [
{
value: 80,
},
],
},
],
};
myChart1.setOption(option1);
var myChart4 = echarts.init(document.querySelector("#echart4"));
var option4 = {
//提示框组件。开发实际中去掉了指针,提示框可以不用设置。
tooltip: {
formatter: "{a} <br/>{b} : {c}%",
},
grid: {
},
//下面属性才是仪表盘的核心!!反正我是这么认为的!!!
series: [
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 60,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "50%"],
//仪表盘轴线相关配置。
name: "内层盘",
type: "gauge",
axisLine: {
lineStyle: {
width: 10,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#334046",
},
{
offset: 1,
color: "#334046",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#fff",
width: 1,
},
length: 6,
splitNumber: 1,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
data: [
{
show: false,
value: "0",
},
],
detail: {
show: 0,
},
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 60,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 45,
center: ["50%", "50%"],
//仪表盘轴线相关配置。
name: "内层盘",
type: "gauge",
axisLine: {
lineStyle: {
width: 10,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#89F7F6",
},
{
offset: 1,
color: "#89F7F6",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#fff",
width: 1,
},
length: 6,
splitNumber: 1,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
data: [
{
show: false,
value: "0",
},
],
detail: {
show: 0,
},
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 40,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "50%"],
//仪表盘轴线相关配置。
name: "内层盘",
type: "gauge",
axisLine: {
lineStyle: {
width: 5,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.1,
color: "#334046",
},
{
offset: 0.6,
color: "#334046",
},
{
offset: 1,
color: "#334046",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#334046",
width: 1,
},
length: 4,
splitNumber: 1,
distance: 0,
show: true,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: true,
valueAnimation: true,
formatter: "{value}%",
offsetCenter: [0, "10%"],
textStyle: {
color: "#fff",
fontSize: 25,
},
},
data: [
{
value: 80,
},
],
},
],
};
myChart4.setOption(option4);
var colorList = ['#2D6ACA', '#72C6B5', '#F0D766', '#80B5F4', '#FD866A', '#9E87FF', '#58D5FF'];
var data = [{
'name': '热点网格',
'value': 5600
}, {
'name': '大气污染',
'value': 3600
}, {
'name': '水质超标',
'value': 1500
}, {
'name': '在线超标',
'value': 2000
}, {
'name': '未知',
'value': 899
}, {
'name': '系统对接',
'value': 4000
}, {
'name': '系统对接1',
'value': 4000
}, {
'name': '系统对接2',
'value': 4000
}, {
'name': '系统对接3',
'value': 4000
}, {
'name': '系统对接4',
'value': 4000
}]
var myChart2 = echarts.init(document.querySelector("#echart2"));
var option2 = {
//提示框组件。开发实际中去掉了指针,提示框可以不用设置。
tooltip: {
trigger: 'item'
},
grid: {
top: '60',
},
legend: {
bottom: '10',
// itemGap: 40,
icon: 'pin',
textStyle: {
rich: {
a: {
color: '#FFFFFF',
width: 30,
fontSize: 13,
},
b: {
color: '#FFFFFF',
fontSize: 13,
padding: [0, 30, 0, 40]
},
b0: {
color: '#73DDFF',
fontSize: 20,
padding: [0, 30, 0, 40]
},
}
},
formatter: function (name) {
let title = ''
var total = 0;
var target;
var index;
for (var i = 0, l = data.length; i < l; i++) {
if (data[i].name == name) {
target = data[i].value;
title = data[i].label
index = i < 6 ? i : 5
}
}
return `{a| ${name}}{b| ${target}}`
}
},
//下面属性才是仪表盘的核心!!反正我是这么认为的!!!
series: [
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 150,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "40%"],
//仪表盘轴线相关配置。
type: "gauge",
axisLine: {
lineStyle: {
width: 50,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.1,
color: "#1C2738",
},
{
offset: 0.6,
color: "#1C2738",
},
{
offset: 1,
color: "#1C2738",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#070E19",
width: 3,
},
length: 50,
splitNumber: 2,
distance: -50,
show: true,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: false,
valueAnimation: true,
formatter: "{value}%",
offsetCenter: [0, "10%"],
textStyle: {
color: "#fff",
fontSize: 25,
},
},
data: [
{
value: 80,
show: false,
},
],
},
{
name: "标签使用频率",
type: "pie",
radius: ["44%", "63%"],
center: ["50%", "40%"],
roseType: "radius",
// itemStyle: {
// normal: {
// color: function (params) {
// return colorList[params.dataIndex]
// }
// }
// },
label: {
show: false
},
emphasis: {
label: {
show: false
}
},
data: data,
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 140,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "40%"],
//仪表盘轴线相关配置。
type: "gauge",
axisLine: {
lineStyle: {
width: 1,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.1,
color: "#619e9d",
},
{
offset: 0.6,
color: "#619e9d",
},
{
offset: 1,
color: "#619e9d",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#070E19",
width: 3,
},
length: 50,
splitNumber: 2,
distance: -50,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: false,
valueAnimation: true,
formatter: "{value}%",
offsetCenter: [0, "10%"],
textStyle: {
color: "#fff",
fontSize: 25,
},
},
data: [
{
value: 80,
show: false,
},
],
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 80,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "40%"],
//仪表盘轴线相关配置。
type: "gauge",
axisLine: {
lineStyle: {
width: 1,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.1,
color: "#619e9d",
},
{
offset: 0.6,
color: "#619e9d",
},
{
offset: 1,
color: "#619e9d",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#070E19",
width: 3,
},
length: 50,
splitNumber: 2,
distance: -50,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: false,
valueAnimation: true,
formatter: "{value}%",
offsetCenter: [0, "10%"],
textStyle: {
color: "#fff",
fontSize: 25,
},
},
data: [
{
value: 80,
show: false,
},
],
},
{
//类型
splitNumber: 4, //刻度数量
type: "gauge",
//半径
radius: 60,
//起始角度。圆心 正右手侧为0度正上方为90度正左手侧为180度。
startAngle: 360,
//结束角度。
endAngle: 0,
center: ["50%", "40%"],
//仪表盘轴线相关配置。
type: "gauge",
axisLine: {
lineStyle: {
width: 1,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.1,
color: "#619e9d",
},
{
offset: 0.6,
color: "#619e9d",
},
{
offset: 1,
color: "#619e9d",
},
]),
],
],
},
},
axisTick: {
lineStyle: {
color: "#070E19",
width: 3,
},
length: 50,
splitNumber: 2,
distance: -50,
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: false,
valueAnimation: true,
formatter: "{value}%",
offsetCenter: [0, "10%"],
textStyle: {
color: "#fff",
fontSize: 25,
},
},
data: [
{
value: 80,
show: false,
},
],
},
],
};
myChart2.setOption(option2);
// getMesBoardEquProductionToday({
// factory: _this.selectxt,
// shiftId: _this.selectxtclasses,
// ymd: _this.datetime,
// equTypeCode: "equ_type_hf",
// }).then((response) => {
// if (response) {
// if (response.data) {
// let numberlist = [];
// let dataoption = [];
// let totalArr = [];
// _this.optionDatalist2 = [];
// if (response.data.totalNum.length > 0) {
// _this.number2 = response.data.totalNum[0].totalNum;
// }
// if (response.data.everyNum.length > 0) {
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// _this.optionDatalist2.push(a);
// dataoption.push(a);
// numberlist.push(item.totalNum);
// });
// dataoption.sort((a, b) => {
// return a.value - b.value;
// });
// let max = Math.max(...numberlist);
// max = max + 100;
// dataoption.forEach((item) => {
// totalArr.push(max);
// });
// option2 = {
// yAxis: [
// {
// data: dataoption,
// },
// ],
// series: [
// {
// data: dataoption,
// itemStyle: {
// normal: {
// color: function (params) {
// var index_num = params.value;
// for (var i = 0; i < dataoption.length; i++) {
// //判断数据是否大于1
// if (index_num > 1131) {
// //var colorList = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'];
// //return colorList[params.dataIndex];
// return new echarts.graphic.LinearGradient(
// 0,
// 0,
// 1,
// 0,
// [
// { offset: 0, color: "#FFB742" },
// { offset: 1, color: "#FFB742" },
// ]
// );
// } else {
// //var colorList = ['blue'];
// //return colorList[params.dataIndex];
// return new echarts.graphic.LinearGradient(
// 0,
// 0,
// 1,
// 0,
// [
// { offset: 0, color: "#005954" },
// { offset: 1, color: "#66E1DF" },
// ]
// );
// }
// }
// },
// },
// },
// },
// {
// data: totalArr,
// },
// ],
// };
// myChart2.setOption(option2);
// }
// }
// }
// });
var myChart3 = echarts.init(document.querySelector("#echart3"));
var option3 = {
grid: {
left: "60",
right: "10%",
top: "5%",
bottom: "1%",
containLabel: true,
},
tooltip: {
trigger: "axis",
show: true,
axisPointer: {
type: "none",
},
formatter: function (e) {
return `${e[0].data.name}\n${e[0].marker}${e[0].data.value}`;
},
},
xAxis: {
name: "数量",
// max: total,
splitLine: {
show: false,
},
axisLine: {
show: true,
},
axisLabel: {
show: true,
},
axisTick: {
show: true,
},
},
yAxis: [
{
type: "category",
inverse: false,
data: ['1', '2', '3', '4'],
axisLine: {
show: true,
},
axisTick: {
show: false,
},
axisLabel: {
show: false,
},
},
],
series: [
{
type: "pictorialBar",
symbol: "rect",
// symbolRepeat: "fixed",
// symbolMargin: "2",
// symbolClip: true,
// symbolSize: [5, 20],
barWidth: 20,
data: ['1', '2', '3', '4'],
label: {
normal: {
formatter: "{b}",
textStyle: {
color: "#D0DEEE",
fontSize: 14,
},
position: "left",
distance: 10, //
show: true,
},
},
z: 10,
},
{
type: "bar",
itemStyle: {
color: "#141A27",
},
label: {
normal: {
formatter: "{b}",
textStyle: {
color: "#D0DEEE",
fontSize: 14,
},
position: "right",
distance: 10, //
show: true,
},
},
data: [], // value鍊<65>
tooltip: {
show: false,
},
barWidth: 30,
},
],
};
myChart3.setOption(option3);
// getMesBoardEquProductionToday({
// factory: _this.selectxt,
// shiftId: _this.selectxtclasses,
// ymd: _this.datetime,
// equTypeCode: "equ_type_spj",
// }).then((response) => {
// if (response) {
// if (response.data) {
// let numberlist = [];
// let dataoption = [];
// let totalArr = [];
// _this.optionDatalist3 = [];
// if (response.data.totalNum.length > 0) {
// _this.number3 = response.data.totalNum[0].totalNum;
// }
// if (response.data.everyNum.length > 0) {
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// _this.optionDatalist3.push(a);
// dataoption.push(a);
// numberlist.push(item.totalNum);
// });
// dataoption.sort((a, b) => {
// return a.value - b.value;
// });
// let max = Math.max(...numberlist);
// max = max + 100;
// dataoption.forEach((item) => {
// totalArr.push(max);
// });
// option3 = {
// yAxis: [
// {
// data: dataoption,
// },
// ],
// series: [
// {
// data: dataoption,
// itemStyle: {
// normal: {
// color: function (params) {
// var index_num = params.value;
// for (var i = 0; i < dataoption.length; i++) {
// //判断数据是否大于1
// if (index_num > 1131) {
// //var colorList = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'];
// //return colorList[params.dataIndex];
// return new echarts.graphic.LinearGradient(
// 0,
// 0,
// 1,
// 0,
// [
// { offset: 0, color: "#FFB742" },
// { offset: 1, color: "#FFB742" },
// ]
// );
// } else {
// //var colorList = ['blue'];
// //return colorList[params.dataIndex];
// return new echarts.graphic.LinearGradient(
// 0,
// 0,
// 1,
// 0,
// [
// { offset: 0, color: "#005954" },
// { offset: 1, color: "#66E1DF" },
// ]
// );
// }
// }
// },
// },
// },
// },
// {
// data: totalArr,
// },
// ],
// };
// myChart3.setOption(option3);
// }
// }
// }
// });
var myChart5 = echarts.init(document.querySelector("#echart5"));
var fontColor = '#D0DEEE';
var option5 = {
grid: {
left: '2%',
right: '4%',
top: '15%',
bottom: '2%',
containLabel: true
},
tooltip: {
show: true,
trigger: 'item'
},
legend: {
show: true,
x: 'center',
y: '0',
icon: 'stack',
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: '#D0DEEE'
},
// nameTextStyle:{
// color: '#D0DEEE'
// },
data: ['已采纳', '已发布', '浏览量']
},
xAxis: [
{
type: 'category',
boundaryGap: false,
axisLabel: {
color: fontColor
},
axisLine: {
show: true,
lineStyle: {
color: '#397cbc'
}
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#2B3241'
}
},
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
}
],
yAxis: [
{
type: 'value',
name: '信息量',
nameTextStyle: {
color: '#D0DEEE'
},
min: 0,
max: 1000,
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#D0DEEE'
}
},
axisLine: {
lineStyle: {
color: '#27b4c2'
}
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#2B3241'
}
}
},
],
series: [
{
name: '已发布',
type: 'line',
stack: '总量',
symbol: 'circle',
symbolSize: 8,
itemStyle: {
normal: {
color: '#00d4c7',
lineStyle: {
color: "#00d4c7",
width: 1
},
areaStyle: {
//color: '#94C9EC'
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: 'rgba(7,44,90,0.3)'
}, {
offset: 1,
color: 'rgba(0,212,199,0.9)'
}]),
}
}
},
data: [220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410]
},
]
};;
myChart5.setOption(option5);
var myChart6 = echarts.init(document.querySelector("#echart6"));
var option6 = {
grid: {
left: '2%',
right: '4%',
top: '15%',
bottom: '2%',
containLabel: true
},
tooltip: {
show: true,
trigger: 'item'
},
legend: {
show: true,
x: 'center',
y: '0',
icon: 'stack',
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: '#D0DEEE'
},
// nameTextStyle:{
// color: '#D0DEEE'
// },
data: ['已采纳', '已发布', '浏览量']
},
xAxis: [
{
type: 'category',
boundaryGap: false,
axisLabel: {
color: fontColor
},
axisLine: {
show: true,
lineStyle: {
color: '#397cbc'
}
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#2B3241'
}
},
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
}
],
yAxis: [
{
type: 'value',
name: '信息量',
nameTextStyle: {
color: '#D0DEEE'
},
min: 0,
max: 1000,
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#D0DEEE'
}
},
axisLine: {
lineStyle: {
color: '#27b4c2'
}
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#2B3241'
}
}
},
],
series: [
{
name: '已发布',
type: 'line',
stack: '总量',
symbol: 'circle',
symbolSize: 8,
itemStyle: {
normal: {
color: '#00d4c7',
lineStyle: {
color: "#00d4c7",
width: 1
},
areaStyle: {
//color: '#94C9EC'
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: 'rgba(7,44,90,0.3)'
}, {
offset: 1,
color: 'rgba(0,212,199,0.9)'
}]),
}
}
},
data: [220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410]
},
]
};
myChart6.setOption(option6);
},
selectline() {
const _this = this;
this.optionDatalist1 = [];
this.optionDatalist2 = [];
this.optionDatalist3 = [];
this.optionDatalist4 = [];
_this.getdatalist(_this.selectxt)
},
//左侧第一个选择类型下拉框 回调函数
},
};
</script>
<style lang="scss" scoped>
.app-container {
padding: 0px 24px;
}
.home {
width: 100%;
height: 100vh;
background: url("../../../assets/images/bg-body.png") no-repeat;
background-size: 100% 100%;
background-color: #050711;
.head {
width: 100%;
height: 74px;
position: relative;
.head-content {
height: 74px;
background-image: url("../../../assets/images/bg-head.png");
background-repeat: no-repeat;
background-size: 100% 100%;
text-align: center;
.title {
font-size: 42px;
font-weight: 400;
color: #ffffff;
}
}
.head-logo {
position: absolute;
left: 0px;
top: 1px;
img {
height: 38px;
// width: ;
}
}
.back {
position: absolute;
right: 0px;
top: 5px;
}
}
.content-top {
display: flex;
justify-content: space-between;
position: relative;
.factory {
width: 540px;
height: 60px;
background: url("../../../assets/images/bg- border1.png") no-repeat;
background-size: 100% 100%;
text-align: center;
position: absolute;
top: -17px;
left: 0px;
}
.timebox {
width: 480px;
height: 60px;
background: url("../../../assets/images/bg-border2.png") no-repeat;
background-size: 100% 100%;
text-align: center;
position: absolute;
top: -17px;
right: 0px;
.time {
font-size: 30px;
font-weight: 400;
color: #ffffff;
line-height: 71px;
}
}
}
.content {
margin-top: 63px;
.itemtop {
display: flex;
justify-content: space-between;
align-items: center;
.item-table {
width: 455px;
height: 492px;
background: url('../../../assets/images/equipment/bg-border1.png') no-repeat;
background-size: 100% 100%;
padding: 27px 21px 30px 25px;
box-sizing: border-box;
box-sizing: border-box;
.equipmentinfobox {
margin-top: 27px;
display: flex;
align-items: center;
justify-content: space-around;
.box {
width: 128px;
height: 96px;
background: url('../../../assets/images/equipment/number.png') no-repeat;
background-size: 100% 100%;
text-align: center;
padding-top: 30px;
box-sizing: border-box;
.number {
.number1 {
font-size: 30px;
font-weight: 500;
color: #66FFFF;
line-height: 10px;
}
}
.name2 {
margin-top: 3px;
font-size: 16px;
font-weight: bold;
color: #FFFFFF;
}
}
}
.equipmentinfobox1 {
margin-top: 22px;
display: flex;
align-items: center;
justify-content: space-between;
.box {
width: 199px;
height: 96px;
background: url('../../../assets/images/equipment/number.png') no-repeat;
background-size: 100% 100%;
text-align: center;
padding-top: 30px;
box-sizing: border-box;
.number {
.number1 {
font-size: 30px;
font-weight: 500;
color: #66FFFF;
line-height: 10px;
}
}
.name2 {
margin-top: 3px;
font-size: 16px;
font-weight: bold;
color: #FFFFFF;
}
}
}
.table-tbody {
.item {
width: 412px;
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 15px;
padding-right: 10px;
margin-bottom: 14px;
position: relative;
.icon {
position: absolute;
transform: rotate(45deg);
top: -2px;
left: 0px;
width: 0;
height: 0;
border-right: 6px solid #3BE8FF;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
}
.itemname1 {
font-size: 16px;
color: #66E1DF;
}
.itemname2 {
font-size: 14px;
color: #D0DEEE;
}
}
}
.bigechartbox {
display: flex;
position: relative;
.title1 {
font-size: 18px;
font-weight: 400;
color: #99B3C8;
position: absolute;
bottom: -26px;
left: 52px;
}
.title2 {
position: absolute;
font-size: 18px;
font-weight: 400;
color: #99B3C8;
bottom: -26px;
right: 58px;
}
}
}
}
.itembottom {
margin-top: 19px;
display: flex;
justify-content: space-around;
.item-table {
width: 929px;
height: 403px;
background: url('../../../assets/images/equipment/bg-border1.png') no-repeat;
background-size: 100% 100%;
padding: 27px 21px 30px 25px;
box-sizing: border-box;
box-sizing: border-box;
.table-thead {
width: 100%;
height: 44px;
margin: auto;
background: #0A1A33;
td {
font-size: 19px;
font-family: NotoSansHans-Medium, NotoSansHans;
font-weight: 500;
color: #159AFF;
text-align: center;
white-space: nowrap;
}
}
.table-tbody {
height: 192px;
// width: 1775px;
margin: auto;
overflow-y: scroll;
table {
width: 100%;
tbody {
width: 100%;
td {
font-size: 19px;
font-family: NotoSansHans-Medium, NotoSansHans;
font-weight: 500;
color: #FFFFFF;
text-align: center;
border-bottom: 1px dashed #6C8097
}
}
}
}
}
.item-table1:first-child {
margin-right: 10px;
}
.item-table1 {
flex: 1;
margin-top: 20px;
padding-top: 19px;
// .table-thead {
// width: 565.01px;
// }
.table-tbody {
height: 144px;
}
}
}
}
}
.titlebox {
width: 431px;
height: 38px;
background: url("../../../assets/images/bg-title.png") no-repeat;
background-size: 100% 100%;
// text-align: center;
font-size: 20px;
font-weight: bold;
color: #ffffff;
line-height: 38px;
letter-spacing: 2px;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
padding-left: 60px;
// .titlename{
// position: relative;
// left: 24px;
// }
}
.factory {
display: flex;
// justify-content: space-around;
}
.selectborder {
background-color: transparent;
border-radius: 4px;
// border: 2px solid #27408c;
position: relative;
display: flex;
align-items: center;
justify-content: space-around;
width: 350px;
margin-left: 50px;
}
.selectborder1 {
background-color: transparent;
border-radius: 4px;
// border: 2px solid #27408c;
position: relative;
display: flex;
align-items: center;
justify-content: space-around;
width: 88px;
margin-left: 25px;
}
.selectborder select {
/*清除select的边框样式*/
border: none;
/*清除select聚焦时候的边框颜色*/
outline: none;
background-color: transparent;
/*将select的宽高等于div的宽高*/
width: 100%;
height: 50px;
/*隐藏select的下拉图标*/
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
font-size: 25px;
font-weight: 400;
color: #ffffff;
line-height: 42px;
}
.selectborder option {
/*清除select的边框样式*/
border: none;
/*清除select聚焦时候的边框颜色*/
outline: none;
background-color: transparent;
/*将select的宽高等于div的宽高*/
width: 100%;
height: 50px;
/*隐藏select的下拉图标*/
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding-left: 20px;
font-size: 25px;
font-weight: 500;
color: #3fa2ff;
border-radius: 0%;
}
.selectborder1 option {
/*清除select的边框样式*/
border: none;
/*清除select聚焦时候的边框颜色*/
outline: none;
background-color: transparent;
/*将select的宽高等于div的宽高*/
width: 200px;
height: 50px;
/*隐藏select的下拉图标*/
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding-left: 20px;
font-size: 25px;
font-weight: 500;
color: #3fa2ff;
border-radius: 0%;
}
.selectborder:after {
content: "";
width: 24px;
height: 24px;
background: url(../../../assets/images/xiala.png) no-repeat center;
/*通过定位将图标放在合适的位置*/
position: absolute;
right: 0px;
top: 25%;
/*给自定义的图标实现点击下来功能*/
pointer-events: none;
}
.selectborder1:after {
content: "";
width: 24px;
height: 24px;
background: url(../../../assets/images/xiala.png) no-repeat center;
/*通过定位将图标放在合适的位置*/
position: absolute;
right: 0px;
top: 25%;
/*给自定义的图标实现点击下来功能*/
pointer-events: none;
}
::v-deep .el-button--primary {
color: #ffffff;
background-color: #325e82;
border-color: #0a0f19;
}
.active1 {
background-color: #0A162A;
}
.active2 {
background-color: #101F2C;
}
::-webkit-scrollbar {
width: 3px;
height: 0px;
background-color: #0c0642;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 8px;
background-color: #07356a;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
border-radius: 8px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #0091ff;
}
</style>