<template>
	<view>
		<view class="all">

			<view class="chart">
				<view class="charts-box">
					<best-gauge :config="gaugeOption"></best-gauge>
				</view>

				<view class="charts-box">
					<best-gauge :config="gaugeOption2"></best-gauge>
				</view>
			</view>

			<view class="white">
				<view class="title1">
					<text class="param">空调排风温度变化</text>
					<view class="tiao"></view>
				</view>

				<view>
					<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchmove="moveLineA"
						@touchend="moveLineA"></canvas>
					<!-- 画布，图表的HTML部分-->
				</view>

			</view>

			<view class="white1">
				<view class="title1">
					<text class="param">空调排风湿度变化</text>
					<view class="tiao"></view>
				</view>

				<view>
					<canvas canvas-id="canvasLineA11" id="canvasLineA11" class="charts" @touchmove="moveLineA11"
						@touchend="moveLineA11"></canvas>
					<!-- 画布，图表的HTML部分-->
				</view>
			</view>

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

<script>
	//仪表盘组件
	import bestGauge from '@/components/best-gauge/best-gauge.vue'

	//引入u-charts组件
	import uCharts from '@/components/u-charts/u-charts.js'

	var _self; //用于全局使用this

	var _self11; //用于全局使用this

	var canvaLineA = null; //uCharts实例

	var canvaLineA11 = null; //uCharts实例


	export default {
		components: {
			bestGauge,
		},

		data() {
			let _width = uni.upx2px(350);
			return {
				timeData: {
					time1: '',
					time2: '',
					time3: '',
					time4: '',
					time5: ''
				},
				WDdata: {
					WD1: '',
					WD2: '',
					WD3: '',
					WD4: '',
					WD5: '',
					WD6: '',
					WD7: '',
					WD8: '',
					WD9: '',
					WD10: '',
					WD11: '',
					WD12: '',
					WD13: '',
					WD14: '',
					WD15: '',
					WD16: '',
					WD17: '',
					WD18: '',
					WD19: '',
					WD20: '',
					WD21: '',
					WD22: '',
					WD23: '',
					WD24: '',
				},

				SDdata: {
					SD1: '',
					SD2: '',
					SD3: '',
					SD4: '',
					SD5: '',
					SD6: '',
					SD7: '',
					SD8: '',
					SD9: '',
					SD10: '',
					SD11: '',
					SD12: '',
					SD13: '',
					SD14: '',
					SD15: '',
					SD16: '',
					SD17: '',
					SD18: '',
					SD19: '',
					SD20: '',
					SD21: '',
					SD22: '',
					SD23: '',
					SD24: '',
				},

				WDSDdata: {
					WDSD1: '',
					WDSD2: '',
					WDSD3: '',
					WDSD4: '',
					WDSD5: '',
					WDSD6: '',
					WDSD7: '',
					WDSD8: '',
					WDSD9: '',
					WDSD10: '',
					WDSD11: '',
					WDSD12: '',
					WDSD13: '',
					WDSD14: '',
					WDSD15: '',
					WDSD16: '',
					WDSD17: '',
					WDSD18: '',
					WDSD19: '',
					WDSD20: '',
					WDSD21: '',
					WDSD22: '',
					WDSD23: '',
					WDSD24: '',
				},

				SDSDdata: {
					SDSD1: '',
					SDSD2: '',
					SDSD3: '',
					SDSD4: '',
					SDSD5: '',
					SDSD6: '',
					SDSD7: '',
					SDSD8: '',
					SDSD9: '',
					SDSD10: '',
					SDSD11: '',
					SDSD12: '',
					SDSD13: '',
					SDSD14: '',
					SDSD15: '',
					SDSD16: '',
					SDSD17: '',
					SDSD18: '',
					SDSD19: '',
					SDSD20: '',
					SDSD21: '',
					SDSD22: '',
					SDSD23: '',
					SDSD24: '',
				},


				formData: {
					WD_1: '',
					SD_1: '',
					QX: '2', //星期
					WD_SJ: '12',
					SD_SJ: '23',
					WD_SD: '34',
					SD_SD: '45',
				},

				cWidth: '',
				cHeight: '', //画布的宽高

				//仪表盘部分
				gaugeOption: { //定义参数
					id: 'gaugeId0',
					value: '',
					axisTickLength: 2 //该属性与axisTick互斥，存在axisTickLength并大于0，axisTick就无效
				},

				gaugeOption2: { //定义参数
					name: 'CK01排风湿度显示',
					id: 'gaugeId1',
					value: '',
					unit: '%',
					axisTickLength: 2 //该属性与axisTick互斥，存在axisTickLength并大于0，axisTick就无效
				},

				//折线图部分

				//温度
				data: { //数据
					categories: ['3时', '6时', '9时', '12时', '15时', '18时', '21时', '24时'],
					series: [{
						name: "温度实际值",

						data: [1, 1, 1, 1, 1, 1, 1, 1],
					}, {
						name: "温度设定值",
						data: [10, 25, 23, 33, 23, 23, 23, 23],
						color: "#336633"
					}]
				},

				//湿度
				data11: { //数据
					categories11: ['3时', '6时', '9时', '12时', '15时', '18时', '21时', '24时'],
					series11: [{
						name: "湿度实际值",
						data: [40, 30, 36, 44, 38, 45, 45, 45],
					}, {
						name: "湿度设定值",
						data: [10, 25, 23, 33, 23, 45, 45, 45],
						color: "red"
					}]
				},
			}
		},

		onLoad() {
			this.getWD1()
			this.getWD2()
			this.getWD3()
			this.getWD4()
			this.getWD5()
			this.getWD6()
			this.getWD7()
			this.getWD8()
			this.getWD9()
			this.getWD10()
			this.getWD11()
			this.getWD12()
			this.getWD13()
			this.getWD14()
			this.getWD15()
			this.getWD16()
			this.getWD17()
			this.getWD18()
			this.getWD19()
			this.getWD20()
			this.getWD21()
			this.getWD22()
			this.getWD23()
			this.getWD24()

			this.getSD1()
			this.getSD2()
			this.getSD3()
			this.getSD4()
			this.getSD5()
			this.getSD6()
			this.getSD7()
			this.getSD8()
			this.getSD9()
			this.getSD10()
			this.getSD11()
			this.getSD12()
			this.getSD13()
			this.getSD14()
			this.getSD15()
			this.getSD16()
			this.getSD17()
			this.getSD18()
			this.getSD19()
			this.getSD20()
			this.getSD21()
			this.getSD22()
			this.getSD23()
			this.getSD24()

			this.getWDSD1()
			this.getWDSD2()
			this.getWDSD3()
			this.getWDSD4()
			this.getWDSD5()
			this.getWDSD6()
			this.getWDSD7()
			this.getWDSD8()
			this.getWDSD9()
			this.getWDSD10()
			this.getWDSD11()
			this.getWDSD12()
			this.getWDSD13()
			this.getWDSD14()
			this.getWDSD15()
			this.getWDSD16()
			this.getWDSD17()
			this.getWDSD18()
			this.getWDSD19()
			this.getWDSD20()
			this.getWDSD21()
			this.getWDSD22()
			this.getWDSD23()
			this.getWDSD24()

			this.getSDSD1()
			this.getSDSD2()
			this.getSDSD3()
			this.getSDSD4()
			this.getSDSD5()
			this.getSDSD6()
			this.getSDSD7()
			this.getSDSD8()
			this.getSDSD9()
			this.getSDSD10()
			this.getSDSD11()
			this.getSDSD12()
			this.getSDSD13()
			this.getSDSD14()
			this.getSDSD15()
			this.getSDSD16()
			this.getSDSD17()
			this.getSDSD18()
			this.getSDSD19()
			this.getSDSD20()
			this.getSDSD21()
			this.getSDSD22()
			this.getSDSD23()
			this.getSDSD24()

			this.getWD_SJ()
			this.getSD_SJ()

			this.getWD_1()
			this.getSD_1()

			this.cWidth = uni.upx2px(702);
			this.cHeight = uni.upx2px(500); //设置宽高
			_self = this //声明this
			_self.showLineA("canvasLineA", _self.data); //触发执行函数

			_self11 = this //声明this
			_self11.showLineA11("canvasLineA11", _self11.data11); //触发执行函数
		},


		methods: {
			async getWD_SJ(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "292",
				};

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

				this.formData.WD_SJ = res.data.data.deviceParam.value;
				console.log(this.formData.WD_SJ);
				this.data.series[0].data[0] = this.formData.WD_SJ
				console.log("实际温度：" + this.data.series[0].data[0]);
			},
			async getSD_SJ(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "280",
				};

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

				this.formData.SD_SJ = res.data.data.deviceParam.value;
				console.log(this.formData.SD_SJ);
				this.data11.series11[0].data[0] = this.formData.SD_SJ
				console.log("实际湿度：" + this.data11.series11[0].data[0]);
			},
			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);
				this.data.series[1].data[0] = this.formData.WD_SD
				console.log("设定温度：" + this.data.series[1].data[0]);
			},
			async getSD_SD(e) {
				let vm = this;

				var XQ = this.formData.QX;
				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);

				if (XQ == 1) {
					this.data11.series11[1].data[0] = this.formData.SD_SD
					console.log("周一设定湿度：" + this.data11.series11[1].data[0]);

				}

				if (XQ == 2) {
					this.data11.series11[1].data[1] = this.formData.SD_SD
					console.log("周二设定湿度：" + this.data11.series11[1].data[1]);

				}

			},

			back() {
				uni.navigateTo({
					url: '/pages/device/deviceInfo/deviceInfo'
				})
			},
			showLineA(canvasId, chartData) {
				canvaLineA = new uCharts({ //这些配置项的意思看这：https://www.kancloud.cn/qiun/ucharts/1172125
					$this: _self, //指针
					canvasId: canvasId, //id
					type: 'line', //类型
					colors: ['#F45E41'], //每一条的颜色
					fontSize: 14, //字体大小
					padding: [15, 15, 0, 15], //空白区域值
					legend: { //图例相关配置
						show: true,
						padding: 5,
						lineHeight: 11,
						margin: 0,
					},
					dataLabel: false, //显示数据标签内容值
					categories: chartData.categories, //数据类别
					series: chartData.series, //数据列表
					xAxis: { //X轴配置
						gridColor: '#CCCCCC', //X轴网格颜色
						gridType: 'dash', //X轴网格线型 'solid'为实线、'dash'为虚线`
						dashLength: 8, //X轴网格为虚线时，单段虚线长度
					},
					yAxis: { //y轴配置
						gridType: 'dash',
						gridColor: '#CCCCCC',
						dashLength: 8,
						min: 0, //取0为最小刻度
						max: 50, //取100为最大刻度
					},
					width: _self.cWidth, //canvas宽度，单位为px
					height: _self.cHeight, //canvas高度，单位为px
					extra: { //扩展配置
						line: {
							type: 'curve' //曲线  curve曲线，straight直线
						}
					}
				});
			},
			moveLineA(e) {
				canvaLineA.showToolTip(e, { //详情框
					format: function(item, category) {
						return category + ' ' + item.name + ':' + item.data + '℃'
					}
				});
			},


			//湿度
			showLineA11(canvasId, chartData) {
				canvaLineA11 = new uCharts({ //这些配置项的意思看这：https://www.kancloud.cn/qiun/ucharts/1172125
					$this: _self11, //指针
					canvasId: canvasId, //id
					type: 'line', //类型
					colors: ['#007AFF'], //每一条的颜色
					fontSize: 14, //字体大小
					padding: [15, 15, 0, 15], //空白区域值
					legend: { //图例相关配置
						show: true,
						padding: 5,
						lineHeight: 11,
						margin: 0,
					},
					dataLabel: false, //显示数据标签内容值
					categories: chartData.categories11, //数据类别
					series: chartData.series11, //数据列表
					xAxis: { //X轴配置
						gridColor: '#CCCCCC', //X轴网格颜色
						gridType: 'dash', //X轴网格线型 'solid'为实线、'dash'为虚线`
						dashLength: 8, //X轴网格为虚线时，单段虚线长度
					},
					yAxis: { //y轴配置
						gridType: 'dash',
						gridColor: '#CCCCCC',
						dashLength: 8,
						min: 0, //取0为最小刻度
						max: 80, //取100为最大刻度
					},
					width: _self11.cWidth, //canvas宽度，单位为px
					height: _self11.cHeight, //canvas高度，单位为px
					extra: { //扩展配置
						line: {
							type: 'curve' //曲线  curve曲线，straight直线
						}
					}
				});
			},
			moveLineA11(e) {
				canvaLineA11.showToolTip(e, { //详情框
					format: function(item, category) {
						return category + ' ' + item.name + ':' + item.data + '%'
					}
				});
			},

			async getWD_1(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "207",
				};

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


				this.gaugeOption.value = res.data.data.deviceParam.value;
			},
			async getSD_1(e) {
				let vm = this;
				let url = uni.$api.deviceParam.detail;
				let data = {
					id: "293",
				};

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


				this.gaugeOption2.value = res.data.data.deviceParam.value;
			},

			//获取24个小时的温度
			async getWD1(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "311",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD1 = res.data.data.deviceParam.value;
			},
			async getWD2(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "312",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD2 = res.data.data.deviceParam.value;
			},
			async getWD3(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "313",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD3 = res.data.data.deviceParam.value;

				this.data.series[0].data[0] = res.data.data.deviceParam.value;
			},
			async getWD4(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "314",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD4 = res.data.data.deviceParam.value;
			},
			async getWD5(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "315",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD5 = res.data.data.deviceParam.value;
			},
			async getWD6(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "316",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[0].data[1] = res.data.data.deviceParam.value;

				this.WDdata.WD6 = res.data.data.deviceParam.value;
			},
			async getWD7(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "317",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD7 = res.data.data.deviceParam.value;
			},
			async getWD8(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "318",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD8 = res.data.data.deviceParam.value;
			},
			async getWD9(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "319",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[0].data[2] = res.data.data.deviceParam.value;

				this.WDdata.WD9 = res.data.data.deviceParam.value;
			},
			async getWD10(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "320",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD10 = res.data.data.deviceParam.value;
			},
			async getWD11(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "321",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD11 = res.data.data.deviceParam.value;
			},
			async getWD12(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "322",
				};
				let res = await uni.$http.get(url, data);

				this.data.series[0].data[3] = res.data.data.deviceParam.value;
				this.WDdata.WD12 = res.data.data.deviceParam.value;
			},
			async getWD13(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "323",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD13 = res.data.data.deviceParam.value;
			},
			async getWD14(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "324",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD14 = res.data.data.deviceParam.value;
			},
			async getWD15(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "325",
				};
				let res = await uni.$http.get(url, data);

				this.data.series[0].data[4] = res.data.data.deviceParam.value;
				this.WDdata.WD15 = res.data.data.deviceParam.value;
			},
			async getWD16(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "326",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD16 = res.data.data.deviceParam.value;
			},
			async getWD17(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "327",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD17 = res.data.data.deviceParam.value;
			},
			async getWD18(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "328",
				};
				let res = await uni.$http.get(url, data);

				this.data.series[0].data[5] = res.data.data.deviceParam.value;
				this.WDdata.WD18 = res.data.data.deviceParam.value;
			},
			async getWD19(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "329",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD19 = res.data.data.deviceParam.value;
			},
			async getWD20(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "330",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD20 = res.data.data.deviceParam.value;
			},
			async getWD21(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "331",
				};
				let res = await uni.$http.get(url, data);

				this.data.series[0].data[6] = res.data.data.deviceParam.value;
				this.WDdata.WD21 = res.data.data.deviceParam.value;
			},
			async getWD22(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "332",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD22 = res.data.data.deviceParam.value;
			},
			async getWD23(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "333",
				};
				let res = await uni.$http.get(url, data);


				this.WDdata.WD23 = res.data.data.deviceParam.value;
			},
			async getWD24(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "334",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[0].data[7] = res.data.data.deviceParam.value;

				this.WDdata.WD24 = res.data.data.deviceParam.value;
			},


			//获取24个小时的湿度
			async getSD1(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "335",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD1 = res.data.data.deviceParam.value;
			},
			async getSD2(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "336",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD2 = res.data.data.deviceParam.value;
			},
			async getSD3(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "337",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[0].data[0] = res.data.data.deviceParam.value;
				this.SDdata.SD3 = res.data.data.deviceParam.value;
			},
			async getSD4(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "338",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD4 = res.data.data.deviceParam.value;
			},
			async getSD5(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "339",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD5 = res.data.data.deviceParam.value;
			},
			async getSD6(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "340",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[0].data[1] = res.data.data.deviceParam.value;
				this.SDdata.SD6 = res.data.data.deviceParam.value;
			},
			async getSD7(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "341",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD7 = res.data.data.deviceParam.value;
			},
			async getSD8(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "342",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD8 = res.data.data.deviceParam.value;
			},
			async getSD9(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "343",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[0].data[2] = res.data.data.deviceParam.value;
				this.SDdata.SD9 = res.data.data.deviceParam.value;
			},
			async getSD10(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "344",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD10 = res.data.data.deviceParam.value;
			},
			async getSD11(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "345",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD11 = res.data.data.deviceParam.value;
			},
			async getSD12(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "346",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[0].data[3] = res.data.data.deviceParam.value;

				this.SDdata.SD12 = res.data.data.deviceParam.value;
			},
			async getSD13(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "347",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD13 = res.data.data.deviceParam.value;
			},
			async getSD14(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "348",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD14 = res.data.data.deviceParam.value;
			},
			async getSD15(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "349",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[0].data[4] = res.data.data.deviceParam.value;

				this.SDdata.SD15 = res.data.data.deviceParam.value;
			},
			async getSD16(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "350",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD16 = res.data.data.deviceParam.value;
			},
			async getSD17(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "351",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD17 = res.data.data.deviceParam.value;
			},
			async getSD18(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "352",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[0].data[5] = res.data.data.deviceParam.value;
				this.SDdata.SD18 = res.data.data.deviceParam.value;
			},
			async getSD19(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "353",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD19 = res.data.data.deviceParam.value;
			},
			async getSD20(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "354",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD20 = res.data.data.deviceParam.value;
			},
			async getSD21(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "355",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[0].data[6] = res.data.data.deviceParam.value;
				this.SDdata.SD21 = res.data.data.deviceParam.value;
			},
			async getSD22(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "356",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD22 = res.data.data.deviceParam.value;
			},
			async getSD23(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "357",
				};
				let res = await uni.$http.get(url, data);


				this.SDdata.SD23 = res.data.data.deviceParam.value;
			},
			async getSD24(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "358",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[0].data[7] = res.data.data.deviceParam.value;

				this.SDdata.SD24 = res.data.data.deviceParam.value;
			},

			//获取24个小时的温度设定
			async getWDSD1(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "359",
				};
				let res = await uni.$http.get(url, data);

				this.WDSDdata.WDSD1 = res.data.data.deviceParam.value;
			},
			async getWDSD2(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "360",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD2 = res.data.data.deviceParam.value;
			},
			async getWDSD3(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "361",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[1].data[0] = res.data.data.deviceParam.value;

				this.WDSDdata.WDSD3 = res.data.data.deviceParam.value;
			},
			async getWDSD4(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "362",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD4 = res.data.data.deviceParam.value;
			},
			async getWDSD5(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "363",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD5 = res.data.data.deviceParam.value;
			},
			async getWDSD6(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "364",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[1].data[1] = res.data.data.deviceParam.value;

				this.WDSDdata.WDSD6 = res.data.data.deviceParam.value;
			},
			async getWDSD7(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "365",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD7 = res.data.data.deviceParam.value;
			},
			async getWDSD8(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "366",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD8 = res.data.data.deviceParam.value;
			},
			async getWDSD9(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "367",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[1].data[2] = res.data.data.deviceParam.value;

				this.WDSDdata.WDSD9 = res.data.data.deviceParam.value;
			},
			async getWDSD10(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "368",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD10 = res.data.data.deviceParam.value;
			},
			async getWDSD11(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "369",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD11 = res.data.data.deviceParam.value;
			},
			async getWDSD12(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "370",
				};
				let res = await uni.$http.get(url, data);

				this.data.series[1].data[3] = res.data.data.deviceParam.value;
				this.WDSDdata.WDSD12 = res.data.data.deviceParam.value;
			},
			async getWDSD13(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "371",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD13 = res.data.data.deviceParam.value;
			},
			async getWDSD14(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "372",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD14 = res.data.data.deviceParam.value;
			},
			async getWDSD15(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "373",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[1].data[4] = res.data.data.deviceParam.value;

				this.WDSDdata.WDSD15 = res.data.data.deviceParam.value;
			},
			async getWDSD16(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "374",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD16 = res.data.data.deviceParam.value;
			},
			async getWDSD17(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "375",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD17 = res.data.data.deviceParam.value;
			},
			async getWDSD18(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "376",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[1].data[5] = res.data.data.deviceParam.value;

				this.WDSDdata.WDSD18 = res.data.data.deviceParam.value;
			},
			async getWDSD19(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "377",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD19 = res.data.data.deviceParam.value;
			},
			async getWDSD20(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "378",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD20 = res.data.data.deviceParam.value;
			},
			async getWDSD21(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "379",
				};
				let res = await uni.$http.get(url, data);

				this.data.series[1].data[6] = res.data.data.deviceParam.value;
				this.WDSDdata.WDSD21 = res.data.data.deviceParam.value;
			},
			async getWDSD22(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "380",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD22 = res.data.data.deviceParam.value;
			},
			async getWDSD23(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "381",
				};
				let res = await uni.$http.get(url, data);


				this.WDSDdata.WDSD23 = res.data.data.deviceParam.value;
			},
			async getWDSD24(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "382",
				};
				let res = await uni.$http.get(url, data);
				this.data.series[1].data[7] = res.data.data.deviceParam.value;

				this.WDSDdata.WDSD24 = res.data.data.deviceParam.value;
			},

			//获取24个小时的湿度设定
			async getSDSD1(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "383",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD1 = res.data.data.deviceParam.value;
			},
			async getSDSD2(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "384",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD2 = res.data.data.deviceParam.value;
			},
			async getSDSD3(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "385",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[1].data[0] = res.data.data.deviceParam.value;
				this.SDSDdata.SDSD3 = res.data.data.deviceParam.value;
			},
			async getSDSD4(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "386",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD4 = res.data.data.deviceParam.value;
			},
			async getSDSD5(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "387",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD5 = res.data.data.deviceParam.value;
			},
			async getSDSD6(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "388",
				};
				let res = await uni.$http.get(url, data);

				this.data11.series11[1].data[1] = res.data.data.deviceParam.value;
				this.SDSDdata.SDSD6 = res.data.data.deviceParam.value;
			},
			async getSDSD7(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "389",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD7 = res.data.data.deviceParam.value;
			},
			async getSDSD8(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "390",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD8 = res.data.data.deviceParam.value;
			},
			async getSDSD9(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "391",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[1].data[2] = res.data.data.deviceParam.value;

				this.SDSDdata.SDSD9 = res.data.data.deviceParam.value;
			},
			async getSDSD10(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "392",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD10 = res.data.data.deviceParam.value;
			},
			async getSDSD11(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "393",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD11 = res.data.data.deviceParam.value;
			},
			async getSDSD12(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "394",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[1].data[3] = res.data.data.deviceParam.value;

				this.SDSDdata.SDSD12 = res.data.data.deviceParam.value;
			},
			async getSDSD13(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "395",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD13 = res.data.data.deviceParam.value;
			},
			async getSDSD14(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "396",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD14 = res.data.data.deviceParam.value;
			},
			async getSDSD15(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "397",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[1].data[4] = res.data.data.deviceParam.value;

				this.SDSDdata.SDSD15 = res.data.data.deviceParam.value;
			},
			async getSDSD16(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "398",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD16 = res.data.data.deviceParam.value;
			},
			async getSDSD17(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "399",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD17 = res.data.data.deviceParam.value;
			},
			async getSDSD18(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "400",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[1].data[5] = res.data.data.deviceParam.value;

				this.SDSDdata.SDSD18 = res.data.data.deviceParam.value;
			},
			async getSDSD19(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "401",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD19 = res.data.data.deviceParam.value;
			},
			async getSDSD20(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "402",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD20 = res.data.data.deviceParam.value;
			},
			async getSDSD21(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "403",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[1].data[6] = res.data.data.deviceParam.value;

				this.SDSDdata.SDSD21 = res.data.data.deviceParam.value;
			},
			async getSDSD22(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "404",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD22 = res.data.data.deviceParam.value;
			},
			async getSDSD23(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "405",
				};
				let res = await uni.$http.get(url, data);


				this.SDSDdata.SDSD23 = res.data.data.deviceParam.value;
			},
			async getSDSD24(e) {
				let vm = this;
				let url = uni.$api.deviceParam.getTimeData;
				let data = {
					id: "406",
				};
				let res = await uni.$http.get(url, data);
				this.data11.series11[1].data[7] = res.data.data.deviceParam.value;

				this.SDSDdata.SDSD24 = res.data.data.deviceParam.value;



				_self = this //声明this
				_self.showLineA("canvasLineA", _self.data); //触发执行函数

				_self11 = this //声明this
				_self11.showLineA11("canvasLineA11", _self11.data11); //触发执行函数
			},

		}

	}
</script>

<style>
	.anniu {
		width: 116rpx;
		height: 116rpx;
		float: right;
		margin-top: 20rpx;
	}

	.charts {
		margin-top: 60rpx;
		width: 702rpx;
		height: 500rpx;
		background-color: #FFFFFF;
	}

	.title1 {
		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;
	}

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

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

	.chart {
		font-size: 26rpx;
		height: 300px;
		/* background:white; */
		background: rgb(30, 130, 250);
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;

	}




	.charts-box {
		margin-left: 8rpx;
		margin-right: 8rpx;
	}
</style>
