<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="factoryCode">
                    <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>
                <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="table-tbody">
                            <div class="item">
                                <div class="itemname1">
                                    <div class="img">
                                        <img src="../../../assets/images/quality/icon-dingdan1.png" alt="">
                                    </div>
                                    <div class="name3" style="min-width: 101px;">
                                        订单总数
                                    </div>
                                    <div class="line">

                                    </div>
                                </div>
                                <div style="min-width: 100px;" class="itemname2">
                                    {{ ordermessage[0].quality }}
                                </div>
                            </div>
                            <div class="item">
                                <div class="itemname1">
                                    <div class="img">
                                        <img src="../../../assets/images/quality/icon-dingdan2.png" alt="">
                                    </div>
                                    <div class="name3" style="min-width: 101px;">
                                        异常总数
                                    </div>
                                    <div class="line">
                                    </div>
                                </div>
                                <div style="min-width: 100px;" class="itemname3">
                                    {{ ordermessage[1].quality }}
                                </div>
                            </div>
                            <div class="item">
                                <div class="itemname1" style="min-width: 240px;">
                                    <div class="img">
                                        <img src="../../../assets/images/quality/icon-dingdan3.png" alt="">
                                    </div>
                                    <div class="name3" style="min-width: 104px;">
                                        合格率
                                    </div>
                                    <div class="line">

                                    </div>
                                </div>
                                <div style="min-width: 100px;" class="itemname4">
                                    {{ ordermessage[2].quality }}
                                </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: 610px; height:296.4px;"></div>
                    </div>
                    <div class="item-table item-table1">
                        <div class="titlebox" style="margin-bottom: 14px;">
                            <div class="titlename">供应商产品不良率TOP5</div>
                        </div>
                        <div class="progress">
                            <div class='bar' style="width: 73%;">

                            </div>
                        </div>
                        <div id="echart3" style="margin: auto; width: 610px; height:296.4px;"></div>
                    </div>
                </div>
                <div class="itembottom">
                    <div class="item-table item-table1">
                        <div class="titlebox2" style="margin-bottom: 14px;">
                            <div class="titlename">订单异常明细备份</div>
                        </div>
                        <table class="table-thead" border="0" cellpadding="0" cellspacing="0">
                            <thead>
                                <tr style="height: 44px;">
                                    <td style="width: 8%;">序号</td>
                                    <td style="width: 8%;">异常单号</td>
                                    <td style="width: 8%;">物料名称</td>
                                    <td style="width: 8%;">订单号</td>
                                    <td style="width: 8%;">来料时间</td>
                                    <td style="width: 8%;">质检确认时间</td>
                                    <td style="width: 8%;">质检数量</td>
                                    <td style="width: 8%;">检验人</td>
                                    <td style="width: 8%;">质检不合格</td>
                                </tr>
                            </thead>
                        </table>
                        <div class="table-tbody">
                            <!-- <vue-seamless-scroll :data="getlistcx" :class-option="classOption" class="wrapscroll"> -->
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tbody>
                                    <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
                                        v-for="(n, index) in orderdetail">
                                        <td style="width: 8%;">{{ index + 1 }}</td>
                                        <td style="width: 8%;">{{ n.orderNo }}</td>
                                        <td style="width: 8%;">{{ n.materialName }}</td>
                                        <td style="width: 8%;">{{ n.orderNo }}</td>
                                        <td style="width: 8%;">{{ n.failureRate }}</td>
                                        <td style="width: 8%;">{{ n.incomeTime }}</td>
                                        <td style="width: 8%;">{{ n.equipmentStatus }}</td>
                                        <td style="width: 8%;">{{ n.checkManName }}</td>
                                        <td style="width: 8%;">{{ n.checkName }}</td>
                                    </tr>
                                </tbody>
                            </table>
                            <!-- </vue-seamless-scroll> -->
                        </div>
                    </div>

                </div>
            </div>
            <!-- <div class="item"></div> -->
            <!-- <div class="item"></div> -->
        </div>
    </v-scale-screen>
</template>

