<template>
	<view class="page">
		<navBar title="智能控制系统" :back="true" color="black" background="white" />

		<image :src="picUrl + '/static/other/c1.png'" mode="" class="topBg"></image>

		<view class="content">
			<view class="topBox">
				<view class="lTxt">
					<image src="/static/index/water.png" mode="" class="water1"></image>
					<view class="main">
						<image src="/static/index/halfCircle_275.png" mode="" style="width: 56rpx;height: 56rpx;">
						</image>
						<text style="z-index: 3;position: relative;">定制我家的智能控制</text>
					</view>
				</view>
				<view class="rDes">
					<view class="con">
						详情
					</view>
					<image src="/static/index/halfRight.png" mode="" style="width: 24rpx;height: 8rpx;">
					</image>
				</view>
			</view>

			<view class="label" @click="handleOpenOrClose(1)">
				<view class="txt">
					户型
				</view>
				<image :src="addOrLessIcon1" mode="" class="" :style="{height:addOrLessIcon1=='/static/index/shortLine.png'
					?'2rpx':'22rpx'}" style="width: 22rpx;margin-right: 56rpx;">
				</image>
			</view>

			<view class="parms">
				<view v-if="show1" @click="currHouseIndex=index" class="item " :class="[currHouseIndex==index?'act':'']"
					v-for="(item,index) in houseTypeList">
					{{item}}
				</view>
			</view>


			<view class="label" @click="handleOpenOrClose(2)">
				<view class="txt">
					生态-品牌
				</view>
				<image :src="addOrLessIcon2" mode="" class="" :style="{height:addOrLessIcon2=='/static/index/shortLine.png'
					?'2rpx':'22rpx'}" style="width: 22rpx;margin-right: 56rpx;">
				</image>
			</view>

			<view class="parms">
				<view v-if="show2" @click="currHouseIndex1=index" class="item "
					:class="[currHouseIndex1==index?'act':'']" v-for="(item,index) in brandTypeList">
					{{item}}
				</view>
			</view>

			<view class="label" @click="handleOpenOrClose(3)">
				<view class="txt">
					智能锁
				</view>
				<image :src="addOrLessIcon3" mode="" class="" :style="{height:addOrLessIcon3=='/static/index/shortLine.png'
					?'2rpx':'22rpx'}" style="width: 22rpx;margin-right: 56rpx;">
				</image>
			</view>

			<view class="parms">
				<view v-if="show3" @click="currHouseIndex2=index" class="item "
					:class="[currHouseIndex2==index?'act':'']" v-for="(item,index) in lockTypeList">
					{{item}}
				</view>
			</view>


			<view class="label" @click="handleOpenOrClose(4)">
				<view class="txt">
					智能面板
				</view>
				<image :src="addOrLessIcon4" mode="" class="" :style="{height:addOrLessIcon4=='/static/index/shortLine.png'
					?'2rpx':'22rpx'}" style="width: 22rpx;margin-right: 56rpx;">
				</image>
			</view>

			<view class="parms">
				<view v-if="show4" @click="currHouseIndex3=index" class="item "
					:class="[currHouseIndex3==index?'act':'']" v-for="(item,index) in pannelTypeList">
					{{item}}
				</view>
			</view>


			<view class="label" @click="handleOpenOrClose(5)">
				<view class="txt">
					智能窗帘
				</view>
				<image :src="addOrLessIcon5" mode="" class="" :style="{height:addOrLessIcon5=='/static/index/shortLine.png'
					?'2rpx':'22rpx'}" style="width: 22rpx;margin-right: 56rpx;">
				</image>
			</view>

			<view class="parms">
				<view v-if="show5" @click="currHouseIndex4=index" class="item "
					:class="[currHouseIndex4==index?'act':'']" v-for="(item,index) in chuanglianTypeList">
					{{item}}
				</view>
			</view>


			<view class="label" @click="handleOpenOrClose(6)">
				<view class="txt">
					智能空调
				</view>
				<image :src="addOrLessIcon6" mode="" class="" :style="{height:addOrLessIcon6=='/static/index/shortLine.png'
					?'2rpx':'22rpx'}" style="width: 22rpx;margin-right: 56rpx;">
				</image>
			</view>

			<view class="parms">
				<view v-if="show6" @click="currHouseIndex5=index" class="item "
					:class="[currHouseIndex5==index?'act':'']" v-for="(item,index) in ktTypeList">
					{{item}}
				</view>


			</view>
		</view>

		<view class="rule" @click="toRule">
			<image src="/static/index/ruleImg.png" mode=""></image>
			<view class="txt">
				挑选规则
			</view>
		</view>
		<view class="bot">
			<view class="left" @click="showConfig=true">
				<view class="price">
					￥2099，9900
				</view>
				<image src="/static/index/arrDown.png" mode=""></image>
			</view>
			<view class="right" @click="toNext">
				预览配置
			</view>
		</view>


		<u-popup :show="showConfig" @close="close" @open="open" round='10'>
			<view class="topBar" style="">
				<view class="left">
				</view>
				<view class="cen">
					清单
				</view>
				<view class="close" @click="showConfig=false">
					<u-icon name="close"></u-icon>
				</view>
			</view>
			<view class="pupopCon">
				<view class="item">
					<view class="top">
						<view class="name">
							户型
						</view>
						<view class="info">
							一室两厅
						</view>
					</view>
				</view>

				<view class="item">
					<view class="top">
						<view class="name">
							类别
						</view>
						<view class="info">
							3系
						</view>
					</view>
					<view class="bottom">
						<view class="name">
							智能锁
						</view>
						<view class="info">
							1
						</view>
					</view>

					<view class="bottom">
						<view class="name">
							智能开关
						</view>
						<view class="info">
							1
						</view>
					</view>
					<view class="bottom">
						<view class="name">
							智能窗帘
						</view>
						<view class="info">
							2
						</view>
					</view>
				</view>
				<view class="item">
					<view class="top">
						<view class="name">
							品牌
						</view>
						<view class="info">
							启源
						</view>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				picUrl: this.$picUrl,

				addOrLessIcon1: '/static/index/add.png',
				addOrLessIcon2: '/static/index/add.png',
				addOrLessIcon3: '/static/index/add.png',
				addOrLessIcon4: '/static/index/add.png',
				addOrLessIcon5: '/static/index/add.png',
				addOrLessIcon6: '/static/index/add.png',

				show1: false,
				show2: false,
				show3: false,
				show4: false,
				show5: false,
				show6: false,


				showConfig: false,

				currHouseIndex: 0,
				currHouseIndex1: 0,
				currHouseIndex2: 0,
				currHouseIndex3: 0,
				currHouseIndex4: 0,
				currHouseIndex5: 0,
				houseTypeList: [
					'一室两厅',
					'两室两厅',
					'三室两厅'
				],
				brandTypeList: [
					'品牌1',
					'品牌2',
				],
				lockTypeList: [
					'指纹款',
					'人脸识别款',
				],
				pannelTypeList: [
					'智能中控',
					'智能开关',
				],
				chuanglianTypeList: [
					'4米内(单层)',
					'4米内(双层)',
					'7米内(单层)',
					'7米内(双层)',
				],
				ktTypeList: [
					'柜机',
					'挂机',
					'风管机',
				]
			}
		},
		onLoad(options) {},
		methods: {
			toRule() {
				uni.navigateTo({
					url: '/pages/index/rule/index?type=ctrl'
				})
			},
			toNext() {
				uni.navigateTo({
					url: '/pages/index/aiControlSys_step2/index'
				})
			},
			handleOpenOrClose(i) {
				if (this['addOrLessIcon' + i] == '/static/index/shortLine.png') {
					this['addOrLessIcon' + i] = '/static/index/add.png'
					this['show' + i] = false
				} else if (this['addOrLessIcon' + i] == '/static/index/add.png') {
					this['addOrLessIcon' + i] = '/static/index/shortLine.png'
					this['show' + i] = true
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>