EquipmentVisual.cshtml 17.4 KB
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
    ViewData["title"] = "设备管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section header
{
    <link href="~/css/iot/iconfont.css" rel="stylesheet" />
    <style type="text/css">
        .jk-leftdiv {
            display: flex;
            width: 35%;
            flex-direction: column;
            justify-content: space-evenly;
            margin-left: 3.6%;
            color: #000000;
        }

        .jk-leftdiv-text {
            font-size: 1.1vw;
            font-weight: 600;
        }

        .accumulatedDeviceStatus {
            position: absolute;
            left: -14px;
            top: 4px;
            width: 10px;
            height: 10px;
            border-radius: 1vw;
        }

        .accumulatedDeviceStatus-red {
            background: red
        }

        .accumulatedDeviceStatus-green {
            background: green
        }

        .accumulatedDeviceStatus-hui {
            background: #A9A9A9
        }

        .accumulatedDeviceStatus-yello {
            background: orange
        }

        .flex-div {
            display: flex;
            margin-top: 1vh;
        }

        .postionrevite {
            position: relative
        }

        .marginLeft-div-3vw {
            margin-left: 3vw
        }

        .rightdiv {
            width: 35%;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .imgstyle {
            width: 92%;
            height: 98.7%;
            padding-left: 7px;
            padding-top: 3px;
        }

        .divcontent {
            display: flex;
            height: 100%;
        }

        .contcss {
            display: flex;
            width: 20%;
            margin-right: 1vw;
            box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
        }

        .top-refresh-data {
            height: 23px;
            line-height: 23px;
            background-color: #ffffff;
            margin-right: 2vw;
            font-size: 20px;
        }

        .divcontent-left {
            flex: 2;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding-left: 1vw;
        }

        .divcontent-right {
            flex: 1;
        }

        .imgdiv {
            height: 3vh;
            text-align: center;
            line-height: 8vh;
        }

        .huizongText {
            font-size: 1vw;
            color: black;
        }

        .textStyle {
            font-weight: 600;
            font-size: 1.2vw;
            color: black;
            padding-top: 10px;
        }

        .layui-colla-content {
            padding: 10px 15px;
        }

        .iconfont {
            font-size: 42px;
        }

        .headStyle {
            position: fixed;
            background-color: #fff;
            z-index: 99;
            width: 99%
        }

        .layui-colla-item {
            margin-bottom: 5px;
        }

        .layui-tab-titles {
            position: fixed;
            width: 100%;
            background: #fff;
            margin-top: 4.7vh;
            z-index: 99999
        }

        .header {
            position: fixed;
            background: #ffffff;
            z-index: 99999;
            width: 100%;
        }

        layui-header {
            position: fixed;
            background: #ffffff;
            z-index: 99999;
            width: 100%;
        }
    </style>
}
<div class="head-breadcrumb header">
    <span class="layui-breadcrumb layui-header" lay-separator=">" lay-filter="projectMap" style="visibility: visible;">
        <a href="/configure/BaseProject/ProjectOverview">项目概述</a>
        <a href="/equipment/BaseEquipment/IndexProjectAndEq">设备列表</a>
        <a href="/equipment/BaseEquipment/EquipmentVisual" id="bread-visual" onclick="event.preventDefault(); ">设备可视化 </a>
    </span>
</div>


<div id="listForm" class="layui-tab-item layui-show">
    <div class="layui-col-xs12">
        <div class="layui-tab layui-tab-brief layui-tab-sys-register" lay-filter="tabVisual">
            <ul class="layui-tab-title layui-tab-titles">
                <li class="layui-this" lay-id="1">健康表现</li>
                <li lay-id="2">实时参数</li>
                <li lay-id="3">未处理故障</li>
                <li lay-id="4">操作手册</li>
                <li lay-id="5">保养信息</li>
            </ul>
            <div class="layui-tab-content">
                <!--健康表现-->
                <div class="layui-tab-item layui-show">
                    <!--设备信息-->
                    <div style="display:flex;height:28vh;padding-top:11vh">
                        <div style="width: 20%;">
                            <img class="eqImg imgstyle" src="/images/equipment/404.jpg" />
                        </div>
                        <div style="width:80%;display:flex;background:#f8f7fd">
                            <div class="jk-leftdiv">
                                <div>设备信息</div>
                                <div class="jk-leftdiv-text" id="eqInfo" style="font-size:0.9vw"></div>
                                <div style="margin-top: 1vh;">当天开机时间</div>
                                <div class="jk-leftdiv-text" id="TodayPowerTime"></div>
                                <div style="margin-top: 1vh;">本月开机时间</div>
                                <div class="jk-leftdiv-text" id="CurrentMonthPowerTime"> </div>
                            </div>
                            <div id="deviceStatus" style="width:30vw;height:30vh"></div>
                            <div class="rightdiv">
                                <div class=" flex-div postionrevite">
                                    <div class="accumulatedDeviceStatus accumulatedDeviceStatus-green"></div>
                                    运行<div id="RunProportion" style="width:70px;padding-top: 0.2vw;"></div>
                                    <div class="marginLeft-div-3vw" id="RunProportionVal"></div>
                                </div>
                                <div class="flex-div postionrevite">
                                    <div class="accumulatedDeviceStatus accumulatedDeviceStatus-yello "></div>
                                    空闲<div id="FreeProportion" style="width:70px;padding-top: 0.2vw;"></div>
                                    <div class="marginLeft-div-3vw" id="FreeProportionVal"></div>
                                </div>
                                <div class="flex-div postionrevite">
                                    <div class="accumulatedDeviceStatus  accumulatedDeviceStatus-red"></div>
                                    故障<div id="AlarmProportion" style="width:70px;padding-top: 0.2vw;"></div>
                                    <div class="marginLeft-div-3vw" id="AlarmProportionVal"></div>
                                </div>
                                <div class="flex-div postionrevite ">
                                    <div class="accumulatedDeviceStatus accumulatedDeviceStatus-hui"></div>
                                    离线<div id="OfflineProportion" style="width:70px;padding-top: 0.2vw;"></div>
                                    <div class="marginLeft-div-3vw" id="OfflineProportionVal"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--OEE、MTTR、MTBF、妥善率-->
                    <div class="layui-collapse" style="padding-left:7px;padding-top: 3vw;">
                        <!--OEE-->
                        <div class="layui-colla-item">
                            <div class="layui-colla-title">设备OEE <span style="color:blue;">(运行时间/(运行时间+空闲时间+故障时间))*100% (单位:分钟)</span></div>
                            <div class="layui-colla-content layui-show">
                                <div class="contcss">
                                    <div class="divcontent-left">
                                        <div>OEE (近7天汇总)</div>
                                        <div class="textStyle" id="totalOee">0%</div>
                                    </div>
                                    <div class="divcontent-right">
                                        <div class="imgdiv">
                                            <span class="iconfont icon-xiaoshuai" style="color: rgb(146, 133, 235);"></span>
                                        </div>
                                    </div>
                                </div>
                                <div style="width:100%;height:40vh" id="eqOeeParameter">
                                </div>
                            </div>
                        </div>

                        <!--MTTR、MTBF-->
                        <div class="layui-colla-item">
                            <div class="layui-colla-title">MTTR、MTBF<span style="color:blue;">(单位:HR MTTR=故障时间hr÷故障次数、MTBF=(运行hr+空闲时间hr)÷故障次数)</span></div>
                            <div class="layui-colla-content layui-show">
                                <div class="divcontent">
                                    <div class="contcss">
                                        <div class="divcontent-left">
                                            <div>MTTR (近7天汇总)</div>
                                            <div class="textStyle" id="totalMttr">0</div>
                                        </div>
                                        <div class="divcontent-right">
                                            <div class="imgdiv">
                                                <span class="iconfont icon-shebeiMTTR" style="color: rgb(146, 133, 235);"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="contcss">
                                        <div class="divcontent-left">
                                            <div>MTBF (近7天汇总)</div>
                                            <div class="textStyle" id="totalMtbf">0</div>
                                        </div>
                                        <div class="divcontent-right">
                                            <div class="imgdiv">
                                                <span class="iconfont icon-MTBF" style="color: rgb(146, 133, 235);"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div style="width:100%;height:40vh" id="eqMttrMtbf">
                                </div>
                            </div>
                        </div>

                        <!--妥善率-->
                        <div class="layui-colla-item">
                            <div class="layui-colla-title">妥善率<span style="color:blue;">( (1-故障时间/总时间)*100%) 总时间:堆垛机默认工作24小时,其他设备字典配置PowerOnTime、目标99%</span></div>
                            <div class="layui-colla-content layui-show">
                                <div class="divcontent">
                                    <div class="contcss">
                                        <div class="divcontent-left">
                                            <div>妥善率 (近7天汇总)</div>
                                            <div class="textStyle" id="totalProper">0</div>
                                        </div>
                                        <div class="divcontent-right">
                                            <div class="imgdiv">
                                                <span class="iconfont icon-zengchangshuai" style="color: rgb(146, 133, 235);"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--列表-->
                                <table id="eqavailability" lay-filter="eqavailability" lay-size="sm" style="margin-top:7px;"></table>
                            </div>
                        </div>
                    </div>
                </div>

                <!--实时参数-->
                <div class="layui-tab-item" style="padding-top:11vh">
                    实时参数 待开发
                </div>
                <!--未处理故障-->
                <div class="layui-tab-item " style="padding-top:11vh">
                    <blockquote class="layui-elem-quote">
                        <p>本页仅显示近200条数据,当前设备未处理的报警总数量:<span id="alarmTotalLab">0</span></p>
                    </blockquote>
                    <table id="mainAlarm" lay-filter="mainAlarm" lay-size="sm"></table>
                </div>
                <!--文件下载-->
                <div class="layui-tab-item " style="padding-top:11vh">
                    <table id="mainFile" lay-filter="mainFile" lay-size="sm"></table>
                </div>
                <!--保养信息-->
                <div class="layui-tab-item" style="width:100%">
                    <div style="display:flex;margin-top: 0.9vh;padding-top:11vh">
                        <div style="text-align: center;" class="layui-col-md1">
                            <img class="eqImg" src="/images/equipment/404.jpg" style="margin:3%;height:56px;" />
                        </div>
                        <div class="layui-col-md2">
                            <div id="eqCode"></div>
                            <div id="projectInfo"></div>
                            <div id="eqStatusIP"></div>
                        </div>
                        <div style="width: 20vw;background:#2f4056;text-align:center;padding-top: 0.6vw;margin-right: 0.6vw;" class="layui-col-md2">
                            <div style="font-size:1.5vw;color:#fff" id="maintainNumber">0</div>
                            <div style="color:#fff">总保养次数</div>
                        </div>
                        <div style="width: 20vw;background:#1e9fff;text-align:center;padding-top: 0.6vw;margin-right: 0.6vw;" class="layui-col-md2">
                            <div style="font-size:1.5vw;color:#fff" id="toBeMaintainNumber">0</div>
                            <div style="color:#fff">部件待保养次数</div>
                        </div>
                        <div style="width: 20vw;background:#ffb800;text-align:center;padding-top: 0.6vw;margin-right: 0.6vw;" class="layui-col-md2">
                            <div style="font-size:1.5vw;color:#fff" id="lastMaintainTime"></div>
                            <div style="color:#fff">最近保养时间</div>
                        </div>
                        <div style="width: 20vw;background:#009688;text-align:center;padding-top: 0.6vw;margin-right: 0.6vw;" class="layui-col-md2">
                            <div style="font-size:1.5vw;color:#fff" id="sumAmount">0</div>
                            <div style="color:#fff">保养总价格</div>
                        </div>

                    </div>
                    <!--部件列表-->
                    <div style="height: 37.9vh;">
                        <span style="font-size: larger;">部件列表</span>
                        <div style=" width:100%;">
                            <table id="equipmentPartDt" lay-filter="equipmentPartDt">
                                <!-- table内容 -->
                            </table>
                        </div>
                    </div>
                    <!--已保养、未保养-->
                    <div style="display:flex;width:100%;">
                        <div style="width:49%;margin-right:20px;">
                            <span style="font-size: larger;">未保养部件记录</span>
                            <div style="width:100%;overflow-x:auto;">
                                <table lay-size="sm" lay-filter="unMaintainDt" id="unMaintainDt">
                                </table>
                            </div>
                        </div>
                        <div style="width:49%;">
                            <span style="font-size: larger;">已保养部件记录</span>
                            <div style="width:100%;overflow-x:auto;">
                                <table lay-size="sm" lay-filter="maintainedDt" id="maintainedDt">
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="MaintainStatus">
    {{# if(d.status==sysEnumData.EnumMaintainStatus.ToBeMaintain){ }}
    <span class="layui-badge  layui-bg-orange">待保养</span>
    {{# }else if(d.status==sysEnumData.EnumMaintainStatus.Maintained){ }}
    <span class="layui-badge layui-bg-green">已保养</span>
    {{# }else{ }}
    <span class="layui-badge layui-bg-red">逾期</span>
    {{# } }}
</script>

@section Scripts
{
    <script src="~/js/echarts/echarts.common.min.js"></script>
    <script type="text/javascript" src="~/echartsconfig/projectoverviewconfig.js"></script>
    <script type="text/javascript" src="/productjs/equipment/equipmentvisual.js" asp-append-version="true"></script>
}