123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=0.5">
- <title>制造管理看板</title>
- <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
- <link href="/css/dashboard.css" rel="stylesheet" />
- <script type="text/javascript" src="/js/service.js"></script>
- <script type="text/javascript" src="/js/session.js"></script>
- <script type="text/javascript" src="/js/service/method-get-service.js"></script>
- <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
- <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
- </head>
- <body id="container" class="container-fluid">
- <div class="row no-padding head-bar" style="height:81px">
- <div class="col-lg-1 col-md-1">
- </div>
- <div class="col-lg-4 col-md-4 page-title">
- 制造管理看板
- </div>
- <div class="col-lg-3 col-md-3 block-padding">
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
- </div>
- <div class="col-lg-4 col-md-4">
- </div>
- </div>
- <div class="my-container" id="div-main">
- <div class="row">
- <div class="col-lg-3 col-md-3">
- <!--生产计划达成率-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">生产计划达成率</div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12" style="height:290px" id="charts_11"></div>
- </div>
- <!--月工时分布情况-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">月工时分布情况</div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12" style="height:290px" id="charts_12"></div>
- </div>
- <!--月质量异常分类 -->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">月生产异常分类</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:290px" id="charts_13"></div>
- </div>
- </div>
- <div class="col-lg-6 col-md-6">
- <!--月生产计划-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">月生产计划</div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-1 col-md-1 center no-padding">工单号</div>
- <div class="col-lg-2 col-md-2 center no-padding">项目名</div>
- <div class="col-lg-1 col-md-1 center no-padding">料号</div>
- <div class="col-lg-2 col-md-2 center no-padding">型号规格</div>
- <div class="col-lg-2 col-md-2 center no-padding">名称</div>
- <div class="col-lg-1 col-md-1 center no-padding">计划数量</div>
- <div class="col-lg-1 col-md-1 center no-padding">工时</div>
- <div class="col-lg-2 col-md-2 center no-padding">完成进度(已/未)</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height: 380px;">
- <div class="row" v-for="product in mouthProduceTaskList">
- <div class="col-lg-1 col-md-1 center no-padding">{{product.orderSheetCode}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{product.projectName}}</div>
- <div class="col-lg-1 col-md-1 center no-padding">{{product.materialCode}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{product.materialName}}</div>
- <div class="col-lg-1 col-md-1 center no-padding">{{product.planSum}}</div>
- <div class="col-lg-1 col-md-1 center no-padding">{{product.workHour}}</div>
- <div class="col-lg-2 col-md-2 center no-padding progress">
- <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:product.completePercent}">
- {{product.completeSum}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:product.incompletePercent}">
- {{product.incompleteSum}}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-6 col-md-6">
- <div class="row">
- <div class="col-lg-12 col-md-12 center block-title">人员出勤率</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:250px" id="charts_21"></div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 center block-title">当月产品良率</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:250px" id="charts_22"></div>
- </div>
- </div>
- <div class="col-lg-6 col-md-6">
- <div class="row">
- <div class="col-lg-12 col-md-12 center block-title">月制程质量异常</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:250px" id="charts_23"></div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 center block-title">周成品入库数量</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:250px" id="charts_24"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-3">
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">生产效率</div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12" style="height:260px" id="charts_31"></div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">标准工时与实际工时对比</div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12" style="height:280px" id="charts_32"></div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">月度项目发货统计</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:280px" id="charts_33"></div>
- </div>
- </div>
- </div>
- </div>
- <!-- jQuery -->
- <script src="/lib/jquery.min.js"></script>
- <script src="/lib/vue.min.js"></script>
- <script src="/lib/echarts/echarts.min.js"></script>
- <script src="/lib/echarts/theme/macarons.js"></script>
- <script src="/js/service/material.js?_v=1"></script>
- <script src="/js/service/product.js?_v=1"></script>
- <script src="/js/service/person.js?_v=1"></script>
- <script src="/js/service/produce-task.js?_v=1"></script>
- <script src="/js/service/workhour.js?_v=1"></script>
- <script src="/js/content/mycharts.js?_v=1"></script>
- <script type="text/javascript">
- var vm = new Vue({
- el: '#div-main',
- data: {
- mouthProduceTaskList: [],
- cacheDataObject: {}, // 从服务器加载的全数据,界面只取某几条
- timer_long: '', // 定时取服务器数据
- timer_short: '' // 数据超长定时轮播
- },
- methods: {
- // 从服务器加载数据并显示
- refreshData: function () {
- // 关闭定时器
- clearInterval(this.timer_short);
- // 刷新报表
- ChartsService.initCommonPie("charts_11", ServiceProduceTask.getCompleteInfo(), [ '#ff9f7f', '#37a2da']);
- ChartsService.initCommonPie("charts_12", ServiceWorkhour.getByMaterial());
- ChartsService.initBarWithShade("charts_13", ServiceProduct
- .getQualityExceptionByCategory(), ChartsService.getGridSpanSmall());
- ChartsService.initBarWithTwoNumberRate("charts_21", ServicePerson.getMonthAttendance(),
- ChartsService.getGridSpanSmall());
- ChartsService.initBarWithTwoNumberRate("charts_22", ServiceProduct.getMonthGood(),
- ChartsService.getGridSpanSmall());
- ChartsService.initBarWithShade("charts_23", ServiceProduct
- .getMonthExceptionByCategory(), ChartsService.getGridSpanSmall());
- ChartsService.initBarWithShade("charts_24", ServiceProduct.getWeekInByCategory(),
- ChartsService.getGridSpanSmall());
- ChartsService.initCommonPanel("charts_31", ServiceProduct.getProduceRate());
- ChartsService.initBarAndLine("charts_32", ServiceWorkhour.getStandAndRealByMaterial());
- ChartsService.initBarWithShade("charts_33", ServiceProduct.getMonthSendByProject());
- this.loadData();
- // 开启定时器
- this.timer_short = setInterval(this.scrollData, 5000);
- },
- // 轮播数据
- scrollData: function () {
- for (var key in this.cacheDataObject) {
- const dataList = this.cacheDataObject[key].data;
- const pagesize = this.cacheDataObject[key].pagesize;
- var pageindex = this.cacheDataObject[key].pageindex + 1;
- if (dataList.length > pagesize) {
- const pagesum = (dataList.length / pagesize).toFixed(0) * 1 + (dataList.length %
- pagesize > 0 ? 1 : 0);
- if (pageindex >= pagesum)
- pageindex = 0;
- this.cacheDataObject[key].pageindex = pageindex;
- const startIndex = pageindex * pagesize;
- const remainSum = dataList.length - startIndex;
- const recordSum = remainSum >= pagesize ? pagesize : remainSum;
- this[key] = dataList.slice(startIndex, startIndex + pagesize);
- }
- }
- },
- // 从服务器加载数据
- loadData: function () {
- this.cacheDataObject = {};
- // 月度生产计划
- const mouthProduceTaskList = ServiceProduceTask.getMonthList();
- this.cacheDataObject.mouthProduceTaskList = {
- data: mouthProduceTaskList,
- pagesize: 10,
- pageindex: 0
- }
- this.mouthProduceTaskList = mouthProduceTaskList.slice(0, this.cacheDataObject
- .mouthProduceTaskList.pagesize);
- }
- },
- mounted() {
- this.timer_long = setInterval(this.refreshData, 60000);
- this.refreshData();
- },
- beforeDestroy() {
- clearInterval(this.timer_long);
- clearInterval(this.timer_short);
- }
- });
- </script>
- </body>
- </html>
|