index1.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. const herfurl = window.location.href.split('index')[0] //跳转地址
  2. let app = new Vue({
  3. el: '#app',
  4. data() {
  5. return {
  6. time: '',
  7. timeout: 15000, // 一分钟发一次心跳
  8. pageindex: 0,
  9. planCompletionRate:0,
  10. productionGoodProductRate:0,
  11. dataCount:0,
  12. comprehensive: [],
  13. dataList: [],
  14. shortageConfig: [{
  15. name:'张三',
  16. code:'SCGD202409060001',
  17. product:'DM(90*96*12)',
  18. number:'-',
  19. date:'-',
  20. datetime:'2024-09-06 17:06:58'
  21. },{
  22. name:'张三',
  23. code:'SCGD202409060001',
  24. product:'DM(90*96*12)',
  25. number:'-',
  26. date:'-',
  27. datetime:'2024-09-06 17:06:58'
  28. },{
  29. name:'张三',
  30. code:'SCGD202409060001',
  31. product:'DM(90*96*12)',
  32. number:'-',
  33. date:'-',
  34. datetime:'2024-09-06 17:06:58'
  35. },{
  36. name:'张三',
  37. code:'SCGD202409060001',
  38. product:'DM(90*96*12)',
  39. number:'-',
  40. date:'-',
  41. datetime:'2024-09-06 17:06:58'
  42. },{
  43. name:'张三',
  44. code:'SCGD202409060001',
  45. product:'DM(90*96*12)',
  46. number:'-',
  47. date:'-',
  48. datetime:'2024-09-06 17:06:58'
  49. },{
  50. name:'张三',
  51. code:'SCGD202409060001',
  52. product:'DM(90*96*12)',
  53. number:'-',
  54. date:'-',
  55. datetime:'2024-09-06 17:06:58'
  56. },{
  57. name:'张三',
  58. code:'SCGD202409060001',
  59. product:'DM(90*96*12)',
  60. number:'-',
  61. date:'-',
  62. datetime:'2024-09-06 17:06:58'
  63. },{
  64. name:'张三',
  65. code:'SCGD202409060001',
  66. product:'DM(90*96*12)',
  67. number:'-',
  68. date:'-',
  69. datetime:'2024-09-06 17:06:58'
  70. },{
  71. name:'张三',
  72. code:'SCGD202409060001',
  73. product:'DM(90*96*12)',
  74. number:'-',
  75. date:'-',
  76. datetime:'2024-09-06 17:06:58'
  77. },{
  78. name:'张三',
  79. code:'SCGD202409060001',
  80. product:'DM(90*96*12)',
  81. number:'-',
  82. date:'-',
  83. datetime:'2024-09-06 17:06:58'
  84. }]
  85. }
  86. },
  87. mounted() {
  88. setTimeout(() => {
  89. this.handleTime()
  90. let token = getQueryVariable('token')
  91. //顶部统计信息
  92. get('/mbwb/api/v1/erpscs/productionScreen/getTopStatistics',{},{
  93. Authorization:token +'='
  94. }).then(res => {
  95. this.planCompletionRate = res.info.planCompletionRate
  96. this.productionGoodProductRate = res.info.productionGoodProductRate
  97. })
  98. //领料库存情况
  99. get('/mbwb/api/v1/erpscs/productionScreen/getNeedMaterialStock',{},{
  100. Authorization:token +'='
  101. }).then(res => {
  102. this.comprehensive = res.infos
  103. })
  104. //生产排产情况
  105. get('/mbwb/api/v1/erpscs/productionScreen/getProductionScheduleInfo',{},{
  106. Authorization:token +'='
  107. }).then(res => {
  108. this.dataList = res.infos
  109. this.dataCount = res.totalCount
  110. })
  111. //获取报工情况
  112. get('/mbwb/api/v1/erpscs/productionScreen/getWorkReportInfo',{},{
  113. Authorization:token +'='
  114. }).then(res => {
  115. })
  116. }, 0)
  117. },
  118. methods: {
  119. handleTime() {
  120. setInterval(() => {
  121. this.time = dayjs().format('YYYY-MM-DD HH:mm:ss')
  122. }, 1000)
  123. },
  124. },
  125. })