|
@@ -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,'-------')
|