view.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <div class="app-container">
  3. <el-card class="box-card">
  4. <div class="title">
  5. <span>正生产铜管数量:</span>
  6. <span style="margin-left: 5px;font-size: 16px;color: #f62e2e">{{ allList.length }}</span>
  7. <span v-show="processNum>0" style="margin-left: 40px">当前工艺铜管加工数:</span>
  8. <span v-show="processNum>0" style="margin-left: 5px;font-size: 16px;color: #f62e2e">{{ processNum }}</span>
  9. <span v-show="activeName=='finish'" style="margin-left: 40px">已完成铜管加工数:</span>
  10. <span v-show="activeName=='finish'" style="margin-left: 5px;font-size: 16px;color: #f62e2e">{{ completeProductionList.length }}</span>
  11. </div>
  12. <div>
  13. <el-tabs :value="activeName" @tab-click="tabClick" :stretch="true">
  14. <el-tab-pane label="生产中" name="all">
  15. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="allList"/>
  16. </el-tab-pane>
  17. <el-tab-pane label="倒角工序" name="daoJiao">
  18. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="DaojiaoList"/>
  19. </el-tab-pane>
  20. <el-tab-pane label="铣面工序" name="xiMian">
  21. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="xiMianList"/>
  22. </el-tab-pane>
  23. <el-tab-pane label="轧制工序" name="zhaZhi">
  24. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="zhaZhiList"/>
  25. </el-tab-pane>
  26. <el-tab-pane label="大散盘工序" name="daSanPan">
  27. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="daSanPanList"/>
  28. </el-tab-pane>
  29. <el-tab-pane label="退火工序" name="tuiHuo">
  30. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="tuiHuoList"/>
  31. </el-tab-pane>
  32. <el-tab-pane label="完成生产" name="finish">
  33. <process-table :loading="showTable" @queryTable="getList" :retroactive-list="completeProductionList"/>
  34. </el-tab-pane>
  35. </el-tabs>
  36. </div>
  37. </el-card>
  38. </div>
  39. </template>
  40. <script>
  41. import ProcessTable from "@/layout/components/processTableView/index.vue";
  42. import {getRetroactiveHistorys, getRetroactiveNowList} from "@/api/trace/process";
  43. export default {
  44. name: "view",
  45. components: {ProcessTable},
  46. data() {
  47. return {
  48. activeName: "all",
  49. allList: [],
  50. DaojiaoList: [],
  51. xiMianList: [],
  52. zhaZhiList: [],
  53. daSanPanList: [],
  54. tuiHuoList: [],
  55. completeProductionList: [],
  56. processNum: 0,
  57. queryParams: {
  58. pageNum: 1,
  59. pageSize: 1000,
  60. },
  61. showTable: true,
  62. tabName:null,
  63. }
  64. },
  65. methods: {
  66. getList(){
  67. this.tabClick({name:this.tabName},null)
  68. },
  69. tabClick(tab, event) {
  70. this.tabName = tab.name;
  71. this.showTable = true
  72. if (tab.name == "all") {
  73. getRetroactiveNowList(this.queryParams).then(response => {
  74. this.allList = response.rows
  75. this.showTable = false
  76. })
  77. }
  78. if (tab.name == "daoJiao") {
  79. let params = {...this.queryParams, inStatus: "1,2"}
  80. getRetroactiveNowList(params).then(response => {
  81. this.DaojiaoList = response.rows
  82. this.showTable = false
  83. this.processNum = response.total
  84. })
  85. }
  86. if (tab.name == "xiMian") {
  87. let params = {...this.queryParams, inStatus: "3"}
  88. getRetroactiveNowList(params).then(response => {
  89. this.xiMianList = response.rows
  90. this.showTable = false
  91. this.processNum = response.total
  92. })
  93. }
  94. if (tab.name == "zhaZhi") {
  95. let params = {...this.queryParams, inStatus: "4"}
  96. getRetroactiveNowList(params).then(response => {
  97. this.zhaZhiList = response.rows
  98. this.showTable = false
  99. this.processNum = response.total
  100. })
  101. }
  102. if (tab.name == "daSanPan") {
  103. let params = {...this.queryParams, inStatus: "5"}
  104. getRetroactiveNowList(params).then(response => {
  105. this.daSanPanList = response.rows
  106. this.showTable = false
  107. this.processNum = response.total
  108. })
  109. }
  110. if (tab.name == "tuiHuo") {
  111. let params = {...this.queryParams, inStatus: "6"}
  112. getRetroactiveNowList(params).then(response => {
  113. this.tuiHuoList = response.rows
  114. this.showTable = false
  115. this.processNum = response.total
  116. })
  117. }
  118. if (tab.name == "finish") {
  119. getRetroactiveHistorys({status: 7}).then(response => {
  120. this.completeProductionList = response
  121. this.showTable = false
  122. this.processNum =0
  123. })
  124. }
  125. this.activeName = tab.name
  126. }
  127. },
  128. mounted() {
  129. getRetroactiveNowList(this.queryParams).then(response => {
  130. this.allList = response.rows
  131. this.showTable = false
  132. })
  133. }
  134. }
  135. </script>
  136. <style scoped lang="scss">
  137. .title {
  138. font-size: 16px;
  139. height: 40px;
  140. }
  141. ::v-deep .el-tabs__content {
  142. overflow: visible;
  143. }
  144. ::v-deep .el-tabs__item {
  145. color: #636469;
  146. }
  147. ::v-deep .el-tabs__item.is-active {
  148. color: #15cbf3;
  149. }
  150. ::v-deep .el-icon-arrow-left {
  151. color: white;
  152. }
  153. ::v-deep .el-icon-arrow-right {
  154. color: white;
  155. }
  156. ::v-deep .el-tabs__nav-wrap::after {
  157. height: 0;
  158. }
  159. ::v-deep .el-tabs__active-bar {
  160. background-color: #15cbf3;
  161. }
  162. </style>