processAlarmInfoQuery.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <div class="container">
  3. <fullscreen :fullscreen.sync="fullscreen" class="container-box">
  4. <div class="titbox">
  5. <h2 class="font-ui">超时工单预警列表</h2>
  6. <div>
  7. <i class="el-icon-refresh" @click="iconCli(1)"></i>
  8. <i class="el-icon-full-screen" @click="iconCli(2)"></i>
  9. <!-- <i class="el-icon-folder-opened"></i>-->
  10. <!-- <i class="el-icon-view"></i>-->
  11. <!-- <i class="el-icon-more"></i>-->
  12. </div>
  13. </div>
  14. <div class="search">
  15. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  16. </div>
  17. <div class="tabbox">
  18. <el-table
  19. height="calc(100% - 40px)"
  20. v-loading="loading"
  21. class="com-table"
  22. ref="multipleTable"
  23. :data="tableData"
  24. tooltip-effect="dark"
  25. size="small"
  26. border
  27. style="width: 100%"
  28. >
  29. <el-table-column
  30. align="center"
  31. prop="processWOID"
  32. label="工单编号"
  33. show-overflow-tooltip
  34. >
  35. </el-table-column>
  36. <el-table-column
  37. align="center"
  38. prop="alarmInfoId"
  39. show-overflow-tooltip
  40. label="告警信息编号"
  41. >
  42. </el-table-column>
  43. <el-table-column
  44. prop="alarmType"
  45. label="告警类型"
  46. align="center"
  47. show-overflow-tooltip
  48. ></el-table-column>
  49. <el-table-column align="center" prop="description" label="告警内容">
  50. </el-table-column>
  51. <el-table-column
  52. width="150"
  53. align="center"
  54. prop="alarmTime"
  55. label="告警时间"
  56. >
  57. </el-table-column>
  58. <el-table-column align="center" prop="alarmStatus" label="告警状态">
  59. </el-table-column>
  60. </el-table>
  61. <el-pagination
  62. class="pageBox"
  63. @current-change="currchange"
  64. layout="prev, pager, next"
  65. background
  66. :total="total"
  67. >
  68. </el-pagination>
  69. </div>
  70. </fullscreen>
  71. </div>
  72. </template>
  73. <script>
  74. import mySearch from "../../../components/search";
  75. export default {
  76. components: {
  77. mySearch,
  78. },
  79. data() {
  80. return {
  81. fullscreen: false,
  82. total: 0,
  83. pageSize: 1,
  84. tableData: [],
  85. searchList: [
  86. {
  87. type: "input",
  88. tit: "CRM订单号",
  89. value: "",
  90. width: "100%",
  91. options: [],
  92. },
  93. ],
  94. params: {
  95. crmProcessWOID: "1",
  96. },
  97. loading: false,
  98. };
  99. },
  100. methods: {
  101. //搜索数据
  102. searchInfo(v) {
  103. this.params = {};
  104. v[0] ? (this.params.crmProcessWOID = v[0]) : "";
  105. this.getList(this.params, this.pageSize);
  106. },
  107. //获取列表
  108. getList(v, n) {
  109. this.loading = true;
  110. this.pageSize = n;
  111. this.$http({
  112. url: "/compvis/ipv/processWoAlarmInfoQuery",
  113. method: "post",
  114. headers: {
  115. "Content-Type": "application/json",
  116. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  117. },
  118. data: v,
  119. }).then((res) => {
  120. this.loading = false;
  121. this.tableData = res.data.data;
  122. this.total = res.data.totalRecord;
  123. });
  124. },
  125. //功能栏
  126. iconCli(v) {
  127. if (v === 1) {
  128. this.getList(this.params, this.pageSize);
  129. }
  130. if (v === 2) {
  131. this.fullscreen = !this.fullscreen;
  132. }
  133. },
  134. // 分页
  135. currchange(v) {
  136. this.pageSize = v;
  137. this.getList(this.params, this.pageSize);
  138. },
  139. },
  140. mounted() {
  141. if (this.$route.params.crmProcessWOID) {
  142. this.searchList[0].value = this.$route.params.crmProcessWOID;
  143. this.params.crmProcessWOID = this.$route.params.crmProcessWOID;
  144. } else {
  145. this.searchList[0].value = "";
  146. this.params.crmProcessWOID = "";
  147. }
  148. this.getList(this.params, this.pageSize);
  149. },
  150. created() {},
  151. watch: {
  152. $route(to, from) {
  153. if (from.name == "complaintQuery" && this.$route.params.crmProcessWOID) {
  154. this.searchList[0].value = this.$route.params.crmProcessWOID;
  155. this.params.crmProcessWOID = this.$route.params.crmProcessWOID;
  156. this.getList(this.params, this.pageSize);
  157. } else {
  158. this.searchList[0].value = "";
  159. this.params.crmProcessWOID = "";
  160. }
  161. },
  162. },
  163. };
  164. </script>
  165. <style>
  166. .el-input__suffix {
  167. cursor: pointer;
  168. }
  169. </style>
  170. <style scoped lang="scss">
  171. .titbox {
  172. div {
  173. float: right;
  174. i {
  175. font-size: 22px;
  176. margin-left: 20px;
  177. cursor: pointer;
  178. }
  179. }
  180. }
  181. .tabbox {
  182. margin-top: 15px;
  183. }
  184. .pageBox {
  185. text-align: right;
  186. margin-top: 10px;
  187. }
  188. </style>