Prechádzať zdrojové kódy

Merge branch 'master' of http://gogs.weclouds.xyz:3000/crazycat/IDCOL

wzh 5 rokov pred
rodič
commit
c79a9919a9
52 zmenil súbory, kde vykonal 1513 pridanie a 528 odobranie
  1. 30 9
      api/application/controllers/Alarm.php
  2. 82 8
      api/application/controllers/Home.php
  3. 22 16
      api/application/controllers/Lampcontrol.php
  4. 5 3
      api/application/controllers/Map.php
  5. 11 2
      api/application/controllers/Project.php
  6. 74 71
      api/application/controllers/Report.php
  7. 3 1
      api/application/helpers/function_helper.php
  8. 8 10
      api/application/models/Lamp_model.php
  9. 43 32
      sendCmd/sumData.php
  10. 1 1
      web/css/app.005925ec.css
  11. 1 1
      web/css/chunk-a80ca5cc.20a235c4.css
  12. 0 1
      web/css/chunk-3520c2d6.17872edd.css
  13. 1 0
      web/css/chunk-3520c2d6.5c857fb5.css
  14. 1 1
      web/css/chunk-3f41bc09.846ab633.css
  15. 1 1
      web/index.html
  16. 2 0
      web/js/app.307669c9.js
  17. 1 0
      web/js/app.307669c9.js.map
  18. 0 2
      web/js/app.db74df5a.js
  19. 0 1
      web/js/app.db74df5a.js.map
  20. 2 2
      web/js/chunk-27550a72.81fd3b05.js
  21. 1 0
      web/js/chunk-27550a72.498f1b83.js.map
  22. 0 1
      web/js/chunk-27550a72.81fd3b05.js.map
  23. 2 0
      web/js/chunk-28ec4e83.f7aafb4b.js
  24. 1 0
      web/js/chunk-28ec4e83.f7aafb4b.js.map
  25. 2 0
      web/js/chunk-3520c2d6.c39c83f8.js
  26. 1 0
      web/js/chunk-3520c2d6.c39c83f8.js.map
  27. 0 2
      web/js/chunk-3520c2d6.d1708aa5.js
  28. 0 1
      web/js/chunk-3520c2d6.d1708aa5.js.map
  29. 2 0
      web/js/chunk-3f41bc09.df967282.js
  30. 1 0
      web/js/chunk-3f41bc09.df967282.js.map
  31. 0 2
      web/js/chunk-3f41bc09.f0656c62.js
  32. 0 1
      web/js/chunk-3f41bc09.f0656c62.js.map
  33. 0 2
      web/js/chunk-6b1d2eca.3e5f4f62.js
  34. 0 1
      web/js/chunk-6b1d2eca.3e5f4f62.js.map
  35. 2 0
      web/js/chunk-6b1d2eca.96bf3759.js
  36. 1 0
      web/js/chunk-6b1d2eca.96bf3759.js.map
  37. 0 4
      web/js/chunk-9927e514.6d5a3946.js
  38. 0 1
      web/js/chunk-9927e514.6d5a3946.js.map
  39. 4 0
      web/js/chunk-9927e514.6e4e1b95.js
  40. 1 0
      web/js/chunk-9927e514.6e4e1b95.js.map
  41. 0 2
      web/js/chunk-a80ca5cc.13833273.js
  42. 0 1
      web/js/chunk-a80ca5cc.13833273.js.map
  43. 7 3
      webConfig/public/index.html
  44. 54 1
      webConfig/src/App.vue
  45. 5 5
      webConfig/src/components/header.vue
  46. 6 0
      webConfig/src/store/index.js
  47. 747 177
      webConfig/src/views/GISMap.vue
  48. 40 10
      webConfig/src/views/alarmMaintenance/alarmMaintenance.vue
  49. 2 2
      webConfig/src/views/dashboard.vue
  50. 49 12
      webConfig/src/views/historicalData/historicalData.vue
  51. 20 3
      webConfig/src/views/operationLog/operationLog.vue
  52. 277 135
      webConfig/src/views/projectManagement.vue

+ 30 - 9
api/application/controllers/Alarm.php

@@ -36,19 +36,22 @@ class Alarm extends Base_Controller {
 
 		// 告警类型筛选
 		$alarmtype = trim($this->input->post('alarmtype',true));
+		// var_dump($alarmtype);
 
 		// 时间筛选
 		$endDate = $this->input->post('endDate',true);
 		$startDate = $this->input->post('startDate',true);
 
 		$type = intval($this->input->post('type',true));
-		$version = $this->session->userdata('version');
-		if (!empty($version)) {
-			$alarmtype = alarm_translate_ch($alarmtype);
-		}
+		$version = $this->version;
+		// var_dump($version);
+		// if (!empty($version)) {
+		// 	$alarmtype = alarm_translate($alarmtype);
+		// }
 
-		$page = !isset($page) ? 1 : $page;
-		$limit = empty($count) ? 20 : $count;
+		$page = empty($page) ? 1 : $page;
+		$count = empty($count) ? 20 : $count;
+		$limit = $count;
 		$offset = ($page - 1)*$count;
 		$section = $this->input->post('section',true);
 
@@ -61,9 +64,27 @@ class Alarm extends Base_Controller {
 			$status = empty($filter['status']) ? 0 : $filter['status'];
 			$where[] = 'AI.status = '.$status;
 		}
-		if(!empty($alarmtype)) $filter['alarmtype'] = $alarmtype;
-		if(isset($endDate)) $filter['endDate'] = $endDate;
-		if(isset($startDate)) $filter['startDate'] = $startDate;
+		// if(!empty($alarmtype)) $filter['alarmtype'] = $alarmtype;
+		if(!empty($alarmtype) && is_numeric($alarmtype)) {
+			$t_ty = substr($alarmtype, 0,1);
+			$t_ty2 = substr($alarmtype, 1,1);
+			if ($t_ty == 1) {
+				$t_1 = 'batstatus';
+			}elseif ($t_ty == 2) {
+				$t_1 = 'panelstatus';
+			}elseif ($t_ty == 2) {
+				$t_1 = 'lampstatus';
+			}else {
+				$t_1 = 'tempstatus';
+			}
+
+			$where[] = 'AI.'.$t_1.' = '.$t_ty2;
+		}
+		// var_dump($alarmtype);
+		// if(isset($endDate)) $filter['endDate'] = $endDate;
+		if(isset($endDate) && !empty($endDate)) $where[] = 'AI.updatetime <= "'.$endDate.'"';
+		if(isset($startDate) && !empty($startDate)) $where[] = 'AI.updatetime >= "'.$startDate.'"';
+		// if(isset($startDate)) $filter['startDate'] = $startDate;
 
 		if (empty($download)) {
 			if (empty($type)) {

+ 82 - 8
api/application/controllers/Home.php

@@ -202,13 +202,13 @@ class Home extends Base_Controller {
             $join[] = ['table'=>'(select w1.* from history_info_log as w1 join (select lampid,max(updatetime) as maxTime from history_info_log group by lampid) as w2 on w1.lampid = w2.lampid AND w1.updatetime = w2.maxTime) as RI','cond'=>'L.id = RI.lampid','type'=>'inner'];
             $res = $this->Lamp_model->get_list_by_multi_join($where, 'sum(RI.totaldischarah) as discharge,sum(RI.totalchargeah) as charge',NULL, NULL, $join, NULL, NUll, 'L', true);
         }
-        $data['electricity'] = $res['discharge'];
-        $data['CO2_reduction'] = $res['discharge'];
-        $data['SO2_reduction'] = $res['discharge'];
-        $data['TCE_reduction'] = $res['discharge'];
-        $data['CO2_reduction'] = round($res['charge']*0.977, 3);
-        $data['SO2_reduction'] = round($res['charge']*0.977/2620*8.5*1000, 3);
-        $data['TCE_reduction'] = round($res['charge']*0.977/2620*1000, 3);
+        $data['electricity'] = round($res['discharge']/1000,1);
+        // $data['CO2_reduction'] = $res['discharge'];
+        // $data['SO2_reduction'] = $res['discharge'];
+        // $data['TCE_reduction'] = $res['discharge'];
+        $data['CO2_reduction'] = round($res['charge']*0.977/1000, 1);
+        $data['SO2_reduction'] = round($res['charge']*0.977/2620*8.5, 1);
+        $data['TCE_reduction'] = round($res['charge']*0.977/2620, 1);
 
     	exit(json_result('0000',$this->response['0000'],$data));
     }
@@ -679,7 +679,12 @@ class Home extends Base_Controller {
         foreach ($tempstatus as $key => $value) {
             $list[] = ['name'=>$value,'value'=>'4'.$key];
         }
-        exit(json_result('0000',$this->response['0000'],$list));
+        if ($this->os == 2) {
+            exit(json_result('0000',$this->response['0000'],['list'=>$list]));
+        }else{
+            exit(json_result('0000',$this->response['0000'],$list));
+        }
+        
     }
 
     // 省级设备数量
@@ -748,4 +753,73 @@ class Home extends Base_Controller {
         }
         exit(json_result('0000',$this->response['0000'],array('list'=>$list)));
     }
+
+    // app额外接口
+    public function app_home_data(){
+        $data = array(
+            'project_count' => 0,
+            'upa_count' => 0,
+            'sup_count' => 0,
+            'manu_count' => 0,
+            'insert_power' => 0,
+            'gen_power' => 0,
+            'user_power' => 0,
+            'light_time' => 0,
+        );
+
+        $projectIdArr = $this->get_project_id();
+        if (empty($projectIdArr)) exit(json_result('0000',$this->response['0000'],$data));
+
+        $role = $this->get_user_info('role');
+        $where = array();
+        $data['project_count'] = count($projectIdArr);
+        $where[] = 'P.id in ('.implode(',', $projectIdArr).')';
+        if ($role != SYSTEM_ADMIN){
+            $company = $this->get_user_info('company');
+            $where[] = 'P.company = '.$company;
+        }
+
+        $sql = 'select count(*) as total from (select L.manu from lampinfo L left join project P on L.projectid = P.id where '.implode(' AND ', $where).' AND L.manu != 0 AND L.manu != "" group by L.manu) t';
+        $total = $this->db->query($sql)->row_array();
+        $data['manu_count'] = $total['total'];
+
+        $sql = 'select count(*) as total from (select L.supplier from lampinfo L left join project P on L.projectid = P.id where '.implode(' AND ', $where).' AND L.supplier != 0 AND L.supplier != "" group by L.supplier) t';
+        $total = $this->db->query($sql)->row_array();
+        $data['sup_count'] = $total['total'];
+
+        $sql = 'select count(*) as total from (select G.id from lampinfo L left join project P on L.projectid = P.id left join global_location G on P.cityid = G.id where '.implode(' AND ', $where).' group by G.id) t';
+        $total = $this->db->query($sql)->row_array();
+        $data['upa_count'] = $total['total'];
+
+        $sql = 'select sum(L.totalLightTime) as light_time,sum(L.boardpower) as boardpower,sum(L.totalgeneration) as totalgeneration,sum(L.totalconsumption) as totalconsumption from lampinfo L left join project P on L.projectid = P.id where '.implode(' AND ', $where);
+        $total = $this->db->query($sql)->row_array();
+        $data['light_time'] = ceil($total['light_time']/60);
+        $data['insert_power'] = round($total['boardpower']/1000,3);
+        $data['gen_power'] = round($total['totalgeneration']/1000,3);
+        $data['user_power'] = round($total['totalconsumption']/1000,3);
+
+        exit(json_result('0000',$this->response['0000'],$data));
+    }
+
+    public function weather_info(){
+        $areaId = intval($this->input->post('areaId',true));
+        if (empty($areaId)) exit(json_result('0007',$this->response['0007']));
+
+        $res1 = $this->Global_location_model->get_one(['id'=>$areaId],'level,pid,chinese_name,longitude,latitude,english_name');
+
+        $url = 'https://free-api.heweather.net/s6/weather/forecast?location='.$res1['longitude'].','.$res1['latitude'].'&key=63dbc994630941fab269ad3c3af4d5d2';
+        // $url = 'https://way.jd.com/he/freeweather?city='.$res2['chinese_name'].'&appkey=a44fc7f907194098c69bb8e90003bca6';
+        $resData = request_post($url);
+        $arr = json_decode($resData,true);
+        if ($arr['HeWeather6'][0]['status'] == 'ok') {
+            $now = $arr['HeWeather6'][0]['daily_forecast'][0];
+            $daily_forecast = $arr['HeWeather6'][0]['daily_forecast'];
+            $data = ['weatherType'=>$now['cond_txt_d'],'code'=>$now['cond_code_d'],'tmp'=>intval(($now['tmp_min'] + $now['tmp_max'])/2)];
+
+        }else{
+            $data = ['weatherType'=>'','code'=>'','tmp'=>''];
+        }
+
+        exit(json_result('0000',$this->response['0000'],$data));
+    }
 }

