<template>
	<view>
		<view class="white">

			<view class="title">
				<text class="param">参数设定</text>
				<view class="tiao"></view>
			</view>


			<view class="setmenu">
				<view class="setItem">
					<view class="text">
						<text>排风温度设定</text>
					</view>
					<view class="input" @click="inputDialogToggle()">
						<input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.WD_SD" />
						<view class="danwei">
							<text style="margin-left: 10rpx;">℃</text>
						</view>
					</view>
				</view>
				<view class="setItem">
					<view class="text">
						<text>排风湿度设定</text>
					</view>
					<view class="input" @click="inputDialogToggle2()">
						<input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.SD_SD" />
						<view class="danwei"> <text style="margin-left: 14rpx;">%</text></view>
					</view>
				</view>
				<view class="setItem">
					<view class="text">
						<text>停机延时设定</text>
					</view>
					<view class="input" @click="inputDialogToggle3()">
						<input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JZ_YSTZ" />
						<view class="danwei"> <text style="margin-left: 20rpx;">S</text></view>
					</view>
				</view>
			</view>


			<view class="buttonItem">
				<view class="item">
					<view class="text">
						<text>控制选择模式</text>
					</view>
					<button class="button" :class="{'active_button': formData.JZ_XZ == 1}"
						@tap="JZXZ">{{formData.JZ_XZ == 0?"CK1":"CK2"}}</button>
				</view>
				<view class="item">
					<view class="text">
						<text>控制模式复位</text>
					</view>
					<button class="button" :class="{'active_button': formData.MS_XZ == 1}" @tap="MSXZ()">复位</button>
				</view>

				<view class="item">
					<view class="text">
						<text>故障复位</text>
					</view>
					<button class="button" :class="{'active_button': formData.GZ_FW == 1}"
						@tap="GZFW()">{{formData.GZ_FW == 0?"关闭":"打开"}}</button>
				</view>
			</view>
		</view>


		<!-- 输入框1 -->
		<view>
			<uni-popup ref="inputDialog" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0.0 - 50.0)" :value="formData.WD_SD"
					placeholder="输入范围: 0 - 50.0的值" @confirm="dialogInputConfirm"></uni-popup-dialog>
			</uni-popup>
		</view>

		<!-- 输入框2 -->
		<view>
			<uni-popup ref="inputDialog2" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0.0 - 100.0)" :value="formData.SD_SD"
					placeholder="输入范围: 0 - 100.0的值!" @confirm="dialogInputConfirm2"></uni-popup-dialog>
			</uni-popup>
		</view>

		<!-- 输入框3 -->
		<view>
			<uni-popup ref="inputDialog3" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 9999)" :value="formData.JZ_YSTZ"
					placeholder="输入范围: 0 - 9999的值!" @confirm="dialogInputConfirm3"></uni-popup-dialog>
			</uni-popup>
		</view>

		<!-- 输入框FA1 -->
		<view>
			<uni-popup ref="inputDialogFA1" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 100)" :value="formData.LSF_SDKD"
					placeholder="输入范围: 0 - 100的值!" @confirm="dialogInputConfirmFA1"></uni-popup-dialog>
			</uni-popup>
		</view>
		<!-- 输入框FA2 -->
		<view>
			<uni-popup ref="inputDialogFA2" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 100)" :value="formData.RSF_SDKD"
					placeholder="输入范围: 0 - 100的值!" @confirm="dialogInputConfirmFA2"></uni-popup-dialog>
			</uni-popup>
		</view>
		<!-- 输入框FA3 -->
		<view>
			<uni-popup ref="inputDialogFA3" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 100)" :value="formData.JSF_SDKD"
					placeholder="输入范围: 0 - 100的值!" @confirm="dialogInputConfirmFA3"></uni-popup-dialog>
			</uni-popup>
		</view>

		<view class="xiabu">

			<view class="title">
				<text class="param">运行状态</text>
				<view class="tiao"></view>
			</view>

			<view class="head">
				<text>设备名称</text>
				<text style="margin-left: 30rpx">控制模式</text>
				<text>手动命令</text>
				<text>实时反馈</text>
			</view>
			<view class="whiteItem">
				<text class="text1">空调送风机</text>
				<button class="auto" :class="{'active_button': formData.SFJ_SZXZ == 1}"
					@tap="shouZiDongSFJ()">{{formData.SFJ_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.SFJ_SDQD == 1}"
					@tap="shouZiDongSFJSD()">{{formData.SFJ_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.SFJ_QT == 0?"停止":"启动"}}</text>
			</view>
			<view class="grayItem">
				<text class="text1">空调排风机</text>
				<button class="auto" :class="{'active_button': formData.PFJ_SZXZ == 1}"
					@tap="shouZiDongPFJ">{{formData.PFJ_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.PFJ_SDQD == 1}"
					@tap="shouZiDongPFJSD()">{{formData.PFJ_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.PFJ_QT == 0?"停止":"启动"}}</text>
			</view>
			<view class="whiteItem">
				<text class="text1">风 冷 主 机</text>
				<button class="auto" :class="{'active_button': formData.FLZJ_SZXZ == 1}"
					@tap="shouZiDongFLZJ">{{formData.FLZJ_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.FLZJ_SDQD == 1}"
					@tap="shouZiDongFLZJSD()">{{formData.FLZJ_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.FLZJ_QT == 0?"停止":"启动"}}</text>
			</view>
			<view class="grayItem">
				<text class="text1">一级电加热</text>
				<button class="auto" :class="{'active_button': formData.YJDJR_SZXZ == 1}"
					@tap="shouZiDongYJDJR">{{formData.YJDJR_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.YJDJR_SDQD == 1}"
					@tap="shouZiDongYJDJRSD()">{{formData.YJDJR_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.YJDJR_QT == 0?"停止":"启动"}}</text>
			</view>
			<view class="whiteItem">
				<text class="text1">二级电加热</text>
				<button class="auto" :class="{'active_button': formData.EJDJR_SZXZ == 1}"
					@tap="shouZiDongEJDJR">{{formData.EJDJR_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.SJDJR_SDQD == 1}"
					@tap="shouZiDongEJDJRSD()">{{formData.SJDJR_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.EJDJR_QT == 0?"停止":"启动"}}</text>
			</view>
			<view class="grayItem">
				<text class="text1">三级电加热</text>
				<button class="auto" :class="{'active_button': formData.SJDJR_SZXZ == 1}"
					@tap="shouZiDongSJDJR">{{formData.SJDJR_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.SJDJR_SDQD == 1}"
					@tap="shouZiDongSJDJRSD()">{{formData.SJDJR_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.SJDJR_QT == 0?"停止":"启动"}}</text>
			</view>
			<view class="whiteItem">
				<text class="text1">空调送风阀</text>
				<button class="auto" :class="{'active_button': formData.SFF_SZXZ == 1}"
					@tap="shouZiDongSFF">{{formData.SFF_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.SFF_SDQD == 1}"
					@tap="shouZiDongSFFSD()">{{formData.SFF_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.SFF_KGKZ == 0?"关闭":"打开"}}</text>
			</view>
			<view class="grayItem">
				<text class="text1">空调排风阀</text>
				<button class="auto" :class="{'active_button': formData.PFF_SZXZ == 1}"
					@tap="shouZiDongPFF">{{formData.PFF_SZXZ == 0?'自动':'手动'}}</button>

				<button class="stop" :class="{'active_button': formData.PFF_SDQD == 1}"
					@tap="shouZiDongPFFSD()">{{formData.PFF_SDQD == 0?'启动':'停止'}}</button>

				<text class="four">{{formData.PFF_KGKZ == 0?"关闭":"打开"}}</text>
			</view>



			<view class="whiteItem">
				<text class="text1">空调冷水阀</text>
				<button class="auto" :class="{'active_button': formData.LSF_SZXZ == 1}"
					@tap="shouZiDong2">{{formData.LSF_SZXZ == 0?'自动':'手动'}}</button>
				<view style="display: flex;flex-direction: row;align-items: center;">
					<button class="three" @click="inputDialogToggleFA1()">{{formData.LSF_SDKD}}</button>%
				</view>

				<view class="four1">
					<text>{{formData.LSF}}%</text>
				</view>
			</view>
			<view class="grayItem">
				<text class="text1">空调热水阀</text>
				<button class="auto" :class="{'active_button': formData.RSF_SZXZ == 1}"
					@tap="shouZiDong3">{{formData.RSF_SZXZ == 0?'自动':'手动'}}</button>
				<view style="display: flex;flex-direction: row;align-items: center;">
					<button class="three" @click="inputDialogToggleFA2()">{{formData.RSF_SDKD}}</button>%
				</view>
				<view class="four1">
					<text>{{formData.RSF}}%</text>
				</view>
			</view>
			<view class="whiteItem">
				<text class="text1">空调加湿器</text>
				<button class="auto" :class="{'active_button': formData.JSF_SZXZ == 1}"
					@tap="shouZiDong">{{formData.JSF_SZXZ == 0?'自动':'手动'}}</button>
				<view style="display: flex;flex-direction: row;align-items: center;">
					<button class="three" @click="inputDialogToggleFA3()">{{formData.JSF_SDKD}}</button>%
				</view>
				<view class="four1">
					<text>{{formData.JSF}}%</text>
				</view>
			</view>
		</view>

		<view class="anniu">
			<image class="anniu" src="../../static/设备菜单/前往列表@2x.png" @tap="back"></image>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: '',

				deviceParams: [],

				formData: {
					GZ_FW: '0',
					JZ_XZ: '0',
					MS_XZ: '0',

					RSF: '',
					LSF: '',
					JSF: '',
					WD_SD: '',
					SD_SD: '',
					JZ_YSTZ: '',
					RSF_SDKD: '', //热水温度手动_设定(0~100,单位为%)
					LSF_SDKD: '', //冷水温度手动_设定(0~100,单位为%)
					JSF_SDKD: '', //电加湿手动_设定(0~100,单位为%)

					LSF_SZXZ: '0',
					RSF_SZXZ: '0',
					JSF_SZXZ: '0',

					//下部按钮参数
					SFF_SZXZ: '0',
					SFF_SDQD: '0',
					PFF_SZXZ: '0',
					PFF_SDQD: '0',
					SFJ_SZXZ: '0',
					SFJ_SZXZ: '0',
					SFJ_SDQD: '0',
					PFJ_SZXZ: '0',
					PFJ_SDQD: '0',
					FLZJ_SZXZ: '0',
					FLZJ_SDQD: '0',
					YJDJR_SZXZ: '0',
					YJDJR_SDQD: '0',
					EJDJR_SZXZ: '0',
					EJDJR_SDQD: '0',
					SJDJR_SZXZ: '0',
					SJDJR_SDQD: '0',

					//第四列实时反馈
					SFJ_QT: '1', //送风机工频启动(0:停止,1:启动)
					PFJ_QT: '0', //排风机工频启动(0:停止,1:启动)
					YJDJR_QT: '0', //一级电加热启停(0:停止,1:启动)
					EJDJR_QT: '0', //二级电加热启停(0:停止,1:启动)
					SJDJR_QT: '0', //三级电加热启停(0:停止,1:启动)
					SFF_KGKZ: '0', //送风阀开关控制(0:关闭,1:打开)
					PFF_KGKZ: '0', //排风阀开关控制(0:关闭,1:打开)
					FLZJ_QT: '0', //风冷主机启停(0:停止,1:启动)

					//上部三个按钮




				}
			}
		},
		onLoad(e) {
			console.log(e);

			this.getYSTZ()
			this.getSD_SD()
			this.getWD_SD()

			this.getJSF_SDKD()
			this.getLSF_SDKD()
			this.getRSF_SDKD()

			this.getRSF()
			this.getLSF()
			this.getJSF()

			this.getYJQT()
			this.getEJQT()
			this.getSJQT()
			this.getFLZJQT()
			this.getSFFQT()
			this.getPFFQT()
			this.getSFJQT()
			this.getPFJQT()
		},
		methods: {
			//三个按钮选择
			async JZXZ(e) {
				this.formData.JZ_XZ == 1 ? this.formData.JZ_XZ = 0 : this.formData.JZ_XZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "247",
					value: this.formData.JZ_XZ,
					name: "JZ_XZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async MSXZ(e) {
				this.formData.MS_XZ == 1 ? this.formData.MS_XZ = 0 : this.formData.MS_XZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "242",
					value: this.formData.MS_XZ,
					name: "MS_XZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async GZFW(e) {
				this.formData.GZ_FW == 1 ? this.formData.GZ_FW = 0 : this.formData.GZ_FW = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "260",
					value: this.formData.GZ_FW,
					name: "GZ_FW",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},



			async shouZiDong(e) {
				this.formData.JSF_SZXZ == 1 ? this.formData.JSF_SZXZ = 0 : this.formData.JSF_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "209",
					value: this.formData.JSF_SZXZ,
					name: "JSF_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDong2(e) {
				this.formData.LSF_SZXZ == 1 ? this.formData.LSF_SZXZ = 0 : this.formData.LSF_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "210",
					value: this.formData.LSF_SZXZ,
					name: "LSF_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDong3(e) {
				this.formData.RSF_SZXZ == 1 ? this.formData.RSF_SZXZ = 0 : this.formData.RSF_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "208",
					value: this.formData.RSF_SZXZ,
					name: "RSF_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},

			//下部按钮的自动手动
			async shouZiDongSFJ(e) {
				this.formData.SFJ_SZXZ == 1 ? this.formData.SFJ_SZXZ = 0 : this.formData.SFJ_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "204",
					value: this.formData.SFJ_SZXZ,
					name: "SFJ_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongPFJ(e) {
				this.formData.PFJ_SZXZ == 1 ? this.formData.PFJ_SZXZ = 0 : this.formData.PFJ_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "203",
					value: this.formData.PFJ_SZXZ,
					name: "PFJ_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongSFF(e) {
				this.formData.SFF_SZXZ == 1 ? this.formData.SFF_SZXZ = 0 : this.formData.SFF_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "290",
					value: this.formData.SFF_SZXZ,
					name: "SFF_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongPFF(e) {
				this.formData.PFF_SZXZ == 1 ? this.formData.PFF_SZXZ = 0 : this.formData.PFF_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "241",
					value: this.formData.PFF_SZXZ,
					name: "PFF_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongYJDJR(e) {
				this.formData.YJDJR_SZXZ == 1 ? this.formData.YJDJR_SZXZ = 0 : this.formData.YJDJR_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "249",
					value: this.formData.YJDJR_SZXZ,
					name: "YJDJR_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongEJDJR(e) {
				this.formData.EJDJR_SZXZ == 1 ? this.formData.EJDJR_SZXZ = 0 : this.formData.EJDJR_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "214",
					value: this.formData.EJDJR_SZXZ,
					name: "EJDJR_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongSJDJR(e) {
				this.formData.SJDJR_SZXZ == 1 ? this.formData.SJDJR_SZXZ = 0 : this.formData.SJDJR_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "265",
					value: this.formData.SJDJR_SZXZ,
					name: "SJDJR_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongFLZJ(e) {
				this.formData.FLZJ_SZXZ == 1 ? this.formData.FLZJ_SZXZ = 0 : this.formData.FLZJ_SZXZ = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "305",
					value: this.formData.FLZJ_SZXZ,
					name: "FLZJ_SZXZ",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},

			//-----------------------------------------------------------------------------------------------

			//第四列实时反馈的获取数据
			async getSFJQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "262",
				};

				let res = await uni.$http.get(url, data);

				this.formData.SFJ_QT = res.data.data.deviceParam.value;
			},
			async getPFJQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "277",
				};

				let res = await uni.$http.get(url, data);

				this.formData.PFJ_QT = res.data.data.deviceParam.value;
			},
			async getSFFQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "300",
				};

				let res = await uni.$http.get(url, data);

				this.formData.SFF_KGKZ = res.data.data.deviceParam.value;
			},
			async getPFFQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "281",
				};

				let res = await uni.$http.get(url, data);

				this.formData.PFF_KGKZ = res.data.data.deviceParam.value;
			},
			async getFLZJQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "224",
				};

				let res = await uni.$http.get(url, data);

				this.formData.FLZJ_QT = res.data.data.deviceParam.value;
			},
			async getYJQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "215",
				};

				let res = await uni.$http.get(url, data);

				this.formData.YJDJR_QT = res.data.data.deviceParam.value;
			},
			async getEJQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "211",
				};

				let res = await uni.$http.get(url, data);

				this.formData.EJDJR_QT = res.data.data.deviceParam.value;
			},
			async getSJQT(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "213",
				};

				let res = await uni.$http.get(url, data);

				this.formData.SJDJR_QT = res.data.data.deviceParam.value;
			},


			//三个阀的实时反馈
			async getRSF(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "216",
				};

				let res = await uni.$http.get(url, data);

				this.formData.RSF = res.data.data.deviceParam.value;
				console.log(this.formData.RSF);
			},
			async getLSF(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "268",
				};

				let res = await uni.$http.get(url, data);

				this.formData.LSF = res.data.data.deviceParam.value;
				console.log(this.formData.LSF);
			},
			async getJSF(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "212",
				};

				let res = await uni.$http.get(url, data);

				this.formData.JSF = res.data.data.deviceParam.value;
				console.log(this.formData.JSF);
			},

			//-----
			async dialogInputConfirm(val) {
				this.formData.WD_SD = val;

				console.log(val);

				this.updateWD_SD()

			},
			async dialogInputConfirm2(val) {
				this.formData.SD_SD = val;

				console.log(this.formData.SD_SD);

				this.updateSD_SD()()

			},
			async dialogInputConfirm3(val) {
				this.formData.JZ_YSTZ = val;

				console.log(val);

				this.updateYSTZ()()

			},

			async dialogInputConfirmFA1(val) {
				this.formData.LSF_SDKD = val;
				this.updateLSF_SDKD()
				console.log(this.formData.LSF_SDKD);
			},
			async dialogInputConfirmFA2(val) {
				this.formData.RSF_SDKD = val;
				this.updateRSF_SDKD()
				console.log(val);
			},
			async dialogInputConfirmFA3(val) {
				this.formData.JSF_SDKD = val;
				this.updateJSF_SDKD()
				console.log(val);
			},

			inputDialogToggle() {
				this.$refs.inputDialog.open()
			},
			inputDialogToggle2() {
				this.$refs.inputDialog2.open()
			},
			inputDialogToggle3() {
				this.$refs.inputDialog3.open()
			},
			inputDialogToggleFA1() {
				this.$refs.inputDialogFA1.open()
			},
			inputDialogToggleFA2() {
				this.$refs.inputDialogFA2.open()
			},
			inputDialogToggleFA3() {
				this.$refs.inputDialogFA3.open()
			},

			back() {
				uni.navigateTo({
					url: '/pages/device/deviceInfo/deviceInfo'
				})
			},

			//三个参数设定
			async getYSTZ(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "219",
				};

				let res = await uni.$http.get(url, data);

				this.formData.JZ_YSTZ = res.data.data.deviceParam.value;
				console.log(this.formData.JZ_YSTZ);
			},
			async getWD_SD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "296",
				};

				let res = await uni.$http.get(url, data);

				this.formData.WD_SD = res.data.data.deviceParam.value;
				console.log(this.formData.WD_SD);
			},
			async getSD_SD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "231",
				};

				let res = await uni.$http.get(url, data);

				this.formData.SD_SD = res.data.data.deviceParam.value;
				console.log(this.formData.SD_SD);
			},

			//三个参数设定更新
			async updateWD_SD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "296",
					sn: "CK1",
					name: "WD_SD",
					value: this.formData.WD_SD

				};

				let res = await uni.$http.get(url, data);

				console.log(res);
			},
			async updateSD_SD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "231",
					sn: "CK1",
					name: "SD_SD",
					value: this.formData.SD_SD

				};

				let res = await uni.$http.get(url, data);

				console.log(res);
			},
			async updateYSTZ(e) {
				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "219",
					sn: "CK1",
					name: "JZ_YSTZ",
					value: this.formData.JZ_YSTZ

				};

				let res = await uni.$http.get(url, data);

				console.log(res);
			},

			//-----三个阀手动命令列
			async getLSF_SDKD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "238",
				};

				let res = await uni.$http.get(url, data);

				this.formData.LSF_SDKD = res.data.data.deviceParam.value;
				console.log(this.formData.LSF_SDKD);
			},
			async getRSF_SDKD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "289",
				};

				let res = await uni.$http.get(url, data);

				this.formData.RSF_SDKD = res.data.data.deviceParam.value;
				console.log(this.formData.RSF_SDKD);
			},
			async getJSF_SDKD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "288",
				};

				let res = await uni.$http.get(url, data);

				this.formData.JSF_SDKD = res.data.data.deviceParam.value;
				console.log(this.formData.JSF_SDKD);
			},

			//-------三个阀手动命令列更新
			async updateLSF_SDKD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "238",
					sn: "CK1",
					name: "LSF_SDKD",
					value: this.formData.LSF_SDKD

				};

				let res = await uni.$http.get(url, data);

				console.log(res);
			},
			async updateRSF_SDKD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "289",
					sn: "CK1",
					name: "RSF_SDKD",
					value: this.formData.RSF_SDKD

				};

				let res = await uni.$http.get(url, data);

				console.log(res);
			},
			async updateJSF_SDKD(e) {
				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "288",
					sn: "CK1",
					name: "JSF_SDKD",
					value: this.formData.JSF_SDKD

				};

				let res = await uni.$http.get(url, data);

				console.log(res);
			},

			//第三列手动启动停止
			async shouZiDongSFJSD(e) {
				this.formData.SFJ_SDQD == 1 ? this.formData.SFJ_SDQD = 0 : this.formData.SFJ_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "261",
					value: this.formData.SFJ_SDQD,
					name: "SFJ_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongPFJSD(e) {
				this.formData.PFJ_SDQD == 1 ? this.formData.PFJ_SDQD = 0 : this.formData.PFJ_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "263",
					value: this.formData.PFJ_SDQD,
					name: "PFJ_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongFLZJSD(e) {
				this.formData.FLZJ_SDQD == 1 ? this.formData.FLZJ_SDQD = 0 : this.formData.FLZJ_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "244",
					value: this.formData.FLZJ_SDQD,
					name: "FLZJ_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongPFFSD(e) {
				this.formData.PFF_SDQD == 1 ? this.formData.PFF_SDQD = 0 : this.formData.PFF_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "284",
					value: this.formData.PFF_SDQD,
					name: "PFF_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongSFFSD(e) {
				this.formData.SFF_SDQD == 1 ? this.formData.SFF_SDQD = 0 : this.formData.SFF_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "239",
					value: this.formData.SFF_SDQD,
					name: "SFF_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongYJDJRSD(e) {
				this.formData.YJDJR_SDQD == 1 ? this.formData.YJDJR_SDQD = 0 : this.formData.YJDJR_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "301",
					value: this.formData.YJDJR_SDQD,
					name: "YJDJR_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongEJDJRSD(e) {
				this.formData.EJDJR_SDQD == 1 ? this.formData.EJDJR_SDQD = 0 : this.formData.EJDJR_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "272",
					value: this.formData.EJDJR_SDQD,
					name: "EJDJR_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},
			async shouZiDongSJDJRSD(e) {
				this.formData.SJDJR_SDQD == 1 ? this.formData.SJDJR_SDQD = 0 : this.formData.SJDJR_SDQD = 1;

				let vm = this;
				let url = uni.$api.deviceParam.updateParam;
				let data = {
					id: "202",
					value: this.formData.SJDJR_SDQD,
					name: "SJDJR_SDQD",
					sn: "CK1"
				};

				let res = await uni.$http.get(url, data);
				console.log(res.data.data.value);
			},


		}
	}
