zhangdan 4 роки тому
батько
коміт
ed6d5d86b6
2 змінених файлів з 20 додано та 20 видалено
  1. 4 4
      pages/index/addData.vue
  2. 16 16
      pages/index/index.vue

+ 4 - 4
pages/index/addData.vue

@@ -4,20 +4,20 @@
 			<view class="form-data">
 				<u-form :model="form" ref="uForm" :label-width="140" :error-type="['toast']">
 						<u-form-item prop="gatherNum_huishou" label="可回收物:">
-							<u-input :disabled="isView" @input="numberToFixed('gatherNum_huishou',2,999999)" type="number" placeholder="请输入" v-model="form.gatherNum_huishou" />
+							<u-input :disabled="isView" @input="numberToFixed('gatherNum_huishou',2,999999)" type="digit" placeholder="请输入" v-model="form.gatherNum_huishou" />
 							<text slot="right" style="color: #000000;">KG</text>
 						</u-form-item>
 						<u-form-item prop="gatherNum_harm" label="有害垃圾:" >
-							<u-input :disabled="isView" @input="numberToFixed('gatherNum_harm',2,999999)" placeholder="请输入" type="number" v-model="form.gatherNum_harm" />
+							<u-input :disabled="isView" @input="numberToFixed('gatherNum_harm',2,999999)" placeholder="请输入" type="digit" v-model="form.gatherNum_harm" />
 							<text slot="right" style="color: #000000;">KG</text>
 						</u-form-item>
 						<u-gap height="20" bg-color="#f5f5f5"></u-gap>
 						<u-form-item prop="gatherNum_chuyu" label="厨余垃圾:" >
-							<u-input :disabled="isView" @input="numberToFixed('gatherNum_chuyu',2,999999)" placeholder="请输入" type="number" v-model="form.gatherNum_chuyu" />
+							<u-input :disabled="isView" @input="numberToFixed('gatherNum_chuyu',2,999999)" placeholder="请输入" type="digit" v-model="form.gatherNum_chuyu" />
 							<text slot="right" style="color: #000000;">L(约{{form.gatherNum_chuyu*1}}KG)</text>
 						</u-form-item>
 						<u-form-item prop="gatherNum_other" label="其他垃圾:" >
-							<u-input :disabled="isView" @input="numberToFixed('gatherNum_other',2,999999)" type="number" placeholder="请输入" v-model="form.gatherNum_other" />
+							<u-input :disabled="isView" @input="numberToFixed('gatherNum_other',2,999999)" type="digit" placeholder="请输入" v-model="form.gatherNum_other" />
 							<text slot="right" style="color: #000000;">L(约{{form.gatherNum_other*1}}KG)</text>
 						</u-form-item>
 						<u-gap height="20" bg-color="#f5f5f5"></u-gap>

+ 16 - 16
pages/index/index.vue

@@ -10,29 +10,29 @@
 			<!-- 总计 -->
 			<view class="header-cont">
 				<view class="cont-item">
-					<text v-if="!titleStatus" class="other">{{huishouTotal? huishouTotal/1000 :'0'}}</text>
-					<text class="header-cont-item-title">可回收物(L)</text>
 					<u-loading :show="titleStatus"></u-loading>
+					<text v-if="!titleStatus" class="other">{{huishouTotal}}</text>
+					<text class="header-cont-item-title">可回收物(L)</text>
 				</view>
 				<view class="cont-item">
-					<text v-if="!titleStatus" class="other">{{harmTotal ? harmTotal/1000:'0'}}</text>
-					<text class="header-cont-item-title">有害收物(L)</text>
 					<u-loading :show="titleStatus"></u-loading>
+					<text v-if="!titleStatus" class="other">{{harmTotal}}</text>
+					<text class="header-cont-item-title">有害收物(L)</text>
 				</view>
 				<view class="cont-item">
-					<text v-if="!titleStatus" class="other">{{chuyuTotal ? chuyuTotal/1000 :'0'}}</text>
-					<text class="header-cont-item-title">厨余垃圾(L)</text>
 					<u-loading :show="titleStatus"></u-loading>
+					<text v-if="!titleStatus" class="other">{{chuyuTotal}}</text>
+					<text class="header-cont-item-title">厨余垃圾(L)</text>
 				</view>
 				<view class="cont-item">
-					<text v-if="!titleStatus" class="other">{{otherTotal ? otherTotal/1000 :'0'}}</text>
-					<text class="header-cont-item-title">其它垃圾(KG)</text>
 					<u-loading :show="titleStatus"></u-loading>
+					<text v-if="!titleStatus" class="other">{{otherTotal}}</text>
+					<text class="header-cont-item-title">其它垃圾(KG)</text>
 				</view>
 				<view class="cont-item">
-					<text v-if="!titleStatus" class="other">{{jianzhuTotal ? jianzhuTotal/1000 :'0'}}</text>
+					
+					<text v-if="!titleStatus" class="other">{{jianzhuTotal}}</text>
 					<text class="header-cont-item-title">建筑垃圾(KG)</text>
-					<u-loading :show="titleStatus"></u-loading>
 				</view>
 			</view>
 		</view>
@@ -53,31 +53,31 @@
 					<view class="cont-item">
 						<u-image src="/static/huishou.png" width="90" height="90"></u-image>
 						<text class="item-title">可回收物</text>
-						<text>{{item.gatherOther? (item.gatherOther/1000/1000).toFixed(3)/1 :0}}kg</text>
+						<text>{{item.gatherRecycling? (item.gatherRecycling/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
 					<!-- 有害垃圾 -->
 					<view class="cont-item">
 						<u-image src="/static/youhai.png"></u-image>
 						<text class="item-title">有害垃圾</text>
-						<text>{{item.gatherOther? (item.gatherOther/1000/1000).toFixed(3)/1 :0}}kg</text>
+						<text>{{item.gatherHarm? (item.gatherHarm/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
 					<!-- 厨余垃圾 -->
 					<view class="cont-item">
 						<u-image src="/static/chuyu.png"></u-image>
 						<text class="item-title">厨余垃圾</text>
-						<text>{{item.gatherKitchen ? (item.gatherKitchen/1000/1000).toFixed(3)/1 :0}}kg</text>
+						<text>{{item.gatherKitchen ? (item.gatherKitchen/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
 					<!-- 其他垃圾 -->
 					<view class="cont-item">
 						<u-image src="/static/qita.png"></u-image>
 						<text class="item-title">其他垃圾</text>
-						<text>{{item.gatherOther? (item.gatherOther/1000/1000).toFixed(3)/1 :0}}kg</text>
+						<text>{{item.gatherOther? (item.gatherOther/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
 					<!-- 建筑垃圾 -->
 					<view class="cont-item">
 						<u-image src="/static/jianzhu.png"></u-image>
 						<text class="item-title">建筑垃圾</text>
-						<text>{{item.gatherBuilding ? (item.gatherBuilding/1000/1000).toFixed(3)/1 :0}}kg</text>
+						<text>{{item.gatherBuilding ? (item.gatherBuilding/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
 				</view>
 			</view>
@@ -367,7 +367,7 @@
 				.other{
 					display: inline-block;
 					margin: 30upx 0 10upx;
-					font-size: 24px;
+					font-size: 18px;
 					font-weight: normal;
 					color: #FFFFFF;
 					opacity: 1;