bottom1Old.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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",{
  59. params: {
  60. condition: "1=1",
  61. }
  62. }).then((result)=>{
  63. let dataList = JSON.parse(result.data.data);
  64. let resultList = new Array();
  65. for (let index = 0; index < dataList.length; index++) {
  66. const element = dataList[index];
  67. let item = new Array();
  68. item.push(element.v_linecode);
  69. item.push(element.v_prcode);
  70. item.push(element.v_prdetail);
  71. item.push(element.v_macode);
  72. item.push(element.v_ab);
  73. item.push(element.v_jd);
  74. item.push(element.v_finishrate);
  75. item.push(element.v_jptime);
  76. item.push(element.v_actbegintime);
  77. item.push(element.v_planenddate);
  78. item.push(element.v_plppm);
  79. //item.push("<span class='colorGrass'>"+element.value+"</span>");
  80. resultList.push(item);
  81. }
  82. const scrollBoard = this.$refs['scroll-board'];
  83. //刷新数据
  84. scrollBoard.updateRows(resultList);
  85. },(result)=>{
  86. console.error(result)
  87. }
  88. );
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. $box-height: 410px;
  95. $box-width: 100%;
  96. #bottom1 {
  97. padding: 16px;
  98. padding-top: 20px;
  99. height: $box-height;
  100. width: $box-width;
  101. border-radius: 5px;
  102. .bg-color-black {
  103. height: $box-height - 30px;
  104. border-radius: 10px;
  105. }
  106. .text {
  107. color: #c3cbde;
  108. // font-size: 15px;
  109. }
  110. .body-box {
  111. border-radius: 10px;
  112. overflow: hidden;
  113. .dv-scr-board {
  114. width: 100%;
  115. height: 340px;
  116. }
  117. }
  118. }
  119. </style>