08/26控制器页面加入手机空中
This commit is contained in:
		
							parent
							
								
									d7dd4ec28f
								
							
						
					
					
						commit
						b49d19b57c
					
				@ -31,7 +31,8 @@ let api = {
 | 
				
			|||||||
	getcontrol_rtdata: "/getcontrol/rtdata", //主页查看控制器实时数据
 | 
						getcontrol_rtdata: "/getcontrol/rtdata", //主页查看控制器实时数据
 | 
				
			||||||
	getcontrol_fsdata: "/getcontrol/fsdata", //控制器实时数据折线图
 | 
						getcontrol_fsdata: "/getcontrol/fsdata", //控制器实时数据折线图
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	getcontrol_cpermission: '/dcpermission/get', //根据设备id查询控制器权限
 | 
						dcpermission_get:'/dcpermission/get',//控制器权限
 | 
				
			||||||
 | 
						getcontrol_cpermission: '/getcontrol/cpermission', //根据设备id查询控制器权限
 | 
				
			||||||
	getControl_getState: '/readControl/getState', //控制器 设备运行状态
 | 
						getControl_getState: '/readControl/getState', //控制器 设备运行状态
 | 
				
			||||||
	getReadControlliShuiControl: '/readControl/liShuiControl', //控制器 顶模和风机
 | 
						getReadControlliShuiControl: '/readControl/liShuiControl', //控制器 顶模和风机
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,6 +2,60 @@
 | 
				
			|||||||
	<view class="controller">
 | 
						<view class="controller">
 | 
				
			||||||
		<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false" title="控制器"
 | 
							<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false" title="控制器"
 | 
				
			||||||
			title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
 | 
								title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
 | 
				
			||||||
 | 
								<!-- 金华权限 -->
 | 
				
			||||||
 | 
										<view class="content" v-if="purviewList.findIndex(item => item.id =='10')!=-1&&purviewList[purviewList.findIndex(item => item.id =='10')].state===0">
 | 
				
			||||||
 | 
											<div class="item">
 | 
				
			||||||
 | 
												<u-collapse :accordion='false' :item-style="itemStyle" :head-style='headStyle' ref="collapseView">
 | 
				
			||||||
 | 
													<u-collapse-item :title="item.nickName" v-for="(item,index) in itemList" :key="index" align="center"
 | 
				
			||||||
 | 
														v-show="isInclude(item)">
 | 
				
			||||||
 | 
														<view class="collapseItem">
 | 
				
			||||||
 | 
															<view class="line"></view>
 | 
				
			||||||
 | 
															<view class="control_model">
 | 
				
			||||||
 | 
																<view class="control">
 | 
				
			||||||
 | 
																	控制模式:
 | 
				
			||||||
 | 
																</view>
 | 
				
			||||||
 | 
																<view class="model">
 | 
				
			||||||
 | 
																	<text @click="change00(item.type,1)"
 | 
				
			||||||
 | 
																		:class="getTypeRoll(item.type)==1?'txt_act':'txt'">打   开</text>
 | 
				
			||||||
 | 
																	<text @click="change00(item.type,2)"
 | 
				
			||||||
 | 
																		:class="getTypeRoll(item.type)==2?'txt_act':'txt'">{{ item.type_2 ? '关   闭' : '停   止' }}</text>
 | 
				
			||||||
 | 
																	<text @click="change00(item.type,3)" v-if="!item.type_2"
 | 
				
			||||||
 | 
																		:class="getTypeRoll(item.type)==3?'txt_act':'txt'">关   闭</text>
 | 
				
			||||||
 | 
																</view>
 | 
				
			||||||
 | 
																<view class="line1"></view>
 | 
				
			||||||
 | 
																<view class="roll_input" v-if="!item.type_2">
 | 
				
			||||||
 | 
																	<view class="">
 | 
				
			||||||
 | 
																		<view class="">
 | 
				
			||||||
 | 
																			<input v-model="item.open_value"
 | 
				
			||||||
 | 
																				@blur="blurChangeData00_1(item.type+1,$event)" type="number"
 | 
				
			||||||
 | 
																				placeholder="0">
 | 
				
			||||||
 | 
																		</view>
 | 
				
			||||||
 | 
																		<text>通道打开;</text>
 | 
				
			||||||
 | 
																	</view>
 | 
				
			||||||
 | 
																	<view class="">
 | 
				
			||||||
 | 
																		<view class="">
 | 
				
			||||||
 | 
																			<input v-model="item.close_value"
 | 
				
			||||||
 | 
																				@blur="blurChangeData00_2(item.type+2,$event)" type="number"
 | 
				
			||||||
 | 
																				placeholder="0">
 | 
				
			||||||
 | 
																		</view>
 | 
				
			||||||
 | 
																		<text>通道关闭</text>
 | 
				
			||||||
 | 
																	</view>
 | 
				
			||||||
 | 
																</view>
 | 
				
			||||||
 | 
																<view class="roll_input" v-else>
 | 
				
			||||||
 | 
																	<view class="">
 | 
				
			||||||
 | 
																		<view class="">
 | 
				
			||||||
 | 
																			<input v-model="item.value" @blur="blurChangeData00_1(item.type+1,$event)"
 | 
				
			||||||
 | 
																				type="number" placeholder="0">
 | 
				
			||||||
 | 
																		</view>
 | 
				
			||||||
 | 
																		<text>通道;</text>
 | 
				
			||||||
 | 
																	</view>
 | 
				
			||||||
 | 
																</view>
 | 
				
			||||||
 | 
															</view>
 | 
				
			||||||
 | 
														</view>
 | 
				
			||||||
 | 
													</u-collapse-item>
 | 
				
			||||||
 | 
												</u-collapse>
 | 
				
			||||||
 | 
											</div>
 | 
				
			||||||
 | 
										</view>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<view class="content" v-for="item,index in statusList" :key="index">
 | 
								<view class="content" v-for="item,index in statusList" :key="index">
 | 
				
			||||||
					<view class="lishui-item">
 | 
										<view class="lishui-item">
 | 
				
			||||||
@ -1246,6 +1300,208 @@
 | 
				
			|||||||
					statusList: [],
 | 
										statusList: [],
 | 
				
			||||||
					
 | 
										
 | 
				
			||||||
				wxgetpermission: [], //小程序手机控制权限数据
 | 
									wxgetpermission: [], //小程序手机控制权限数据
 | 
				
			||||||
 | 
													itemList: [{
 | 
				
			||||||
 | 
															head: "1#顶卷膜",
 | 
				
			||||||
 | 
															type: 21680,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "2#顶卷膜",
 | 
				
			||||||
 | 
															type: 21683,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "3#顶卷膜",
 | 
				
			||||||
 | 
															type: 21686,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "1#侧卷膜",
 | 
				
			||||||
 | 
															type: 21689,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "2#侧卷膜",
 | 
				
			||||||
 | 
															type: 21692,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "外遮阳1",
 | 
				
			||||||
 | 
															type: 21695,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "外遮阳2",
 | 
				
			||||||
 | 
															type: 21698,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "外遮阳3",
 | 
				
			||||||
 | 
															type: 21701,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "外遮阳4",
 | 
				
			||||||
 | 
															type: 21704,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "外遮阳5",
 | 
				
			||||||
 | 
															type: 21707,
 | 
				
			||||||
 | 
															open_value: 0,
 | 
				
			||||||
 | 
															close_value: 0
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机1",
 | 
				
			||||||
 | 
															type: 21710,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机2",
 | 
				
			||||||
 | 
															type: 21712,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机3",
 | 
				
			||||||
 | 
															type: 21714,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机4",
 | 
				
			||||||
 | 
															type: 21716,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机5",
 | 
				
			||||||
 | 
															type: 21718,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机6",
 | 
				
			||||||
 | 
															type: 21720,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机7",
 | 
				
			||||||
 | 
															type: 21722,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机8",
 | 
				
			||||||
 | 
															type: 21724,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机9",
 | 
				
			||||||
 | 
															type: 21726,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
														{
 | 
				
			||||||
 | 
															head: "风机10",
 | 
				
			||||||
 | 
															type: 21728,
 | 
				
			||||||
 | 
															value: 0,
 | 
				
			||||||
 | 
															type_2: 2
 | 
				
			||||||
 | 
														},
 | 
				
			||||||
 | 
													],
 | 
				
			||||||
 | 
					txt_act_list: [{
 | 
				
			||||||
 | 
											txt_act21680: 0,
 | 
				
			||||||
 | 
											key: 21680
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21683: 0,
 | 
				
			||||||
 | 
											key: 21683
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21686: 0,
 | 
				
			||||||
 | 
											key: 21686
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21689: 0,
 | 
				
			||||||
 | 
											key: 21689
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21692: 0,
 | 
				
			||||||
 | 
											key: 21692
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21695: 0,
 | 
				
			||||||
 | 
											key: 21695
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21698: 0,
 | 
				
			||||||
 | 
											key: 21698
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21701: 0,
 | 
				
			||||||
 | 
											key: 21701
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21704: 0,
 | 
				
			||||||
 | 
											key: 21704
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21707: 0,
 | 
				
			||||||
 | 
											key: 21707
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21710: 0,
 | 
				
			||||||
 | 
											key: 21710
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21712: 0,
 | 
				
			||||||
 | 
											key: 21712
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21714: 0,
 | 
				
			||||||
 | 
											key: 21714
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21716: 0,
 | 
				
			||||||
 | 
											key: 21716
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21718: 0,
 | 
				
			||||||
 | 
											key: 21718
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21720: 0,
 | 
				
			||||||
 | 
											key: 21720
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21722: 0,
 | 
				
			||||||
 | 
											key: 21722
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21724: 0,
 | 
				
			||||||
 | 
											key: 21724
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21726: 0,
 | 
				
			||||||
 | 
											key: 21726
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											txt_act21728: 0,
 | 
				
			||||||
 | 
											key: 21728
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
									],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				itemStyle: {
 | 
									itemStyle: {
 | 
				
			||||||
					width: "690rpx",
 | 
										width: "690rpx",
 | 
				
			||||||
@ -2079,47 +2335,61 @@
 | 
				
			|||||||
				this.statusInterval = setInterval(() => {
 | 
									this.statusInterval = setInterval(() => {
 | 
				
			||||||
					this.getControl_getState()
 | 
										this.getControl_getState()
 | 
				
			||||||
				}, this.statusTime * 1000);
 | 
									}, this.statusTime * 1000);
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
									var deviceId = this.deviceId
 | 
				
			||||||
 | 
													this.$http({
 | 
				
			||||||
 | 
														url: this.api.getcontrol_cpermission + '?deviceId=' + deviceId,
 | 
				
			||||||
 | 
														method: 'POST',
 | 
				
			||||||
 | 
													}).then(res=>{
 | 
				
			||||||
 | 
														uni.stopPullDownRefresh();
 | 
				
			||||||
 | 
					res.data.forEach((el, index) =>{
 | 
				
			||||||
 | 
						this.purviewList.push({id:el.id.toString(),state:el.state})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					console.log();
 | 
				
			||||||
 | 
						if (this.purviewList.findIndex(item => item.id =='10') != -1) {
 | 
				
			||||||
 | 
										// 小程序手机控制权限数据
 | 
				
			||||||
 | 
										this.getcontrol_wxgetpermission();
 | 
				
			||||||
 | 
										this.$http({
 | 
				
			||||||
 | 
											url: this.api.readJinHuaControl_reg + '?deviceId=' + deviceId,
 | 
				
			||||||
 | 
											method: 'POST',
 | 
				
			||||||
 | 
										}).then(res => {
 | 
				
			||||||
 | 
											// console.log(res, 'deviceId读取所有寄存器的状态值');
 | 
				
			||||||
 | 
											if (res.code == 200) {
 | 
				
			||||||
 | 
												uni.hideLoading()
 | 
				
			||||||
 | 
												uni.stopPullDownRefresh();
 | 
				
			||||||
 | 
												this.inputData = res.data
 | 
				
			||||||
 | 
												for (let i = 0; i < this.itemList.length; i++) {
 | 
				
			||||||
 | 
													if (!this.itemList[i].type_2) {
 | 
				
			||||||
 | 
														this.itemList[i].open_value = this.inputData[Number(
 | 
				
			||||||
 | 
																'21681') +
 | 
				
			||||||
 | 
															i *
 | 
				
			||||||
 | 
															3]
 | 
				
			||||||
 | 
														this.itemList[i].close_value = this.inputData[Number(
 | 
				
			||||||
 | 
																'21682') +
 | 
				
			||||||
 | 
															i *
 | 
				
			||||||
 | 
															3]
 | 
				
			||||||
 | 
														this.getType((21680 + i * 3), 1)
 | 
				
			||||||
 | 
													} else {
 | 
				
			||||||
 | 
														this.itemList[i].value = this.inputData[21711 + (i - 10) *
 | 
				
			||||||
 | 
															2]
 | 
				
			||||||
 | 
														this.getType((21710 + (i - 10) * 2), 2)
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
												this.getType('21680')
 | 
				
			||||||
 | 
												this.getType('21683')
 | 
				
			||||||
 | 
												this.getType('21686')
 | 
				
			||||||
 | 
												this.getType('21689')
 | 
				
			||||||
 | 
												this.getType('21692')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										})
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
													})
 | 
				
			||||||
				// //查看金华权限
 | 
									// //查看金华权限
 | 
				
			||||||
				// if (this.purviewList.indexOf('10') != -1) {
 | 
					 | 
				
			||||||
				// 	// 小程序手机控制权限数据
 | 
					 | 
				
			||||||
				// 	this.getcontrol_wxgetpermission();
 | 
					 | 
				
			||||||
				// 	this.$http({
 | 
					 | 
				
			||||||
				// 		url: this.api.readJinHuaControl_reg + '?deviceId=' + deviceId,
 | 
					 | 
				
			||||||
				// 		method: 'POST',
 | 
					 | 
				
			||||||
				// 	}).then(res => {
 | 
					 | 
				
			||||||
				// 		// console.log(res, 'deviceId读取所有寄存器的状态值');
 | 
					 | 
				
			||||||
				// 		if (res.code == 200) {
 | 
					 | 
				
			||||||
				// 			uni.hideLoading()
 | 
					 | 
				
			||||||
				// 			uni.stopPullDownRefresh();
 | 
					 | 
				
			||||||
				// 			this.inputData = res.data
 | 
					 | 
				
			||||||
				// 			for (let i = 0; i < this.itemList.length; i++) {
 | 
					 | 
				
			||||||
				// 				if (!this.itemList[i].type_2) {
 | 
					 | 
				
			||||||
				// 					this.itemList[i].open_value = this.inputData[Number(
 | 
					 | 
				
			||||||
				// 							'21681') +
 | 
					 | 
				
			||||||
				// 						i *
 | 
					 | 
				
			||||||
				// 						3]
 | 
					 | 
				
			||||||
				// 					this.itemList[i].close_value = this.inputData[Number(
 | 
					 | 
				
			||||||
				// 							'21682') +
 | 
					 | 
				
			||||||
				// 						i *
 | 
					 | 
				
			||||||
				// 						3]
 | 
					 | 
				
			||||||
				// 					this.getType((21680 + i * 3), 1)
 | 
					 | 
				
			||||||
				// 				} else {
 | 
					 | 
				
			||||||
				// 					this.itemList[i].value = this.inputData[21711 + (i - 10) *
 | 
					 | 
				
			||||||
				// 						2]
 | 
					 | 
				
			||||||
				// 					this.getType((21710 + (i - 10) * 2), 2)
 | 
					 | 
				
			||||||
				// 				}
 | 
					 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
				// 			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				// 			// this.getType('21680')
 | 
					 | 
				
			||||||
				// 			// this.getType('21683')
 | 
					 | 
				
			||||||
				// 			// this.getType('21686')
 | 
					 | 
				
			||||||
				// 			// this.getType('21689')
 | 
					 | 
				
			||||||
				// 			// this.getType('21692')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				// 		}
 | 
					 | 
				
			||||||
				// 	})
 | 
					 | 
				
			||||||
				// }
 | 
					 | 
				
			||||||
				//查看丽水权限
 | 
									//查看丽水权限
 | 
				
			||||||
				// if (this.purviewList.indexOf('9') != -1) {
 | 
									// if (this.purviewList.indexOf('9') != -1) {
 | 
				
			||||||
				// 	// this.getControl_getState()
 | 
									// 	// this.getControl_getState()
 | 
				
			||||||
@ -2954,7 +3224,104 @@
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
								change00(type, index) {
 | 
				
			||||||
 | 
											uni.showLoading({
 | 
				
			||||||
 | 
												title: '加载中...'
 | 
				
			||||||
 | 
											})
 | 
				
			||||||
 | 
											let arr = this.txt_act_list.filter(el => el.key == type)
 | 
				
			||||||
 | 
											let key1 = Object.keys(arr[0])[0];
 | 
				
			||||||
 | 
											this.txt_act_list.forEach(el => {
 | 
				
			||||||
 | 
												if (el.key == type) {
 | 
				
			||||||
 | 
													el[key1] = index
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											})
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
											if (type > 21679 && type < 21708) {
 | 
				
			||||||
 | 
												var list = ["0", "0", "0"];
 | 
				
			||||||
 | 
												if (index == 1) {
 | 
				
			||||||
 | 
													list[2] = "1";
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													list[2] = "0";
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
												if (index == 2) {
 | 
				
			||||||
 | 
													list[1] = "1";
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													list[1] = "0";
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
												if (index == 3) {
 | 
				
			||||||
 | 
													list[0] = "1";
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													list[0] = "0";
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											} else if (type > 21709 && type < 21729) {
 | 
				
			||||||
 | 
												var list = ["0", "0"];
 | 
				
			||||||
 | 
												if (index == 1) {
 | 
				
			||||||
 | 
													list[1] = "1";
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													list[1] = "0";
 | 
				
			||||||
 | 
												};
 | 
				
			||||||
 | 
												if (index == 2) {
 | 
				
			||||||
 | 
													list[0] = "1";
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													list[0] = "0";
 | 
				
			||||||
 | 
												};
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
											var num = list.join("");
 | 
				
			||||||
 | 
											var dataNum = {
 | 
				
			||||||
 | 
												target: {
 | 
				
			||||||
 | 
													value: parseInt(num, 2),
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
											};
 | 
				
			||||||
 | 
											this.change(type, dataNum);
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
											getType(type, flag) {
 | 
				
			||||||
 | 
														if (flag == 1) {
 | 
				
			||||||
 | 
															var number = this.padString(Number(this.inputData[type]).toString(2), 3)
 | 
				
			||||||
 | 
															// console.log(number); //001
 | 
				
			||||||
 | 
															// console.log(number[0]); //0  bit2  关闭
 | 
				
			||||||
 | 
															// console.log(number[1]); //0  bit1  停止
 | 
				
			||||||
 | 
															// console.log(number[2]); //1  bit0  打开
 | 
				
			||||||
 | 
															let arr = this.txt_act_list.filter(el => el.key == type)
 | 
				
			||||||
 | 
															let key1 = Object.keys(arr[0])[0];
 | 
				
			||||||
 | 
															this.txt_act_list.forEach(el => {
 | 
				
			||||||
 | 
																if (el.key == type) {
 | 
				
			||||||
 | 
																	if (Number(number[0])) {
 | 
				
			||||||
 | 
																		el[key1] = 3
 | 
				
			||||||
 | 
																	} else if (Number(number[1])) {
 | 
				
			||||||
 | 
																		el[key1] = 2
 | 
				
			||||||
 | 
																	} else if (Number(number[2])) {
 | 
				
			||||||
 | 
																		el[key1] = 1
 | 
				
			||||||
 | 
																	} else {
 | 
				
			||||||
 | 
																		el[key1] = 0
 | 
				
			||||||
 | 
																	}
 | 
				
			||||||
 | 
																}
 | 
				
			||||||
 | 
															})
 | 
				
			||||||
 | 
														} else if (flag == 2) {
 | 
				
			||||||
 | 
															var number = this.padString(Number(this.inputData[type]).toString(2), 2)
 | 
				
			||||||
 | 
															// console.log(number); //01
 | 
				
			||||||
 | 
															// console.log(number[0]); //1  bit1  关闭
 | 
				
			||||||
 | 
															// console.log(number[1]); //1  bit0  打开
 | 
				
			||||||
 | 
															let arr = this.txt_act_list.filter(el => el.key == type)
 | 
				
			||||||
 | 
															let key1 = Object.keys(arr[0])[0];
 | 
				
			||||||
 | 
															this.txt_act_list.forEach(el => {
 | 
				
			||||||
 | 
																if (el.key == type) {
 | 
				
			||||||
 | 
																	if (Number(number[0])) {
 | 
				
			||||||
 | 
																		el[key1] = 2
 | 
				
			||||||
 | 
																	} else if (Number(number[1])) {
 | 
				
			||||||
 | 
																		el[key1] = 1
 | 
				
			||||||
 | 
																	} else {
 | 
				
			||||||
 | 
																		el[key1] = 0
 | 
				
			||||||
 | 
																	}
 | 
				
			||||||
 | 
																}
 | 
				
			||||||
 | 
															})
 | 
				
			||||||
 | 
														}
 | 
				
			||||||
 | 
													},
 | 
				
			||||||
 | 
					// 根据type参数返回对应的txt_act21680
 | 
				
			||||||
 | 
								getTypeRoll(i) {
 | 
				
			||||||
 | 
									let arr = this.txt_act_list.filter(el => el.key == i)
 | 
				
			||||||
 | 
									return arr[0][Object.keys(arr[0])[0]]
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
		// x#顶卷膜输入框
 | 
							// x#顶卷膜输入框
 | 
				
			||||||
		blurChangeData00_1(code, el) {
 | 
							blurChangeData00_1(code, el) {
 | 
				
			||||||
			uni.showLoading({
 | 
								uni.showLoading({
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user