XAWDJ0277HWXPT2\Administrator il y a 5 ans
Parent
commit
58e01a0282

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
web/index.html


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
web/js/app.a71f3d4e.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
web/js/app.a71f3d4e.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
web/js/chunk-28ec4e83.862f4aab.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
web/js/chunk-28ec4e83.862f4aab.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 2
web/js/chunk-28ec4e83.dd786775.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
web/js/chunk-28ec4e83.dd786775.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
web/js/chunk-3520c2d6.c39c83f8.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
web/js/chunk-3520c2d6.b16140ca.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
web/js/chunk-3520c2d6.c39c83f8.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 4 - 0
web/js/chunk-476b0587.2d37f609.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
web/js/chunk-476b0587.2d37f609.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 4
web/js/chunk-476b0587.b46c22a4.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
web/js/chunk-476b0587.b46c22a4.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 2
web/js/chunk-6b1d2eca.ec7f2c5d.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
web/js/chunk-6b1d2eca.ec7f2c5d.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
web/js/chunk-6b1d2eca.ee783652.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
web/js/chunk-6b1d2eca.ee783652.js.map


+ 1 - 1
webConfig/public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>bitbug_favicon.ico">
-    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1849275_ovslqk14w6f.css">
+    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1849275_aqwfobkx1ao.css">
     <title>IDCOL</title>
   </head>
   <body>

+ 86 - 132
webConfig/src/views/GISMap.vue

@@ -1295,7 +1295,6 @@
                     },1000)
                 }
                 
-                // this.getProjectNav('lamp')
                 // this.getProjectCompany
             }else{
                 if(this.browserLanguage == 'bd'){
@@ -1307,7 +1306,6 @@
                     },1000)
                 }
                 // this.projectInfo(0);
-                // this.getProjectNav()
             }
             AMap.mapSwitch=function(){                  
             };
@@ -2188,20 +2186,22 @@
             },
             sectionNavGet(id,obj){
                 // console.log(id,obj)
-                baseApi.ajax_post(
-                    allUrl.gisMap.section_nav,
-                    {
-                        username:this.username,
-                        client_key:this.client_key,
-                        token:this.token,
-                        projectid:id,
-                    },
-                    {},
-                    data =>{
-                        this.$set(obj,'roadList',data.data.list)
-                        // console.log(data)
-                    },
-                this)
+                if(id){
+                    baseApi.ajax_post(
+                        allUrl.gisMap.section_nav,
+                        {
+                            username:this.username,
+                            client_key:this.client_key,
+                            token:this.token,
+                            projectid:id,
+                        },
+                        {},
+                        data =>{
+                            this.$set(obj,'roadList',data.data.list)
+                            // console.log(data)
+                        },
+                    this)
+                }
             },
             lampInfoGet(id){
                 this.lampId = id;
@@ -2347,19 +2347,21 @@
                  this.isShowLampStatusList=false
             },
             dateNav(){
-                baseApi.ajax_post(
-                    allUrl.gisMap.dateNav,
-                    {
-                        username:this.username,
-                        client_key:this.client_key,
-                        token:this.token,
-                        project_id:this.projectId,
-                    },
-                    {},
-                    data =>{
-                        this.topDataNav =data.data;
-                    },
-                this)
+                if(this.projectId){
+                    baseApi.ajax_post(
+                        allUrl.gisMap.dateNav,
+                        {
+                            username:this.username,
+                            client_key:this.client_key,
+                            token:this.token,
+                            project_id:this.projectId,
+                        },
+                        {},
+                        data =>{
+                            this.topDataNav =data.data;
+                        },
+                    this)
+                }
             },
             /*捕虫器开关*/
             catcherOnOff(){
@@ -2414,59 +2416,6 @@
                     
                 }
             },
