XAWDJ0277HWXPT2\Administrator пре 5 година
родитељ
комит
94c35f6a19

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
web/index.html


Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
web/js/app.54d5029e.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
web/js/app.0e4e4d28.js.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 1
web/js/app.54d5029e.js.map


Разлика између датотеке није приказан због своје велике величине
+ 2 - 0
web/js/chunk-3c3021a1.2983305e.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
web/js/chunk-3c3021a1.2983305e.js.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
web/js/chunk-3c3021a1.47922e75.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 1
web/js/chunk-3c3021a1.47922e75.js.map


+ 1 - 1
webConfig/public/index.html

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

+ 1 - 0
webConfig/src/api/allUel.js

@@ -67,6 +67,7 @@ const urls={
 
         get_manu_by_address:'https://120.77.179.55/api/common/get_manu_by_address',/*通过设备地址获取制造商信息*/
    
+        reboot_dev:'https://120.77.179.55/api/lampcontrol/reboot_dev',/*重启设备*/
 
     },
     /*概览信息*/

+ 64 - 11
webConfig/src/views/projectManagement.vue

@@ -252,7 +252,7 @@
                     <el-table-column
                         fixed="right"
                         align="center"
-                        :width="12.5*remRatio"
+                        :width="13*remRatio"
                         :label="'operation'">
                         <template slot-scope="scope">
                             <span class="btn" @click="seeFun(scope.row)" title="See">
@@ -270,6 +270,9 @@
                             <span class="btn" @click="monitorFun(scope.row)" title="Parameter">
                                 <i class="iconfont icon-canshu"></i>
                             </span>
+                            <span v-if="role == '1'" class="btn" @click="rebootFun(scope.row)" v-loading="scope.row.rebootLoading" title="Reboot">
+                                <i class="iconfont icon-zhongqi"></i>
+                            </span>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -530,7 +533,7 @@
                         <el-option key="1" label="Insecticidal lamp" value="1"></el-option>
                     </el-select>
 
-                    <el-select v-model="lightControlData[item.model]" placeholder="please choose" v-if="item.type == 'select' && item.model == 'fascal_year'"  @keyup.native="lampKeydown($event)">
+                    <el-select v-model="lightControlData[item.model]" placeholder="please choose" v-if="item.type == 'select' && item.model == 'fiscal_year'"  @keyup.native="lampKeydown($event)">
                         <el-option key="2019-20" label="2019-20" value="2019-20"></el-option>
                         <el-option key="2020-21" label="2020-21" value="2020-21"></el-option>
                         <el-option key="2021-22" label="2021-22" value="2021-22"></el-option>
@@ -541,7 +544,7 @@
                         <el-option key="2026-27" label="2026-27" value="2026-27"></el-option>
                         <el-option key="2027-28" label="2027-28" value="2027-28"></el-option>
                     </el-select>
-                    <el-select v-model="lightControlData[item.model]" placeholder="please choose" v-if="item.type == 'select' && item.model == 'fascal_year_phase'"  @keyup.native="lampKeydown($event)">
+                    <el-select v-model="lightControlData[item.model]" placeholder="please choose" v-if="item.type == 'select' && item.model == 'fiscal_year_phase'"  @keyup.native="lampKeydown($event)">
                         <el-option key="Phase1" label="Phase1" value="Phase1"></el-option>
                         <el-option key="Phase2" label="Phase2" value="Phase2"></el-option>
                     </el-select>
@@ -1212,8 +1215,8 @@
                     supplierName:'',
                     protocoltype:'',
                     loadtype:'0',
-                    fascal_year:'',
-                    fascal_year_phase:'',
+                    fiscal_year:'',
+                    fiscal_year_phase:'',
                     street_light_SN:'',
                     customer_name:'',
                     customer_ID:'',
@@ -1234,8 +1237,8 @@
 
                     {model:'protocoltype',label:'Network protocol type',type:"select",unit:''},
                     {model:'section',label:'Road',unit:''},
-                    {model:'fascal_year',label:'Fascal year',type:"select",unit:''},
-                    {model:'fascal_year_phase',label:'Fascal year phase',type:"select",unit:''},
+                    {model:'fiscal_year',label:'Fiscal year',type:"select",unit:''},
+                    {model:'fiscal_year_phase',label:'Fiscal year phase',type:"select",unit:''},
 
                     {model:'lamptype',label:'Lamp type',type:"select_filterable",unit:''},
                     {model:'boardtype',label:'Solar panel type',type:"select_filterable",unit:''},
@@ -1262,8 +1265,8 @@
 
                     {model:'protocoltype',label:'Network protocol type',type:"select",unit:''},
                     {model:'section',label:'Road',unit:''},
-                    {model:'fascal_year',label:'Fascal year',type:"select",unit:''},
-                    {model:'fascal_year_phase',label:'Fascal year phase',type:"select",unit:''},
+                    {model:'fiscal_year',label:'Fiscal year',type:"select",unit:''},
+                    {model:'fiscal_year_phase',label:'Fiscal year phase',type:"select",unit:''},
 
                     {model:'lamptype',label:'Lamp type',type:"select_filterable",unit:''},
                     {model:'boardtype',label:'Solar panel type',type:"select_filterable",unit:''},
@@ -1312,10 +1315,10 @@
                         { required: true, message: 'Not null', trigger: 'blur' }
                     ],
 
-                    fascal_year: [
+                    fiscal_year: [
                         { required: true, message: 'Not null', trigger: 'change' }
                     ],
-                    fascal_year_phase: [
+                    fiscal_year_phase: [
                         { required: true, message: 'Not null', trigger: 'change' }
                     ],
 
@@ -2491,6 +2494,7 @@
                             this.deviceList = data.data.lamps;
                             let i = (this.currentPage - 1)*this.pageSize+1;
                             for(let d of this.deviceList){
+                                this.$set(d,'rebootLoading',false);
                                 d.lighteness = parseInt(d.lighteness);
                                 let hh1 = '',mm1 = '',hh2 = '',mm2 = '';
                                 hh1 = parseInt(d.daychargemincurrent/3600);
@@ -4955,6 +4959,55 @@
                     }
                 )
             },
+            // 重启
+            rebootFun(data){
+                this.$confirm('Restart the RTU module?','Prompt', {
+                  confirmButtonText: 'confirm',
+                  cancelButtonText: 'cancel',
+                  type: 'warning'
+                }).then(() => {
+                    data.rebootLoading = true;
+                    baseApi.websocket1(allUrl.websocket.wss,data=>{
+                        if(data.data.status == '1'){
+                            baseApi.ajax_post_ws(
+                                allUrl.project.reboot_dev,
+                                {
+                                    username:this.username,
+                                    client_key:this.client_key,
+                                    token:this.token,
+                                    lamp_id:data.id,
+                                    clientid:data.data.clientid,
+                                },
+                                this,
+                            )
+                        }
+                        if(data.data.status == '2'){
+                            if(data.code == '0000'){
+                                this.$message({
+                                  showClose: true,
+                                  message:data.msg,
+                                  type: 'success'
+                                });
+                                data.rebootLoading = false;
+                            }else{
+                                this.$message({
+                                  showClose: true,
+                                  message:data.msg,
+                                  type: 'warning'
+                                });
+                                data.rebootLoading = false;    
+                            }
+                        }
+                    },() => {
+                        this.loading.setLoadFun = false;
+                    },this) 
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: 'Undeleted'
+                    });
+                });
+            },
             /*参数弹框*/
             monitorFun(data){
                 console.log(data,'-------')