bottom1.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <div id="bottom1">
  3. <div class="bg-color-black">
  4. <div class="d-flex pt-2 pl-2">
  5. <span>
  6. <icon name="chart-line" class="text-icon"></icon>
  7. </span>
  8. <div class="d-flex">
  9. <span class="fs-xl text mx-2">产出数量</span>
  10. </div>
  11. </div>
  12. <div class="d-flex jc-center body-box">
  13. <dv-scroll-board class="dv-scr-board" :config="config" ref="scroll-board" />
  14. </div>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. config: {
  23. header: [ '<span style="color:#dad052;font-weight:bold;font-size:17px;">产线',
  24. '<span style="color:#dad052;font-weight:bold;font-size:17px;">产品编码',
  25. '<span style="color:#dad052;font-weight:bold;font-size:17px;">产品描述',
  26. '<span style="color:#dad052;font-weight:bold;font-size:17px;">当前工单',
  27. '<span style="color:#dad052;font-weight:bold;font-size:17px;">面别',
  28. '<span style="color:#dad052;font-weight:bold;font-size:17px;">当前进度',
  29. '<span style="color:#dad052;font-weight:bold;font-size:17px;">完工率',
  30. '<span style="color:#dad052;font-weight:bold;font-size:17px;">节拍时间',
  31. '<span style="color:#dad052;font-weight:bold;font-size:17px;">开始生产时间',
  32. '<span style="color:#dad052;font-weight:bold;font-size:17px;">预计完成时间',
  33. '<span style="color:#dad052;font-weight:bold;font-size:17px;">抛料PPM'],
  34. data: [
  35. ],
  36. headerHeight: 35,
  37. headerBGC: '#0f1325', //表头
  38. oddRowBGC: '#0f1325', //奇数行
  39. evenRowBGC: '#171c33', //偶数行
  40. //index: true,
  41. rowNum:7,
  42. columnWidth: [120,180,350,180,100,140,130,100,220,220,120],
  43. align: ['center']
  44. }
  45. }
  46. },
  47. mounted() {
  48. this.refreshdata()
  49. },
  50. methods: {
  51. refreshdata() {
  52. this.getdata(); //获取-数据
  53. setInterval(() => {
  54. this.getdata(); //获取--数据
  55. }, 30000);
  56. },
  57. async getdata() {
  58. await this.$http.get("kanban/datalist.action?caller=KB!SMT!BUTTOM1&_noc=1&page=1&pageSize=100&condition=1=1")
  59. .then((result)=>{
  60. let dataList = JSON.parse(result.data.data);
  61. let resultList = new Array();
  62. for (let index = 0; index < dataList.length; index++) {
  63. const element = dataList[index];
  64. let item = new Array();
  65. item.push(element.v_linecode);
  66. item.push(element.v_prcode);
  67. item.push(element.v_prdetail);
  68. item.push(element.v_macode);
  69. item.push(element.v_ab);
  70. item.push(element.v_jd);
  71. item.push(element.v_finishrate);
  72. item.push(element.v_jptime);
  73. item.push(element.v_actbegintime);
  74. item.push(element.v_planenddate);
  75. item.push(element.v_plppm);
  76. //item.push("<span class='colorGrass'>"+element.value+"</span>");
  77. resultList.push(item);
  78. }
  79. const scrollBoard = this.$refs['scroll-board'];
  80. //刷新数据
  81. scrollBoard.updateRows(resultList);
  82. },(result)=>{
  83. console.error(result)
  84. }
  85. );
  86. }
  87. }
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. $box-height: 410px;
  92. $box-width: 100%;
  93. #bottom1 {
  94. padding: 16px;
  95. padding-top: 20px;
  96. height: $box-height;
  97. width: $box-width;
  98. border-radius: 5px;
  99. .bg-color-black {
  100. height: $box-height - 30px;
  101. border-radius: 10px;
  102. }
  103. .text {
  104. color: #c3cbde;
  105. // font-size: 15px;
  106. }
  107. .body-box {
  108. border-radius: 10px;
  109. overflow: hidden;
  110. .dv-scr-board {
  111. width: 100%;
  112. height: 340px;
  113. }
  114. }
  115. }
  116. </style>