reportcheckorderlist.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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: 'reportcheckorderlist',
  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: 160,
  78. html: true,
  79. formatter: (val) => {
  80. if (val.rtuName) {
  81. return '<b>' + val.rtuName + '</b>' + '<b>【' + val.rtuCode + '】</b>'
  82. } else {
  83. return '<b>' + val.rtuCode + '</b>'
  84. }
  85. }
  86. },
  87. {
  88. label: "测站名称",
  89. prop: "rtuName",
  90. span: 24,
  91. search: true,
  92. hide: true,
  93. },
  94. {
  95. label: "行政区",
  96. prop: "areaName",
  97. span: 12,
  98. editDisplay: false,
  99. addDisplay: false,
  100. },
  101. {
  102. label: "运维单位",
  103. prop: "manageCompany",
  104. span: 12,
  105. },
  106. {
  107. label: "维修填报时间",
  108. prop: "orderProcessTime",
  109. span: 24,
  110. width: 150
  111. },
  112. {
  113. label: "维修时长",
  114. prop: "taskProcessDuration",
  115. span: 24,
  116. width: 150
  117. },
  118. ],
  119. },
  120. data: [],
  121. };
  122. },
  123. prop: {
  124. },
  125. computed: {
  126. ...mapGetters(["userInfo", "permission"]),
  127. permissionList() {
  128. return {
  129. closeBtn: this.vaildData(this.permission.order_close, false),
  130. changeBtn: this.vaildData(this.permission.order_change, false),
  131. };
  132. },
  133. },
  134. created() {
  135. },
  136. methods: {
  137. init() {
  138. this.onLoad(this.page);
  139. },
  140. searchReset() {
  141. this.query = {};
  142. this.page.currentPage = 1;
  143. this.onLoad(this.page);
  144. },
  145. searchChange(params, done) {
  146. this.query = params;
  147. this.page.currentPage = 1;
  148. this.onLoad(this.page, params);
  149. done();
  150. },
  151. selectionChange(list) {
  152. this.selectionList = list;
  153. },
  154. selectionClear() {
  155. this.selectionList = [];
  156. //this.$refs.crud.toggleSelection();
  157. },
  158. beforeOpen(done, type) {
  159. if (["edit", "view"].includes(type)) {
  160. getDetail(this.form.id).then((res) => {
  161. this.form = res.data.data;
  162. });
  163. }
  164. done();
  165. },
  166. currentChange(currentPage) {
  167. this.page.currentPage = currentPage;
  168. },
  169. sizeChange(pageSize) {
  170. this.page.pageSize = pageSize;
  171. },
  172. refreshChange() {
  173. var params = {};
  174. this.onLoad(this.page, params);
  175. },
  176. onLoad(page, params = {}) {
  177. this.loading = true;
  178. params['orderConfirm'] = 1;
  179. params['orderClose'] = 0;
  180. params['orderReportStatus'] = 1;
  181. getPage(
  182. page.currentPage,
  183. page.pageSize,
  184. Object.assign(params, this.query)
  185. ).then((res) => {
  186. const data = res.data.data;
  187. this.page.total = data.total;
  188. this.data = data.records;
  189. this.loading = false;
  190. this.selectionClear();
  191. });
  192. },
  193. },
  194. };
  195. </script>
  196. <style lang="scss" scoped>
  197. .line {
  198. display: flex;
  199. flex-direction: row;
  200. justify-content: flex-start;
  201. }
  202. .line .lineText {
  203. margin-left: 10px;
  204. margin-right: 0px;
  205. display: flex;
  206. flex-direction: column;
  207. justify-content: center;
  208. }
  209. .line .lineText .orderCount {
  210. color: green;
  211. font-size: 0.8rem;
  212. }
  213. .line .lineText .spliteLine {
  214. color: gray;
  215. font-size: 0.8rem;
  216. }
  217. .line .lineText .orderUnconfirm {
  218. color: lightcoral;
  219. font-size: 0.8rem;
  220. }
  221. .line .lineText .orderProcessing {
  222. color: dodgerblue;
  223. font-size: 0.8rem;
  224. }
  225. </style>