Knowledge6.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <div class="knowledge-6">
  3. <div class="query mg-b-8">
  4. <div class="query-items">
  5. <div class="query-item">
  6. <div class="lable">型号:</div>
  7. <div class="search-input">
  8. <el-select
  9. v-model="model"
  10. placeholder="请选择"
  11. popper-class="select"
  12. >
  13. <el-option
  14. v-for="item in models"
  15. :key="item"
  16. :label="item"
  17. :value="item"
  18. >
  19. </el-option>
  20. </el-select>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="query-actions">
  25. <button class="btn green" @click="onClickSearch">搜索</button>
  26. </div>
  27. </div>
  28. <div>
  29. <ComTable :data="tableData" height="85vh"></ComTable>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. import ComTable from "@com/coms/table/table.vue";
  35. export default {
  36. components: { ComTable },
  37. data() {
  38. return {
  39. model: "",
  40. models: ["UP82","UP77","UP97","UP105-2000-S","SG500KTL","NTE-N500KTL","CCWE-1500","AE-500-50-PV-X-HV"],
  41. tableData: {
  42. column: [
  43. {
  44. name: "预警编号",
  45. field: "tid",
  46. is_num: true,
  47. is_light: false,
  48. },
  49. {
  50. name: "名称",
  51. field: "name",
  52. is_num: false,
  53. is_light: false,
  54. },
  55. {
  56. name: "风机型号",
  57. field: "model",
  58. is_num: false,
  59. is_light: false,
  60. },
  61. {
  62. name: "故障排查方法",
  63. field: "gzpc",
  64. is_num: false,
  65. is_light: false,
  66. },
  67. {
  68. name: "故障处理",
  69. field: "gzyy",
  70. is_num: false,
  71. is_light: false,
  72. },
  73. {
  74. name: "工器具",
  75. field: "gqj",
  76. is_num: false,
  77. is_light: false,
  78. },
  79. {
  80. name: "故障处理时长",
  81. field: "xqsc",
  82. is_num: false,
  83. is_light: false,
  84. }
  85. ],
  86. data: [],
  87. },
  88. };
  89. },
  90. created() {
  91. this.model = this.models[0];
  92. this.requestSafeList();
  93. },
  94. methods: {
  95. // 搜索按钮
  96. onClickSearch() {
  97. this.requestSafeList();
  98. },
  99. requestSafeList() {
  100. let that = this;
  101. this.API.requestData({
  102. method: "GET",
  103. baseURL: "http://10.155.32.4:8034/",
  104. subUrl: "/experienceBase/pcjxfa",
  105. data: {
  106. model: that.model,
  107. pageNum: 1,
  108. pageSize: 1000,
  109. }, // 请求所携带参数,默认为空,可缺省
  110. success(res) {
  111. if (res.code == 200) {
  112. that.tableData.data = res.data
  113. }
  114. },
  115. });
  116. },
  117. },
  118. };
  119. </script>
  120. <style lang="less" scope>
  121. @titleGray: #9ca5a8;
  122. @rowGray: #606769;
  123. @darkBack: #536268;
  124. .knowledge-6 {
  125. .el-select {
  126. width: 200px;
  127. }
  128. .el-input {
  129. width: 200px;
  130. }
  131. }
  132. </style>