GSign.vue 9.8 KB

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