123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- <html style="height: 100%">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge">
- <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
- <title>流水线管理页-度彼科技</title>
- <!-- Favicon-->
- <link rel="icon" href="favicon.ico" type="image/x-icon">
- <!-- Bootstrap Core Css -->
- <link rel="stylesheet" href="css/third/bootstrap.min.css" >
- <!-- Waves Effect Css -->
- <link href="plugins/node-waves/waves.css" rel="stylesheet" />
- <!-- Animation Css -->
- <link href="plugins/animate-css/animate.css" rel="stylesheet" />
- <!-- Morris Chart Css-->
- <link href="plugins/morrisjs/morris.css" rel="stylesheet" />
- <!-- Custom Css -->
- <!--<link href="css/style-frontend.css" rel="stylesheet">-->
- <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
- <link href="css/themes/all-themes.css" rel="stylesheet" />
- <script src="css/third/jq.3.2.1.min.js"></script>
- <script src="css/third/popper.1.12.9.js" ></script>
- <script src="css/third/boot.min.js" ></script>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style>
- /* css 代码 */
- th, td{
- color:white;
- font-size: 1.2em;
- }
- .big-letter{
- font-size: 1.2em;
- }
- .middle-font{
- font-size: 1.02em;
- }
- .green-bar {
- background-color: #0f9d58 !important;
- }
- .red-bar {
- background-color: #732020 !important;
- }
- </style>
- <script src="css/third/hchart.js"></script>
- <script src="css/third/exporting.js"></script>
- <script src="css/third/cn.js"></script>
- <script src="css/third/dark.js"></script>
- <script src="js/timeService.js"></script>
- <script src="js/vue.js"></script>
- </head>
- <body class="theme-black" style="background-color: #2d2d2d !important;" onload="startTime()">
- <nav class="navbar clearfix navbar-expand-lg navbar-dark" role="navigation" style="background-color: #732020;">
- <a class="navbar-brand" href="#">
- <img src="images/logo.jpg" width="42" height="30" class="d-inline-block align-top" alt="">
- 工厂产能监控系统
- </a>
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- <ul class="navbar-nav mr-auto">
- <li class="nav-item">
- <a class="nav-link" href="denglu.html"> 主页 <span class="sr-only">(current)</span></a>
- </li>
- <li class="nav-item active">
- <a class="nav-link" href="#">全厂大屏</a>
- </li>
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- 前往
- </a>
- <div class="dropdown-menu" aria-labelledby="navbarDropdown">
- <a class="dropdown-item" href="#" onclick="history.go(0)">刷新</a>
- <div class="dropdown-divider"></div>
- <a class="dropdown-item" href="/server">后台入口</a>
- </div>
- </li>
- <li class="nav-item">
- <a class="nav-link bg-red text-white" href="javascript:void">深圳市度彼电子有限公司</a>
- </li>
- </ul>
- <form class="form-inline my-2 my-lg-0 text-white" >
- <button class="btn btn-outline-dark my-2 my-sm-0 text-white" id="nowDateTimeSpan"></button>
- <button class="btn btn-success my-2 my-sm-0" type="submit">重新加载</button>
- </form>
- </div>
- <!--<div class="container-fluid">
- <div class="navbar-header">
- <a class="navbar-brand" href="index.html">工厂产能监控系统</a>
- </div>
- <div style="color:#fff" class="text-center"><img src="images/logo.jpg" style="width: 10%;"> 深圳市度彼电子有限公司</div>
- <font color="#ffffff"><span id="nowDateTimeSpan"></span></font>
- </div>-->
- </nav>
- <div class="container" style="max-width:none; !important;">
- <div class="alert alert-warning" id="mpAlert" style="display:none">
- </div>
- <div class="text-white row middle-font">
- <div class="col-md-3">
- <div class="text-center big-letter">全厂产能统计</div>
- <table class="table table-bordered text-center">
- <thead>
- <tr>
- <th scope="col">时间</th>
- <th scope="col">良品数</th>
- <th scope="col">不良品数</th>
- <th scope="col">堆积数</th>
- <th scope="col">不良率</th>
- </tr>
- </thead>
- <tbody id="rank-one">
- </tbody>
- </table>
- </div>
- <div class="col-md-9 text-white" style="height: 30vh" id="redrank">
- <div class="text-center text-lg big-letter" @click="clicktitle">{{title}}</div>
- <div class="row">
- <div class="col-md-4" v-for="parto in parting">
- <table class="table table-bordered text-center table-striped">
- <thead>
- <tr>
- <th>名次</th>
- <th @click="useId">人员</th>
- <th @click="usePass">良品</th>
- <th @click="useFail">坏品</th>
- <th @click="useTotal">总量</th>
- <th @click="useRate">不良率</th>
- </tr>
- </thead>
- <tbody class="table-rank-0">
- <tr v-for="one in parto" v-bind:class="{'red-bar' : one.isRed, 'green-bar': one.isGreen}">
- <td>{{one.seq+1}}</td>
- <td>{{one.workerName}}</td>
- <td>{{one.passNum}}</td>
- <td>{{one.failNum}}</td>
- <td>{{one.totalNum}}</td>
- <td>{{one.failRate}} %</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div class="row" style-height="50">
- <div class="row col-md-12 ">
- <div id="graph-1" class="chartsize col-md-12" style-height="30"></div>
- </div>
- <div class="row col-md-12 ">
- <div id="graph-2" class="chartsize col-md-12" style-height="30"></div>
- </div>
- </div>
- </div>
- <!-- Modal -->
- <div id="modalContainer"></div>
- <!-- Common Js Files -->
- <script src="js/basic.js"></script>
- <script src="js/getparam.js"></script>
- <script src="js/resize.js"></script>
- <script src="js/common.js"></script>
- <!--- Unique -->
- <script src="js/dapingmu.js"></script>
- <script src="js/dapingmu-display.js"></script>
- <script src="js/newCommon.js"></script>
- <script src="js/newRedrankvue.js"></script>
- <script>
- var FlowRealTime = new (function () {
- this.pgName = "flowDashBoard";
- this.page = new SinglePage(this.pgName);
- this.scheduleId = utils_get_param("scheduleId");
- this.flowId = utils_get_param("flowId");
- if(scheduleId == null || flowId == null)
- {
- send_alert(`清重新进入本页面!<a href='denglu.html'> 返回主页 </a>`);
- return;
- }
- this.flowPlace = " % flowPlace %";
- this.flowName = " % flowPlace %";
- this.scheduleLoadDataService = new DataObjectService("fcWorkScheduleLoad", ONDEMAND /*AUTO & FAST*/, "?scheduleId=" + scheduleId);
- this.oaStaffService = new DataObjectService("fcWorkScheduleLoad", ONDEMAND, "");
- this.sectorService = new DataObjectService("fcWorkScheduleLoad", ONDEMAND, "");
- this.flowService = new DataObjectService("fcFlow", ONDEMAND, "");
- this.MeduimData = new (function () {
- this.initializeUsers = function(list){
- list.forEach(function (val, it, arr) {
- var isExist = false;
- userIDs.forEach(function (vals) {
- if (vals == val.userId) {
- isExist = true;
- }
- });
- if (!isExist) userIDs.push(val.userId);
- });
- };
- })();
- this.initPage = function() {
- setInterval(RedRankTablePlugin.tick, 1000);
- };
- this.Action = new (function (parent) {
- this.parent = parent;
- this.doStopSchedule = function () {
- get_data("fcWorkSchedule/stopSchedule?userId=" + userId + "&scheduleId=" + scheduleId, this.parent.UI.showStopSuccess, this.parent);
- };
- this.confirmStopSchedule = function () {
- var out = confirm("真的要下班吗?");
- if (out == true) {
- this.doStopSchedule();
- } else {
- }
- };
- })(this);
- this.UI = new (function (parent) {
- this.p = parent;
- this.showClearPanel = function () {
- $("#clearModal").modal('show');
- };
- this.showStopSuccess = function (obj, sta, scope) {
- send_alert("下班操作成功! <a href='denglu.html'> 点击这里返回控制主页 </a>");
- };
- this.bind = function () {
- $(".confirm-clear-data").click(function(){
- FlowRealTime.ClearDataControl.clearDataOfDeviceId($('#handInput').val());
- });
- $(".open-clear-panel").click(function () {
- FlowRealTime.UI.showClearPanel();
- })
- $(".close-schedule").click(function () {
- FlowRealTime.Action.confirmStopSchedule();
- })
- }
- })(this);
- var ClearDataControl = new (function (parent) {
- this.p = parent;
- this.finished = true;
- this.executed = false;
- this.directCount = -1;
- this.clearDataOfDeviceId = function (handId) {
- this.executed = false;
- this.directCount = -1;
- this.finished = true;
- var hand = handId;
- var hd = 0;
- if (hand.length > 0) {
- hd = parseInt(hand);
- }
- get_data("endpoint/clearBoard?flowId=" + flowId + "&handheldId=" + hd, this.clearSuccess);
- };
- this.clearSuccess = function (obj, sta) {
- console.warn("------- 手持设备清空 ----------");
- console.warn(obj);
- send_alert("发送清空请求成功, 正在等待采集端进行处理...");
- this.finished = false;
- setTimeout(this.resultVerifyTimeout, 8000, this);
- setTimeout(this.getVerify, 300, this);
- }
- this.getVerify = function (obj) {
- if (obj.finished) return;
- get_data("endpoint/heartbeat?flowId=" + flowId, obj.onVerifyResult);
- setTimeout(obj.getVerify, 100, obj);
- };
- this.onVerifyResult = function (obj, sta) {
- var parsed = {};
- if (typeof(obj) === "string") {
- parsed = JSON.parse(obj);
- } else {
- parsed = obj;
- }
- if (typeof(parsed) === "object") {
- if (parsed.ret === "10000") {
- //ok
- if (parsed.model == null || parsed.model === undefined) {
- executed = true;
- finished = true;
- } else if (typeof(obj.model) === "object") {
- // 没有拿到,继续
- if (obj.model.list != null && obj.model.list.length > 0) {
- var direct = obj.model.list[0];
- if (direct.eventType + "" !== "500") {
- // OK
- executed = true;
- finished = true;
- } else if (direct.arg2 + "" !== "" + $("#handInput").val()) {
- // OK
- executed = true;
- finished = true;
- } else {
- directCount = direct.counter;
- }
- }
- }
- }
- }
- }
- this.resultVerifyTimeout = function (obj) {
- finished = true;
- if (executed) {
- // 执行成功
- } else {
- if (directCount >= 0) {
- get_data("endpoint/ack?counter=" + directCount, function () {
- console.log("撤销操作成功");
- console.log(this);
- });
- directCount = -1;
- send_alert("请求已经超时!请注意,采集端可能没有执行成功。即将撤销您的请求。");
- } else {
- send_alert("请求已经超时!请注意,采集端可能没有执行成功。");
- }
- }
- }
- })(this);
- })();
- $(document).ready(function(){
- FlowRealTime.initPage();
- FlowRealTime.UI.bind();
- });
- </script>
- </body>
- </html>
|