فهرست منبع

new page ready

Changpeng Duan 5 سال پیش
والد
کامیت
de80d036b8

+ 9 - 0
src/Global.js

@@ -108,6 +108,15 @@ globalCheckPhone = function (val) {
     }
 };
 
+//格式化日期  年月日
+globaltime2String = function (time) {
+    let datetime = new Date();
+    datetime.setTime(time);
+    let year = datetime.getFullYear();
+    let month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
+    let date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
+    return year + "-" + month + "-" + date;
+};
 
 // table配置项目
 

+ 63 - 1
src/api/getApiRes.js

@@ -138,7 +138,7 @@ export function RegionEdit(postdata) {
 
 // 修改区域状态
 export function RegionStatusEdit(postdata) {
-    // 修改内部区域状态设置为9删除
+    // 修改内部区域状态设置为 9删除
     let url = headapi + 'v1/Company/RegionStatusEdit';
     return getApiBasic(url,postdata);
 }
@@ -150,5 +150,67 @@ export function RegionPictureUpload(postdata) {
     return getApiBasic(url,postdata);
 }
 
+// 查询信号 Wifi记录
+export function LogWifiDetectedQueryByDetector(postdata) {
+    // 查询检测设备的Wifi信号记录
+    let url = headapi + 'v1/Detector/LogWifiDetectedQueryByDetector';
+    return getApiBasic(url,postdata);
+}
 
+// 查询手机信号记录
+export function LogPhoneDetectedQueryByDetector(postdata) {
+    // 查询手机信号记录
+    let url = headapi + 'v1/Detector/LogPhoneDetectedQueryByDetector';
+    return getApiBasic(url,postdata);
+}
+
+// 获取单个区域信息
+export function GetRegiononeinfo(postdata) {
+    // 获取单个区域信息
+    let url = headapi + 'v1/Company/GetRegiononeinfo';
+    return getApiBasic(url,postdata);
+}
 
+// 获取企业内部区域选择框信息
+export function GetRegionSelect(postdata) {
+    // 根据企业id获取企业内部区域选择框信息 default:1
+    let url = headapi + 'v1/Auth/GetRegionSelect';
+    return getApiBasic(url,postdata);
+}
+
+// Detector part
+
+// 查询检测设备信息
+export function DetectorQuery(postdata) {
+    // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
+    let url = headapi + 'v1/Detector/DetectorQuery';
+    return getApiBasic(url,postdata);
+}
+
+// 添加检测设备
+export function DetectorAdd(postdata) {
+    // 添加检测设备
+    let url = headapi + 'v1/Detector/DetectorAdd';
+    return getApiBasic(url,postdata);
+}
+
+// 修改检测设备信息
+export function DetectorEdit(postdata) {
+    // 添加检测设备
+    let url = headapi + 'v1/Detector/DetectorEdit';
+    return getApiBasic(url,postdata);
+}
+
+// 修改检测设备状态
+export function DetectorEditStatus(postdata) {
+    // 修改检测设备状态  9删除
+    let url = headapi + 'v1/Detector/DetectorEditStatus';
+    return getApiBasic(url,postdata);
+}
+
+// 修改检测设备状态
+export function RegionPictureGetByRegionId(postdata) {
+    // 修改检测设备状态  9删除
+    let url = headapi + 'v1/Company/RegionPictureGetByRegionId';
+    return getApiBasic(url,postdata);
+}

+ 9 - 26
src/components/EquipInfo.vue

@@ -59,12 +59,7 @@
 </template>
 
 <script>
-    let qs = require('qs');
-    import { GetStaticinfo } from '../api/getApiRes.js'
     import Ring from '@/components/Ring.vue'
-
-    // 设备信息统计与
-
     export default {
         data() {
             return {
@@ -78,28 +73,16 @@
                 }
             }
         },
-        mounted() {
-            let that = this;
-            that.getDate();
-            this.timer = setInterval(() => {
-                that.getDate();
-            }, 1600);
-        },
-        methods: {
-            getDate() {
+        props: ['equipRs'],
+        watch: {
+            equipRs: function (val) {
                 let that = this;
-                let param = {
-                    token: localStorage.token
-                };
-                let postdata = qs.stringify(param);
-                GetStaticinfo(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        this.info = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
+                if(!val.Rs){
+                    return false
+                }
+                else{
+                    that.info = val.Rs;
+                }
             },
         },
         components: {

+ 59 - 93
src/components/HistoryRecord.vue

@@ -13,27 +13,28 @@
                     stripe
                     style="width: 100%">
                 <el-table-column
-                        prop="ssid"
+                        prop="SSID"
                         label="SSID"
                         width="">
                     <template slot-scope="scope">
-                        <i :class="[{'blue':scope.row.state == 1},{'yellow':scope.row.state == 0}]"></i>
-                        {{ scope.row.ssid }}
+                        <i :class="[{'blue':scope.row.DangerLevel == -1},{'yellow':scope.row.DangerLevel != -1}]"></i>
+                        {{ scope.row.SSID }}
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="date"
+                        prop="EditTime"
                         label="日期"
-                        width="">
+                        :formatter="filterFmtDate"
+                >
                 </el-table-column>
                 <el-table-column
-                        prop="location"
+                        prop="RegionName"
                         label="地点"
                         width="">
                 </el-table-column>
                 <el-table-column
-                        prop="type"
-                        label="可疑信号">
+                        prop="SignalIntensity"
+                        label="信号强度">
                 </el-table-column>
             </el-table>
             <br>
@@ -74,92 +75,44 @@
                     total: 30,
                     pageIndex: 1,
                 },
-                tableData: [{
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 1
-                }, {
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 0
-                }, {
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 1
-                },{
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 1
-                },{
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 1
-                },{
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 1
-                },{
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 1
-                }, {
-                    date: '06-19 12:32:01',
-                    ssid: 'ewall-4G',
-                    location: '201会议室',
-                    type: 'WIFI信号',
-                    state: 0
-                },]
+                draw: 1,
+                start: 0,
+                recordsTotal: 0,
+                tableData: [],
+                allTableData: [],
+                limit: '10',
+                multipleSort: false,
+                loading: true,
+                fileList: [],
+                multipleSelection: [],
+                detectedmac: '',
             }
         },
-        mounted() {
-            this.getTableQuery();
+        props: ['historyRs'],
+        watch: {
+            historyRs: function (val) {
+                this.getTableQuery(val)
+            },
         },
         methods: {
-            // 查询按钮
-            query() {
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
             // 页面数据查询
-            getTableQuery() {
-                // let that = this;
-                // that.loading = true;
-                // let url = headapi + '?ctl=ajax&mod=dial&act=taskListQuery';//获取
-                // let param = {
-                //     'taskstatus': that.panel.taskstatus,
-                //     'bt': globaltime2String(that.panel.time1[0]),
-                //     'et': globaltime2String(that.panel.time1[1]),
-                //     'KEYWORD': that.panel.keyword,
-                //     'USERCODE': that.panel.USERCODE,
-                // };
-                // let JSON = '';
-                // let postdata = qs.stringify(param);
-                // axios.post(url, postdata)
-                //     .then(function (response) {
-                //         JSON = response.data;
-                //         that.loading = false;
-                //         that.allTableData = JSON.rs;
-                //         that.recordsTotal = JSON.rs.length;
-                //         // 设置分页数据
-                //         that.setPaginations();
-                //     })
-                //     .catch(function (error) {
-                //         console.log(error);
-                //     });
+            getTableQuery(val) {
+                let that = this;
+                if (val.Code == 0) {
+                    that.loading = false;
+                    if (val.Rs) {
+                        that.allTableData = val.Rs;
+                        that.recordsTotal = val.Rs.length;
+                    } else {
+                        that.allTableData = [];
+                        that.recordsTotal = 0;
+                    }
+
+                    // 设置分页数据
+                    that.setPaginations();
+                } else {
+                    that.$message.error(json.Memo);
+                }
             },
             // 设置分页数据
             setPaginations() {
@@ -205,7 +158,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return globalfmtDate(column, 10);
             },
             // 过滤金额
         },
@@ -213,6 +166,13 @@
 </script>
 
 <style scoped>
+    .historyRecord {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
     .other-people {
         width: 439px;
         height: 480px;
@@ -221,6 +181,7 @@
 
     .el-table {
         width: 100%;
+        height: 380px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -296,20 +257,24 @@
         background: rgba(0, 23, 67, 0.8) !important;
         font-weight: normal;
     }
+
     /deep/ .el-table .cell {
         padding: 3px;
     }
+
     /deep/ .el-table td, .el-table th {
         padding: 6px 0;
     }
+
     /deep/ .number {
         width: 25px;
         height: 25px;
         line-height: 25px;
-        min-width:25px;
+        min-width: 25px;
     }
+
     i.blue {
-        width:10px;
+        width: 10px;
         height: 10px;
         float: left;
         background: #6DC1FF;
@@ -317,8 +282,9 @@
         margin-right: 5px;
         border-radius: 250px;
     }
+
     i.yellow {
-        width:10px;
+        width: 10px;
         height: 10px;
         float: left;
         margin-top: 6px;

+ 0 - 1
src/components/Scan.vue

@@ -72,7 +72,6 @@
         watch: {
             ScanRs: function (val) {
                 let that = this;
-                console.log(val);
                that.chartData.rows = val.Rs
             },
         },

+ 7 - 16
src/components/SingleEquipInfo.vue

@@ -67,29 +67,20 @@
         watch: {
             totalRs: function (val) {
                 let that = this;
-               that.state = val.DetRs.WarnString == '检测安全';
-               that.time =  val.DetRs.Dettime;
-               that.dangerItem =  val.DetRs.WarnNum;
+                that.state = val.DetRs.WarnString == '检测安全';
+                that.time = val.DetRs.Dettime;
+                that.dangerItem = val.DetRs.WarnNum;
             },
         },
         filters: {
             fmtDate: function (value) {
-                console.log(value);
-                if(!value){
+                if (!value) {
                     return '---';
-                }else{
-                    return value.substr(11,8);
+                } else {
+                    return value.substr(11, 8);
                 }
             }
         },
-        // mounted() {
-        //     this.timer = setInterval(() => {
-        //         this.test();
-        //     }, 1000);
-        // },
-        // beforeDestroy() {
-        //     clearInterval(this.timer);
-        // },
         methods: {
             test: function () {
                 let house = new Date().getHours();
@@ -197,7 +188,7 @@
         color: #005EA2;
         text-align: left;
         font-family: UniDreamLED;
-        letter-spacing: 4px;
+        letter-spacing: 1px;
     }
 
     .timePart .lt span {

+ 3 - 0
src/views/GSign.vue

@@ -54,7 +54,9 @@
                 </div>
             </div>
         </div>
+        <h3>todo 此处应是图表</h3>
         <el-table
+                v-if="false"
                 :data="tableData"
                 class=""
                 stripe
@@ -94,6 +96,7 @@
         </el-table>
         <br>
         <el-pagination
+                v-if="false"
                 background
                 :total="pageination.total"
                 :page-size="pageination.pageItem"

+ 2 - 2
src/views/Login.vue

@@ -17,7 +17,7 @@
                         <el-form-item label=""  v-loading="validImgState"   element-loading-text="拼命加载中"
                                       element-loading-spinner="el-icon-loading"
                                       element-loading-background="rgba(0, 0, 0, 0.4)">
-                            <el-input v-model="form.valid" placeholder="验证码"></el-input>
+                            <el-input v-model="form.valid" placeholder="验证码"    @keyup.enter.native="pwdLoginBtn"></el-input>
                             <img  id="validImg" :src="valImgSrc" alt="" width="100px" height="30px" title="看不清?刷一下试试!" @click="changeValImg" >
                         </el-form-item>
                         <el-form-item>
@@ -152,7 +152,7 @@
                         } else {
                             that.$notify({
                                 title: '警告',
-                                message: json.memo,
+                                message: json.Memo,
                                 type: 'warning'
                             });
                         }

+ 54 - 13
src/views/Main.vue

@@ -64,13 +64,13 @@
         </div>
         <div class="mrt">
             <div class="cube" v-if="pageLevel == 0||pageLevel == 1||pageLevel == 4">
-                <HistoryRecord></HistoryRecord>
+                <HistoryRecord :history-rs="historyRs"></HistoryRecord>
             </div>
             <div class="cube" v-if="pageLevel == 2||pageLevel == 3">
                 <runTimeRecord :total-rs="totalRs"></runTimeRecord>
             </div>
             <div v-if="pageLevel != 4">
-                <EquipInfo></EquipInfo>
+                <EquipInfo :equip-rs="equipRs"></EquipInfo>
             </div>
             <!--单个设备情况-->
             <div v-if="pageLevel == 4">
@@ -98,7 +98,9 @@
         SingleDetInfolist,
         DetectorWifixyInfolist,
         RegionWifixyInfolist,
-        Detector06GInfolist
+        Detector06GInfolist,
+        LogWifiDetectedQueryByDetector,
+        GetStaticinfo
     } from '../api/getApiRes.js'
 
     let qs = require('qs');
@@ -117,6 +119,8 @@
                 totalRs: [],
                 WifiRs: [],
                 ScanRs: [],
+                historyRs: [],
+                equipRs: [],
                 // pageLevel: 1,//当前为楼层
                 // pageLevel: 2,//当前为楼层区域
                 // pageLevel: 3,//当前为房间
@@ -133,12 +137,12 @@
                 that.getDate();
             }, 1115000);
 
-            let param = {
-                token: localStorage.token,
-                detectorId: 1,
-                regionId: this.regionId
-            };
-            let postdata = qs.stringify(param);
+            // let param = {
+            //     token: localStorage.token,
+            //     detectorId: 1,
+            //     regionId: this.regionId
+            // };
+            // let postdata = qs.stringify(param);
             // that.getDetector06GInfolist(postdata);
         },
         destroyed() {
@@ -163,33 +167,48 @@
             // 根据层级和地区ID调用不同的Ajax接口
             getDate() {
                 let that = this;
-
                 // 非设备层级
                 if (that.pageLevel != 4) {
                     let param = {
                         token: localStorage.token,
                         detectorId: 0,
-                        regionId: this.regionId
+                        regionId: this.regionId,
+                        detidstr:0,
+                        bt: globaltime2String(globalBt2()[0]) + ' 00:00:01',//开始时间
+                        et: globaltime2String(globalBt2()[1]) + ' 23:59:59',//结束时间
+                        start: 1,//
+                        tableMax: 30,//
                     };
                     let postdata = qs.stringify(param);
                     // wifi柱状图信息传入区域Id
                     that.getRegionWifixyInfolist(postdata);
                     // 区域检测实时记录
                     that.getRegionDetInfolist(postdata);
+                    // 历史检测记录
+                    that.getLogWifiDetectedQueryByDetector(postdata);
+                    // 0-6G
+                    that.getDetector06GInfolist(postdata);
+                    that.getGetStaticinfo(postdata);
 
                 } else {
                     // 单个设备层级
                     // todo
                     let param = {
                         token: localStorage.token,
-                        detectorId: this.detectorId
+                        detectorId: this.detectorId,
+                        bt: globaltime2String(globalBt2()[0]) + ' 00:00:01',//开始时间
+                        et: globaltime2String(globalBt2()[1]) + ' 23:59:59',//结束时间
+                        start: 1,//
+                        tableMax: 10,//
                     };
                     let postdata = qs.stringify(param);
                     // Wifi柱状图信息传入探测器Id
                     that.getDetectorWifixyInfolist(postdata);
                     // 单个设备检测实时记录
                     that.getSingleDetInfolist(postdata);
-                    // that.getDetector06GInfolist(postdata);
+                    that.getDetector06GInfolist(postdata);
+                    // 历史检测记录
+                    that.getLogWifiDetectedQueryByDetector(postdata);
                 }
             },
             getDetector06GInfolist(postdata) {
@@ -214,6 +233,17 @@
                     }
                 })
             },
+            getGetStaticinfo(postdata) {
+                let that = this;
+                GetStaticinfo(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.equipRs = json;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             getSingleDetInfolist(postdata) {
                 let that = this;
                 SingleDetInfolist(postdata).then(res => {
@@ -225,6 +255,17 @@
                     }
                 })
             },
+            getLogWifiDetectedQueryByDetector(postdata) {
+                let that = this;
+                LogWifiDetectedQueryByDetector(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.historyRs = json;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             wordDisplay(word) {
                 let index = 0;
                 let that = this;

+ 131 - 84
src/views/PhoneSign.vue

@@ -12,8 +12,15 @@
                 <div class=" panel_control">
                     <el-row :gutter="20">
                         <el-col :span="4">
-                            <em>设备ID:</em>
-                            <el-input v-model="panel.keyword" placeholder="请输入设备ID"></el-input>
+                            <em>探测器:</em>
+                            <el-select v-model="panel.detidstr">
+                                <el-option
+                                        v-for="item in panel.detOptions"
+                                        :key="item.Id"
+                                        :label="item.Name"
+                                        :value="item.Id">
+                                </el-option>
+                            </el-select>
                         </el-col>
                         <el-col :span="6">
                             <em>检测时间:</em>
@@ -27,22 +34,11 @@
                         </el-col>
                         <el-col :span="4">
                             <em>信道:</em>
-                            <el-select v-model="panel.taskstatus">
+                            <el-select v-model="panel.Operator">
                                 <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>信号频段:</em>
-                            <el-select v-model="panel.taskstatus">
-                                <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
+                                        v-for="item in panel.OperatorOptions"
+                                        :key="item.Id"
+                                        :label="item.Name"
                                         :value="item.value">
                                 </el-option>
                             </el-select>
@@ -56,40 +52,61 @@
         </div>
         <el-table
                 :data="tableData"
+                is-horizontal-resize
+                :default-sort="{prop: 'date', order: 'descending'}"
+                v-loading="loading"
                 class=""
                 stripe
         >
             <el-table-column
-                    prop="name"
-                    label="设备ID"
-                    >
+                    prop="Id"
+                    label="Id"
+            >
+            </el-table-column>
+            <el-table-column
+                    prop="Wwan"
+                    label="通信方式"
+            >
             </el-table-column>
             <el-table-column
-                    prop="date"
-                    label="检测时间"
-                    width="180">
+                    prop="SignalType"
+                    label="信号类型"
+            >
             </el-table-column>
             <el-table-column
-                    prop="name"
-                    label="探测区域"
+                    prop="SignalIntensity"
+                    label="信号强度"
             >
             </el-table-column>
             <el-table-column
-                    prop="name"
-                    label="信道"
-                    width="180">
+                    prop="Path"
+                    label="位置">
             </el-table-column>
             <el-table-column
-                    prop="address"
-                    label="信号频段">
+                    prop="Operator"
+                    label="信">
             </el-table-column>
             <el-table-column
-                    prop="address"
-                    label="数据量">
+                    prop="DeviceType"
+                    label="设备类型"
+            >
+                <template slot-scope="scope">
+                    <!--0:其他-->
+                    <!--1:摄像头-->
+                    <!--2:wifi-->
+                    <span v-if="scope.row.DeviceType == 1">其他</span>
+                    <span v-if="scope.row.DeviceType == 2">摄像头</span>
+                    <span v-if="scope.row.DeviceType == 3">wifi</span>
+                </template>
             </el-table-column>
             <el-table-column
-                    prop="address"
-                    label="信号强度">
+                    prop="DangerLevel"
+                    label="危险等级"
+            >
+                <template slot-scope="scope">
+                    <span v-if="scope.row.DangerLevel == -1">危险</span>
+                    <span v-if="scope.row.DangerLevel != -1">安全</span>
+                </template>
             </el-table-column>
         </el-table>
         <br>
@@ -105,14 +122,17 @@
 
 <script>
     import Global from '../Global.js'
+    import {LogPhoneDetectedQueryByDetector, GetRegionAndDectorSelect} from '../api/getApiRes.js'
+
+    let qs = require('qs');
     export default {
         data() {
             return {
-                tabIndex:0,
-                tabs:[
-                    {name:'手机信号记录',url:'phoneSign'},
-                    {name:'WiFi信号记录',url:'wifiSign'},
-                    {name:'0-6G扫描记录',url:'GSign'},
+                tabIndex: 0,
+                tabs: [
+                    {name: '手机信号记录', url: 'phoneSign'},
+                    {name: 'WiFi信号记录', url: 'wifiSign'},
+                    {name: '0-6G扫描记录', url: 'GSign'},
                 ],
                 // panel 配置项目
                 panel: {
@@ -121,46 +141,65 @@
                     compname: '',
                     keyword: '',
                     USERCODE: '',
+                    channel: '',
+                    detectedmac: '',
+                    Operator: '',
                     taskstatus: 99,
-                    options: [
+                    OperatorOptions: [
+                        {Id: 99, Name: '全部',value: ''},
+                        {Id: 1, Name: '移动',value: '移动'},
+                        {Id: 2, Name: '联通',value: '联通'},
+                        {Id: 3, Name: '电信',value: '电信'},
+                    ], options: [
                         {value: 99, label: '全部'},
                         {value: 1, label: '进行中'},
                         {value: 2, label: '已完成'},
                     ],
+                    detOptions: [],
+                    detidstr: 0,
                     time1: globalBt2(),
                 },
                 pageination: {
                     pageItem: 10,
                     pageoptions: pageOptions(),
-                    total: 10,
+                    total: 300,
                     pageIndex: 1,
                 },
-                tableData: [{
-                    date: '2016-05-02',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, {
-                    date: '2016-05-04',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1517 弄'
-                }, {
-                    date: '2016-05-01',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1519 弄'
-                }, {
-                    date: '2016-05-03',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1516 弄'
-                }]
+                draw: 1,
+                start: 0,
+                recordsTotal: 0,
+                tableData: [],
+                allTableData: [],
+                limit: '10',
+                multipleSort: false,
+                loading: true,
+                fileList: [],
+                multipleSelection: [],
+                detectedmac: '',
             }
         },
         mounted() {
             this.getTableQuery();
         },
         methods: {
+            getDetOption() {
+                let param = {
+                    'token': localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                GetRegionAndDectorSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        this.panel.detOptions = json.DectectorRs;//所有设备
+                        this.panel.detOptions.push({Id: 0, Name: '全部'})
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 跳转tab页面
-            goTab(url){
-                this.$router.push({path:url});
+            goTab(url) {
+                this.$router.push({path: url});
             },
             // 查询按钮
             query() {
@@ -169,30 +208,38 @@
             },
             // 页面数据查询
             getTableQuery() {
-                // let that = this;
-                // that.loading = true;
-                // let url = headapi + '?ctl=ajax&mod=dial&act=taskListQuery';//获取
-                // let param = {
-                //     'taskstatus': that.panel.taskstatus,
-                //     'bt': globaltime2String(that.panel.time1[0]),
-                //     'et': globaltime2String(that.panel.time1[1]),
-                //     'KEYWORD': that.panel.keyword,
-                //     'USERCODE': that.panel.USERCODE,
-                // };
-                // let JSON = '';
-                // let postdata = qs.stringify(param);
-                // axios.post(url, postdata)
-                //     .then(function (response) {
-                //         JSON = response.data;
-                //         that.loading = false;
-                //         that.allTableData = JSON.rs;
-                //         that.recordsTotal = JSON.rs.length;
-                //         // 设置分页数据
-                //         that.setPaginations();
-                //     })
-                //     .catch(function (error) {
-                //         console.log(error);
-                //     });
+                // 获取探测器列表
+                this.getDetOption();
+                let that = this;
+                that.loading = true;
+                let param = {
+                    'token': localStorage.token,
+                    'detidstr': that.panel.detidstr + ',',//探测器id列表
+                    'channel ': that.panel.channel,//信道
+                    'bt': globaltime2String(that.panel.time1[0]) + ' 00:00:01',//开始时间
+                    'et': globaltime2String(that.panel.time1[1]) + ' 23:59:59',//结束时间
+                    'start': 1,//
+                    'tableMax': 300,//
+                };
+                let postdata = qs.stringify(param);
+                LogPhoneDetectedQueryByDetector(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
             },
             // 导出excel
             btnExpAll() {

+ 278 - 172
src/views/Region.vue

@@ -21,16 +21,31 @@
                         :data="tree"
                         show-checkbox
                         :props="defaultProps"
-                        node-key="Id"
+                        node-Key="Id"
                         default-expand-all
                         :expand-on-click-node="false">
                      <span class="custom-tree-node" slot-scope="{ node, data }">
                     <span>{{ node.label }}</span>
                       <span class="treeIcon">
-                      <img src="../assets/img/region/add.png" height="18" width="18" @click="addLoft(node)"/>
-                      <img src="../assets/img/region/edit.png" height="18" width="18" @click="editLoft(node)"/>
-                      <img src="../assets/img/region/del.png" height="18" width="18" @click="delLoft(node)"/>
-                      <img src="../assets/img/region/watch.png" height="18" width="18" @click="seeLoft(node)"/>
+                          <!--第三层不能增加其子区域-->
+                      <img src="../assets/img/region/add.png"
+                           height="18" width="18"
+                           v-if="node.level != 3"
+                           @click="addLoft(node)"
+                      />
+                      <img src="../assets/img/region/edit.png"
+                           height="18" width="18"
+                           @click="editLoft(node)"
+                      />
+                      <img src="../assets/img/region/del.png"
+                           height="18" width="18"
+                           @click="delLoft(node)"
+                      />
+                      <img src="../assets/img/region/watch.png"
+                           height="18" width="18"
+                           v-if="node.level != 1"
+                           @click="seeLoft(node)"
+                      />
                       </span>
                   </span>
                 </el-tree>
@@ -40,14 +55,15 @@
                     <div class="plateTitle">
                         {{plateTitle}}
                     </div>
-                    <ul class="list" v-if="false">
-                        <li>
-                            <img src="../assets/img/region/loft.png" height="22" width="20"/>
-                            <em>1楼</em>
-                        </li>
-                    </ul>
-                    <div class="plateImg" v-if="false">
-                        <img src="../assets/img/main/RoomBg.png" height="769" width="1396"/>
+                    <!--<ul class="list" v-if="false">-->
+                    <!--<li>-->
+                    <!--<img src="../assets/img/region/loft.png" height="22" width="20"/>-->
+                    <!--<em>1楼</em>-->
+                    <!--</li>-->
+                    <!--</ul>-->
+                    <div class="plateImg" v-if="plateImg">
+                        <!--<img src="../assets/img/main/RoomBg.png" height="769" width="1396"/>-->
+                        <img :src="plateImgSrc"/>
                     </div>
                 </div>
             </div>
@@ -67,6 +83,13 @@
                         </label>
                         <el-input v-model="dialog.name"></el-input>
                     </el-col>
+                    <el-col :span="20">
+                        <label>
+                            建筑介绍
+                        </label>
+                        <el-input type="textarea" v-model="dialog.description"></el-input>
+                    </el-col>
+
                     <!--<el-col :span="20" v-if="dialog_level != 1">-->
                     <el-col :span="20" v-if="true">
                         <label>
@@ -125,7 +148,9 @@
     import {
         GetRegionAndDectorSelect,
         RegionStatusEdit,
-        RegionAdd
+        RegionAdd,
+        GetRegiononeinfo,
+        RegionPictureGetByRegionId
     }
         from '../api/getApiRes.js'
 
@@ -137,21 +162,25 @@
                 dialog_state: false,
                 dialog_title: '',
                 dialog_type: '',//类型,1是添加,2是修改
-                dialog_level: 1,//类型,1是楼(无图),2是楼层(有图),3是会议室(有图)
+                dialog_level: 1,//类型,1是楼(有图不显示),2是楼层(有图),3是会议室(有图)
                 dialog: {
                     shopID: 1,//One and always is one
                     token: localStorage.token,
                     name: '',
                     region: '',
+                    description: '',
                     regionId: 0,
+                    superiorid: 0,
                     memo: '',
-                    key: '',
+                    Key: '',
                     image: '',
                 },
                 dialogImageUrl: '',
+                plateImgSrc: '',
                 dialogVisible: false,
                 disabled: false,
                 plateTitle: '',
+                plateImg: false,
                 loftList: [
                     {}
                 ],
@@ -182,13 +211,27 @@
                     }
                 })
             },
+            clearDialog() {
+                let that = this;
+                that.dialog.superiorid = 0;//上级 为空
+                that.dialog.name = '';
+                that.dialog.region = '';
+                that.dialog.regmemoion = '';
+                that.dialog.description = '';
+                that.dialog.Key = '';
+                that.dialog.image = '';
+                that.dialog.regionId = 0;
+            },
             // 添加主建筑
             addMain() {
                 let that = this;
                 that.dialog_state = true;
                 that.dialog_title = '添加主建筑';
-                that.dialog_type = 1;
-                that.dialog_level = 1;
+                that.dialog_type = 1;//1添加2修改
+                that.dialog_level = 1;//类型,1是楼(有图不显示),2是楼层(有图),3是会议室(有图)
+                // clear dialog
+                that.clearDialog();
+
             },
             // 修改建筑 弹窗
             editLoft(node) {
@@ -196,21 +239,23 @@
                 that.dialog_state = true;
                 that.dialog_title = '修改';
                 that.dialog_type = 2;
-                that.dialog_level = node.level;
+                that.dialog_level = node.level;//类型,1是楼(有图不显示),2是楼层(有图),3是会议室(有图)
                 that.dialog.name = node.data.Name;
                 that.dialog.regionId = node.data.Id;
+                that.getGetRegiononeinfo(node.data.Id); //读取Description
             },
             // 删除楼层
             delLoft(node) {
                 let that = this;
                 let regionId = node.data.Id;
-                let name = node.data.label;
+                let name = node.data.Name;
                 // 状态9删除
                 let param = {
-                    'token': localStorage.token,
-                    'regionid ': regionId,
-                    'newstatus  ': 9,
+                    token: localStorage.token,
+                    regionid: regionId,
+                    newstatus: 9,
                 };
+                console.log(param);
                 let postdata = qs.stringify(param);
 
                 this.$confirm('是否删除' + name + '区域?', '删除操作', {
@@ -225,179 +270,229 @@
                                 type: 'success',
                                 message: `删除成功`
                             });
+                            that.getDate();
                         } else {
                             that.$message.error(json.Memo);
                         }
                     });
-                    that.getDate();
                 }).catch(() => {
                     this.$message({
                         type: 'info',
                         message: '已取消禁用'
                     });
                 });
-        },
-        // 提交主建筑
-        confirmAddMain() {
-            let that = this;
-            // checkVal
-            if (!that.dialog.name) {
-                this.$message.error('错了哦,主建筑名称不能空');
-                return false
-            }
-            if (that.dialog.name.length > 20) {
-                this.$message.error('错了哦,主建筑名称不能超过20个字符');
-                return false
-            }
-            let param = {
-                'token': localStorage.token,
-                'regionid ': regionId,
-                'comid   ': 1,
-                'superiorid    ': 0,
-                'longitude     ': 0,
-                'latitude      ': 0,
-                'width       ': 400,
-                'height        ': 300,
-                'picMemo        ': 300,
-                'picType         ': 1, //图片类型,1:主图 2:平面图
-                'key         ': dialog.key,
-            };
-            let postdata = qs.stringify(param);
-
-            RegionAdd(postdata).then(res => {
-                let json = res;
-                if (json.Code == 0) {
-                    that.dialog_state = false;
-                    that.$message({
-                        showClose: true,
-                        message: '主建筑已添加!',
-                        type: 'success'
-                    });
-                } else {
-                    that.$message.error(json.Memo);
+            },
+            // 提交添加新的建筑/区域
+            confirmAddRegion() {
+                let that = this;
+                // checkVal
+                if (!that.dialog.name) {
+                    this.$message.error('错了哦,主建筑名称不能空');
+                    return false
+                }
+                if (that.dialog.name.length > 20) {
+                    this.$message.error('错了哦,主建筑名称不能超过20个字符');
+                    return false
+                }
+                let param = {
+                    token: localStorage.token,
+                    regionname: that.dialog.name,
+                    comid: 1,
+                    superiorid: that.dialog.superiorid,
+                    description: that.dialog.description,
+                    longitude: 0,
+                    latitude: 0,
+                    width: 400,
+                    height: 300,
+                    picMemo: 300,
+                    picType: that.dialog_level, //图片类型,1:主图 2:平面图
+                    Key: that.dialog.Key,
+                };
+                let postdata = qs.stringify(param);
+                RegionAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.dialog_state = false;
+                        that.$message({
+                            showClose: true,
+                            message: '建筑/区域已添加!',
+                            type: 'success'
+                        });
+                        // 重载tree
+                        that.getDate();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 提交修改
+            confirmEdit() {
+                let that = this;
+                // checkVal
+                if (!that.dialog.name) {
+                    this.$message.error('错了哦,建筑名称不能空');
+                    return false
+                }
+                if (that.dialog.name.length > 20) {
+                    this.$message.error('错了哦,建筑名称不能超过20个字符');
+                    return false
                 }
-            })
-        },
-        // 提交修改
-        confirmEdit() {
-            let that = this;
-            // checkVal
-            if (!that.dialog.name) {
-                this.$message.error('错了哦,建筑名称不能空');
-                return false
-            }
-            if (that.dialog.name.length > 20) {
-                this.$message.error('错了哦,建筑名称不能超过20个字符');
-                return false
-            }
 
-            // ajax todo
-            // ok
-            that.dialog_state = false;
-            that.$message({
-                message: '建筑已修改',
-                type: 'success'
-            });
-        },
-        // 添加次级建筑
-        addLoft(node) {
-            let that = this;
-            that.dialog_state = true;
-            that.dialog_title = '添加楼层或区域';
-            that.dialog_type = 1;
-            that.dialog_level = 2;
-            console.log(node);
-        },
-        handleImgSuccess(res, file) {
-            console.log(res);
-        },
-        handleImgbefore(file) {
-            console.log(file);
-            this.dialog.image = file;
-        },
-        handleCheckChange(data, checked, indeterminate) {
-            console.log(data, checked, indeterminate);
-        },
-        handleNodeClick(data) {
-            console.log(data);
-        },
-        loadNode(node, resolve) {
-            if (node.level === 0) {
-                return resolve([{name: 'region1'}, {name: 'region2'}]);
-            }
-            if (node.level > 3) return resolve([]);
-
-            var hasChild;
-            if (node.data.name === 'region1') {
-                hasChild = true;
-            } else if (node.data.name === 'region2') {
-                hasChild = false;
-            } else {
-                hasChild = Math.random() > 0.5;
-            }
+                // ajax todo
+                // ok
+                that.dialog_state = false;
+                that.$message({
+                    message: '建筑已修改',
+                    type: 'success'
+                });
+            },
+            // 添加次级建筑
+            addLoft(node) {
+                let that = this;
+                // clear dialog
+                that.clearDialog();
+                that.dialog_state = true;
+                that.dialog_title = '添加楼层或区域';
+                that.dialog_type = 1;//1添加2修改
+                that.dialog_level = node.level;//类型,1是楼(有图不显示),2是楼层(有图),3是会议室(有图)
+                that.dialog.superiorid = node.data.Id;//将当前ID保存为上级ID
+            },
+            handleImgSuccess(res, file) {
+                let that = this;
+                if (res.Code == 0) {
+                    that.dialog.Key = res.Key
+                } else {
+                    that.$message.error(res.Memo);
+                }
+                console.log(res);
+            },
+            handleImgbefore(file) {
+                console.log(file);
+                this.dialog.image = file;
+            },
+            handleCheckChange(data, checked, indeterminate) {
+                console.log(data, checked, indeterminate);
+            },
+            handleNodeClick(data) {
+                console.log(data);
+            },
+            loadNode(node, resolve) {
+                if (node.level === 0) {
+                    return resolve([{name: 'region1'}, {name: 'region2'}]);
+                }
+                if (node.level > 3) return resolve([]);
 
-            setTimeout(() => {
-                var data;
-                if (hasChild) {
-                    data = [{
-                        name: 'zone' + this.count++
-                    }, {
-                        name: 'zone' + this.count++
-                    }];
+                var hasChild;
+                if (node.data.name === 'region1') {
+                    hasChild = true;
+                } else if (node.data.name === 'region2') {
+                    hasChild = false;
                 } else {
-                    data = [];
+                    hasChild = Math.random() > 0.5;
                 }
 
-                resolve(data);
-            }, 500);
-        },
-        dialog_cancel() {
-            let that = this;
-            that.dialog_state = false;
-        },
-        dialog_ok() {
-            let that = this;
-            // 添加类
-            if (that.dialog_type == 1) {
-                // 获取提交类型
-                switch (parseInt(that.dialog_level)) {
+                setTimeout(() => {
+                    var data;
+                    if (hasChild) {
+                        data = [{
+                            name: 'zone' + this.count++
+                        }, {
+                            name: 'zone' + this.count++
+                        }];
+                    } else {
+                        data = [];
+                    }
+
+                    resolve(data);
+                }, 500);
+            },
+            dialog_cancel() {
+                let that = this;
+                that.dialog_state = false;
+            },
+            dialog_ok() {
+                let that = this;
+                // 添加类 1是添加,2是修改
+                if (that.dialog_type == 1) {
+                    // 获取提交类型
+                    that.confirmAddRegion();
+                }
+                // 修改类 1是添加,2是修改
+                if (that.dialog_type == 2) {
+                    that.confirmEdit();
+                }
+            },
+            handleRemove(file) {
+                console.log(file);
+            },
+            handlePictureCardPreview(file) {
+                this.dialogImageUrl = file.url;
+                this.dialogVisible = true;
+            },
+            handleDownload(file) {
+                console.log(file);
+            },
+            // 查看当前区域情况
+            seeLoft(node) {
+                let that = this;
+                that.plateTitle = node.data.Name;
+                switch (parseInt(node.level)) {
                     case 1:
-                        that.confirmAddMain();
+                        // 看列表
+                        that.loftList = true;
                         break;
                     case 2:
+                        // 看楼层图
+                        that.plateImg = true;
+                        that.getRegionPictureGetByRegionId(node.data.Id);
+                        // that.plateImgSrc
                         break;
                     case 3:
+                        // 看会议图
+                        that.plateImg = true;
+                        that.getRegionPictureGetByRegionId(node.data.Id);
                         break;
                 }
+            },
+            getGetRegiononeinfo(regionid) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    regionid: regionid,
+                };
+                let postdata = qs.stringify(param);
+                GetRegiononeinfo(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        console.log(json);
+                        that.dialog.description = json.Rs.Description;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            getRegionPictureGetByRegionId(regionID) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    regionID: regionID,
+                };
+                let postdata = qs.stringify(param);
+                RegionPictureGetByRegionId(postdata).then(res => {
+                    let json = res;
+                    that.plateImgSrc = '';
+                    if (json.Code == 0) {
+                        that.plateImgSrc = json.EncodeString
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
             }
-            // 修改类
-            if (that.dialog_type == 2) {
-                that.confirmEdit();
-            }
-
-            // let dialog_type = that.dialog_type;
-            // let name = that.field_name;
-            // let id = that.field_id;
-        },
-        handleRemove(file) {
-            console.log(file);
-        },
-        handlePictureCardPreview(file) {
-            this.dialogImageUrl = file.url;
-            this.dialogVisible = true;
-        },
-        handleDownload(file) {
-            console.log(file);
-        },
-        // 查看当前区域情况
-        seeLoft(node) {
-            // todo
-        },
-    }
-    ,
-    components: {
-        dialog_referrer_list
-    }
+        }
+        ,
+        components: {
+            dialog_referrer_list
+        }
     }
     ;
 </script>
@@ -603,4 +698,15 @@
         color: #005EA2;
     }
 
+    /deep/ .modal-body {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 40px;
+    }
+
+    /deep/ .modal-body textarea {
+        color: #005EA2;
+    }
 </style>

+ 119 - 92
src/views/WifiSign.vue

@@ -12,8 +12,19 @@
                 <div class=" panel_control">
                     <el-row :gutter="20">
                         <el-col :span="4">
-                            <em>设备ID:</em>
-                            <el-input v-model="panel.keyword" placeholder="请输入设备ID"></el-input>
+                            <em>探测器:</em>
+                            <el-select v-model="panel.detidstr">
+                                <el-option
+                                        v-for="item in panel.detOptions"
+                                        :key="item.Id"
+                                        :label="item.Name"
+                                        :value="item.Id">
+                                </el-option>
+                            </el-select>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>被检Mac:</em>
+                            <el-input v-model="panel.detectedmac" placeholder="请输入被检测设备Mac"></el-input>
                         </el-col>
                         <el-col :span="6">
                             <em>检测时间:</em>
@@ -25,28 +36,6 @@
                                     end-placeholder="结束日期">
                             </el-date-picker>
                         </el-col>
-                        <el-col :span="4">
-                            <em>信道:</em>
-                            <el-select v-model="panel.taskstatus">
-                                <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>信号频段:</em>
-                            <el-select v-model="panel.taskstatus">
-                                <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
                         <el-col :span="4">
                             <el-button size="small" type="primary" @click="query">查询</el-button>
                         </el-col>
@@ -56,41 +45,58 @@
         </div>
         <el-table
                 :data="tableData"
+                is-horizontal-resize
+                :default-sort="{prop: 'date', order: 'descending'}"
+                v-loading="loading"
                 class=""
                 stripe
         >
             <el-table-column
-                    prop="name"
-                    label="设备ID"
-                    >
+                    prop="Id"
+                    label="记录"
+            >
             </el-table-column>
             <el-table-column
-                    prop="date"
-                    label="检测时间"
-                    width="180">
+                    prop="DetectorId"
+                    label="探测设备ID"
+            >
             </el-table-column>
             <el-table-column
-                    prop="name"
-                    label="探测区域"
+                    prop="Macstr"
+                    label="Mac地址"
             >
             </el-table-column>
             <el-table-column
-                    prop="name"
-                    label="信道"
-                    width="180">
+                    prop="ProduceCom"
+                    label="品牌"
+            >
             </el-table-column>
             <el-table-column
-                    prop="address"
-                    label="信号频段">
+                    prop="Path"
+                    label="位置"
+            >
             </el-table-column>
             <el-table-column
-                    prop="address"
-                    label="数据量">
+                    prop="SignalIntensity"
+                    label="信号强度"
+            >
             </el-table-column>
             <el-table-column
-                    prop="address"
-                    label="信号强度">
+                    prop="EditTime"
+                    label="检测时间"
+                    :formatter="filterFmtDate"
+                    width="180">
             </el-table-column>
+            <el-table-column
+                    prop="DangerLevel"
+                    label="危险等级"
+            >
+                <template slot-scope="scope">
+                    <span v-if="scope.row.DangerLevel == -1">危险</span>
+                    <span v-if="scope.row.DangerLevel != -1">安全</span>
+                </template>
+            </el-table-column>
+
         </el-table>
         <br>
         <el-pagination
@@ -105,15 +111,17 @@
 
 <script>
     import Global from '../Global.js'
+    import {LogWifiDetectedQueryByDetector, GetRegionAndDectorSelect} from '../api/getApiRes.js'
 
+    let qs = require('qs');
     export default {
         data() {
             return {
-                tabIndex:1,
-                tabs:[
-                    {name:'手机信号记录',url:'phoneSign'},
-                    {name:'WiFi信号记录',url:'wifiSign'},
-                    {name:'0-6G扫描记录',url:'GSign'},
+                tabIndex: 1,
+                tabs: [
+                    {name: '手机信号记录', url: 'phoneSign'},
+                    {name: 'WiFi信号记录', url: 'wifiSign'},
+                    {name: '0-6G扫描记录', url: 'GSign'},
                 ],
                 // panel 配置项目
                 panel: {
@@ -122,46 +130,58 @@
                     compname: '',
                     keyword: '',
                     USERCODE: '',
+                    detectedmac: '',
                     taskstatus: 99,
                     options: [
                         {value: 99, label: '全部'},
                         {value: 1, label: '进行中'},
                         {value: 2, label: '已完成'},
                     ],
+                    detOptions: [],
+                    detidstr: 0,
                     time1: globalBt2(),
                 },
                 pageination: {
                     pageItem: 10,
                     pageoptions: pageOptions(),
-                    total: 10,
+                    total: 300,
                     pageIndex: 1,
                 },
-                tableData: [{
-                    date: '2016-05-02',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, {
-                    date: '2016-05-04',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1517 弄'
-                }, {
-                    date: '2016-05-01',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1519 弄'
-                }, {
-                    date: '2016-05-03',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1516 弄'
-                }]
+                draw: 1,
+                start: 0,
+                recordsTotal: 0,
+                tableData: [],
+                allTableData: [],
+                limit: '10',
+                multipleSort: false,
+                loading: true,
+                fileList: [],
+                multipleSelection: [],
+                detectedmac: '',
             }
         },
         mounted() {
             this.getTableQuery();
         },
         methods: {
+            getDetOption() {
+                let param = {
+                    'token': localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                GetRegionAndDectorSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        this.panel.detOptions = json.DectectorRs;//所有设备
+                        this.panel.detOptions.push({Id: 0, Name: '全部'})
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 跳转tab页面
-            goTab(url){
-                this.$router.push({path:url});
+            goTab(url) {
+                this.$router.push({path: url});
             },
             // 查询按钮
             query() {
@@ -170,30 +190,38 @@
             },
             // 页面数据查询
             getTableQuery() {
-                // let that = this;
-                // that.loading = true;
-                // let url = headapi + '?ctl=ajax&mod=dial&act=taskListQuery';//获取
-                // let param = {
-                //     'taskstatus': that.panel.taskstatus,
-                //     'bt': globaltime2String(that.panel.time1[0]),
-                //     'et': globaltime2String(that.panel.time1[1]),
-                //     'KEYWORD': that.panel.keyword,
-                //     'USERCODE': that.panel.USERCODE,
-                // };
-                // let JSON = '';
-                // let postdata = qs.stringify(param);
-                // axios.post(url, postdata)
-                //     .then(function (response) {
-                //         JSON = response.data;
-                //         that.loading = false;
-                //         that.allTableData = JSON.rs;
-                //         that.recordsTotal = JSON.rs.length;
-                //         // 设置分页数据
-                //         that.setPaginations();
-                //     })
-                //     .catch(function (error) {
-                //         console.log(error);
-                //     });
+                // 获取探测器列表
+                this.getDetOption();
+                let that = this;
+                that.loading = true;
+                let param = {
+                    'token': localStorage.token,
+                    'detidstr': that.panel.detidstr + ',',//探测器id列表
+                    'detectedmac ': that.panel.detectedmac,//被检测设备Mac
+                    'bt': globaltime2String(that.panel.time1[0]) + ' 00:00:01',//开始时间
+                    'et': globaltime2String(that.panel.time1[1]) + ' 23:59:59',//结束时间
+                    'start': 1,//
+                    'tableMax': 300,//
+                };
+                let postdata = qs.stringify(param);
+                LogWifiDetectedQueryByDetector(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
             },
             // 导出excel
             btnExpAll() {
@@ -248,7 +276,7 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return globalfmtDate(column, 11);
+                return globalfmtDate(column, 10);
             },
             // 过滤金额
             filterMoney(value, row, column) {
@@ -261,5 +289,4 @@
 
 <style scoped>
     @import "../assets/css/panel.css";
-
 </style>