<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../../../lib/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../../../../view/doorlockUsers/unlockInfo.css">
    <style type="text/css">
        [v-cloak]{
            display: none;
        }
    </style>
    <!--<script type="text/javascript" src="../../../../lib/js/start.js"></script>-->
    <script type="text/javascript" src="../../lib/js/p.js"></script>
    <script type="text/javascript" src="../../../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">

    <div id="app" v-cloak>
        <div class="header">
            <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
            <p>{{ $t('title.addUnlockInfo') }}</p>
        </div>
        <div class="content"> 
            <div class="opendoorMode">
                <p class="title">{{ $t('addUnlockInfo.opendoorMode') }}</p>
                <ul class="modeSelect">
                	<v-touch tag="li" v-bind:class="{active: item.mode == selectedMode}" v-for="item in waysOpenDoor" v-on:tap="onSelectOpenDoorModeTap(item.mode)">
                		{{ item.text }}
                </ul>
            </div>
            <div class="opendoorRecord">
                <p class="title">{{ $t('addUnlockInfo.opendoorRecord') }}</p>
                <u-select ref="uselect" :value="recordSelectIndex" :init-param="componentsConfig.recordSelect.initParam"
                  v-on:u-select-change="onRecordSelectChange(arguments[0])"></u-select>
               	<div class="position">
	               	<p class="tip">{{ $t('addUnlockInfo.tip') }}</p>
	                <u-switch :value="valueSetHijack" v-show="recordSelectList.length && selectedMode == 2" 
	                	:init-param="componentsConfig.setHijackSwitch.initParam" v-on:u-switch-tap="onSetHijackTap(arguments[0])"></u-switch>
               	</div>
            </div>
            <u-button :init-param="componentsConfig.addButton.initParam" :disabled="!recordSelectList.length" v-on:u-button-tap="onAddButtonTap"></u-button>
        </div>
        <transition name="fade">
            <div class="guide-dialog" v-show="guideShowFlag">
                <transition name="fade">
                    <div class="guideStep1" v-show="guideStep1ShowFlag">
                        <div class="guideStep1Cont">
                            <p class="title">{{ $t('addUnlockInfo.opendoorMode') }}</p>
                            <ul class="modeSelect">
                                <li class="active">{{ $t('addUnlockInfo.fingerprint') }}</li>
                                <li>{{ $t('addUnlockInfo.password') }}</li>
                                <li>{{ $t('addUnlockInfo.icCard') }}</li>
                                <li>{{ $t('addUnlockInfo.remote') }}</li>
                            </ul>
                        </div>
                        <div class="guideStep1Tip">
                            {{ $t('addUnlockInfo.guideStep1Tip') }}
                        </div>
                    </div>
                </transition> 
                <transition name="fade">
                    <div class="guideStep2" v-show="guideStep2ShowFlag">
                        <u-button :init-param="componentsConfig.nextButton.initParam" v-on:u-button-tap="onNextButtonTap"></u-button>
                    </div>
                </transition>
               <transition name="fade">
                    <div class="guideStep3" v-show="guideStep3ShowFlag">
                        <div class="guideStep3Tip" v-html="$t('addUnlockInfo.guideStep3Tip')"></div>
                        <div class="guideStep3Cont">
                            <ul>
                                <li class="active">
                                    <p>16:35</p>
                                    <p>ID:001</p>
                                </li>
                                <li>
                                    <p>15:33</p>
                                    <p>ID:002</p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </transition>
                <transition name="fade">
                    <div class="guideStep4" v-show="guideStep4ShowFlag">
                        <u-button :init-param="componentsConfig.nextButton.initParam" v-on:u-button-tap="onNextStepButtonTap"></u-button>
                    </div>
                </transition>
               <transition name="fade">
                    <div class="guideStep5" v-show="guideStep5ShowFlag">
                        <div class="guideStep5Tip" v-html="$t('addUnlockInfo.guideStep5Tip')"></div>
                        <div class="guideStep5Cont">
                            <p>{{ $t('addUnlockInfo.setHijackSwitch') }}</p>
                        </div>
                    </div>
                </transition>
                <transition name="fade">
                    <div class="guideStep6" v-show="guideStep6ShowFlag">
                        <u-button :init-param="componentsConfig.iSeeButton.initParam" v-on:u-button-tap="onISeeButtonTap"></u-button>
                    </div>
                </transition>                                                                                     
            </div>
        </transition>            
        <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
        <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
    </div>

    <script type="text/javascript" src="./addUnlockInfo.js" defer async></script>
    
</body>
</html>