|
@@ -120,8 +120,6 @@
|
|
|
|
|
|
<el-button type="text" style="color:#fc8440" v-if="alarmNav=='Alarm'" size="small" @click="tableOperationfun3(scope.row)">{{'delete'}}</el-button>
|
|
|
<el-button type="text" style="color:#fc8440" v-if="alarmNav == 'Inspection setup'" size="small" @click="tableOperationfun2(scope.row)">{{'Set up'}}</el-button>
|
|
|
- <el-button type="text" v-if="alarmNav == 'Inspection setup'" size="small" @click="tableOperationfun3(scope.row)">{{'details'}}</el-button>
|
|
|
- <el-button type="text" v-if="alarmNav == 'Inspection setup'" size="small" @click="tableOperationfun4(scope.row)" v-loading="scope.row.synchronizationLoading">{{'Synchronous inspection'}}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -144,16 +142,6 @@
|
|
|
:visible.sync="inspectionSetupDialog"
|
|
|
width="60%">
|
|
|
<el-form ref="form" :model="inspectionSetupform" :label-width="'180px'">
|
|
|
- <el-form-item :label="'Inspection order:'">
|
|
|
- <el-select :disabled="inspectionSetupType=='XQ'" v-model="inspectionSetupform.switch" style="width:100%" @keyup.native="inspectionSetupdown($event)">
|
|
|
- <el-option
|
|
|
- v-for="item in patrolOrderList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
<el-form-item :label="'Inspection interval(min):'">
|
|
|
<el-select :disabled="inspectionSetupType=='XQ'" v-model="inspectionSetupform.interval" style="width:100%" @keyup.native="inspectionSetupdown($event)">
|
|
|
<el-option key="15" value="15" label="15"></el-option>
|
|
@@ -370,8 +358,7 @@
|
|
|
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'}],
|
|
|
|
|
|
- patrolTableList:[{prop:'project_name',label:'项目名称'},{prop:'network_name',label:'网络名称'},{prop:'number',label:'路灯编号'},{prop:'patroltype',label:'巡检命令'},{prop:'patrolinterval',label:'巡检间隔时间(min)'},{prop:'updatetime',label:'参数设置时间'}],
|
|
|
- patrolTableListEN:[{prop:'project_name',label:'Project name'},{prop:'network_name',label:'Network name'},{prop:'number',label:'Lamp Number'},{prop:'patroltype',label:'Patrol order'},{prop:'patrolinterval',label:'Inspection interval time(min)'},{prop:'updatetime',label:'Parameter setting time'}],
|
|
|
+ patrolTableListEN:[{prop:'project_name',label:'Project name'},{prop:'number',label:'Lamp Number'},{prop:'patrolinterval',label:'Inspection interval time(min)'},],
|
|
|
tableData: [],
|
|
|
currentPage:1,
|
|
|
pageSize:20,
|
|
@@ -383,7 +370,6 @@
|
|
|
inspectionSetupDialog:false,
|
|
|
inspectionSetupType:'',
|
|
|
inspectionSetupform:{
|
|
|
- switch:'',
|
|
|
interval:'',
|
|
|
updatetime:'',
|
|
|
},
|
|
@@ -611,59 +597,65 @@
|
|
|
this.inspectionSetupSave(this.lampId);
|
|
|
}
|
|
|
},
|
|
|
- BatchSetup(){
|
|
|
- if(this.multipleSelection.length > 0){
|
|
|
- this.inspectionSetupDialog = true;
|
|
|
- this.inspectionSetupType = 'PLSZ';
|
|
|
- for(let key in this.inspectionSetupform){
|
|
|
- this.inspectionSetupform[key] = '';
|
|
|
- }
|
|
|
- this.inspectionSetupform.switch = '1';
|
|
|
- }else{
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message:'Please select the light control',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
inspectionSetupSave(val){
|
|
|
let ids = '';
|
|
|
- if(this.inspectionSetupType == 'PLSZ'){
|
|
|
- for(let d of this.multipleSelection){
|
|
|
- if(ids == ''){
|
|
|
- ids = d.id;
|
|
|
+ ids = val
|
|
|
+ this.loading.inspectionSetupSave = true;
|
|
|
+ // baseApi.ajax_post(
|
|
|
+ // allUrl.alarm.patrolPost,
|
|
|
+ // {
|
|
|
+ // username:this.username,
|
|
|
+ // client_key:this.client_key,
|
|
|
+ // token:this.token,
|
|
|
+ // type:'lamp',
|
|
|
+ // value:ids,
|
|
|
+ // switch:this.inspectionSetupform.switch,
|
|
|
+ // interval:this.inspectionSetupform.interval,
|
|
|
+ // },
|
|
|
+ // {},
|
|
|
+ // ()=>{
|
|
|
+ // this.patrol_list(this.currentPage,()=>{
|
|
|
+ // },0);
|
|
|
+ // this.loading.inspectionSetupSave = false;
|
|
|
+ // this.inspectionSetupDialog = false;
|
|
|
+ // },
|
|
|
+ // this,
|
|
|
+ // ()=>{
|
|
|
+ // this.loading.inspectionSetupSave = false;
|
|
|
+ // this.inspectionSetupDialog = false;
|
|
|
+ // })
|
|
|
+ console.log(allUrl.websocket.wss)
|
|
|
+ let this_ = this;
|
|
|
+ baseApi.websocket1(allUrl.websocket.wss,data=>{
|
|
|
+ if(data.data.status == '1'){
|
|
|
+ baseApi.ajax_post_ws(
|
|
|
+ allUrl.alarm.patrolPost,
|
|
|
+ {
|
|
|
+ username:this_.username,
|
|
|
+ client_key:this_.client_key,
|
|
|
+ token:this_.token,
|
|
|
+ role:this_.role,
|
|
|
+ value:ids,
|
|
|
+ interval:this_.inspectionSetupform.interval,
|
|
|
+ clientid:data.data.clientid,
|
|
|
+ },
|
|
|
+ this_,
|
|
|
+ )
|
|
|
+ }
|
|
|
+ if(data.status == '2'){
|
|
|
+ if(data.code == '0000'){
|
|
|
+ this_.patrol_list(this_.currentPage,()=>{
|
|
|
+ },0);
|
|
|
+ this_.loading.inspectionSetupSave = false;
|
|
|
+ this_.inspectionSetupDialog = false;
|
|
|
}else{
|
|
|
- ids+=','+d.id;
|
|
|
+ this_.loading.inspectionSetupSave = false;
|
|
|
+ this_.inspectionSetupDialog = false;
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
- ids = val
|
|
|
- }
|
|
|
- this.loading.inspectionSetupSave = true;
|
|
|
- baseApi.ajax_post(
|
|
|
- allUrl.alarm.patrolPost,
|
|
|
- {
|
|
|
- username:this.username,
|
|
|
- client_key:this.client_key,
|
|
|
- token:this.token,
|
|
|
- type:'lamp',
|
|
|
- value:ids,
|
|
|
- switch:this.inspectionSetupform.switch,
|
|
|
- interval:this.inspectionSetupform.interval,
|
|
|
- },
|
|
|
- {},
|
|
|
- ()=>{
|
|
|
- this.patrol_list(this.currentPage,()=>{
|
|
|
- },0);
|
|
|
- this.loading.inspectionSetupSave = false;
|
|
|
- this.inspectionSetupDialog = false;
|
|
|
- },
|
|
|
- this,
|
|
|
- ()=>{
|
|
|
- this.loading.inspectionSetupSave = false;
|
|
|
- this.inspectionSetupDialog = false;
|
|
|
- })
|
|
|
+ },() => {
|
|
|
+ this_.loading.lampLightSlider = false;
|
|
|
+ },this_)
|
|
|
},
|
|
|
printing(){
|
|
|
let type = '';
|
|
@@ -1202,17 +1194,11 @@
|
|
|
for(let key in this.inspectionSetupform){
|
|
|
this.inspectionSetupform[key] = '';
|
|
|
}
|
|
|
- this.inspectionSetupform.switch = '1';
|
|
|
- if(this.alarmNav == '巡检设置' || this.alarmNav == 'Inspection setup'){
|
|
|
+ if(this.alarmNav == 'Inspection setup'){
|
|
|
// console.log(data)
|
|
|
this.lampId = data.id;
|
|
|
this.inspectionSetupform['interval'] = data['patrolinterval'];
|
|
|
this.inspectionSetupform['updatetime'] = data['updatetime'];
|
|
|
- if(data['patroltype'] == '开' || data['patroltype'] == 'on'){
|
|
|
- this.inspectionSetupform['switch'] = '1'
|
|
|
- }else if(data['patroltype'] == '关' || data['patroltype'] == 'off'){
|
|
|
- this.inspectionSetupform['switch'] = '0'
|
|
|
- }
|
|
|
this.inspectionSetupDialog = true;
|
|
|
this.inspectionSetupType = 'SZ';
|
|
|
}else{
|
|
@@ -1306,7 +1292,7 @@
|
|
|
this)
|
|
|
},
|
|
|
tableOperationfun3(data){
|
|
|
- if(this.alarmNav == '巡检设置' || this.alarmNav == 'Inspection setup'){
|
|
|
+ if(this.alarmNav == 'Inspection setup'){
|
|
|
// this.lampId = data.id;
|
|
|
// console.log(data.updatetime)
|
|
|
if(data.updatetime == null){
|
|
@@ -1319,11 +1305,6 @@
|
|
|
this.lampId = data.id;
|
|
|
this.inspectionSetupform['interval'] = data['patrolinterval'];
|
|
|
this.inspectionSetupform['updatetime'] = data['updatetime'];
|
|
|
- if(data['patroltype'] == '开' || data['patroltype'] == 'on'){
|
|
|
- this.inspectionSetupform['switch'] = '1'
|
|
|
- }else if(data['patroltype'] == '关' || data['patroltype'] == 'off'){
|
|
|
- this.inspectionSetupform['switch'] = '0'
|
|
|
- }
|
|
|
this.inspectionSetupDialog = true;
|
|
|
this.inspectionSetupType = 'XQ';
|
|
|
}
|