<template>
	<view>
		<view>
			<view class="item ddflex">
				<view class="label">机柜名称</view>
				<view class="item-input fflex ddflex">
					<view>西正路100号门店12仓</view>
					<view class="state">在线</view>
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">机柜编号</view>
				<view class="item-input fflex">
					CHZD04TTCC200329109
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">机柜温度</view>
				<view class="item-input fflex">
					29C
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">机柜电压</view>
				<view class="item-input fflex">
					229.20V
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">当前电流</view>
				<view class="item-input fflex">
					14.2A
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">信号强度</view>
				<view class="item-input fflex">
					28
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">电表度数</view>
				<view class="item-input fflex">
					13461.11 KWH
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">iccid</view>
				<view class="item-input fflex">
					89860469092190149474
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">硬件版本</view>
				<view class="item-input fflex">
					V1.2
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">软件版本</view>
				<view class="item-input fflex">
					ZXSCMB-3.25-20220714
				</view>
			</view>
			<view class="item ddflex">
				<view class="label">协议版本</view>
				<view class="item-input fflex">
					V1.2
				</view>
			</view>
			
		</view>
		
		<!-- 保存按钮 -->
		<view class="savepadding" style="height: 150rpx;"></view>
		<view class="savepadding submit-box">
			<view class="submit-btn" @click="jumpUrl('/machineAndCell/machineDetailEdit/machineDetailEdit')">
				更改机柜地址
			</view>
		</view>
		
	</view>
</template>

<script>
	const app = getApp();
	const req = require("../../utils/request.js");
	export default {
		components: {
		},
		props: {},
		data() {
			return {
				systems: {},
				isTop:0,
			}
		},
		onLoad(options) {
			
		},
		onShow() {
			
		},
		methods: {
			jumpUrl(url) {
				if (req.isLogins(true)) {
					uni.navigateTo({
						url: url
					})
				}
			},
		},
		mounted() {
			const systemInfo = uni.getSystemInfoSync();
			// px转换到rpx的比例
			let pxToRpxScale = 750 / systemInfo.windowWidth;
			let systems = {
				ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
				navigationHeight: 44 * pxToRpxScale // 导航栏的高度
			};
			systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
			this.systems = systems;
		},
		onPageScroll: function(e) {
			if (e.scrollTop > this.systems.barHeight) {
				this.isTop = 1;
			} else {
				this.isTop = 0;
			}
		}
	}
</script>

<style>
	@import "./machineDetail.css";
</style>