/**
* v_opendoorRecord.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c)  2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 开门记录页面
*/

import {iot, uPublic, uComponents} from '../../public/public.js';

iot.ready(init);
function init() {
    //通用 list、dialog、loading组件
    uPublic.componentsInit(['u-list','u-dialog','u-loading']);
    const app = new Vue({
        data:{            
            //配置组件
            componentsConfig: initComponentsConfig()     
        },
        mounted(){           
        },
        methods:{
            //tap <
            onBackTap(){
                backTap();
            }                    
        }   
    }).$mount('#app');
}

//配置组件参数
function initComponentsConfig() {
    return {
        opendoorRecordList:{   
            initParam: {
                class: 'custom-list',
                list: [
                    {value: 1, leftImage: '../../resources/image/green_opendoor0_icon.png', title:'', subtitle: '手机远程开门', rightText: '2017.08.0310:29:53'},
                    {value: 2, leftImage: '../../resources/image/green_opendoor0_icon.png', title:'', subtitle: '手机远程开门', rightText: '2017.08.0310:27:56'},
                    {value: 3, leftImage: '../../resources/image/green_opendoor1_icon.png', title:'ID:6', subtitle: '指纹开门', rightText: '2017.08.0310:25:47'},
                    {value: 4, leftImage: '../../resources/image/green_opendoor0_icon.png', title:'', subtitle: '手机远程开门', rightText: '2017.07.3117:13:03',},
                    {value: 5, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'测试用户02', subtitle: '劫持指纹开门', rightText: '2017.07.3117:10:10'},
                    {value: 6, leftImage: '../../resources/image/green_opendoor3_icon.png', title:'测试用户', subtitle: '密码开门', rightText: '2017.07.3117:09:59'},
                    {value: 7, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'ID:117', subtitle: '劫持指纹开门', rightText: '2017.07.3117:05:19'},
                    {value: 8, leftImage: '../../resources/image/green_opendoor3_icon.png', title:'测试用户', subtitle: '密码开门', rightText: '2017.07.3117:03:50',}
                ],
                tip: Vue.t('opendoorRecord.noRecordTip')
            }
        },
        dialog: {
            initParam: {
                class: 'custom-dialog'
            }
        },
        loading: {
            initParam: {
                class: 'custom-loading'
            }
        }                
    }
}

//tap <
function backTap(){
    iot.navigator.back();
}