GSign.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <div>
  3. <div class="tabs">
  4. <ul>
  5. <li v-for="(tab,i) in tabs" @click="goTab(tab.url)" :class="{'active':tabIndex == i}">
  6. {{tab.name}}
  7. </li>
  8. </ul>
  9. </div>
  10. <div class="panel">
  11. <div class="panel-body">
  12. <div class=" panel_control">
  13. <el-row :gutter="20">
  14. <el-col :span="4">
  15. <em>设备ID:</em>
  16. <el-input v-model="panel.keyword" placeholder="请输入设备ID"></el-input>
  17. </el-col>
  18. <el-col :span="6">
  19. <em>检测时间:</em>
  20. <el-date-picker
  21. v-model="panel.time1"
  22. type="daterange"
  23. range-separator="至"
  24. start-placeholder="开始日期"
  25. end-placeholder="结束日期">
  26. </el-date-picker>
  27. </el-col>
  28. <el-col :span="4">
  29. <em>信道:</em>
  30. <el-select v-model="panel.taskstatus">
  31. <el-option
  32. v-for="item in panel.options"
  33. :key="item.value"
  34. :label="item.label"
  35. :value="item.value">
  36. </el-option>
  37. </el-select>
  38. </el-col>
  39. <el-col :span="4">
  40. <em>信号频段:</em>
  41. <el-select v-model="panel.taskstatus">
  42. <el-option
  43. v-for="item in panel.options"
  44. :key="item.value"
  45. :label="item.label"
  46. :value="item.value">
  47. </el-option>
  48. </el-select>
  49. </el-col>
  50. <el-col :span="4">
  51. <el-button size="small" type="primary" @click="query">查询</el-button>
  52. </el-col>
  53. </el-row>
  54. </div>
  55. </div>
  56. </div>
  57. <el-table
  58. :data="tableData"
  59. class=""
  60. stripe
  61. >
  62. <el-table-column
  63. prop="name"
  64. label="设备ID"
  65. >
  66. </el-table-column>
  67. <el-table-column
  68. prop="date"
  69. label="检测时间"
  70. width="180">
  71. </el-table-column>
  72. <el-table-column
  73. prop="name"
  74. label="探测区域"
  75. >
  76. </el-table-column>
  77. <el-table-column
  78. prop="name"
  79. label="信道"
  80. width="180">
  81. </el-table-column>
  82. <el-table-column
  83. prop="address"
  84. label="信号频段">
  85. </el-table-column>
  86. <el-table-column
  87. prop="address"
  88. label="数据量">
  89. </el-table-column>
  90. <el-table-column
  91. prop="address"
  92. label="信号强度">
  93. </el-table-column>
  94. </el-table>
  95. <br>
  96. <el-pagination
  97. background
  98. :total="pageination.total"
  99. :page-size="pageination.pageItem"
  100. @current-change="pageChange"
  101. ></el-pagination>
  102. </div>
  103. </template>
  104. <script>
  105. import Global from '../Global.js'
  106. export default {
  107. data() {
  108. return {
  109. tabIndex:2,
  110. tabs:[
  111. {name:'手机信号记录',url:'phoneSign'},
  112. {name:'WiFi信号记录',url:'wifiSign'},
  113. {name:'0-6G扫描记录',url:'GSign'},
  114. ],
  115. // panel 配置项目
  116. panel: {
  117. usercode: '',
  118. username: '',
  119. compname: '',
  120. keyword: '',
  121. USERCODE: '',
  122. taskstatus: 99,
  123. options: [
  124. {value: 99, label: '全部'},
  125. {value: 1, label: '进行中'},
  126. {value: 2, label: '已完成'},
  127. ],
  128. time1: globalBt2(),
  129. },
  130. pageination: {
  131. pageItem: 10,
  132. pageoptions: pageOptions(),
  133. total: 10,
  134. pageIndex: 1,
  135. },
  136. tableData: [{
  137. date: '2016-05-02',
  138. name: '王小虎',
  139. address: '上海市普陀区金沙江路 1518 弄'
  140. }, {
  141. date: '2016-05-04',
  142. name: '王小虎',
  143. address: '上海市普陀区金沙江路 1517 弄'
  144. }, {
  145. date: '2016-05-01',
  146. name: '王小虎',
  147. address: '上海市普陀区金沙江路 1519 弄'
  148. }, {
  149. date: '2016-05-03',
  150. name: '王小虎',
  151. address: '上海市普陀区金沙江路 1516 弄'
  152. }]
  153. }
  154. },
  155. mounted() {
  156. this.getTableQuery();
  157. },
  158. methods: {
  159. // 跳转tab页面
  160. goTab(url){
  161. this.$router.push({path:url});
  162. },
  163. // 查询按钮
  164. query() {
  165. this.getTableQuery();
  166. this.$message.success('查询完毕');
  167. },
  168. // 页面数据查询
  169. getTableQuery() {
  170. // let that = this;
  171. // that.loading = true;
  172. // let url = headapi + '?ctl=ajax&mod=dial&act=taskListQuery';//获取
  173. // let param = {
  174. // 'taskstatus': that.panel.taskstatus,
  175. // 'bt': globaltime2String(that.panel.time1[0]),
  176. // 'et': globaltime2String(that.panel.time1[1]),
  177. // 'KEYWORD': that.panel.keyword,
  178. // 'USERCODE': that.panel.USERCODE,
  179. // };
  180. // let JSON = '';
  181. // let postdata = qs.stringify(param);
  182. // axios.post(url, postdata)
  183. // .then(function (response) {
  184. // JSON = response.data;
  185. // that.loading = false;
  186. // that.allTableData = JSON.rs;
  187. // that.recordsTotal = JSON.rs.length;
  188. // // 设置分页数据
  189. // that.setPaginations();
  190. // })
  191. // .catch(function (error) {
  192. // console.log(error);
  193. // });
  194. },
  195. // 导出excel
  196. btnExpAll() {
  197. let that = this;
  198. let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
  199. let bt = globaltime2String(that.panel.time1[0]);
  200. let et = globaltime2String(that.panel.time1[1]);
  201. let usercode = that.panel.usercode;
  202. window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
  203. },
  204. // 设置分页数据
  205. setPaginations() {
  206. // 分页属性
  207. let that = this;
  208. that.pageination.total = that.recordsTotal;
  209. // 默认分页
  210. that.tableData = that.allTableData.filter((item, index) => {
  211. return index < that.pageination.pageItem;
  212. });
  213. },
  214. // 每页显示数量
  215. handleSizeChange() {
  216. let that = this;
  217. that.tableData = that.allTableData.filter((item, index) => {
  218. return index < that.pageination.pageItem;
  219. });
  220. that.draw = that.pageination.pageItem;
  221. that.getTableQuery();
  222. },
  223. // 翻页
  224. pageChange(pageIndex) {
  225. let that = this;
  226. // 获取当前页
  227. let index = that.pageination.pageItem * (pageIndex - 1);
  228. // 数据总数
  229. let nums = that.pageination.pageItem * pageIndex;
  230. // 容器
  231. let tables = [];
  232. for (var i = index; i < nums; i++) {
  233. if (that.allTableData[i]) {
  234. tables.push(that.allTableData[i])
  235. }
  236. this.tableData = tables;
  237. }
  238. that.start = index * that.draw;
  239. that.getTableQuery();
  240. },
  241. // 自动排序
  242. sortChange(params) {
  243. console.log(params)
  244. },
  245. // 过滤时间
  246. filterFmtDate(value, row, column) {
  247. let that = this;
  248. return globalfmtDate(column, 11);
  249. },
  250. // 过滤金额
  251. filterMoney(value, row, column) {
  252. let that = this;
  253. return parseFloat(column).toFixed(2);
  254. },
  255. },
  256. }
  257. </script>
  258. <style scoped>
  259. @import "../assets/css/panel.css";
  260. </style>