|
@@ -503,8 +503,16 @@
|
|
|
</el-dialog>
|
|
|
<el-form label-width="14rem" ref="lightControlData" :model="lightControlData" :rules="lightControlDataRulesEN" label-position="right" class="clearfix">
|
|
|
<el-form-item :label="item.label+item.unit+':'" :key="item.id" v-for="item in lightControlListEN_for" class="list_box" :class="{'list_box_min':windowWidth < 1600}" :prop="item.model">
|
|
|
- <el-input v-model="lightControlData[item.model]" v-if="item.type != 'select'&&item.type != 'select_filterable'&&item.model !='lamp_no'"
|
|
|
+ <el-input v-model="lightControlData[item.model]" v-if="item.type != 'select'&&item.type != 'select_filterable'&&item.model !='lamp_no'&&item.model !='address'&&item.model !='mfrsName'"
|
|
|
@keyup.native="lampKeydown($event)"></el-input>
|
|
|
+
|
|
|
+ <el-input v-model="lightControlData[item.model]" v-if="item.type != 'select'&&item.type != 'select_filterable'&&item.model =='address'"
|
|
|
+ @keyup.native="lampKeydown($event)" @change="get_manu_by_address"></el-input>
|
|
|
+
|
|
|
+ <el-input v-model="lightControlData[item.model]" v-if="item.type != 'select'&&item.type != 'select_filterable'&&item.model =='mfrsName'"
|
|
|
+ @keyup.native="lampKeydown($event)" disabled></el-input>
|
|
|
+
|
|
|
+
|
|
|
<el-input-number v-model="lightControlData[item.model]" controls-position="right" :min="0" :max="999999" v-if="item.type != 'select'&&item.model =='lamp_no'"
|
|
|
@keyup.native="lampKeydown($event)"></el-input-number>
|
|
|
<el-select v-model="lightControlData[item.model]" placeholder="please choose" v-if="item.type == 'select' && item.model == 'protocoltype'" @keyup.native="lampKeydown($event)">
|
|
@@ -522,6 +530,22 @@
|
|
|
<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-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>
|
|
|
+ <el-option key="2022-23" label="2022-23" value="2022-23"></el-option>
|
|
|
+ <el-option key="2023-24" label="2023-24" value="2023-24"></el-option>
|
|
|
+ <el-option key="2024-25" label="2024-25" value="2024-25"></el-option>
|
|
|
+ <el-option key="2025-26" label="2025-26" value="2025-26"></el-option>
|
|
|
+ <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-option key="Phase1" label="Phase1" value="Phase1"></el-option>
|
|
|
+ <el-option key="Phase2" label="Phase2" value="Phase2"></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
<el-select
|
|
|
v-model="lightControlData[item.model]"
|
|
|
placeholder="please choose"
|
|
@@ -1188,31 +1212,65 @@
|
|
|
supplierName:'',
|
|
|
protocoltype:'',
|
|
|
loadtype:'0',
|
|
|
+ fascal_year:'',
|
|
|
+ fascal_year_phase:'',
|
|
|
+ street_light_SN:'',
|
|
|
+ customer_name:'',
|
|
|
+ customer_ID:'',
|
|
|
+ mfrsName:'',
|
|
|
},
|
|
|
lightControlListEN:[
|
|
|
{model:'lamp_no',label:'Lamp number',unit:''},
|
|
|
+ {model:'address',label:'Wireless module address',unit:''},
|
|
|
+
|
|
|
+ {model:'street_light_SN',label:'Street light SN',unit:''},
|
|
|
+ {model:'customer_name',label:'Customer Name',unit:''},
|
|
|
+ {model:'customer_ID',label:'Customer ID',unit:''},
|
|
|
+
|
|
|
{model:'poName',label:'PO name',type:'select',unit:''},
|
|
|
{model:'supplierName',label:'Supplier name',type:'select',unit:''},
|
|
|
- {model:'protocoltype',label:'Network protocol type',type:"select",unit:''},{model:'section',label:'Road',unit:''},{model:'address',label:'Wireless module address',unit:''},
|
|
|
- // {model:'poleheight',label:'Lamp-post length',unit:'(m)'},
|
|
|
- // {model:'polediameter',label:'Lamp-post diameter',unit:'(mm)'},
|
|
|
- // {model:'polematerial',label:'Lamp-post materials',type:"select_filterable",unit:''},
|
|
|
- // {model:'lighttype',label:'Light type',type:"select_filterable",unit:''},
|
|
|
- {model:'lamptype',label:'Lamp type',type:"select_filterable",unit:''},{model:'boardtype',label:'Solar panel type',type:"select_filterable",unit:''},{model:'batterytype',label:'Battery type',type:"select_filterable",unit:''},{model:'boardpower',label:'Solar panel power',unit:'(W)'},{model:'batteryah',label:'Battery capacity',unit:'(Ah)'},{model:'loadpower',label:'Load power',unit:'(W)'},
|
|
|
+
|
|
|
+ {model:'mfrsName',label:'MFRS name',unit:''},
|
|
|
+
|
|
|
+ {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:'lamptype',label:'Lamp type',type:"select_filterable",unit:''},
|
|
|
+ {model:'boardtype',label:'Solar panel type',type:"select_filterable",unit:''},
|
|
|
+ {model:'batterytype',label:'Battery type',type:"select_filterable",unit:''},
|
|
|
+ {model:'boardpower',label:'Solar panel power',unit:'(W)'},
|
|
|
+ {model:'batteryah',label:'Battery capacity',unit:'(Ah)'},
|
|
|
+ {model:'loadpower',label:'Load power',unit:'(W)'},
|
|
|
{model:'loadtype',label:'Load type',unit:'',type:"select"},
|
|
|
{model:'longitude',label:'Longitude',unit:''},
|
|
|
{model:'latitude',label:'Latitude',unit:''}
|
|
|
],
|
|
|
lightControlListEN_for:[
|
|
|
{model:'lamp_no',label:'Lamp number',unit:''},
|
|
|
+ {model:'address',label:'Wireless module address',unit:''},
|
|
|
+
|
|
|
+ {model:'street_light_SN',label:'Street light SN',unit:''},
|
|
|
+ {model:'customer_name',label:'Customer Name',unit:''},
|
|
|
+ {model:'customer_ID',label:'Customer ID',unit:''},
|
|
|
+
|
|
|
{model:'poName',label:'PO name',type:'select',unit:''},
|
|
|
{model:'supplierName',label:'Supplier name',type:'select',unit:''},
|
|
|
- {model:'protocoltype',label:'Network protocol type',type:"select",unit:''},{model:'section',label:'Road',unit:''},{model:'address',label:'Wireless module address',unit:''},
|
|
|
- // {model:'poleheight',label:'Lamp-post length',unit:'(m)'},
|
|
|
- // {model:'polediameter',label:'Lamp-post diameter',unit:'(mm)'},
|
|
|
- // {model:'polematerial',label:'Lamp-post materials',type:"select_filterable",unit:''},
|
|
|
- // {model:'lighttype',label:'Light type',type:"select_filterable",unit:''},
|
|
|
- {model:'lamptype',label:'Lamp type',type:"select_filterable",unit:''},{model:'boardtype',label:'Solar panel type',type:"select_filterable",unit:''},{model:'batterytype',label:'Battery type',type:"select_filterable",unit:''},{model:'boardpower',label:'Solar panel power',unit:'(W)'},{model:'batteryah',label:'Battery capacity',unit:'(Ah)'},{model:'loadpower',label:'Load power',unit:'(W)'},
|
|
|
+
|
|
|
+ {model:'mfrsName',label:'MFRS name',unit:''},
|
|
|
+
|
|
|
+ {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:'lamptype',label:'Lamp type',type:"select_filterable",unit:''},
|
|
|
+ {model:'boardtype',label:'Solar panel type',type:"select_filterable",unit:''},
|
|
|
+ {model:'batterytype',label:'Battery type',type:"select_filterable",unit:''},
|
|
|
+ {model:'boardpower',label:'Solar panel power',unit:'(W)'},
|
|
|
+ {model:'batteryah',label:'Battery capacity',unit:'(Ah)'},
|
|
|
+ {model:'loadpower',label:'Load power',unit:'(W)'},
|
|
|
{model:'loadtype',label:'Load type',unit:'',type:"select"},
|
|
|
{model:'longitude',label:'Longitude',unit:''},
|
|
|
{model:'latitude',label:'Latitude',unit:''}
|
|
@@ -1243,6 +1301,24 @@
|
|
|
address: [
|
|
|
{ required: true, message: 'Not null', trigger: 'blur' }
|
|
|
],
|
|
|
+
|
|
|
+ street_light_SN: [
|
|
|
+ { required: true, message: 'Not null', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ customer_name: [
|
|
|
+ { required: true, message: 'Not null', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ customer_ID: [
|
|
|
+ { required: true, message: 'Not null', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ fascal_year: [
|
|
|
+ { required: true, message: 'Not null', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ fascal_year_phase: [
|
|
|
+ { required: true, message: 'Not null', trigger: 'change' }
|
|
|
+ ],
|
|
|
+
|
|
|
protocoltype: [
|
|
|
{ required: true, message: 'Not null', trigger: 'blur' }
|
|
|
],
|
|
@@ -1915,6 +1991,7 @@
|
|
|
pageSizeArr:[{id:10,name:'10/page'},{id:20,name:'20/page'},{id:50,name:'50/page'},{id:100,name:'100/page'}],
|
|
|
|
|
|
websocket:null,
|
|
|
+ updateRemRatioShakeProof:null,
|
|
|
loading:{
|
|
|
deviceList:false,
|
|
|
lampLightSlider:false,
|
|
@@ -2194,6 +2271,19 @@
|
|
|
|
|
|
},
|
|
|
methods:{
|
|
|
+ get_manu_by_address(address){
|
|
|
+ baseApi.ajax_post(
|
|
|
+ allUrl.project.get_manu_by_address,
|
|
|
+ {
|
|
|
+ address:address,
|
|
|
+ },
|
|
|
+ {},
|
|
|
+ data =>{
|
|
|
+ this.lightControlData.mfrsName = data.data.name;
|
|
|
+ // console.log(data)
|
|
|
+ },
|
|
|
+ this)
|
|
|
+ },
|
|
|
addTypeChange(){
|
|
|
this.dialogBatchAdd = false;
|
|
|
this.addLightControlFun(this.networkId);
|
|
@@ -3205,7 +3295,7 @@
|
|
|
this.deviceArr.push({prop:d,label:this.tableConfig.label[i],minWidth:this.tableConfig.width[i],sortable:this.tableConfig.sortable[i]})
|
|
|
i++;
|
|
|
}
|
|
|
- console.log(this.deviceArr)
|
|
|
+ // console.log(this.deviceArr)
|
|
|
this.currentPage = 1;
|
|
|
this.loading.fieldKeep = true;
|
|
|
this.getLightList(this.currentPage,() => {
|
|
@@ -3825,6 +3915,7 @@
|
|
|
}
|
|
|
this.lightControlData.poName = data.data.po+'';
|
|
|
this.lightControlData.supplierName = data.data.supplier+'';
|
|
|
+ this.get_manu_by_address(this.lightControlData.address)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -5791,20 +5882,57 @@
|
|
|
this.lightControlListEN_for = JSON.parse(JSON.stringify(this.lightControlListEN))
|
|
|
},
|
|
|
"updateRemRatio":function (){
|
|
|
- this.getFields();
|
|
|
- if(this.historicalDialog){
|
|
|
- this.lampcontrolHistorylist(1,0);
|
|
|
- }
|
|
|
+ clearTimeout(this.updateRemRatioShakeProof)
|
|
|
+ this.updateRemRatioShakeProof = setTimeout(()=>{
|
|
|
|
|
|
- if(this.myChart){
|
|
|
- if(document.body.offsetWidth <1500){
|
|
|
- this.legendWidth = '180px';
|
|
|
- }else{
|
|
|
- this.legendWidth = 'auto';
|
|
|
+ this.tableConfig.label = [];
|
|
|
+ this.tableConfig.prop = [];
|
|
|
+ this.tableConfig.prop1 = [];
|
|
|
+ this.tableConfig.width = [];
|
|
|
+ for(var d of this.fieldList){
|
|
|
+ if(d.select == '1'){
|
|
|
+ this.$set(this.tableConfig.label,this.tableConfig.label.length,d.enname);
|
|
|
+ this.$set(this.tableConfig.prop1,this.tableConfig.prop1.length,d.field);
|
|
|
+ this.$set(this.tableConfig.prop,this.tableConfig.prop.length,d.fields1);
|
|
|
+ if(d.fields1 == 'updatetime'){
|
|
|
+ this.$set(this.tableConfig.width,this.tableConfig.width.length,12*this.remRatio);
|
|
|
+ }else if(d.fields1 == 'isfaulted'){
|
|
|
+ this.$set(this.tableConfig.width,this.tableConfig.width.length,10*this.remRatio);
|
|
|
+ }else if(d.fields1 == 'section'){
|
|
|
+ this.$set(this.tableConfig.width,this.tableConfig.width.length,10*this.remRatio);
|
|
|
+ }else if(d.fields1 == 'status'){
|
|
|
+ this.$set(this.tableConfig.width,this.tableConfig.width.length,8*this.remRatio);
|
|
|
+ }else{
|
|
|
+ this.$set(this.tableConfig.width,this.tableConfig.width.length,((d.enname.length+1)*0.5+1.5)*this.remRatio);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- // this.myChart.setOption(option,true);
|
|
|
- this.myChart.resize();
|
|
|
- }
|
|
|
+ let i = 0;
|
|
|
+ this.deviceArr = [];
|
|
|
+ for(let d of this.tableConfig.prop){
|
|
|
+ this.deviceArr.push({prop:d,label:this.tableConfig.label[i],minWidth:this.tableConfig.width[i],sortable:this.tableConfig.sortable[i]})
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ this.$refs.deviceList.doLayout();
|
|
|
+ if(this.historicalDialog){
|
|
|
+ this.$refs.multipleTable.doLayout();
|
|
|
+ }
|
|
|
+ // console.log(this,'-----')
|
|
|
+ // this.getFields();
|
|
|
+ // if(this.historicalDialog){
|
|
|
+ // this.lampcontrolHistorylist(1,0);
|
|
|
+ // }
|
|
|
+ if(this.myChart){
|
|
|
+ if(document.body.offsetWidth <1500){
|
|
|
+ this.legendWidth = '180px';
|
|
|
+ }else{
|
|
|
+ this.legendWidth = 'auto';
|
|
|
+ }
|
|
|
+ // this.myChart.setOption(option,true);
|
|
|
+ this.myChart.resize();
|
|
|
+ }
|
|
|
+ },1000)
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
}
|