</script>
<style>
	.anniu {
		width: 116rpx;
		height: 116rpx;
		float: right;
		margin-right: 10rpx;
	}

	.four1 {
		margin-right: 30rpx;
		margin-left: 30rpx;
	}

	.four {
		margin-right: 60rpx;
	}

	.whiteItem {
		height: 60px;
		background: white;
		border-radius: 4px;
		font-size: 30rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		color: #444546;
	}

	.grayItem {
		height: 60px;
		background: #F6F7FB;
		border-radius: 4px;
		font-size: 30rpx;
		display: flex;
		align-items: center;
		color: #444546;
	}

	.text1 {
		margin-left: 20rpx;
		font-size: 30rpx;
		color: #444546;
	}

	.auto {
		width: 60px;
		height: 33px;
		background: #007AFF;
		border-radius: 4px;
		font-size: 30rpx;
		color: white;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.three {
		margin-right: 10rpx;
		margin-left: 0rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 30rpx;
		color: #007AFF;
		width: 60px;
		height: 33px;
		border-radius: 4px;
		border: 1px solid #007AFF;
	}

	.stop {
		margin-right: 75rpx;
		margin-left: 0rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 30rpx;
		color: #007AFF;
		width: 60px;
		height: 33px;
		border-radius: 4px;
		border: 1px solid #007AFF;
	}

	.head {
		height: 60px;
		background: #EAF1FE;
		border-radius: 4px;
		font-size: 30rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		color: #444546;
	}

	.xiabu {
		margin-left: 24rpx;
		margin-top: 24rpx;
		background-color: white;
		width: 702rpx;
		height: 1520rpx;
		border-radius: 10rpx;
	}

	.buttonItem {
		display: flex;
		flex-direction: row;
		margin-top: 5rpx;
		justify-content: center;
	}

	.button {
		width: 208rpx;
		height: 98rpx;
		margin-top: 20rpx;
		background-color: #007AFF;
		color: white;
		font-size: unset;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.item {
		margin-left: 20rpx;
	}

	.setmenu {
		display: flex;
		flex-wrap: wrap;
	}

	.setItem {
		margin-left: 20rpx;
	}

	.text {
		margin-top: 40rpx;
		margin-bottom: 16rpx;
		color: #444546;
		font-size: 26rpx;
	}

	.input {
		width: 320rpx;
		height: 98rpx;
		background-color: #eaeaea;
		display: flex;
		flex-direction: row;
		align-items: center;
		border-radius: 5rpx;
		border: 1px solid #eaeaea;
	}



	.danwei {
		width: 78rpx;
		height: 98rpx;
		background-color: white;
		display: flex;
		align-items: center;
	}

	.white {
		width: 702rpx;
		height: 711rpx;
		background-color: white;
		margin-left: 24rpx;
		margin-top: 26rpx;
	}

	.title {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.tiao {
		width: 60px;
		height: 3px;
		margin-top: 20rpx;
		background: #007AFF;
	}

	.param {
		font-size: 38rpx;
		font-weight: 550;
		margin-top: 40rpx;
	}

	.active_button {
		background-color: skyblue;

	}
</style>
