Knowledge5.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <div class="knowledge-2">
  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-input v-model="content" placeholder="请输入查询内容"></el-input>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="query-actions" style="margin-right: 1500px">
  13. <button class="btn green" @click="onClickSearch">搜索</button>
  14. </div>
  15. </div>
  16. <div>
  17. <ComTable :data="tableData"></ComTable>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import ComTable from "@com/coms/table/table.vue";
  23. export default {
  24. components: { ComTable },
  25. data() {
  26. return {
  27. content: "",
  28. tableData: {
  29. column: [
  30. {
  31. name: "设备类型",
  32. field: "modelid",
  33. is_num: true,
  34. is_light: false,
  35. },
  36. {
  37. name: "特征名称",
  38. field: "name",
  39. is_num: false,
  40. is_light: false,
  41. },
  42. {
  43. name: "特征描述",
  44. field: "description",
  45. is_num: false,
  46. is_light: false,
  47. },
  48. {
  49. name: "设备结构",
  50. field: "structureid",
  51. is_num: false,
  52. is_light: false,
  53. },
  54. {
  55. name: "设备结构组成",
  56. field: "componentid",
  57. is_num: false,
  58. is_light: false,
  59. },
  60. {
  61. name: "测点统一编码",
  62. field: "uniformcode",
  63. is_num: false,
  64. is_light: false,
  65. },
  66. {
  67. name: "最小值",
  68. field: "minvalue",
  69. is_num: false,
  70. is_light: false,
  71. },
  72. {
  73. name: "最大值",
  74. field: "maxvalue",
  75. is_num: false,
  76. is_light: false,
  77. },
  78. {
  79. name: "正常范围下限",
  80. field: "normalmin",
  81. is_num: false,
  82. is_light: false,
  83. },
  84. {
  85. name: "正常范围上限",
  86. field: "normalmax",
  87. is_num: false,
  88. is_light: false,
  89. },
  90. {
  91. name: "预警值",
  92. field: "prealertvalue",
  93. is_num: false,
  94. is_light: false,
  95. },
  96. {
  97. name: "报警值",
  98. field: "alertvalue",
  99. is_num: false,
  100. is_light: false,
  101. },
  102. {
  103. name: "是否启用",
  104. field: "enable",
  105. is_num: false,
  106. is_light: false,
  107. },
  108. ],
  109. data: [],
  110. },
  111. };
  112. },
  113. created() {
  114. this.requestSafeList();
  115. },
  116. methods: {
  117. // 搜索按钮
  118. onClickSearch() {
  119. this.requestSafeList();
  120. },
  121. // 获取按错内容
  122. requestSafeList() {
  123. let that = this;
  124. this.API.requestData({
  125. method: "GET",
  126. baseURL: "http://10.155.32.4:8034/",
  127. subUrl: "/experienceBase/tzcs",
  128. data: {
  129. name: that.content,
  130. pageNum: 1,
  131. pageSize: 1000,
  132. }, // 请求所携带参数,默认为空,可缺省
  133. success(res) {
  134. if (res.code == 200) {
  135. that.tableData.data = [];
  136. res.data.forEach((item) => {
  137. item.enable = item.enable == 0 ? "启用" : "停止";
  138. that.tableData.data.push(item);
  139. });
  140. }
  141. },
  142. });
  143. },
  144. },
  145. };
  146. </script>
  147. <style lang="less" scope>
  148. @titleGray: #9ca5a8;
  149. @rowGray: #606769;
  150. @darkBack: #536268;
  151. .knowledge-2 {
  152. .el-select {
  153. width: 200px;
  154. }
  155. .el-input {
  156. width: 200px;
  157. }
  158. }
  159. </style>