<template>
	<view>
		<uni-card>
			<uni-forms class="uniRow" ref="form" label-position="top" :model="formData" validate-trigger="submit"
				err-show-type="toast">

				<scroll-view scroll-y="true" :style="{height:scrollerHeight+'px'}">

					<view class="uni-container">

						<view class="formItem">
							<uni-forms-item name="dVFlowb" label-width='150' label="标况体积流量(m³/s)">
								<uni-title type="h3" color="blue" placeholder="标况体积流量"
									:title="formData.dVFlowb"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem">
							<uni-forms-item name="dVFlowf" label-width='150' label="工况体积流量(m³/s)">
								<uni-title type="h3" color="blue" placeholder="工况体积流量"
									:title="formData.dVFlowf"></uni-title>
							</uni-forms-item>
						</view>


						<view class="formItem">
							<uni-forms-item name="dMFlowb" label-width='150' label="标况质量流量(kg/s)">
								<uni-title type="h3" color="blue" placeholder="标况质量流量"
									:title="formData.dMFlowb"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem">
							<uni-forms-item name="dEFlowb" label-width='150' label="标况能量流量(MJ/s)">
								<uni-title type="h3" color="blue" placeholder="标况能量流量"
									:title="formData.dEFlowb"></uni-title>
							</uni-forms-item>
						</view>


						<view class="formItem">
							<uni-forms-item name="dZb" label-width='150px' label="标况压缩因子">
								<uni-title type="h3" color="blue" placeholder="标况压缩因子"
									:title="formData.dZb"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem">
							<uni-forms-item name="dZf" label-width='150px' label="工况压缩因子">
								<uni-title type="h3" color="blue" placeholder="工况压缩因子"
									:title="formData.dZf"></uni-title>
							</uni-forms-item>
						</view>



						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dE" label-width='150' label="渐近速度系数 E">
								<uni-title type="h3" color="blue" placeholder="渐近速度系数 E"
									:title="formData.dE"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem"><uni-forms-item v-if="meterType==0" name="dFG" label-width='150'
								label="相对密度系数 FG">
								<uni-title type="h3" color="blue" placeholder="相对密度系数 FG"
									:title="formData.dFG"></uni-title>
							</uni-forms-item>
						</view>



						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dFT" label-width='150' label="流动温度系数 FT">
								<uni-title type="h3" color="blue" placeholder="流动温度系数 FT"
									:title="formData.dFT"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem"><uni-forms-item v-if="meterType==0" name="dDViscosity" label-width='150'
								label="动力粘度dlnd">
								<uni-title type="h3" color="blue" placeholder="动力粘度dlnd"
									:title="formData.dDViscosity"></uni-title>
							</uni-forms-item>
						</view>


						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dDExpCoefficient" label-width='150' label="可膨胀系数">
								<uni-title type="h3" color="blue" placeholder="可膨胀系数"
									:title="formData.dDExpCoefficient"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dFpv" label-width='150px' label="超压缩系数">
								<uni-title type="h3" color="blue" placeholder="超压缩系数"
									:title="formData.dFpv"></uni-title>
							</uni-forms-item>
						</view>


						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dRoughNessPipe" label-width='150'
								label="管道粗糙度系数Gme">
								<uni-title type="h3" color="blue" placeholder="管道粗糙度系数Gme"
									:title="formData.dRoughNessPipe"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem"><uni-forms-item v-if="meterType==0" name="dBk" label-width='150'
								label="孔板锐利度系数Bk">
								<uni-title type="h3" color="blue" placeholder="孔板锐利度系数Bk"
									:title="formData.dBk"></uni-title>
							</uni-forms-item>
						</view>





						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dCd" label-width='150' label="流出系数">
								<uni-title type="h3" color="blue" placeholder="流出系数" :title="formData.dCd"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem"><uni-forms-item v-if="meterType==0" name="dRnPipe" label-width='150'
								label="管道雷诺数">
								<uni-title type="h3" color="blue" placeholder="管道雷诺数"
									:title="formData.dRnPipe"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dVelocityFlow" label-width='150'
								label="天然气流速(m/s)">
								<uni-title type="h3" color="blue" placeholder="管道内天然气流速"
									:title="formData.dVelocityFlow"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem"> <uni-forms-item v-if="meterType==0" name="dPressLost" label-width='150'
								label="压力损失">
								<uni-title type="h3" color="blue" placeholder="压力损失(Pa)"
									:title="formData.dPressLost"></uni-title>
							</uni-forms-item>
						</view>




						<view class="formItem">
							<uni-forms-item v-if="meterType==0" name="dBeta" label-width='150' label="直径比">
								<uni-title type="h3" color="blue" placeholder="直径比" :title="formData.dBeta"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem"><uni-forms-item v-if="meterType==0" name="dKappa" label-width='150'
								label="等熵指数">
								<uni-title type="h3" color="blue" placeholder="等熵指数"
									:title="formData.dKappa"></uni-title>
							</uni-forms-item>
						</view>



						<view class="formItem">
							<uni-forms-item v-if="meterType==2" name="dKappa" label-width='150' label="等熵指数">
								<uni-title type="h3" color="blue" placeholder="等熵指数"
									:title="formData.dKappa"></uni-title>
							</uni-forms-item>
						</view>
						<view class="formItem">
							<uni-forms-item v-if="meterType==2" name="dCstar" label-width='150' label="临界流函数C*">
								<uni-title type="h3" color="blue" placeholder="临界流函数"
									:title="formData.dCstar"></uni-title>
							</uni-forms-item>
						</view>
					</view>
				</scroll-view>



			</uni-forms>
		</uni-card>
	</view>