<script>
import {
    getBoardFactory,
    getOverallInfo,
    getCheckProjectsPie,
    getSupplierBadTOP5,
    getSupplierNoOkList,
    getSupplierTaskList,
} from "@/api/kanban/quality";
import {
  getDeviceRefreshTime,
} 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: [],
            orderdetail: [],
            equipmentrepairlist: [],
            equipmentstabilizelist: [],
            equipmentinfo: [],
            ordermessage: [
                {

                }, {

                }, {

                }
            ],

        };
    },
    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.selectfactoryCodelist();

        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);
        },
        selectfactoryCodelist() {
            const _this = this;
            getBoardFactory({
                factory: null,
            }).then((response) => {
                if (response.data) {
                    _this.getLineList = response.data;
                    _this.selectxt = _this.getLineList[0].parentName;
                    _this.getdatalist()
                    _this.getDeviceRefreshTime()
                }
            });
        },
        getDeviceRefreshTime() {
            const _this = this;
            getDeviceRefreshTime().then((response) => {
                if (response.data) {
                    console.log(response.data)
                    this.RefreshTime = response.data
                    this.time1 = setInterval(() => {
                        _this.getdatalist(_this.selectxt)
                    }, 1000 * 60 * this.RefreshTime);
                }
            });
        },
        getdatalist() {
            const _this = this;
            getOverallInfo({
                ymdType: '统计维度',
                typeCode: 'material',
                factoryCode: 'ds_' + _this.selectxt,
            }).then((response) => {
                if (response) {
                    _this.ordermessage = response;
                }
            });
            getCheckProjectsPie({
                ymdType: '统计维度',
                typeCode: 'material',
                factoryCode: 'ds_' + _this.selectxt,
            }).then((response) => {
                if (response) {
                    _this.optionDatalist2 = []
                    response.forEach((item) => {
                        let a = {}
                        a.name = item.projectName
                        a.value = item.quality
                        _this.optionDatalist2.push(a)
                    });
                    _this.initChart2()
                }
            });
            getSupplierBadTOP5({
                ymdType: '统计维度',
                typeCode: 'material',
                factoryCode: 'ds_' + _this.selectxt,
            }).then((response) => {
                if (response) {
                    _this.optionDatalist3 = []
                    let a = {}
                    let areaName = []
                    let eventCount = []
                    _this.optionDatalist3 = []
                    response.forEach((item) => {
                        areaName.push(item.supplierName)
                        eventCount.push(parseInt(item.quality))
                    });
                    a.areaName = areaName
                    a.eventCount = eventCount
                    _this.optionDatalist3.push(a)
                    _this.initChart1()

                }
            });
            this.orderdetail = []
            getSupplierNoOkList({
                ymdType: '统计维度',
                typeCode: 'material',
                factoryCode: 'ds_' + _this.selectxt,
            }).then((response) => {
                if (response) {
                    this.orderdetail = response
                    this.orderdetail.forEach((item) => {
                        item.incomeTime = moment(item.incomeTime).format('YYYY-MM-DD HH:mm:ss')
                    });
                }
            });
        },
        // 订单异常信息
        initChart1() {
            const _this = this
            var myChart3 = echarts.init(document.querySelector("#echart3"));

            var tick = "../../../static/img/icon-dingdan1.d5172b23.png";
            console.log(tick)

            // let bjlxChartData = { areaName: ['苍南县', '瓯江口', '鹿城区', '龙湾区'], eventCount: [30, 3, 3, 3] };
            let bjlxChartData = _this.optionDatalist3[0]
            let max = 100;
            var maxArr = [];
            console.log(bjlxChartData)
            if (bjlxChartData.areaName.length > 0) {
                for (var i = 0; i < bjlxChartData.eventCount.length; i++) {
                    maxArr.push(max);
                }
                var option3 = {
                    grid: {
                        left: '1%',
                        top: '5%',
                        right: '3%',
                        bottom: '0%',
                        containLabel: true,
                    },
                    xAxis: [
                        {
                            show: false,
                        },
                    ],
                    yAxis: [
                        {
                            axisTick: 'none',
                            axisLine: 'none',
                            inverse: true,
                            axisLabel: {
                                inside: true,
                                textStyle: {
                                    color: 'white',
                                    fontSize: 16,
                                    verticalAlign: 'bottom',
                                    align: 'top',
                                    padding: [10, 10, 15, 0],
                                },
                                // formatter: function (value) {
                                //     console.log(value);
                                //     return `{warnValue|}{value|${value}}`;
                                // },
                                formatter: (p, index) => {
                                    return '{index|' + (index + 1) + '} {p|' + p + '}'
                                },
                                rich: {
                                    //这里的rich，下面有解释
                                    warnValue: {
                                        //这里的warnValue对应上面的标签名
                                        height: 60,
                                        width: 80,
                                        align: 'left',
                                        color: 'white',
                                        backgroundColor: {
                                            image: tick, //这个warnImg是上面定义的图片var warnImg = "img/warn.png";
                                        },
                                    },
                                    p: {
                                        color: 'white',
                                        fontSize: 16,
                                    },
                                },
                            },
                            data: bjlxChartData.areaName,
                        },
                        {
                            axisTick: 'none',
                            axisLine: 'none',
                            inverse: true,
                            axisLabel: {
                                textStyle: {
                                    color: 'white',
                                    fontSize: 18,
                                    verticalAlign: "bottom",
                                    align: 'right',
                                    padding: [10, 10, 15, 0],
                                },
                                formatter: function (value, index) {
                                    return `{value|${value}%}`;
                                },
                                rich: {
                                    value: {
                                        align: 'right',
                                        color: 'white',
                                        marginLeft: 100,
                                        fontSize: 16,
                                    },
                                },
                            },
                            data: bjlxChartData.eventCount,
                        },
                        {
                            axisLine: {
                                lineStyle: {
                                    color: 'rgba(0,0,0,0)',
                                },
                            },
                            data: [],
                        },
                    ],
                    series: [
                        {
                            name: '条',
                            type: 'bar',
                            stack: '圆',
                            yAxisIndex: 0,
                            // data: data,
                            data: bjlxChartData.eventCount,
                            barWidth: 8,
                            itemStyle: {
                                normal: {
                                    color: {
                                        type: 'linear',
                                        x: 0,
                                        y: 0,
                                        x2: 1,
                                        y2: 0,
                                        colorStops: [
                                            {
                                                offset: 0,
                                                color: '#054B60', // 0% 处的颜色
                                            },
                                            {
                                                offset: 1,
                                                color: '#00FCFF', // 100% 处的颜色
                                            },
                                        ],
                                    },
                                    barBorderRadius: 10,
                                },
                            },
                            z: 2,
                        },
                        {
                            name: 'XXX',
                            type: 'pictorialBar',
                            symbol:
                                'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAMAAAApB0NrAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABC1BMVEUA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7QA/7SO/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/86O/85K/8IT/7gM/7YP/7cs/7wB/7QH/7Vl/8cZ/7kA/7QH/7WJ/80C/7Qk/7st/7wM/7aO/84g/7oI/7Y8/78N/7aO/84E/7UA/7Q1/76O/84q/7wB/7QN/7Yp/7wD/7UB/7QR/7ct/7wa/7kg/7pr/8iO/86O/86O/86O/84A/7QAAAAmnbE7AAAAV3RSTlMAAwsQFBcYFhINBgkaDgIHGREFDwEKBAwIFRMHDRETEg8KAgsXGhkQAxUJBRgELnSThkT0riNl/rIb4U5CkhRUpTeIBs77OwFH9opI1PF6Q2NTIQgWDA6QHRcgAAAAAWJLR0RY7bXEjgAAAAd0SU1FB+ULEBQKJQdQcX4AAAITSURBVDjLbVRnY5swEBVmCMxhC2MgdrwdPJK46d5N2roJ3Stt/f//SXUnbFbeF3THk+54pwdjBWgN3TAtk9tOk90N14AcpteqM9ocQPiNptbSOm6AgdMtM7o6AA8LyaYtE1GR0jJAxJVtTQ7iqEDpgdmpVe/6RVIfuKZWx4PhaDyZzlQUgNhvdcBUlPlJorBYrijhA1cdRAJIjtU6ybE4pXIcPOLYEODj7DwpYUCNg8ASHRAo1+okqeBUVQuoMTpmVKUkiw2dYMmOLMDej7MX9y7uP3iYrce4twdtFoFZOObi0U7i8RMV4cd5smsXfLmaqeTTZzvCcxXOcY7Ql+I4h1IvXu4yvKJ4iPdF1gmgIVdTyr3eU3ZvKL5EiUAwHUJUmHJXB85bitfYKUDpnHcHznuKRzhvsGQ/qPZWNfkho1zfULjESQGX32XLVbqg5MdPivM5Vxrfa/IsiaHKfvkqGd++Z0KnNAb53VwKydhmP4EfP3/9zpYT3GzipXBIRDapzet8RhLiGDQBeLfTy+pIt7jVgBgfulQbx7EuU27JczR2qYBFErF0WaD8OSPjWqQwkYXy7na8Z8xTuqqGKqHuv5UZfHb7999gusnMI/2SO1o6Kaz5K+qBVXRqAGBrZQfGomJmFgoQeu7VVmwC+BV3M83HP4oeu2039PAvw49YHZFnHX4/wr6LQeg0Ar/v63G7VOU/Y9Ve2lDCOJ4AAAAASUVORK5CYII=',
                            symbolSize: [40, 40],
                            symbolPosition: 'end',
                            symbolOffset: [20, 0],
                            z: 12,
                            itemStyle: {
                                normal: {
                                    color: '#fff',
                                },
                            },
                            data: bjlxChartData.eventCount,
                        },
                        {
                            name: '背景',
                            type: 'bar',
                            barWidth: 8,
                            barGap: '-100%',
                            data: maxArr,
                            itemStyle: {
                                normal: {
                                    color: 'rgba(28, 128, 213, 0.19)',

                                    barBorderRadius: 5,
                                },
                            },
                        },
                    ],
                };
                myChart3.setOption(option3);
            }


        },
        initChart2() {
            const _this = this
            // 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
            // }, {
            //     'name': '系统对接5',
            //     'value': 4000
            // }, {
            //     'name': '系统对接6',
            //     'value': 4000
            // }, {
            //     'name': '系统对接7',
            //     'value': 4000
            // }, {
            //     'name': '系统对接8',
            //     'value': 4000
            // }]
            var data = _this.optionDatalist2
            var myChart2 = echarts.init(document.querySelector("#echart2"));
            var option2 = {
                //提示框组件。开发实际中去掉了指针，提示框可以不用设置。
                tooltip: {
                    trigger: 'item'
                },
                grid: {
                    top: '60',
                },
                legend: {
                    bottom: '10',
                    //  itemGap: 40,
                    orient: "vartical",
                    icon: 'pin',
                    top: "center",
                    right: "50",
                    textStyle: {
                        rich: {
                            a: {
                                color: '#FFFFFF',
                                width: 30,
                                fontSize: 13,
                            },
                            b: {
                                color: '#FFFFFF',
                                fontSize: 13,
                            },
                            b0: {
                                color: '#73DDFF',
                                fontSize: 20,
                            },
                        }
                    },
                    formatter: function (name) {
                        var target;
                        for (var i = 0, l = data.length; i < l; i++) {
                            if (data[i].name == name) {
                                target = data[i].value;
                                console.log(target)
                            }
                        }
                        return `{a|${name}}\n{b|${target}}`
                    }
                },
                //下面属性才是仪表盘的核心！！反正我是这么认为的！！！
                series: [
                    {
                        //类型
                        splitNumber: 4, //刻度数量
                        type: "gauge",
                        //半径
                        radius: 150,
                        //起始角度。圆心 正右手侧为0度，正上方为90度，正左手侧为180度。
                        startAngle: 360,
                        //结束角度。
                        endAngle: 0,
                        center: ["30%", "50%"],
                        //仪表盘轴线相关配置。
                        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: ["60%", "90%"],
                        center: ["30%", "50%"],
                        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: ["30%", "50%"],
                        //仪表盘轴线相关配置。
                        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: ["30%", "50%"],
                        //仪表盘轴线相关配置。
                        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: ["30%", "50%"],
                        //仪表盘轴线相关配置。
                        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);
        },
        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;

        .factoryCode {
            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: 610px;
                height: 402px;
                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: 548px;
                        height: 90px;
                        display: flex;
                        align-items: center;
                        justify-content: space-around;
                        padding-left: 15px;
                        padding-right: 10px;
                        margin-bottom: 14px;
                        position: relative;
                        background: url('../../../assets/images/quality/bg-dingdan.png');
                        background-size: 100% 100%;

                        .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 {
                            display: flex;
                            align-items: center;

                            .img {
                                width: 65px;
                                height: 99px;
                            }

                            .name3 {
                                font-size: 26px;
                                color: #fff;
                                margin-left: 48px;
                                margin-right: 38px;
                            }

                            .line {
                                border: 1px solid #3D435B;
                                height: 40px;
                            }
                        }

                        .itemname2 {
                            font-size: 36px;
                            color: #66FFFF;
                        }

                        .itemname3 {
                            font-size: 36px;
                            color: #FF4D4F;
                        }

                        .itemname4 {
                            font-size: 36px;
                            color: #F1D34C;
                        }
                    }
                }

                .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: 1877px;
                height: 485px;
                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: 336px;
                    // 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: 336px;
                }
            }
        }
    }
}

.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;
    //   }
}

.titlebox2 {
    margin: auto;
    width: 542px;
    height: 41px;
    background: url("../../../assets/images/quality/bg-border2title.png") no-repeat;
    background-size: 100% 100%;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    line-height: 41px;
    letter-spacing: 2px;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
    //   .titlename{
    //     position: relative;
    //     left: 24px;
    //   }
}

.factoryCode {
    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: url('../../../assets/images/quality/bgtable.png');
}

.active2 {}

::-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;
    // opacity: 0.1;
}

.progress {
    width: 100px;
    background-color: rgba(15, 182, 217, 0.3);
    border-radius: 10px;

    .bar {
        background: linear-gradient(90deg, rgba(15, 182, 217, 1), rgba(1, 255, 255, 1));
        border-radius: 10px;
    }
}
</style>
