zhengkaixin il y a 3 ans
Parent
commit
8064446c37

+ 22 - 11
src/projects/business/views/Other/Energy/Info.vue

@@ -63,27 +63,27 @@
 					</div>
 					<div class="returnRadio">
 						<div class="mui-input-row mui-radio mui-left">
-							<label>总用电量</label>
+							<label style="padding-right: 0px;" >总用电量</label>
 							<input name="radio1" value="0" v-model="selectType" @click="ck(0)" type="radio">
 						</div>
 						<div class="mui-input-row mui-radio mui-left">
-							<label>当月用电量</label>
+							<label style="padding-right: 0px;" >当月用电量</label>
 							<input name="radio1" value="1" v-model="selectType" @click="ck(1)" type="radio">
 						</div>
 						<div class="mui-input-row mui-radio mui-left">
-							<label>上月用电量</label>
+							<label style="padding-right: 0px;">上月用电量</label>
 							<input name="radio1" value="2" v-model="selectType" @click="ck(2)" type="radio">
 						</div>
 						<div class="mui-input-row mui-radio mui-left">
-							<label>当年用电量</label>
+							<label style="padding-right: 0px;">当年用电量</label>
 							<input name="radio1" value="3" v-model="selectType" @click="ck(3)" type="radio">
 						</div>
 						<div class="mui-input-row mui-radio mui-left">
-							<label>当日用电量</label>
+							<label style="padding-right: 0px;" >当日用电量</label>
 							<input name="radio1" value="4" v-model="selectType" @click="ck(4)" type="radio">
 						</div>
 						<div class="mui-input-row mui-radio mui-left">
-							<label>查询其他</label>
+							<label style="padding-right: 0px;">查询其他</label>
 							<input name="radio1" value="9" v-model="selectType" @click="ck(9)" type="radio">
 						</div>
 					</div>
@@ -183,7 +183,8 @@
 				showlist2: [],
 				showlist3: [],
 				meterList: [],
-				meterListObj: {}
+				meterListObj: {},
+				key:"xpgj_selectMeter_meterListObj"
 			}
 		},
 		mounted() {
@@ -217,6 +218,7 @@
 				picker.show(function(selectItems) {
 					_this.meterListObj = _this.meterList[selectItems[0].value];
 					//_this.approvalPersonName = selectItems[0].text;
+					window.localStorage.setItem(_this.key,JSON.stringify(_this.meterListObj));
 					_this.init();
 				})
 			},
@@ -247,12 +249,20 @@
 
 					this.meterList = response.meterList;
 					console.log(response)
-					if (this.meterList.length) {
+					if (this.meterList.length) {
+						var deobj= window.localStorage.getItem(this.key);
+						if(deobj){
+							deobj=JSON.parse(deobj)
+						}
 						this.meterListObj = this.meterList[0]
 						for(var i in  this.meterList ){
 								var obj=this.meterList[i];
 								obj.value=i;
 								obj.text=obj.name;
+								if(deobj&&deobj.meterNo==obj.meterNo){
+									this.meterListObj = obj;
+									
+								}
 						}
 						this.nowDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
 
@@ -317,7 +327,7 @@
 					"value": _this.queryDate2
 				});
 				picker.show(function(rs) {
-					_this.queryDate2 = rs.text+'-1';
+					_this.queryDate2 = rs.text+'-01';
 					_this.getEnergyCenterElectricity()
 					picker.dispose();
 				});
@@ -352,7 +362,8 @@
 			getEnergyCenterMap() {
 				this.isLoading = true;
 				API.energyCenter({
-					queryDate: this.queryDate
+					queryDate: this.queryDate,
+					meterNo: this.meterListObj.meterNo,
 				}).then(response => {
 					this.isLoading = false;
 
@@ -909,7 +920,7 @@
 		display: flex;
 		flex-wrap: wrap;
 		margin-top: 12px;
-		padding: 0 20px;
+		padding: 0 5px;
 	}
 
 	.returnRadio .mui-input-row {

+ 2 - 1
src/projects/business/views/Other/Energy/Info5.vue

@@ -147,8 +147,9 @@
 				})
 			},
 			setMap2(){
+				this.timeList2=[];
 				for(var i in  this.graphMap2){
-									
+							
 					this.timeList2.push(parseInt(i)+'时')
 				}
 				 

+ 1 - 0
src/projects/business/views/Other/Energy/Info6.vue

@@ -155,6 +155,7 @@
 				})
 			},
 			setMap2(){
+				this.timeList2=[];
 				for(var i in  this.graphMap2){
 									
 					this.timeList2.push(parseInt(i)+'时')