processingcheckorderlist.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <!--
  2. * @Title:
  3. * @Description: 维修中任务列表
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <div>
  11. <el-row>
  12. <el-col :span="24">
  13. <basic-container>
  14. <avue-crud :option="option" :table-loading="loading" :page.sync="page" :data="data" ref="crud"
  15. v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate"
  16. @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
  17. @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
  18. @refresh-change="refreshChange" @on-load="onLoad">
  19. </avue-crud>
  20. </basic-container>
  21. </el-col>
  22. </el-row>
  23. </div>
  24. </template>
  25. <script>
  26. import {
  27. getPage,
  28. getDetail,
  29. } from "@/api/business/order/order.js";
  30. import { mapGetters } from "vuex";
  31. export default {
  32. components: {
  33. },
  34. name: 'processingcheckorderlist',
  35. data() {
  36. return {
  37. dialogTitle: "维修中任务",
  38. id: "",
  39. form: {},
  40. selectionList: [],
  41. query: {},
  42. loading: true,
  43. page: {
  44. pageSize: 10,
  45. currentPage: 1,
  46. total: 0,
  47. },
  48. option: {
  49. labelWidth: 120,
  50. viewLabelWidth: 100,
  51. searchlabelWidth: 100,
  52. height: "auto",
  53. calcHeight: 80,
  54. align: "center",
  55. headerAlign: "center",
  56. tip: false,
  57. simplePage: true,
  58. searchShow: true,
  59. searchMenuSpan: 6,
  60. addBtn: false,
  61. tree: true,
  62. border: true,
  63. index: true,
  64. editBtn: false,
  65. delBtn: false,
  66. menuWidth: 200,
  67. dialogType: "drawer",
  68. dialogClickModal: false,
  69. columnBtn: false,
  70. menu: false,
  71. column: [
  72. {
  73. label: "测站编码",
  74. prop: "rtuCode",
  75. span: 24,
  76. search: true,
  77. width: 120,
  78. },
  79. {
  80. label: "测站名称",
  81. prop: "rtuName",
  82. span: 24,
  83. search: true,
  84. },
  85. {
  86. label: "行政区",
  87. prop: "areaName",
  88. span: 12,
  89. editDisplay: false,
  90. addDisplay: false,
  91. },
  92. {
  93. label: "运维单位",
  94. prop: "manageCompany",
  95. span: 12,
  96. },
  97. {
  98. label: "任务确认时间",
  99. prop: "orderConfirmTime",
  100. span: 24,
  101. },
  102. {
  103. label: "维修时长",
  104. prop: "taskProcessDuration",
  105. span: 24,
  106. },
  107. ],
  108. },
  109. data: [],
  110. };
  111. },
  112. prop: {
  113. },
  114. computed: {
  115. ...mapGetters(["userInfo", "permission"]),
  116. permissionList() {
  117. return {
  118. closeBtn: this.vaildData(this.permission.order_close, false),
  119. changeBtn: this.vaildData(this.permission.order_change, false),
  120. };
  121. },
  122. },
  123. created() {
  124. },
  125. methods: {
  126. init() {
  127. this.onLoad(this.page);
  128. },
  129. searchReset() {
  130. this.query = {};
  131. this.page.currentPage = 1;
  132. this.onLoad(this.page);
  133. },
  134. searchChange(params, done) {
  135. this.query = params;
  136. this.page.currentPage = 1;
  137. this.onLoad(this.page, params);
  138. done();
  139. },
  140. selectionChange(list) {
  141. this.selectionList = list;
  142. },
  143. selectionClear() {
  144. this.selectionList = [];
  145. //this.$refs.crud.toggleSelection();
  146. },
  147. beforeOpen(done, type) {
  148. if (["edit", "view"].includes(type)) {
  149. getDetail(this.form.id).then((res) => {
  150. this.form = res.data.data;
  151. });
  152. }
  153. done();
  154. },
  155. currentChange(currentPage) {
  156. this.page.currentPage = currentPage;
  157. },
  158. sizeChange(pageSize) {
  159. this.page.pageSize = pageSize;
  160. },
  161. refreshChange() {
  162. var params = {};
  163. this.onLoad(this.page, params);
  164. },
  165. onLoad(page, params = {}) {
  166. this.loading = true;
  167. params['orderConfirm'] = 1;
  168. params['orderClose'] = 0;
  169. getPage(
  170. page.currentPage,
  171. page.pageSize,
  172. Object.assign(params, this.query)
  173. ).then((res) => {
  174. const data = res.data.data;
  175. this.page.total = data.total;
  176. this.data = data.records;
  177. this.loading = false;
  178. this.selectionClear();
  179. });
  180. },
  181. },
  182. };
  183. </script>
  184. <style lang="scss" scoped>
  185. .line {
  186. display: flex;
  187. flex-direction: row;
  188. justify-content: flex-start;
  189. }
  190. .line .lineText {
  191. margin-left: 10px;
  192. margin-right: 0px;
  193. display: flex;
  194. flex-direction: column;
  195. justify-content: center;
  196. }
  197. .line .lineText .orderCount {
  198. color: green;
  199. font-size: 0.8rem;
  200. }
  201. .line .lineText .spliteLine {
  202. color: gray;
  203. font-size: 0.8rem;
  204. }
  205. .line .lineText .orderUnconfirm {
  206. color: lightcoral;
  207. font-size: 0.8rem;
  208. }
  209. .line .lineText .orderProcessing {
  210. color: dodgerblue;
  211. font-size: 0.8rem;
  212. }
  213. </style>