-            /*获取公司项目列表*/
-            getProjectNav(type){
-                baseApi.ajax_post(
-                    allUrl.device.projectNav,
-                    {
-                        username:this.username,
-                        client_key:this.client_key,
-                        token:this.token,
-                    },
-                    {},
-                    data =>{
-                        // console.log(data,'公司列表')
-                        this.projectNav = data.data;
-
-                        var storage = window.localStorage;
-                        let projectId = storage.getItem("projectId");
-                        this.companyId = storage.getItem("companyId");
-                        for(var key in data.data){
-                            this.$set(data.data[key],'type','Unfold')
-                            if(data.data[key].project_list){
-                                for(var d of data.data[key].project_list){
-                                    this.$set(d,'companyId',data.data[key].id)
-                                }
-                            }
-                            if(type){
-                                console.log(type)
-                            }else{
-                                if(this.companyId != 'false' && this.companyId){
-                                    if(data.data[key].id == this.companyId){
-                                        this.$set(data.data[key],'type','Collapse')
-                                        this.projectId = projectId;
-                                    }
-                                }else{
-                                    this.projectId = 0;
-                                    this.companyId = 0;
-                                }
-                            }
-                        }
-                        for(let d of this.projectNav){
-                            if(d.id == this.companyId){
-                                for(let dd of d.project_list){
-                                    if(dd.id == this.projectId){
-                                        this.$set(dd,'isOpen',true);
-                                        this.sectionNavGet(dd.id,dd)
-                                    }
-                                }
-                            }
-                        }
-                        this.dateNav();
-                        this.lampListGet(1);
-                    },
-                this)
-            },
             /*侧栏列表*/
             sideBarCompanyList(val,type,init){
                 baseApi.ajax_post(
@@ -2492,7 +2441,7 @@
                                 }else{
                                     this.projectId = data.data[0].id;
                                 }
-                                        this.sectionNavGet(data.data[0].id,data.data[0])
+                                this.sectionNavGet(data.data[0].id,data.data[0])
                                 for(let key in data.data){
                                     this.$set(data.data[key],'isOpen',false)
                                     if(data.data[key].id == this.projectId){
@@ -2505,26 +2454,29 @@
                             if(data.data.length>0){
                                 if(companyId){
                                     this.companyId = companyId;
-                                    if(data.data[0].projectList.length>0){
-                                        if(projectId){
-                                            this.projectId = projectId;
-                                        }else{
-                                            this.projectId = data.data[0].projectList[0].id;
+                                    for(let d of data.data){
+                                        if(d.cId == companyId){
+                                            if(d.projectList.length>0){
+                                                if(projectId){
+                                                    this.projectId = projectId;
+                                                }else{
+                                                    this.projectId = d.projectList[0].id;
+                                                }
+                                                this.sectionNavGet(d.id,data.data[0])
+                                            }else{
+                                                this.projectId = null;
+                                                this.deviceTotalData = {
+                                                    light_num:0,
+                                                    online_num:0,
+                                                    fault_count:0,
+                                                    network_num:0
+                                                };
+                                                this.deviceList = [];
+                                                this.total = 0;
+                                                this.count = 0;
+                                                this.fault = 0;
+                                            }
                                         }
-                                        // this.$set(data.data[0].projectList[0],'isOpen',true)
-                                        this.sectionNavGet(data.data[0].id,data.data[0])
-                                    }else{
-                                        this.projectId = null;
-                                        this.deviceTotalData = {
-                                            light_num:0,
-                                            online_num:0,
-                                            fault_count:0,
-                                            network_num:0
-                                        };
-                                        this.deviceList = [];
-                                        this.total = 0;
-                                        this.count = 0;
-                                        this.fault = 0;
                                     }
                                 }else{
                                     this.companyId = data.data[0].cId;
@@ -2768,37 +2720,39 @@
                 }
             },
             lampListGet(val,callback){
-                 baseApi.ajax_post(
-                    allUrl.gisMap.lampList,
-                    {
-                        username:this.username,
-                        client_key:this.client_key,
-                        token:this.token,
-                        project_id:this.projectId,
-                        section:this.roadId,
-                        type:this.operationType,
-                        keyword:this.keyword,
-                        page:val,
-                        count:16,
-                    },
-                    {},
-                    data =>{
-                        if(callback){
-                            callback(data)
-                        }
-                        // console.log(data)
-                        this.streetLampList = data.data.lamps;
-                        this.lampListTotal = data.data.total;
-                        this.lampListPage = 1;
-                        for(let d of this.streetLampList){
-                            if(d.status == '1'){
-                                d.runState = 'Lamp on'
-                            }else{
-                                d.runState = 'Lamp off'
+                if(this.projectId){
+                    baseApi.ajax_post(
+                        allUrl.gisMap.lampList,
+                        {
+                            username:this.username,
+                            client_key:this.client_key,
+                            token:this.token,
+                            project_id:this.projectId,
+                            section:this.roadId,
+                            type:this.operationType,
+                            keyword:this.keyword,
+                            page:val,
+                            count:16,
+                        },
+                        {},
+                        data =>{
+                            if(callback){
+                                callback(data)
                             }
-                        }
-                    },
-                this)
+                            // console.log(data)
+                            this.streetLampList = data.data.lamps;
+                            this.lampListTotal = data.data.total;
+                            this.lampListPage = 1;
+                            for(let d of this.streetLampList){
+                                if(d.status == '1'){
+                                    d.runState = 'Lamp on'
+                                }else{
+                                    d.runState = 'Lamp off'
+                                }
+                            }
+                        },
+                    this)
+                }
             },
             contextmenuFun(e){
                 // console.log(e,1)

+ 30 - 27
webConfig/src/views/alarmMaintenance/alarmMaintenance.vue

@@ -535,34 +535,37 @@
                             if(data.data.length>0){
                                 if(companyId){
                                     this.companyId = companyId;
-                                    if(data.data[0].projectList.length>0){
-                                        if(projectId){
-                                            this.projectId = projectId;
-                                        }else{
-                                            this.projectId = data.data[0].projectList[0].id;
-                                        }
-                                        // this.$set(data.data[0].projectList[0],'isOpen',true)
-                                        if(this.alarmNav != 'Inspection setup'){
-                                            this.alarmGet(1,data => {
-                                                console.log(data)
-                                            })
-                                        }else{
-                                            this.patrol_list(1,() => {
-                                                // console.log(data)
-                                            })
+                                    for(let d of data.data){
+                                        if(d.cId == companyId){
+                                            if(d.projectList.length>0){
+                                                if(projectId){
+                                                    this.projectId = projectId;
+                                                }else{
+                                                    this.projectId = d.projectList[0].id;
+                                                }
+                                                if(this.alarmNav != 'Inspection setup'){
+                                                    this.alarmGet(1,data => {
+                                                        console.log(data)
+                                                    })
+                                                }else{
+                                                    this.patrol_list(1,() => {
+                                                        // console.log(data)
+                                                    })
+                                                }
+                                            }else{
+                                                this.projectId = null;
+                                                this.deviceTotalData = {
+                                                    light_num:0,
+                                                    online_num:0,
+                                                    fault_count:0,
+                                                    network_num:0
+                                                };
+                                                this.deviceList = [];
+                                                this.total = 0;
+                                                this.count = 0;
+                                                this.fault = 0;
+                                            }
                                         }
-                                    }else{
-                                        this.projectId = null;
-                                        this.deviceTotalData = {
-                                            light_num:0,
-                                            online_num:0,
-                                            fault_count:0,
-                                            network_num:0
-                                        };
-                                        this.deviceList = [];
-                                        this.total = 0;
-                                        this.count = 0;
-                                        this.fault = 0;
                                     }
                                 }else{
                                     this.companyId = data.data[0].cId;

+ 25 - 22
webConfig/src/views/historicalData/historicalData.vue

@@ -462,29 +462,32 @@
                             if(data.data.length>0){
                                 if(companyId){
                                     this.companyId = companyId;
-                                    if(data.data[0].projectList.length>0){
-                                        if(projectId){
-                                            this.projectId = projectId;
-                                        }else{
-                                            this.projectId = data.data[0].projectList[0].id;
+                                    for(let d of data.data){
+                                        if(d.cId == companyId){
+                                            if(d.projectList.length>0){
+                                                if(projectId){
+                                                    this.projectId = projectId;
+                                                }else{
+                                                    this.projectId = d.projectList[0].id;
+                                                }
+                                                this.reportHome(1,0,data => {
+                                                    this.tableList = this.powerTableListEN;
+                                                    this.tableData = data.data.list;
+                                                })
+                                            }else{
+                                                this.projectId = null;
+                                                this.deviceTotalData = {
+                                                    light_num:0,
+                                                    online_num:0,
+                                                    fault_count:0,
+                                                    network_num:0
+                                                };
+                                                this.deviceList = [];
+                                                this.total = 0;
+                                                this.count = 0;
+                                                this.fault = 0;
+                                            }
                                         }
-                                        // this.$set(data.data[0].projectList[0],'isOpen',true)
-                                        this.reportHome(1,0,data => {
-                                            this.tableList = this.powerTableListEN;
-                                            this.tableData = data.data.list;
-                                        })
-                                    }else{
-                                        this.projectId = null;
-                                        this.deviceTotalData = {
-                                            light_num:0,
-                                            online_num:0,
-                                            fault_count:0,
-                                            network_num:0
-                                        };
-                                        this.deviceList = [];
-                                        this.total = 0;
-                                        this.count = 0;
-                                        this.fault = 0;
                                     }
                                 }else{
                                     this.companyId = data.data[0].cId;

+ 34 - 28
webConfig/src/views/projectManagement.vue

@@ -145,7 +145,7 @@
                             <div class="li" :class="{'select':online == '1'}" @click="statusTypeFun('0','0','0','1')"><span>Online</span></div>
                             <div class="li" :class="{'select':status == '1'}" @click="statusTypeFun('1','0','0','0')"><span>Warning</span></div>
                         </div>
-                        <div class="btn" @click="batchProcessingFun('on')" v-if="batchProcessing=='off'"><i class="iconfont icon-piliangcaozuo"></i><span>Batch management</span></div>
+                        <div class="btn" @click="batchProcessingFun('on')" v-if="batchProcessing=='off'"><i class="iconfont icon-piliangcaozuo"></i><span>Batch</span></div>
                         <div class="left_button" v-if="batchProcessing=='on'">
                             <div :class="{'lampcontrol_type_select':lampcontrolOperationType=='1'}" @click="batchOperation('1')"><span>Turn-on</span></div>
                             <div :class="{'lampcontrol_type_select':lampcontrolOperationType=='0'}" @click="batchOperation('0')"><span>Turn-off</span></div>
@@ -161,7 +161,8 @@
                             <div :class="{'wxzzt':lampcontrolOperationType == '-1'}"><span @click="batchProcessingFun('off')" v-loading="loading.batchProcessingFun">{{lampcontrolOperationType=='参数'?'modify':'Save'}}</span></div>
                             <div @click="batchProcessingFun('cancel')"><span>Cancel</span></div>
                         </div>
-                        <div class="btn" @click="lampcontrolUpdate()" v-loading="loading.lampcontrolUpdate">Update</div>
+                        <div class="btn" @click="lampcontrolUpdate('0')" v-loading="loading.lampcontrolUpdate0" :title="'Update data'"><i class="iconfont icon-gengxinshuju"></i></div>
+                        <div class="btn" @click="lampcontrolUpdate('1')" v-loading="loading.lampcontrolUpdate1" :title="'Update GPS'"><i class="iconfont icon-weizhi"></i></div>
                     </div>
                     <div class="table_top_r">
                         <div class="btn" @click="getLightList()">
@@ -1818,7 +1819,8 @@
                 loading:{
                     deviceList:false,
                     lampLightSlider:false,
-                    lampcontrolUpdate:false,
+                    lampcontrolUpdate0:false,
+                    lampcontrolUpdate1:false,
                     setBatteryFun:false,
                     exportTableLS:false,
                     batchProcessingFun:false,
@@ -2279,28 +2281,31 @@
                             if(data.data.length>0){
                                 if(companyId){
                                     this.companyId = companyId;
-                                    if(data.data[0].projectList.length>0){
-                                        if(projectId){
-                                            this.projectId = projectId;
-                                        }else{
-                                            this.projectId = data.data[0].projectList[0].id;
+                                    for(let d of data.data){
+                                        if(d.cId == companyId){
+                                            if(d.projectList.length>0){
+                                                if(projectId){
+                                                    this.projectId = projectId;
+                                                }else{
+                                                    this.projectId = d.projectList[0].id;
+                                                }
+                                                this.getProjectData(this.projectId)
+                                                this.getFields();
+                                                this.networkGet();
+                                            }else{
+                                                this.projectId = null;
+                                                this.deviceTotalData = {
+                                                    light_num:0,
+                                                    online_num:0,
+                                                    fault_count:0,
+                                                    network_num:0
+                                                };
+                                                this.deviceList = [];
+                                                this.total = 0;
+                                                this.count = 0;
+                                                this.fault = 0;
+                                            }
                                         }
-                                        // this.$set(data.data[0].projectList[0],'isOpen',true)
-                                        this.getProjectData(this.projectId)
-                                        this.getFields();
-                                        this.networkGet();
-                                    }else{
-                                        this.projectId = null;
-                                        this.deviceTotalData = {
-                                            light_num:0,
-                                            online_num:0,
-                                            fault_count:0,
-                                            network_num:0
-                                        };
-                                        this.deviceList = [];
-                                        this.total = 0;
-                                        this.count = 0;
-                                        this.fault = 0;
                                     }
                                 }else{
                                     this.companyId = data.data[0].cId;
@@ -3086,7 +3091,7 @@
                 this.areaList = [];
             },
             /*数据更新*/
-            lampcontrolUpdate(){
+            lampcontrolUpdate(type){
                 let lampIds = '';
                 for(let d of this.multipleSelection){
                     if(lampIds == ''){
@@ -3102,7 +3107,7 @@
                       type: 'warning'
                     });
                 }else{
-                    this.loading.lampcontrolUpdate = true;
+                    this.loading['lampcontrolUpdate'+type] = true;
                     baseApi.ajax_post(
                         allUrl.project.lampcontrolUpdate,
                         {
@@ -3110,6 +3115,7 @@
                             client_key:this.client_key,
                             token:this.token,
                             lamp_id:lampIds,
+                            type:type,
                         },
                         {},
                         data =>{
@@ -3122,13 +3128,13 @@
                             this.getLightList(this.currentPage);
                             let this_ = this;
                             setTimeout(function(){
-                                this_.loading.lampcontrolUpdate = false;
+                                this_.loading['lampcontrolUpdate'+type] = false;
                             },100)
                         },
                         this,
                         () => {
                             this.getLightList(this.currentPage);
-                            this.loading.lampcontrolUpdate = false;
+                            this.loading['lampcontrolUpdate'+type] = false;
                         }
                     )
                 }