</template>

<script>
	export default {

		props: {
			formData: {
				type: Object,
				default: {}
			},
			meterType: {
				type: Number,
				default: 0
			}

		},
		data() {
			return {
				formOptions: {},
				scrollerHeight: 0
			}
		},
		mounted() {
			let that = this;
			// #ifdef APP

			uni.getSystemInfo({
				success: function(res) {
					that.scrollerHeight = (res.windowHeight - 200)
				}
			});
			// #endif
			// #ifdef H5			

			uni.getSystemInfo({
				success: function(res) {
					that.scrollerHeight = (res.windowHeight - 200)
				}
			});
			// #endif
			// #ifdef  MP-WEIXIN
			wx.getSystemInfo({
				success: function(res) {
					that.scrollerHeight = (res.windowHeight - 200)
				}
			})
			// #endif
			// this.$refs.form.setRules(this.rules)

		},
		methods: {

			/**
			 * 验证表单并提交
			 */

		}
	}
</script>

<style>
	.uni-container {
		padding: 0px;
		display: flex;
		flex-wrap: wrap;
	}

	@media screen and (min-width: 1024px) {
		.formItem {
			width: 18%;
			padding-right: 10px;
		}
	}

	@media screen and (max-width: 1024px) {
		.formItem {
			width: 18%;
			padding-right: 10px;
		}
	}

	@media screen and (max-width: 768px) {
		.formItem {
			width: 30%;
			padding-right: 10px;
		}
	}



	@media screen and (max-width: 640px) {
		.formItem {
			width: 45%;
			padding-right: 10px;
		}
	}

	@media screen and (max-width: 320px) {
		.formItem {
			width: 90%;
			padding-right: 10px;
		}
	}

	.uni-input-border,
	.uni-textarea-border {
		width: 100%;
		font-size: 14px;
		color: #666;
		border: 1px #e5e5e5 solid;
		border-radius: 5px;
		box-sizing: border-box;
	}

	.uni-input-border {
		padding: 0 10px;
		height: 35px;

	}

	.uni-textarea-border {
		padding: 10px;
		height: 80px;
	}

	.uni-button-group {
		margin-top: 50px;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		justify-content: center;
	}

	.uni-button {
		width: 184px;
	}

	.uniRow {
		padding: 1px;
	}
</style>