+ 22 - 16
api/application/controllers/Lampcontrol.php

@@ -103,11 +103,12 @@ class Lampcontrol extends Base_Controller {
         $version = $this->session->userdata('version');
         if ($lite == 1) {
             if(empty($fields)){
-                $fields = 'L.id, L.number,L.address,RI.updatetime,RI.loadpower,RI.batvoltage as battvoltage,L.netstatus,L.lighteness,L.status';
+                $fields = 'L.id, L.number,L.address,RI.updatetime,RI.loadpower,RI.batvoltage as battvoltage,L.netstatus,L.lighteness,L.status,L.battstatus,L.chargestage';
             }else{
                 $fields .= ",RI.updatetime";
             }
             $join = array();
+            $join[] = ['table'=>'(select t1.* from realtime_info_log t1, (select lampid, max(updatetime) as maxtime from realtime_info_log group by lampid) t2 where t1.lampid = t2.lampid and t1.updatetime = t2.maxtime) as RI', 'cond'=>'L.id = RI.lampid', 'type'=>'left'];
             $data['lamps'] = $this->Lamp_model->get_list_by_join($filter, $fields,$limit, $offset, $join, "L.number ASC", NUll, 'L');
         } else {
             if(empty($fields) || empty($field1)){
@@ -684,6 +685,7 @@ class Lampcontrol extends Base_Controller {
             }elseif (strpos('light_time', $key)) {
                 $t = explode(':', $value);
                 $m = $t[0]*60+$t[1];
+                $m = round($m/10);
                 $word = substr('00'.base_convert($m, 10, 16), -2);
             }elseif ($key == 'load_current') {
                 $word = substr('0000'.base_convert(round($value/10), 10, 16), -4);
@@ -1002,9 +1004,9 @@ class Lampcontrol extends Base_Controller {
 
 
     private function format_date_en($date){
-        $h = floor($date/3600);
+        $h = floor($date/60);
         $h = $h > 10 ? $h : '0'.$h;
-        $t = floor($date%3600/60);
+        $t = floor($date%60);
         $t = $t > 10 ? $t : '0'.$t;
         return $h.':'.$t;
     }
@@ -1130,14 +1132,14 @@ class Lampcontrol extends Base_Controller {
         // $res['end_current'] = number_format($res['end_current'],2);
         // $res['end_voltage'] = number_format($res['end_voltage'],1);
         // $res['begin_voltage'] = number_format($res['begin_voltage'],1);
-        $res['first_light_time'] = $this->format_date_en($res['first_light_time']);
-        $res['second_light_time'] = $this->format_date_en($res['second_light_time']);
-        $res['third_light_time'] = $this->format_date_en($res['third_light_time']);
-        $res['fourth_light_time'] = $this->format_date_en($res['fourth_light_time']);
-        $res['fifth_light_time'] = $this->format_date_en($res['fifth_light_time']);
-        $res['sixth_light_time'] = $this->format_date_en($res['sixth_light_time']);
-        $res['seventh_light_time'] = $this->format_date_en($res['seventh_light_time']);
-        $res['tenth_light_time'] = $this->format_date_en($res['tenth_light_time']);
+        $res['first_light_time'] = $this->format_date_en($res['first_light_time']*10);
+        $res['second_light_time'] = $this->format_date_en($res['second_light_time']*10);
+        $res['third_light_time'] = $this->format_date_en($res['third_light_time']*10);
+        $res['fourth_light_time'] = $this->format_date_en($res['fourth_light_time']*10);
+        $res['fifth_light_time'] = $this->format_date_en($res['fifth_light_time']*10);
+        $res['sixth_light_time'] = $this->format_date_en($res['sixth_light_time']*10);
+        $res['seventh_light_time'] = $this->format_date_en($res['seventh_light_time']*10);
+        $res['tenth_light_time'] = $this->format_date_en($res['tenth_light_time']*10);
         // unset($res['id']);
         // unset($res['updatetime']);
         $data = $res;
@@ -1527,7 +1529,7 @@ class Lampcontrol extends Base_Controller {
         if ($table == 'lamp_info_log') {
             $table = 'realtime_info_log';
             $total = $this->RealtimeInfoLog_model->get_count(['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate]);
-            $res = $this->RealtimeInfoLog_model->get_list(['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate], 'loadvoltage as lampvoltage,lighteness,loadcurrent as lampcurrent,loadpower as lamppower,updatetime,loadWorkTimeDay as daychargemincurrent',$count, ($page-1)*$count, 'updatetime desc,id desc', NUll);
+            $res = $this->RealtimeInfoLog_model->get_list(['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate], 'loadvoltage as lampvoltage,lighteness,loadcurrent as lampcurrent,loadpower as lamppower,updatetime,loadWorkTimeDay as daychargemincurrent,daydischarmaxpow',$count, ($page-1)*$count, 'updatetime desc,id desc', NUll);
             // $res = $this->Lamp_model->getListForInfoLog($lamp_id, $table, ($page-1)*$count, $count,$beginDate,$endDate);
         }elseif ($table == 'system_info_log') {
             $total = $this->Lamp_model->getCountForInfoLog($lamp_id, $table,$beginDate,$endDate);
@@ -1538,7 +1540,7 @@ class Lampcontrol extends Base_Controller {
             ];
             $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
             $total = $this->RealtimeInfoLog_model->get_count($where,'count(*) as total');
-            $fields = 'batvoltage as battvoltage,chgtemper as batttemper,updatetime,DayOverDisChgTimes as overtimes';
+            $fields = 'batvoltage as battvoltage,chgtemper as batttemper,updatetime,DayOverDisChgTimes as overtimes,battstatus,chargestage,voltagedaymin,voltagedaymax,daybattmintemper,daybattmaxtemper';
             $res = $this->RealtimeInfoLog_model->get_list($where, $fields,$count, ($page-1)*$count, 'updatetime desc,id desc');
         }else{
 
@@ -1547,7 +1549,7 @@ class Lampcontrol extends Base_Controller {
             ];
             $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
             $total = $this->RealtimeInfoLog_model->get_count($where,'count(*) as total');
-            $fields = 'panelvoltage as solarvoltage,updatetime,panelcurrent as solarcurrent,panelpower as solarpower';
+            $fields = 'panelvoltage as solarvoltage,updatetime,panelcurrent as solarcurrent,panelpower as solarpower,daychargemaxpow';
             $res = $this->RealtimeInfoLog_model->get_list($where, $fields,$count, ($page-1)*$count, 'updatetime desc,id desc');
             // $total = $this->Lamp_model->getCountForInfoLog($lamp_id, $table,$beginDate,$endDate);
             // $res = $this->Lamp_model->getListForInfoLog($lamp_id, $table, ($page-1)*$count, $count,$beginDate,$endDate);
@@ -2033,13 +2035,17 @@ class Lampcontrol extends Base_Controller {
                 exit(json_result('0418',$this->response['0418']));
             }
             $beginDate = $res[0];
-            $endDate = $res[1];
+            $endDate = date('Y-m-d 23:59:59',strtotime($res[1]));
+            // var_dump($endDate);die;
         }
         $sql = "SELECT P.id,P.patrolinterval FROM lampinfo AS L LEFT JOIN project as P on P.id = L.projectid  WHERE L.id = {$lampId} limit 1";        
         $lampData = $this->db->query($sql)->row_array();
         $timezoneData = $this->Project_model->get_timezone_by_projectid($lampData['id']);
         $timezone = $timezoneData['value'];
 
+        $beginDate = date('Y-m-d H:i:s',strtotime($beginDate) - $timezone * 3600);
+        $endDate = date('Y-m-d H:i:s',strtotime($endDate) - $timezone * 3600);
+
         $data = ['patrolinterval'=>$lampData['patrolinterval']];
         if ($type == 0) {  // 路灯
             $sql = 'select LI.loadvoltage as lampvoltage,LI.loadcurrent as lampcurrent,LI.lighteness,LI.loadpower as lamppower,LI.updatetime from realtime_info_log as LI where LI.lampid = '.$lampId.' and LI.updatetime >= "'.$beginDate.'" and LI.updatetime <= "'.$endDate.'"';
@@ -2051,7 +2057,7 @@ class Lampcontrol extends Base_Controller {
                 $temp['lampcurrent'][] = $value['lampcurrent'];
                 $temp['lamppower'][] = $value['lamppower'];
                 $temp['lighteness'][] = $value['lighteness'];
-                $temp['updatetime'][] = date_change($value['updatetime'],8,$timezone);
+                $temp['updatetime'][] = date_change($value['updatetime'],0,$timezone);
                 if (!isset($data['maxcurrent'])) {
                     $data['maxcurrent'] = $value['lampcurrent'];
                 }else{

+ 5 - 3
api/application/controllers/Map.php

@@ -692,7 +692,8 @@ class Map extends Base_Controller{
         if (!empty($arr['num'])) {
             $online_arr = $this->Lamp_model->get_count(['projectid'=>$project_id,'netStatus'=>1]);
             $lighting_arr = $this->Lamp_model->getCountByFilter($role, 0, $project_id, $userid, array('L.status'=>1));
-            $failure = $this->Lamp_model->get_fault_count(array('L.projectid'=>$project_id,'L.isfaulted'=>1), $role, 0, $userid);
+            // $failure = $this->Lamp_model->get_fault_count(array('L.projectid'=>$project_id,'L.isfaulted'=>1), $role, 0, $userid);
+            $failure = 0;
 
             $data['online_rate'] = round($online_arr['num']/$arr['num']*100, 2);
             $data['lighting_rate'] = round($lighting_arr['num']/$arr['num']*100, 2);
@@ -866,7 +867,7 @@ class Map extends Base_Controller{
     	$failStatus = intval($this->input->post('failStatus',true));
     	if (!empty($failStatus)) $where['status'] = 1;
 
-    	$list = $this->Lamp_model->get_list_in(null, array(), 'L.id,L.number,N.status as netStatus,L.lighteness,L.isfaulted,AI.stralarmtype,AI.status as failStatus',$where);
+    	$list = $this->Lamp_model->get_list_in(null, array(), 'L.id,L.number,L.netstatus as netStatus,L.lighteness,L.isfaulted',$where);
     	$version = $this->session->userdata('version');
     	$data['lampList'] = array();
     	foreach ($list as $value) {
@@ -944,7 +945,8 @@ class Map extends Base_Controller{
         if (!empty($arr['num'])) {
             $online_arr = $this->Lamp_model->getOnlineCount($role, 0, $project_id, $userid, 1);
             $lighting_arr = $this->Lamp_model->getCountByFilter($role, 0, $project_id, $userid, array('L.status'=>1));
-            $failure = $this->Lamp_model->get_fault_count(array('L.projectid'=>$project_id,'L.isfaulted'=>1), $role, 0, $userid);
+            // $failure = $this->Lamp_model->get_fault_count(array('L.projectid'=>$project_id,'L.isfaulted'=>1), $role, 0, $userid);
+            $failure = 0;
             $data['online_rate'] = round($online_arr['num']/$arr['num']*100, 2);
             $data['lighting_rate'] = round($lighting_arr['num']/$arr['num']*100, 2);
             $data['online_count'] = intval($online_arr['num']);

+ 11 - 2
api/application/controllers/Project.php

@@ -430,7 +430,11 @@ class Project extends Base_Controller {
                 $data = array_values($temp);
             }
 
-            exit(json_result('0000',$this->response['0000'],$data));
+            if ($this->os == 2) {
+                exit(json_result('0000',$this->response['0000'],['list'=>$data]));
+            }else{
+                exit(json_result('0000',$this->response['0000'],$data));
+            }
         }else{
             if ($role != SYSTEM_ADMIN) $where['P.company'] = $company;
 
@@ -492,7 +496,12 @@ class Project extends Base_Controller {
                 }
                 $data = array_values($temp2);
             }
-            exit(json_result('0000',$this->response['0000'],$data));
+            if ($this->os == 2) {
+                exit(json_result('0000',$this->response['0000'],['list'=>$data]));
+            }else{
+                exit(json_result('0000',$this->response['0000'],$data));
+            }
+            
         }
     }
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 74 - 71
api/application/controllers/Report.php


+ 3 - 1
api/application/helpers/function_helper.php

@@ -423,7 +423,9 @@ function weather_translate_ru($code){
 }
 
 //输出json
-function json_result($code, $msg, $data = array()) {
+// function json_result($code, $msg, $data = array()) {
+function json_result($code, $msg, $data = array(),$resType = 0) {
+    $data = empty($data) && $resType == 0? new stdClass() : $data;
     $res = array('code' => $code,'msg' => $msg,'data' => $data);
     $CI =& get_instance();
     $clientId = $CI->input->post('clientId',true);

+ 8 - 10
api/application/models/Lamp_model.php

@@ -49,11 +49,11 @@ class Lamp_model extends Base_model {
 			$this->db->where('L.id', $filter['lampid']);
 		}
 
-		if(isset($filter['status']) && is_numeric($filter['status'])){
-			$this->db->where('L.isfaulted', $filter['status']);
-			$this->db->where('AI.stralarmtype !=', '');
-			$this->db->where('AI.status', 0);
-		}
+		// if(isset($filter['status']) && is_numeric($filter['status'])){
+		// 	$this->db->where('L.isfaulted', $filter['status']);
+		// 	$this->db->where('AI.stralarmtype !=', '');
+		// 	$this->db->where('AI.status', 0);
+		// }
         if(isset($filter['lightStatus']) && is_numeric($filter['lightStatus'])){
 			$this->db->where('L.status', $filter['lightStatus']);
 		}
@@ -126,7 +126,7 @@ class Lamp_model extends Base_model {
 	        // $this->db->join('battery_info_log as BI', 'L.id = BI.lampid AND BI.lampid=T.lampid AND BI.updatetime = T.time', 'left');
 	        // $this->db->join('history_info_log as HI', 'L.id = HI.lampid AND HI.lampid=T.lampid AND HI.updatetime = T.time', 'left');
 	        // $this->db->join('alarm_info_log as AI', 'L.id = AI.lampid AND AI.lampid=T.lampid AND AI.updatetime = T.time', 'left');
-	        $this->db->join('(select t1.* from alarm_info_log t1, (select lampid, max(updatetime) as maxtime from alarm_info_log group by lampid) t2 where t1.lampid = t2.lampid and t1.updatetime = t2.maxtime) as AI', 'L.id = AI.lampid', 'left');
+	        // $this->db->join('(select t1.* from alarm_info_log t1, (select lampid, max(updatetime) as maxtime from alarm_info_log group by lampid) t2 where t1.lampid = t2.lampid and t1.updatetime = t2.maxtime) as AI', 'L.id = AI.lampid', 'left');
 	        // $this->db->join('solar_info_log as SI', 'L.id = SI.lampid AND SI.lampid=T.lampid AND SI.updatetime = T.time', 'left');
 	        // $this->db->join('electric_info_log as EI', 'L.id = EI.lampid AND EI.lampid=T.lampid AND EI.updatetime = T.time', 'left');
 	        // $this->db->join('system_info_log as SIL', 'L.id = SIL.lampid AND SIL.lampid=T.lampid AND SIL.updatetime = T.time', 'left');
@@ -619,8 +619,6 @@ class Lamp_model extends Base_model {
 		// 	WHERE L.id = {$id} limit 1";
 		$sql = "SELECT {$field}, L.id as id
 			FROM 	  ( select * from lampinfo where id = {$id} limit 1 ) AS L
-			LEFT JOIN network as N on N.id = L.networkid 
-			LEFT JOIN ( select * from alarm_info_log where lampid = {$id} order by updatetime desc limit 1 ) AS alog ON L.id = alog.lampid 
 			LEFT JOIN ( select * from battery_cmd where id = {$id} order by updatetime desc limit 1 ) AS BC ON L.id = BC.id
 			WHERE L.id = {$id} limit 1";		
 		$query = $this->db->query($sql);
@@ -868,12 +866,12 @@ class Lamp_model extends Base_model {
 		}
 
 		if ($nw_status !== false) {
-			$andCondition = 'AND N.status = '.$nw_status;
+			$andCondition = 'AND L.netstatus = '.$nw_status;
 		} else {
 			$andCondition = '';
 		}
 
-		$sql = "SELECT COUNT(L.id) AS num FROM lampinfo as L left join network as N on L.networkid = N.id WHERE {$condition} {$andCondition}";
+		$sql = "SELECT COUNT(L.id) AS num FROM lampinfo as L WHERE {$condition} {$andCondition}";
 		$query = $this->db->query($sql);
 		$arrRet = $query->row_array();
 		return $arrRet;

+ 43 - 32
sendCmd/sumData.php

@@ -5,50 +5,59 @@ date_default_timezone_set('Asia/Shanghai');
 
 $config = [
     'hostname' => 'rm-wz98r5cn33zq4ou980o.mysql.rds.aliyuncs.com',
-	'username' => 'lampmanager',
-	'password' => 'lampmanager@2019',
-	'dbname' => 'lampmanager',
+	'username' => 'idcol20',
+	'password' => 'idcol@1234',
+	'dbname' => 'idcol',
 ];
 while (1) {
 	$db = new Db($config);
 	$t = date('H:i',time());
-	if ($t == '02:05') {
-		$lampList = $db->query('select id,logtime from lampinfo order by id asc');
-		// $minTime = $db->query('select max(updatetime) as minTime from statistics');
-		// $sum = floor((time() - strtotime($minTime[0]['minTime'])) / 86400);
-
-		// for ($i=0; $i < $sum; $i++) { 
-			// $fromDate = date('Y-m-d 00:00:00',strtotime($minTime[0]['minTime']) + ($i+1) * 24 * 3600);
-			// $toDate = date('Y-m-d 23:59:59',strtotime($minTime[0]['minTime']) + ($i+1) * 24 * 3600);
-			$fromDate = date('Y-m-d 00:00:00',time() - 24 * 3600);
-			$toDate = date('Y-m-d 23:59:59',time() - 24 * 3600);
+	// if ($t == '02:05') {
+	if (1) {
+		$lampList = $db->query('select id,updatetime from lampinfo order by id asc');
+		// $minTime = $db->query('select max(updatetime) as minTime from new_statistics where updatetime is not null');
+		// if (empty($minTime) || empty($minTime[0]) || empty($minTime[0]['minTime'])) {
+			$sql = 'select min(updatetime) as minTime from realtime_info_log where updatetime is not null AND updatetime != "1970-01-01 08:00:00"';
+			$minTime = $db->query($sql);
+			// var_dump($minTime);die;
+		// }
+		// var_dump($minTime);die;
+		$sum = floor((time() - strtotime($minTime[0]['minTime'])) / 86400);
+		// var_dump($sum);die;
+		for ($i=0; $i < $sum; $i++) { 
+			$fromDate = date('Y-m-d 00:00:00',strtotime($minTime[0]['minTime']) + ($i+1) * 24 * 3600);
+			$toDate = date('Y-m-d 23:59:59',strtotime($minTime[0]['minTime']) + ($i+1) * 24 * 3600);
+			// $fromDate = date('Y-m-d 00:00:00',time() - 24 * 3600);
+			// $toDate = date('Y-m-d 23:59:59',time() - 24 * 3600);
 			// var_dump($fromDate);var_dump($toDate);
 
 			$sql = 'select lampid from statistics WHERE updatetime >= "'.$fromDate.'" AND updatetime <= "'.$toDate.'"';
 			$data = $db->query($sql);
-			$lampidData = [];
-			foreach ($data as $v) {
-				$lampidData[] = $v['lampid'];
-			}
+			// $lampidData = [];
+			// foreach ($data as $v) {
+			// 	$lampidData[] = $v['lampid'];
+			// }
 			foreach ($lampList as $value) {
-				if (empty($value['logtime'])) continue;
-				if (in_array($value['id'], $lampidData)) continue;
+				if (empty($value['updatetime'])) continue;
+				// if (in_array($value['id'], $lampidData)) continue;
 
 				// if (empty($data[0]['id'])) {
-					$sql = 'select max(updatetime) as maxTime from lamp_info_log WHERE updatetime >= "'.$fromDate.'" AND updatetime <= "'.$toDate.'" AND lampid = '.$value['id'];
+					$sql = 'select max(updatetime) as maxTime from realtime_info_log WHERE updatetime >= "'.$fromDate.'" AND updatetime <= "'.$toDate.'" AND lampid = '.$value['id'];
 					$updatetime = $db->query($sql);
+					var_dump($updatetime);
 					if (empty($updatetime[0]['maxTime'])) {
 						usleep(10000);
 						continue;
 					}
 					$res = get_data($value['id'],$updatetime[0]['maxTime'],$db);
+					// var_dump($res);
 					$res['lampid'] = $value['id'];
 					$res['updatetime'] = $updatetime[0]['maxTime'];
 					$db->table('statistics')->insert($res);
 
-					$lampData = $db->query('select id from new_statistics WHERE lampid = '.$value['id']);
+					$lampData = $db->query('select id from new_statistics WHERE lampid = '.$value['id'].' AND date_format(updatetime,"%Y-%m-%d") = "'.date('Y-m-d',strtotime($res['updatetime'])).'"');
 					if (!empty($lampData) && !empty($lampData[0]['id'])) {
-						$db->table('new_statistics')->where('lampid='.$value['id'])->update($res);
+						$db->table('new_statistics')->where('id='.$lampData[0]['id'])->update($res);
 					}else{
 						$db->table('new_statistics')->insert($res);
 					}
@@ -56,14 +65,15 @@ while (1) {
 				// }
 				
 			}
-		// }	
+		}	
+		var_dump('ok');die;
 	}
 	$db->close();
 	sleep(30);
 } 
 function get_data($id,$date,$db){
 	
-	$table = 'electric_info_log';
+	$table = 'realtime_info_log';
 
 	$beginDateDay = date('Y-m-d 00:00:00',strtotime($date));
 	$endDateDay   = date('Y-m-d 23:59:59',strtotime($date));
@@ -76,18 +86,18 @@ function get_data($id,$date,$db){
 	
 	
 	// 当天发电量,用电量
-	$query = "SELECT lampid,daygeneration,dayconsumption FROM {$table}
+	$query = "SELECT lampid,chargeday as daygeneration,dischargeday as dayconsumption FROM {$table}
 			WHERE lampid =".$id." 
 			AND updatetime>='".$beginDateDay."' 
 			AND updatetime<='".$endDateDay."' order by updatetime desc limit 1";	
-	
 	$query = $db->query($query);
+	
 	$data['dayGeneration'] = empty($query[0]['daygeneration']) ? 0 : round($query[0]['daygeneration'],2);
 	$data['dayConsumption'] = empty($query[0]['dayconsumption']) ? 0 : round($query[0]['dayconsumption'],2);
 	
 
 	// 总发电量,总用电量
-	$query = "SELECT totalgeneration,totalconsumption FROM {$table}
+	$query = "SELECT totalchargeah as totalgeneration,totaldischarah as totalconsumption FROM history_info_log
 			WHERE lampid =".$id." 
 			AND updatetime>='".$beginDateDay."' 
 			AND updatetime<='".$endDateDay."' order by updatetime desc limit 1";	
@@ -96,7 +106,7 @@ function get_data($id,$date,$db){
 	$data['totalConsumption'] = empty($query[0]['totalconsumption']) ? 0 : round($query[0]['totalconsumption'],2);
 	
 	//月发电量和用电量
-	$query = "SELECT totalgeneration AS lastmonthgeneration,totalconsumption AS lastmonthconsumption FROM {$table} 
+	$query = "SELECT totalchargeah AS lastmonthgeneration,totaldischarah AS lastmonthconsumption FROM history_info_log 
 			WHERE lampid =".$id." AND updatetime<'".$beginDateMonth."' order by updatetime desc limit 1";	
 	
 	$query = $db->query($query);
@@ -108,7 +118,7 @@ function get_data($id,$date,$db){
 	$data['monthGeneration'] = $query[0]['lastmonthgeneration'] >= $data['totalGeneration'] ? 0 : $data['totalGeneration'] - $query[0]['lastmonthgeneration'];
 	
 	//年发电量和用电量
-	$query = "SELECT totalgeneration AS lastyeargeneration,totalconsumption AS lastyearconsumption FROM {$table} 
+	$query = "SELECT totalchargeah AS lastyeargeneration,totaldischarah AS lastyearconsumption FROM history_info_log 
 			WHERE lampid =".$id." AND updatetime<'".$beginDateYear."'";		
 	$query = $db->query($query);
 	$query[0]['lastyeargeneration'] = empty($query[0]['lastyeargeneration']) ? 0 : round($query[0]['lastyeargeneration'],2);
@@ -117,11 +127,12 @@ function get_data($id,$date,$db){
 	$data['yearGeneration'] = $query[0]['lastyeargeneration'] >= $data['totalGeneration'] ? 0 : $data['totalGeneration'] - $query[0]['lastyeargeneration'];
 
 	// 当天蓄电池累计数据
-	$query = "SELECT max(daycharmaxcurrent) as dayCharMaxCurr,max(daydischarmaxcurrent) as dayDischarMaxCurr,min(daybattmintemper) as dayMinTemper,max(daybattmaxtemper) as dayMaxTemper,max(daychargemaxpow) as dayCharMaxPower,max(daydischarmaxpow) as dayDischarMaxPower,max(voltagedaymax) as dayMaxVoltage,min(voltagedaymin) as dayMinVoltage FROM battery_info_log
+	$query = "SELECT max(daycharmaxcurrent) as dayCharMaxCurr,max(daydischarmaxcurrent) as dayDischarMaxCurr,min(daybattmintemper) as dayMinTemper,max(daybattmaxtemper) as dayMaxTemper,max(daychargemaxpow) as dayCharMaxPower,max(daydischarmaxpow) as dayDischarMaxPower,max(voltagedaymax) as dayMaxVoltage,min(voltagedaymin) as dayMinVoltage FROM realtime_info_log
 			WHERE lampid =".$id." 
 			AND updatetime>='".$beginDateDay."' 
 			AND updatetime<='".$endDateDay."'";
 	$query = $db->query($query);
+	
 	$data['dayCharMaxCurr'] = empty($query[0]['dayCharMaxCurr']) ? 0 : round($query[0]['dayCharMaxCurr'],2);
 	$data['dayDischarMaxCurr'] = empty($query[0]['dayDischarMaxCurr']) ? 0 : round($query[0]['dayDischarMaxCurr'],2);
 	$data['dayMinTemper'] = empty($query[0]['dayMinTemper']) ? 0 : round($query[0]['dayMinTemper'],2);
@@ -132,7 +143,7 @@ function get_data($id,$date,$db){
 	$data['dayMinVoltage'] = empty($query[0]['dayMinVoltage']) ? 0 : round($query[0]['dayMinVoltage'],2);
 
 	// 当月蓄电池累计数据
-	$query = "SELECT max(daycharmaxcurrent) as monthCharMaxCurr,max(daydischarmaxcurrent) as monthDischarMaxCurr,min(daybattmintemper) as monthMinTemper,max(daybattmaxtemper) as monthMaxTemper,max(daychargemaxpow) as monthCharMaxPower,max(daydischarmaxpow) as monthDischarMaxPower,max(voltagedaymax) as monthMaxVoltage,min(voltagedaymin) as monthMinVoltage FROM battery_info_log
+	$query = "SELECT max(daycharmaxcurrent) as monthCharMaxCurr,max(daydischarmaxcurrent) as monthDischarMaxCurr,min(daybattmintemper) as monthMinTemper,max(daybattmaxtemper) as monthMaxTemper,max(daychargemaxpow) as monthCharMaxPower,max(daydischarmaxpow) as monthDischarMaxPower,max(voltagedaymax) as monthMaxVoltage,min(voltagedaymin) as monthMinVoltage FROM realtime_info_log
 			WHERE lampid =".$id." 
 			AND updatetime>='".$beginDateMonth."' 
 			AND updatetime<='".$endDateMonth."'";
@@ -147,7 +158,7 @@ function get_data($id,$date,$db){
 	$data['monthMinVoltage'] = empty($query[0]['monthMinVoltage']) ? 0 : round($query[0]['monthMinVoltage'],2);
 
 	// 当年蓄电池累计数据
-	$query = "SELECT max(daycharmaxcurrent) as yearCharMaxCurr,max(daydischarmaxcurrent) as yearDischarMaxCurr,min(daybattmintemper) as yearMinTemper,max(daybattmaxtemper) as yearMaxTemper,max(daychargemaxpow) as yearCharMaxPower,max(daydischarmaxpow) as yearDischarMaxPower,max(voltagedaymax) as yearMaxVoltage,min(voltagedaymin) as yearMinVoltage FROM battery_info_log
+	$query = "SELECT max(daycharmaxcurrent) as yearCharMaxCurr,max(daydischarmaxcurrent) as yearDischarMaxCurr,min(daybattmintemper) as yearMinTemper,max(daybattmaxtemper) as yearMaxTemper,max(daychargemaxpow) as yearCharMaxPower,max(daydischarmaxpow) as yearDischarMaxPower,max(voltagedaymax) as yearMaxVoltage,min(voltagedaymin) as yearMinVoltage FROM realtime_info_log
 			WHERE lampid =".$id." 
 			AND updatetime>='".$beginDateYear."' 
 			AND updatetime<='".$endDateYear."'";

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
web/css/app.005925ec.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
web/css/chunk-a80ca5cc.20a235c4.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/css/chunk-3520c2d6.17872edd.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/css/chunk-3520c2d6.5c857fb5.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
web/css/chunk-3f41bc09.846ab633.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
web/index.html


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 0
web/js/app.307669c9.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/app.307669c9.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 2
web/js/app.db74df5a.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/app.db74df5a.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 2
web/js/chunk-27550a72.81fd3b05.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/chunk-27550a72.498f1b83.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/chunk-27550a72.81fd3b05.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 0
web/js/chunk-28ec4e83.f7aafb4b.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/chunk-28ec4e83.f7aafb4b.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 0
web/js/chunk-3520c2d6.c39c83f8.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/chunk-3520c2d6.c39c83f8.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 2
web/js/chunk-3520c2d6.d1708aa5.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/chunk-3520c2d6.d1708aa5.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 0
web/js/chunk-3f41bc09.df967282.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/chunk-3f41bc09.df967282.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 2
web/js/chunk-3f41bc09.f0656c62.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/chunk-3f41bc09.f0656c62.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 2
web/js/chunk-6b1d2eca.3e5f4f62.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/chunk-6b1d2eca.3e5f4f62.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 0
web/js/chunk-6b1d2eca.96bf3759.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/chunk-6b1d2eca.96bf3759.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 4
web/js/chunk-9927e514.6d5a3946.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/chunk-9927e514.6d5a3946.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 4 - 0
web/js/chunk-9927e514.6e4e1b95.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 0
web/js/chunk-9927e514.6e4e1b95.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 2
web/js/chunk-a80ca5cc.13833273.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1
web/js/chunk-a80ca5cc.13833273.js.map


+ 7 - 3
webConfig/public/index.html

@@ -13,9 +13,13 @@
     <script type="text/javascript" src="./bmap.min.js"></script> -->
     <!-- <script type="text/javascript" src="js/echarts.min.js"></script> -->
     <script type="text/javascript" src="js/echarts.js"></script>
-    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.6&key=192cfd61cc0fbe8c2cf8d5c314f43bb3&plugin=AMap.MarkerClusterer,AMap.ToolBar,AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Geolocation"></script>
-    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD_FHQc9qTI5SPvTBV0SQ-aPS2HJHm8H9U&language=en"></script>
-    <script type="text/javascript" src="./js/richmarker.js"></script>
+
+    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.6&key=192cfd61cc0fbe8c2cf8d5c314f43bb3&plugin=AMap.MarkerClusterer,AMap.ToolBar,AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Geolocation"></script><!-- 百度地图 -->
+    
+    <script type="text/javascript" src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
+
+    <!-- <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD_FHQc9qTI5SPvTBV0SQ-aPS2HJHm8H9U&language=en"></script> -->
+    <!-- <script type="text/javascript" src="./js/richmarker.js"></script> -->
     <noscript>
       <strong>We're sorry but IDCOL doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
     </noscript>

+ 54 - 1
webConfig/src/App.vue

@@ -198,10 +198,63 @@
                     updateRemRatio:this_.updateRemRatio+1,
                 })
             }
+            //ie 
+            if (navigator.browserLanguage != "undefined" && navigator.browserLanguage != null) { 
+                if (navigator.systemLanguage == "zh-CN") {
+                    this_.$store.commit('BROWSERLANGUAGE',{
+                        browserLanguage:'bd',
+                    })
+                    // this_.loadJS('https://webapi.amap.com/maps?v=1.4.6&key=192cfd61cc0fbe8c2cf8d5c314f43bb3&plugin=AMap.MarkerClusterer,AMap.ToolBar,AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder',function(){})
 
+                }else{
+                    this_.$store.commit('BROWSERLANGUAGE',{
+                        browserLanguage:'google',
+                    })
+                    this_.loadJS('https://maps.googleapis.com/maps/api/js?key=AIzaSyD_FHQc9qTI5SPvTBV0SQ-aPS2HJHm8H9U&language=en',function(){
+                        this_.loadJS('./js/richmarker.js',function(){})
+                    })
+                }
+            } 
+            //firefox、chrome,360 
+            else { 
+                if (navigator.language == "zh-CN") {
+                    // this_.loadJS('https://webapi.amap.com/maps?v=1.4.6&key=192cfd61cc0fbe8c2cf8d5c314f43bb3&plugin=AMap.MarkerClusterer,AMap.ToolBar,AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder',function(){})
+                    this_.$store.commit('BROWSERLANGUAGE',{
+                        browserLanguage:'bd',
+                    })
+                }else{
+                    this_.$store.commit('BROWSERLANGUAGE',{
+                        browserLanguage:'google',
+                    })
+                    this_.loadJS('https://maps.googleapis.com/maps/api/js?key=AIzaSyD_FHQc9qTI5SPvTBV0SQ-aPS2HJHm8H9U&language=en',function(){
+                        this_.loadJS('./js/richmarker.js',function(){})
+                    })
+                }
+            }
             
         },
         methods:{
+            loadJS( url, callback ){
+                let script = document.createElement('script'),
+                fn = callback || function(){};
+                script.type = 'text/javascript';
+                //IE
+                if(script.readyState){
+                  script.onreadystatechange = function(){
+                    if( script.readyState == 'loaded' || script.readyState == 'complete' ){
+                      script.onreadystatechange = null;
+                      fn();
+                    }
+                  };
+                }else{
+                  //其他浏览器
+                  script.onload = function(){
+                    fn();
+                  };
+                }
+                script.src = url;
+                document.getElementsByTagName('head')[0].appendChild(script);
+            },
             login(){
                 var storage = window.localStorage;
                 let client_key = jqueryK.md5(navigator.userAgent);
@@ -368,7 +421,7 @@
       /*滚动条样式*/
     .el-table__body-wrapper::-webkit-scrollbar {/*滚动条整体样式*/
         width: 3px;     /*高宽分别对应横竖滚动条的尺寸*/
-        height: 5px;
+        height: 8px;
     }
     .el-table__body-wrapper::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
         border-radius: 3px;

+ 5 - 5
webConfig/src/components/header.vue

@@ -10,22 +10,22 @@
                         <div class="nav_ul">
                             <div class="nav_title"><span class="span">Control Deck</span></div>
                             <div class="nav_li" @click="linkToFun('/dashboard')" :class="{'select':routerStr == '/dashboard'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Dashboard</span></div>
-                            <div class="nav_li" @click="linkToFun('/projectManagement')" :class="{'select':routerStr == '/projectManagement'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Project Management</span></div>
+                            <div class="nav_li" @click="linkToFun('/projectManagement')" :class="{'select':routerStr == '/projectManagement'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Project management</span></div>
                             <!-- <div class="nav_li"><i class="iconfont icon-daohangjiantou"></i><span class="span">Group Configuration</span></div>
                             <div class="nav_li"><i class="iconfont icon-daohangjiantou"></i><span class="span">Video Surveillance</span></div>
                             <div class="nav_li"><i class="iconfont icon-daohangjiantou"></i><span class="span">Weather Monitoring</span></div> -->
-                            <div class="nav_li" @click="linkToFun('/GIS')" :class="{'select':routerStr == '/GIS'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">GIS Map</span></div>
+                            <div class="nav_li" @click="linkToFun('/GIS')" :class="{'select':routerStr == '/GIS'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">GIS map</span></div>
                         </div>
                         <div class="nav_ul">
                             <div class="nav_title"><span class="span">Maintain</span></div> 
                             <div class="nav_li" @click="linkToFun('/alarmMaintenance')" :class="{'select':routerStr == '/alarmMaintenance'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Alarm maintenance</span></div>
-                            <div class="nav_li" @click="linkToFun('/historicalData')" :class="{'select':routerStr == '/historicalData'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Historical Data</span></div>
+                            <div class="nav_li" @click="linkToFun('/historicalData')" :class="{'select':routerStr == '/historicalData'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Historical data</span></div>
                         </div>
                         <div class="nav_ul">
                             <div class="nav_title"><span class="span">Set Up</span></div>
-                            <div class="nav_li" @click="linkToFun('/userManagement')" :class="{'select':routerStr == '/userManagement'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">User Management</span></div>
+                            <div class="nav_li" @click="linkToFun('/userManagement')" :class="{'select':routerStr == '/userManagement'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">User management</span></div>
                             <!-- <div class="nav_li"><i class="iconfont icon-daohangjiantou"></i><span class="span">User Management</span></div> -->
-                            <div class="nav_li" @click="linkToFun('/operationLog')" :class="{'select':routerStr == '/operationLog'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Operation Log</span></div>
+                            <div class="nav_li" @click="linkToFun('/operationLog')" :class="{'select':routerStr == '/operationLog'}"><i class="iconfont icon-daohangjiantou"></i><span class="span">Operation log</span></div>
                             <div class="nav_li" @click="linkToFun('/companyManagement')" :class="{'select':routerStr == '/companyManagement'}" v-if="username == 'admin'"><i class="iconfont icon-daohangjiantou"></i><span class="span">Company management</span></div>
                         </div>
                     </div>

+ 6 - 0
webConfig/src/store/index.js

@@ -35,9 +35,12 @@ export default new Vuex.Store({
         longitude:0,
         latitude:0,
         sideBarCompanyType:0,
+        browserLanguage:null,
     },
     getters: {
 
+        browserLanguage:state=>state.browserLanguage,
+
         sideBarCompanyType:state=>state.sideBarCompanyType,
         lampEdit:state=>state.lampEdit,
 
@@ -76,6 +79,9 @@ export default new Vuex.Store({
 
     },
     mutations: {
+        BROWSERLANGUAGE:(state,payload)=>{
+            state.browserLanguage = payload.browserLanguage;
+        },
         setLampEdit:(state,payload)=>{
             state.lampEdit = payload.lampEdit;
         },

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 747 - 177
webConfig/src/views/GISMap.vue


+ 40 - 10
webConfig/src/views/alarmMaintenance/alarmMaintenance.vue

@@ -95,7 +95,7 @@
                       :show-overflow-tooltip="showOverflowTooltip"
                       width="82">
                     </el-table-column>
-                    <el-table-column align="center" :show-overflow-tooltip="showOverflowTooltip" :prop="item.prop" :label="item.label" :key="item.id" :min-width="item.prop=='updatetime'?'160':(item.label.length+1)*9+20" v-for="(item) in tableList">
+                    <el-table-column header-align="center" :show-overflow-tooltip="showOverflowTooltip" :prop="item.prop" :label="item.label" :key="item.id" :min-width="item.minWidth" :width="item.width" v-for="(item) in tableList" :align="item.align?item.align:'center'">
                         <template  slot-scope="scope">
                             <span class="tag_select" v-if="item.prop == 'number'" @click="routerLampLink('streetLightInformation',scope.row)">{{scope.row[item.prop]}}</span>
                             <span v-if="item.prop != 'number'" :title="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
@@ -168,7 +168,7 @@
           :close-on-click-modal="false"
           class="detailsDetails_box"
           width="60%">
-          <el-form label-width="80px" :model="detailsDetailsData" label-position="right" class="box">
+          <el-form :label-width="12*remRatio+'px'" :model="detailsDetailsData" label-position="right" class="box">
               <el-row>
                 <el-col :span="12" style="padding-right: 15px">
                     <el-form-item :label="'Project name:'">
@@ -355,10 +355,26 @@
                 /*表格*/
                 tableList:[],
                 multipleSelection:[],
-                alarmTableList:[{prop:'project',label:'项目名称'},{prop:'number',label:'报警路灯'},{prop:'stralarmtype',label:'报警事件'},{prop:'statusStr',label:'是否已处理'},{prop:'updatetime',label:'更新时间'}],
-                alarmTableListEN:[{prop:'project',label:'Project name'},{prop:'number',label:'Alarm lamp'},{prop:'stralarmtype',label:'Alarm event'},{prop:'statusStr',label:'whether processed'},{prop:'updatetime',label:'Update time'}],
+                // alarmTableList:[
+                //   {prop:'project',label:'项目名称'},
+                //   {prop:'number',label:'报警路灯'},
+                //   {prop:'stralarmtype',label:'报警事件'},
+                //   {prop:'statusStr',label:'是否已处理'},
+                //   {prop:'updatetime',label:'更新时间'}
+                // ],
+                alarmTableListEN:[
+                  {prop:'project',label:'Project name'},
+                  {prop:'number',label:'Alarm lamp'},
+                  {prop:'stralarmtype',label:'Alarm event'},
+                  {prop:'statusStr',label:'whether processed'},
+                  {prop:'updatetime',label:'Update time'}
+                ],
 
-                patrolTableListEN:[{prop:'project_name',label:'Project name'},{prop:'number',label:'Lamp Number'},{prop:'patrolinterval',label:'Inspection interval time(min)'},],
+                patrolTableListEN:[
+                  {prop:'project_name',label:'Project name'},
+                  {prop:'number',label:'Lamp Number'},
+                  {prop:'patrolinterval',label:'Inspection interval time(min)'}
+                ],
                 tableData: [],
                 currentPage:1,
                 pageSize:20,
@@ -414,10 +430,24 @@
                 version:'version',
                 privilege:'privilege',
                 role:'role',
-                sideBarCompanyType:'sideBarCompanyType'
+                sideBarCompanyType:'sideBarCompanyType',
+                remRatio:'remRatio'
           })
         },
         mounted(){
+            this.alarmTableListEN = [
+                {prop:'project',label:'Project name',width:9*this.remRatio},
+                {prop:'number',label:'Alarm lamp',width:9*this.remRatio},
+                {prop:'stralarmtype',label:'Alarm event',align:"left"},
+                {prop:'statusStr',label:'whether processed',width:12*this.remRatio},
+                {prop:'updatetime',label:'Update time',width:13*this.remRatio}
+            ];
+
+            this.patrolTableListEN = [
+                {prop:'project_name',label:'Project name',width:9*this.remRatio},
+                {prop:'number',label:'Lamp Number',width:9*this.remRatio},
+                {prop:'patrolinterval',label:'Inspection interval time(min)'}
+            ]
             this.alarmNav = 'Alarm';
             // this.getProjectNav('默认')
             this.nearRepairList();
@@ -796,7 +826,7 @@
                 this)
             },
             exportExcel(){
-                if(this.alarmNav != '巡检设置' && this.alarmNav != 'Inspection setup'){
+                if(this.alarmNav != 'Inspection setup'){
                     this.alarmGet(this.currentPage,data => {
                         // console.log(data)
                         this.loading.exportExcel = false;
@@ -1077,18 +1107,18 @@
             },
             alarmNavFun(type){
                 this.alarmNav = type;
-                if(type == '告警信息' || type == 'Alarm'){
+                if(type == 'Alarm'){
                     this.alarmGet(1,() => {
                         // console.log(data)
                     })
                 }
-                if(type == '历史告警' || type == 'Historical alarm'){
+                if(type == 'Historical alarm'){
                     this.alarmGet(1,() => {
                         // console.log(data)
                     })
                 }
                 // console.log(type)
-                if(type == '巡检设置' || type == 'Inspection setup'){
+                if(type == 'Inspection setup'){
                     this.patrol_list(1,() => {
                         // console.log(data)
                     })

+ 2 - 2
webConfig/src/views/dashboard.vue

@@ -111,7 +111,7 @@
                             </div> -->
                             <div class="li">
                                 <p class="p1" :title="statisticInfo.electricity">{{statisticInfo.electricity?statisticInfo.electricity:0}}</p>
-                                <p class="p2">Electricity(Wh)</p>
+                                <p class="p2">Electricity(kWh)</p>
                             </div>
                             <div class="li">
                                 <p class="p1" :title="statisticInfo.CO2_reduction">{{statisticInfo.CO2_reduction?statisticInfo.CO2_reduction:0}}</p>
@@ -119,7 +119,7 @@
                             </div>
                             <div class="li">
                                 <p class="p1" :title="statisticInfo.SO2_reduction">{{statisticInfo.SO2_reduction?statisticInfo.SO2_reduction:0}}</p>
-                                <p class="p2">SO2 reduction(g)</p>
+                                <p class="p2">SO2 reduction(Kg)</p>
                             </div>
                             <div class="li">
                                 <p class="p1" :title="statisticInfo.TCE_reduction">{{statisticInfo.TCE_reduction?statisticInfo.TCE_reduction:0}}</p>

+ 49 - 12
webConfig/src/views/historicalData/historicalData.vue

@@ -63,7 +63,7 @@
                         v-loading="loading.table"
                         ref="multipleTable"
                         @selection-change="handleSelectionChange"
-                        v-if="reportType == 'table' || (reportType == 'report'&&(reportNav=='列表'||reportNav=='Lists'))"
+                        v-if="reportType == 'table' || (reportType == 'report'&&(reportNav=='Lists'))"
                         :data="tableData"
                         border
                         style="width: 100%"
@@ -72,9 +72,11 @@
                         <el-table-column
                           v-if="reportType != 'report'"
                           type="selection"
-                          min-width="50">
+                          align="center"
+                          width="50">
                         </el-table-column>
-                        <el-table-column :show-overflow-tooltip="true" :prop="item.prop" :label="item.label" :key="item.id" :min-width="(item.label.length+1)*9+15" v-for="(item) in tableList">
+                        <el-table-column 
+                          align="center" :show-overflow-tooltip="true" :prop="item.prop" :label="item.label" :key="item.id" :min-width="item.prop == 'updatetime'?12*remRatio:(item.label.length+5)*0.5*remRatio" v-for="(item) in tableList">
                         </el-table-column>
                     </el-table>
                     <div class="echarts_box" v-if="reportType == 'report' && (reportNav!='Lists')">
@@ -158,7 +160,7 @@
                     <div class="paging_box">
                         <el-button type="primary" :class="{'report_bottton':reportType == 'report'}" icon="el-icon-check" round @click="reportTypeFun()" v-if="reportType == 'table' || (reportType == 'report'&&reportNav=='Lists')" style="width: 230px;">{{reportTypeBt}}</el-button>
                         <el-pagination
-                          v-if="reportType == 'table' || (reportType == 'report'&&(reportNav=='列表'||reportNav=='Lists'))"
+                          v-if="reportType == 'table' || (reportType == 'report'&&(reportNav=='Lists'))"
                           @size-change="handleSizeChange"
                           @current-change="handleCurrentChange"
                           :current-page.sync="currentPage"
@@ -259,6 +261,7 @@
                 version:'version',
                 role:'role',
                 sideBarCompanyType:'sideBarCompanyType',
+                remRatio:'remRatio',
           })
         },
         mounted(){
@@ -653,7 +656,7 @@
             reportNavFun(type){
                 if(!this.loading.table){
                     this.reportNav = type;
-                    if(type != '列表' && type != 'Lists'){
+                    if(type != 'Lists'){
                         if(this.reportNavFunIsTrue){
                             this.reportNavFunIsTrue = false;
 
@@ -714,7 +717,6 @@
                 }else{
                     this.reportType = 'table';
                     this.reportNav = 'Lists';
-                    this.reportTypeBt = '查看选中路灯';
                     this.reportTypeBt = 'See selected street lights';
                     this.currentPage = 1;
                     this.reportHome(this.currentPage,0,data => {
@@ -764,7 +766,7 @@
                     data =>{
                         if(type == 0){
                             if(callback){
-                                if(this.reportNav == '列表' || type == 'Lists'){
+                                if(this.reportNav == 'Lists'){
                                     this.tableData = data.data.list;
                                     this.currentPage = value;
                                     this.total = data.data.total*this.pageSize;
@@ -798,6 +800,25 @@
                 console.log(data)
                 var this_ = this;
                 let tbType = '',tbType1 = '',tbType2 = '';
+
+                let unit = '';
+                if(titleType == 'power'){
+                    unit = 'kWh';
+                    tbType1 = 'Generation capacity Report';
+                    tbType2 ='Electricity consumption Report';
+                }else if(titleType == 'current'){
+                    unit = 'A';
+                    tbType = 'Current Report';
+                }else if(titleType == 'temper'){
+                    unit = '℃';
+                    tbType = 'Temperature Report';
+                }else if(titleType == 'capacity'){
+                    unit = 'W';
+                    tbType = 'Power Report';
+                }else if(titleType == 'voltage'){
+                    unit = 'V';
+                    tbType = 'Voltage Report';
+                }
                 this.$nextTick(function(){
                     let myChart,myChart1,myChart2;
                     if(titleType == 'power'){
@@ -1199,7 +1220,7 @@
             min-height: 610px;
         }
         .wrap{
-            padding: 0px 40px;
+            padding: 0px 4rem;
             height: 100%;
         }
         .main_top_bg{
@@ -1328,11 +1349,27 @@
             width: 100%;
             height: calc(100% - 113px);
             .el-table{
-                tr:hover>td{
-                    background: inherit;
+                th,td{
+                    padding: 0;
+                    >.cell{
+                        padding: 0 0.5rem;
+                        line-height: inherit;
+                    }
+                }
+                th{
+                    height: 3.33rem;line-height: 3.33rem;
+                    background:rgba(246,248,250,1);
+                    font-size:1rem;
+                    font-family:PingFang-SC-Medium,PingFang-SC;
+                    font-weight:500;
+                    color:rgba(102,102,102,1);
                 }
-                .row_bg{
-                    background: #F6F6F9;
+                td{
+                    height: 3rem;line-height: 3rem;
+                    font-size:1rem;
+                    font-family:PingFangSC-Medium,PingFang SC;
+                    font-weight:500;
+                    color:rgba(51,51,51,1);
                 }
             }
             .echarts_box{

+ 20 - 3
webConfig/src/views/operationLog/operationLog.vue

@@ -40,7 +40,15 @@
                       align="center"
                       width="80">
                     </el-table-column>
-                    <el-table-column align="center" :show-overflow-tooltip="showOverflowTooltip" :prop="item.prop" :label="item.label" :key="item.id" min-width="160px" v-for="(item) in tableListEN">
+                    <el-table-column 
+                        align="center" 
+                        :show-overflow-tooltip="showOverflowTooltip"
+                        :prop="item.prop" 
+                        :label="item.label" 
+                        :key="item.id"
+                        :width="item.width"
+                        :min-width="item.minWidth"
+                        v-for="(item) in tableListEN">
                     </el-table-column>
                     <!-- <el-table-column align="left" header-align="center" :show-overflow-tooltip="showOverflowTooltip" :prop="item.prop" :label="item.label" :key="item.id" :min-width="(item.label.length+1)*9+20" v-for="(item,index) in tableListEN" v-if="index == 4">
                     </el-table-column> -->
@@ -74,7 +82,7 @@
                 reportList:[{label:'登录/登出日志',value:'login'},{label:'添加日志',value:'insert'},{label:'修改日志',value:'update'},{label:'指令日志',value:'cmd'},{label:'删除日志',value:'delete'},{label:'其他日志',value:'other'},],
                 reportListEN:[{label:'Sign In/Sign out',value:'login'},{label:'Add',value:'insert'},{label:'Modify',value:'update'},{label:'Commands',value:'cmd'},{label:'Delete',value:'delete'},{label:'Others',value:'other'},],
                 /*表格*/
-                tableList:[{prop:'time',label:'操作时间'},{prop:'type',label:'操作类型'},{prop:'username',label:'操作用户ID'},{prop:'realname',label:'操作用户名'},{prop:'content',label:'操作内容'}],
+                // tableList:[{prop:'time',label:'操作时间'},{prop:'type',label:'操作类型'},{prop:'username',label:'操作用户ID'},{prop:'realname',label:'操作用户名'},{prop:'content',label:'操作内容'}],
                 tableListEN:[{prop:'time',label:'Operation time'},{prop:'type',label:'Operation type'},{prop:'username',label:'User ID'},{prop:'realname',label:'Username'},{prop:'content',label:'Behavior'}],
                 tableData: [],
                 currentPage:1,
@@ -96,10 +104,18 @@
                 projectsId:'projectsId',
                 version:'version',
                 role:'role',
+                remRatio:'remRatio',
           })
         },
         mounted(){
             this.getList(1,0);
+            this.tableListEN = [
+                {prop:'time',label:'Operation time',width:12*this.remRatio},
+                {prop:'type',label:'Operation type',width:10*this.remRatio},
+                {prop:'username',label:'User ID',width:8*this.remRatio},
+                {prop:'realname',label:'Username',width:8*this.remRatio},
+                {prop:'content',label:'Behavior',}
+            ];
         },
         methods:{
             search(val){
@@ -303,6 +319,7 @@
                     padding: 0;
                     >.cell{
                         padding: 0 0.5rem;
+                        line-height: inherit;
                     }
                 }
                 th{
@@ -314,7 +331,7 @@
                     color:rgba(102,102,102,1);
                 }
                 td{
-                    height: 4.2rem;line-height: 4.2rem;
+                    height: 3rem;line-height: 3rem;
                     font-size:1rem;
                     font-family:PingFangSC-Medium,PingFang SC;
                     font-weight:500;

+ 277 - 135
webConfig/src/views/projectManagement.vue

@@ -34,7 +34,7 @@
                         <p class="p"><i class="iconfont icon-dizhi"></i><span class="span2">{{detailData.location}}</span></p>
                         <div class="data_bpx">
                             <div class="li">
-                                <p class="p1">{{Number(deviceTotalData.light_num).formatNumberRgx()}}</p>
+                                <p class="p1">{{Number(deviceTotalData.total).formatNumberRgx()}}</p>
                                 <p class="p2">Lights</p>
                             </div>
                             <div class="li">
@@ -240,7 +240,7 @@
                             <span class="btn" @click="gisFun(scope.row,'GIS')" title="GIS">
                                 <i class="iconfont icon-GIS"></i>
                             </span>
-                            <span class="btn" @click="monitorFun(scope.row)" title="Weather">
+                            <span class="btn" @click="monitorFun(scope.row)" title="Parameter">
                                 <i class="iconfont icon-canshu"></i>
                             </span>
                         </template>
@@ -281,8 +281,8 @@
                 </div>
                 <div class="div2">
                     <div>
-                        <span>{{'brightness'}}: {{lampLightSlider}}%</span>
-                        <span @click="lampLightSliderSave()" v-loading="loading.lampLightSlider">{{'save'}}</span>
+                        <span>{{'Brightness'}}: {{lampLightSlider}}%</span>
+                        <span @click="lampLightSliderSave()" v-loading="loading.lampLightSlider">{{'Save'}}</span>
                     </div>
                     <div>
                         <el-slider v-model="lampLightSlider"></el-slider>
@@ -1002,6 +1002,7 @@
                     online_num:0,
                     fault_count:0,
                     network_num:0,
+                    total:0,
                 },
 
                 /*侧边栏*/
@@ -1820,6 +1821,7 @@
                 role:'role',
                 remRatio:'remRatio',
                 sideBarCompanyType:'sideBarCompanyType',
+                browserLanguage:'browserLanguage',
             }),
             historicalNavListENFor(){
                 let list = [];
@@ -2108,6 +2110,7 @@
                         }
                         if(downloadVal == 0){
                             this.deviceTotalData = data.data.total_data;
+                            this.deviceTotalData.total = data.data.total;
                             this.deviceList = data.data.lamps;
                             let i = (this.currentPage - 1)*this.pageSize+1;
                             for(let d of this.deviceList){
@@ -3583,85 +3586,139 @@
                         let WDstr = '';
                         JDstr = 'longitude';
                         WDstr = 'latitude';
-                        
                         let lat = 0;
                         let lng = 0;
-                        if(!isNaN(this.lampLongitude) && !isNaN(this.lampLatitude) &&!(this.lampLongitude ==0 &&this.lampLongitude ==0)){
-                            let bd_decrypt = this.bd_decrypt(this.lampLongitude,this.lampLatitude)
-                            this.lampLatitude = Number(bd_decrypt.lat.toFixed(8));
-                            this.lampLongitude = Number(bd_decrypt.lng.toFixed(8));
-                            console.log(this.lampLatitude,this.lampLongitude,'----s')
-                            lat = bd_decrypt.lat;
-                            lng = bd_decrypt.lng;
-                            this_.mapDWIsTrue = false;
-                            this.map = new google.maps.Map(document.getElementById('lampAmapWrapper'), {
-                                center:{lat: this.lampLatitude, lng: this.lampLongitude},
-                                zoom: 16,
-                                gestureHandling: 'greedy',
-                                streetViewControl:false,
-                                mapTypeControlOptions:{
-                                  style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,
-                                  position:google.maps.ControlPosition.RIGHT_TOP
-                                },
-                                mapTypeId:google.maps.MapTypeId.ROADMAP,
-                            });
-                            // console.log('---------1',lat,lng)
-                        }else{
-                            this_.mapDWIsTrue = true;
-                            this.map = new google.maps.Map(document.getElementById('lampAmapWrapper'), {
-                                center:{lat: 0, lng: 0},
-                                zoom: 16,
-                                gestureHandling: 'greedy',
-                                streetViewControl:false,
-                                mapTypeControlOptions:{
-                                  style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,
-                                  position:google.maps.ControlPosition.RIGHT_TOP
-                                },
-                                mapTypeId:google.maps.MapTypeId.ROADMAP,
-                            });
-                        }
-                        // console.log(Number(lat),Number(lng))
-                        this.geocoder = new google.maps.Geocoder();
-                        let bgColor = 'linear-gradient(#fc8440, #fe7121)';
-                        let borderColor = 'rgba(253, 122, 48, 0.18)';
-                        this_.positionPicker = new RichMarker({
-                          position:new google.maps.LatLng(Number(lat),Number(lng)),
-                          map: this_.map,
-                          draggable: true,
-                          content:'<div class="lm_img_mover" style="text-align:center;border:11px solid '+borderColor+'; border-radius:50%;cursor:pointer;"><div style="text-align:center;background:'+bgColor+';background-clip: padding-box;border:2px solid #fff; height: 16px; width: 16px; border-radius:50%;"></div></div>'
-                        })
-                        var controlDiv = document.createElement('DIV');
-                        controlDiv.className = "google_Location_box"
-                        var controlUI = document.createElement('DIV');
-                        controlUI.className = "google_Location"
-                        controlDiv.appendChild(controlUI);
-                        var svg = document.createElementNS('http://www.w3.org/2000/svg','svg');
-                        svg.setAttribute('viewBox','25 25 50 50');
-                        svg.setAttribute('class','circular');
-                        svg.setAttribute('styel','display:none');
-                        var circle = document.createElementNS('http://www.w3.org/2000/svg','circle');
-                        circle.setAttribute('cx','50');
-                        circle.setAttribute('cy','50');
-                        circle.setAttribute('r','20');
-                        circle.setAttribute('fill','none');
-                        circle.setAttribute('class','path');
+                        console.log(this.browserLanguage)
+                        if(this.browserLanguage == 'google'){
+                            if(!isNaN(this.lampLongitude) && !isNaN(this.lampLatitude) &&!(this.lampLongitude ==0 &&this.lampLongitude ==0)){
+                                let bd_decrypt = this.bd_decrypt(this.lampLongitude,this.lampLatitude)
+                                this.lampLatitude = Number(bd_decrypt.lat.toFixed(8));
+                                this.lampLongitude = Number(bd_decrypt.lng.toFixed(8));
+                                console.log(this.lampLatitude,this.lampLongitude,'----s')
+                                lat = bd_decrypt.lat;
+                                lng = bd_decrypt.lng;
+                                this_.mapDWIsTrue = false;
+                                this.map = new google.maps.Map(document.getElementById('lampAmapWrapper'), {
+                                    center:{lat: this.lampLatitude, lng: this.lampLongitude},
+                                    zoom: 16,
+                                    gestureHandling: 'greedy',
+                                    streetViewControl:false,
+                                    mapTypeControlOptions:{
+                                      style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,
+                                      position:google.maps.ControlPosition.RIGHT_TOP
+                                    },
+                                    mapTypeId:google.maps.MapTypeId.ROADMAP,
+                                });
+                                // console.log('---------1',lat,lng)
+                            }else{
+                                this_.mapDWIsTrue = true;
+                                this.map = new google.maps.Map(document.getElementById('lampAmapWrapper'), {
+                                    center:{lat: 0, lng: 0},
+                                    zoom: 16,
+                                    gestureHandling: 'greedy',
+                                    streetViewControl:false,
+                                    mapTypeControlOptions:{
+                                      style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,
+                                      position:google.maps.ControlPosition.RIGHT_TOP
+                                    },
+                                    mapTypeId:google.maps.MapTypeId.ROADMAP,
+                                });
+                            }
+                            // console.log(Number(lat),Number(lng)
+                            this.geocoder = new google.maps.Geocoder();
+                            let bgColor = 'linear-gradient(#fc8440, #fe7121)';
+                            let borderColor = 'rgba(253, 122, 48, 0.18)';
+                            this_.positionPicker = new RichMarker({
+                              position:new google.maps.LatLng(Number(lat),Number(lng)),
+                              map: this_.map,
+                              draggable: true,
+                              content:'<div class="lm_img_mover" style="text-align:center;border:11px solid '+borderColor+'; border-radius:50%;cursor:pointer;"><div style="text-align:center;background:'+bgColor+';background-clip: padding-box;border:2px solid #fff; height: 16px; width: 16px; border-radius:50%;"></div></div>'
+                            })
+                            var controlDiv = document.createElement('DIV');
+                            controlDiv.className = "google_Location_box"
+                            var controlUI = document.createElement('DIV');
+                            controlUI.className = "google_Location"
+                            controlDiv.appendChild(controlUI);
+                            var svg = document.createElementNS('http://www.w3.org/2000/svg','svg');
+                            svg.setAttribute('viewBox','25 25 50 50');
+                            svg.setAttribute('class','circular');
+                            svg.setAttribute('styel','display:none');
+                            var circle = document.createElementNS('http://www.w3.org/2000/svg','circle');
+                            circle.setAttribute('cx','50');
+                            circle.setAttribute('cy','50');
+                            circle.setAttribute('r','20');
+                            circle.setAttribute('fill','none');
+                            circle.setAttribute('class','path');
 
-                        svg.appendChild(circle);
-                        controlDiv.appendChild(svg);
-                        
-                        google.maps.event.addDomListener(controlDiv, 'click', function() {
-                            if (navigator.geolocation && this_.googleMapLocattion) {
-                                this_.googleMapLocattion = false;
-                                $('.google_Location').css('display','none');
-                                $('.google_Location_box .circular').css('display','inline-block');
-                                let options ={
-                                    enableHighAccuracy:false,
-                                    timeout:3000,
-                                    maximumAge:3000
+                            svg.appendChild(circle);
+                            controlDiv.appendChild(svg);
+                            
+                            google.maps.event.addDomListener(controlDiv, 'click', function() {
+                                if (navigator.geolocation && this_.googleMapLocattion) {
+                                    this_.googleMapLocattion = false;
+                                    $('.google_Location').css('display','none');
+                                    $('.google_Location_box .circular').css('display','inline-block');
+                                    let options ={
+                                        enableHighAccuracy:false,
+                                        timeout:3000,
+                                        maximumAge:3000
+                                    }
+                                    navigator.geolocation.getCurrentPosition(successHandler,errorHandler,options)
                                 }
-                                navigator.geolocation.getCurrentPosition(successHandler,errorHandler,options)
+                            });
+                            this_.map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(controlDiv);
+                            if(this_.screenMap && this_.mapDWIsTrue){
+                                this_.geocoder.geocode({address:this_.screenMap},function(status, result){
+                                    // console.log(status, result)
+                                    if(result === 'OK'){
+                                        this_.mapDWIsTrue = false;
+                                        lng = status[0].geometry.location.lng();
+                                        lat = status[0].geometry.location.lat();
+                                        // console.log(lng,lat)
+                                        this_.positionPicker.setPosition(new google.maps.LatLng(lat,lng))
+                                        this_.map.setCenter(new google.maps.LatLng(lat,lng));
+                                    }else{
+                                        this_.mapDWIsTrue = true;
+                                        this_.$message({
+                                          showClose: true,
+                                          message: 'Unrecognized, please change the search content',
+                                          type: 'warning'
+                                        });
+                                    }
+                                    function_navigator(this_,lat,lng);
+                                })
+                            }else{
+                                function_navigator(this_,lat,lng);
                             }
-                        });
+                            google.maps.event.addListener(this_.positionPicker,"position_changed",function(){
+                                $('.lampLongitude'+this_.lampId).text(this.getPosition().lng().toFixed(8));
+                                $('.lampLatitude'+this_.lampId).html(this.getPosition().lat().toFixed(8));
+                                let bd_encrypt = this_.bd_encrypt(this.getPosition().lng().toFixed(8),this.getPosition().lat().toFixed(8))
+                                this_.lampLongitude = bd_encrypt.bd_lng;
+                                this_.lampLatitude = bd_encrypt.bd_lat;
+                            })
+                            let time = setInterval(function(){
+                                if($('.lm_img_mover').length >0){
+                                    let div = $('<div class="lamp_coordinate_en lamp_coordinate_'+this_.lampId+'"><span><span>'+ JDstr +' : <span class="lampLongitude'+this_.lampId+'">'+this_.lampLongitude+'</span></span><span>'+ WDstr +' : <span class="lampLatitude'+this_.lampId+'">'+this_.lampLatitude+'</span></span></span><i class="determine_l"></i><i class="cancel_l"></i></div>')
+                                    $('.lm_img_mover').parent().append(div);
+                                    
+                                    $('.lamp_coordinate_'+this_.lampId).children('i').mouseup(function(e){
+                                        let className = e.target.className.split(' ');
+                                        if(className[0] == 'determine_l'){
+                                            this_.lightControlData.longitude = this_.lampLongitude;
+                                            this_.lightControlData.latitude = this_.lampLatitude;
+                                            $('.lamp_coordinate_'+this_.lampId).css('display','none');
+                                            $('.lamp_'+this_.lampId).unbind("mousedown");
+                                            this_.amapWrapper = false;
+                                        }else if(className[0] == 'cancel_l'){
+                                            this_.amapWrapper = false;
+                                        }
+                                    })
+                                    clearInterval(time)
+                                }
+                            },1)
+                            // console.log(navigator.geolocation , this_.mapDWIsTrue)
+                        }
                         function successHandler(position){
                             this_.map.setCenter(new google.maps.LatLng(position.coords.latitude,position.coords.longitude));
                             lat = position.coords.latitude;
@@ -3683,31 +3740,6 @@
                               type: 'warning'
                             });
                         }
-                        this_.map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(controlDiv);
-                        if(this_.screenMap && this_.mapDWIsTrue){
-                            this_.geocoder.geocode({address:this_.screenMap},function(status, result){
-                                // console.log(status, result)
-                                if(result === 'OK'){
-                                    this_.mapDWIsTrue = false;
-                                    lng = status[0].geometry.location.lng();
-                                    lat = status[0].geometry.location.lat();
-                                    // console.log(lng,lat)
-                                    this_.positionPicker.setPosition(new google.maps.LatLng(lat,lng))
-                                    this_.map.setCenter(new google.maps.LatLng(lat,lng));
-                                }else{
-                                    this_.mapDWIsTrue = true;
-                                    this_.$message({
-                                      showClose: true,
-                                      message: 'Unrecognized, please change the search content',
-                                      type: 'warning'
-                                    });
-                                }
-                                function_navigator(this_,lat,lng);
-                            })
-                        }else{
-                            function_navigator(this_,lat,lng);
-                        }
-                        // console.log(navigator.geolocation , this_.mapDWIsTrue)
                         function function_navigator(this_) {
                             if (navigator.geolocation && this_.mapDWIsTrue && this_.googleMapLocattion) {
                                 this_.googleMapLocattion = false;
@@ -3736,7 +3768,7 @@
                                 if($('.google_Location').length>0 && $('.google_Location_box .circular').length>0){
                                     $('.google_Location').css('display','inline-block');
                                     $('.google_Location_box .circular').css('display','none');
-                                    clearInterval(time1);
+                                    // clearInterval(time1);
                                     clearInterval(time2);
                                 }
                             },1)
@@ -3749,7 +3781,7 @@
                                 if($('.google_Location').length>0 && $('.google_Location_box .circular').length>0){
                                     $('.google_Location').css('display','inline-block');
                                     $('.google_Location_box .circular').css('display','none');
-                                    clearInterval(time1);
+                                    // clearInterval(time1);
                                     clearInterval(time3);
                                 }
                             },1)
@@ -3759,34 +3791,132 @@
                               type: 'warning'
                             });
                         }
-                        google.maps.event.addListener(this_.positionPicker,"position_changed",function(){
-                            $('.lampLongitude'+this_.lampId).text(this.getPosition().lng().toFixed(8));
-                            $('.lampLatitude'+this_.lampId).html(this.getPosition().lat().toFixed(8));
-                            let bd_encrypt = this_.bd_encrypt(this.getPosition().lng().toFixed(8),this.getPosition().lat().toFixed(8))
-                            this_.lampLongitude = bd_encrypt.bd_lng;
-                            this_.lampLatitude = bd_encrypt.bd_lat;
-                        })
-                        let time = setInterval(function(){
-                            if($('.lm_img_mover').length >0){
-                                let div = $('<div class="lamp_coordinate_en lamp_coordinate_'+this_.lampId+'"><span><span>'+ JDstr +' : <span class="lampLongitude'+this_.lampId+'">'+this_.lampLongitude+'</span></span><span>'+ WDstr +' : <span class="lampLatitude'+this_.lampId+'">'+this_.lampLatitude+'</span></span></span><i class="determine_l"></i><i class="cancel_l"></i></div>')
-                                $('.lm_img_mover').parent().append(div);
-                                
-                                $('.lamp_coordinate_'+this_.lampId).children('i').mouseup(function(e){
-                                    let className = e.target.className.split(' ');
-                                    if(className[0] == 'determine_l'){
-                                        this_.lightControlData.longitude = this_.lampLongitude;
-                                        this_.lightControlData.latitude = this_.lampLatitude;
-                                        $('.lamp_coordinate_'+this_.lampId).css('display','none');
-                                        $('.lamp_'+this_.lampId).unbind("mousedown");
-                                        this_.amapWrapper = false;
-                                    }else if(className[0] == 'cancel_l'){
-                                        this_.amapWrapper = false;
-                                    }
-                                })
-                                clearInterval(time)
-                            }
-                        },1)
                     
+                        if(this.browserLanguage == 'bd'){
+                            if(!isNaN(this.lampLongitude) && !isNaN(this.lampLatitude)){
+                                let bd_decrypt = this.bd_decrypt(this.lampLongitude,this.lampLatitude)
+                                this.lampLongitude = bd_decrypt.lat
+                                this.lampLatitude = bd_decrypt.lng
+                                this.map = new AMap.Map("lampAmapWrapper", {
+                                    resizeEnable: true,
+                                    center:[this.lampLongitude,this.lampLatitude],
+                                    zoom: 18,
+                                });
+                            }else{
+                                this.map = new AMap.Map("lampAmapWrapper", {
+                                    resizeEnable: true,
+                                    zoom: 18,
+                                });
+                            }
+                            this.geocoder = new AMap.Geocoder({
+                            });
+                            AMapUI.loadUI(['misc/PositionPicker'], function(PositionPicker) {
+                                this_.positionPicker = new PositionPicker({
+                                    mode: 'dragMarker',
+                                    map: this_.map,
+                                    iconStyle: { //自定义外观
+                                        url: require('../img/GIS/off-icon.png'),
+                                        ancher: [19, 19],
+                                        size: [38, 38],
+                                    }
+                                });
+
+                                this_.positionPicker.on('success', function(positionResult) {
+                                    let bd_encrypt = this_.bd_encrypt(positionResult.position.lng,positionResult.position.lat)
+                                    console.log(bd_encrypt,bd_encrypt.bd_lng)
+                                    positionResult.position.lng = bd_encrypt.bd_lng.toFixed(5);
+                                    positionResult.position.lat = bd_encrypt.bd_lat.toFixed(5);
+
+                                    $('.lampLongitude'+this_.lampId).text(positionResult.position.lng);
+                                    $('.lampLatitude'+this_.lampId).html(positionResult.position.lat);
+                                    
+                                    this_.lampLongitude = positionResult.position.lng;
+                                    this_.lampLatitude = positionResult.position.lat;
+                                });
+                                // this_.positionPicker.on('fail', function(positionResult) {
+                                //     // console.log(positionResult.position)
+                                // });
+                                this_.map.addControl(new AMap.ToolBar({
+                                    liteStyle: true
+                                }))
+                                if(this_.lampLongitude && this_.lampLatitude && !(this_.lampLongitude>180||this_.lampLongitude<-180||this_.lampLatitude>90||this_.lampLatitude<-90)){
+                                    if(this_.screenMap){
+                                        this_.geocoder.getLocation(this_.screenMap, function(status, result) {
+                                            if (status === 'complete' && result.info === 'OK') {
+                                                if(result.geocodes.length >0){
+                                                    this_.positionPicker.start([result.geocodes[0].location.lng,result.geocodes[0].location.lat])
+                                                }
+                                            }else{
+                                                this_.$message({
+                                                  showClose: true,
+                                                  message: this_.version==0?'无法识别,请更改搜索内容':'Unrecognized, please change the search content',
+                                                  type: 'warning'
+                                                });
+                                                this_.positionPicker.start()
+                                            }
+                                        });
+                                    }else{
+                                        this_.map.plugin('AMap.Geolocation', function() {
+                                            let geolocation = new AMap.Geolocation({
+                                                enableHighAccuracy: true,//是否使用高精度定位,默认:true
+                                                timeout: 5000,          //超过10秒后停止定位,默认:无穷大
+                                                buttonOffset: new AMap.Pixel(14, 125),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
+                                                zoomToAccuracy: true,      //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
+                                                buttonPosition:'RB'
+                                            });
+                                            this_.map.addControl(geolocation);
+                                            geolocation.getCurrentPosition();
+                                            AMap.event.addListener(geolocation, 'complete', onComplete);//返回定位信息
+                                            AMap.event.addListener(geolocation, 'error', onError);      //返回定位出错信息
+                                        });
+                                    }
+                                }else{
+                                    this_.positionPicker.start([this_.lampLatitude,this_.lampLongitude]);
+                                }
+                            });
+                            let time = setInterval(function(){
+                                if($('.amap-marker').children('.amap-marker-content').children('img').parent().length>0){
+                                    let div = $('<div class="lamp_coordinate lamp_coordinate_'+this_.lampId+'"><span><span>'+JDstr+' : <span class="lampLongitude'+this_.lampId+'">0</span></span><span>'+WDstr+' : <span class="lampLatitude'+this_.lampId+'">0</span></span></span><i class="determine_l"></i><i class="cancel_l"></i></div>')
+                                    $('.amap-marker').children('.amap-marker-content').children('img').parent().append(div);
+                                    $('.lampLongitude'+this_.lampId).text(this_.lampLongitude);
+                                    $('.lampLatitude'+this_.lampId).html(this_.lampLatitude);
+                                    $('.lamp_coordinate_'+this_.lampId).children('i').mousedown(function(){
+                                        this_.map.setStatus({'dragEnable':false})
+                                    })
+                                    $('.lamp_coordinate_'+this_.lampId).children('i').mouseup(function(e){
+                                        let className = e.target.className.split(' ');
+                                        if(className[0] == 'determine_l'){
+                                            console.log(this_.lampLongitude,this_.lampLatitude,'----')
+                                            this_.lightControlData.longitude = this_.lampLongitude;
+                                            this_.lightControlData.latitude = this_.lampLatitude;
+                                            this_.map.setStatus({'dragEnable':true})
+                                            $('.lamp_coordinate_'+this_.lampId).css('display','none');
+                                            $('.lamp_'+this_.lampId).unbind("mousedown");
+                                            this_.positionPicker.stop();
+                                            this_.amapWrapper = false;
+                                        }else if(className[0] == 'cancel_l'){
+                                            this_.positionPicker.stop();
+                                            this_.amapWrapper = false;
+                                        }
+                                    })
+                                    clearInterval(time)
+                                }
+                            },1)
+                        }
+                        //解析定位结果
+                        function onComplete(data) {
+                            this_.positionPicker.start([data.position.getLng(),data.position.getLat()])
+                        }
+                        //解析定位错误信息
+                        function onError() {
+                            // console.log(data)
+                            this_.positionPicker.start([114,34]);
+                            this_.$message({
+                              showClose: true,
+                              message:'精确定位失败',
+                              type: 'warning'
+                            });
+                        }
                     })
                 }
             },
@@ -4042,12 +4172,12 @@
                         {name:'Voltage',icon:'circle'},
                         {name:'Current',icon:'circle'},
                         {name:'power',icon:'circle'},
-                        {name:'brightness',icon:'circle',select:false}
+                        {name:'brightness',icon:'circle'}
                     ];
                     legendSelected['Voltage'] = true;
                     legendSelected['Current'] = true;
                     legendSelected['power'] = true;
-                    legendSelected['brightness'] = false;
+                    legendSelected['brightness'] = true;
                     for(let d of data.lamppower){
                         d = parseInt(d);
                         if(d > dataListMax){
@@ -6777,7 +6907,8 @@
             line-height: 40px;
             width: 450px;
             top: 0px;
-            left: 78px;
+            left: 50px;
+            display: flex;
             >span{
                 display: inline-block;
                 padding: 0 20px;
@@ -6799,6 +6930,17 @@
                 z-index: 1;
                 cursor: pointer;
             }
+            .determine_l{
+                background: url(../img/GIS/determine-icon.png);
+                display:inline-block;
+                width: 38px;height: 38px;
+            }
+            .cancel_l{
+                background: url(../img/GIS/cancel-icon.png);
+                display:inline-block;
+                width: 38px;height: 38px;
+                margin-left: 10px;
+            }
         }
     }
     .lamp_light_slider{