<?php /*a:2:{s:63:"D:\phpEnv\www\SCM-API\app\admin\view\general\profile\index.html";i:1750736984;s:52:"D:\phpEnv\www\SCM-API\app\admin\view\layout\vue.html";i:1750736984;}*/ ?>

    import table from "http://yun.cn/assets/js/components/Table.js";
    import form from "http://yun.cn/assets/js/components/Form.js";
    import uploadimg from "http://yun.cn/assets/js/components/UploadImg.js";
    import third from "http://yun.cn/assets/js/components/Third.js";
    export default{
        components:{'YunTable':table,'YunForm':form,'UploadImg':uploadimg,'Third':third},
        data:{
            admininfo:Yunqi.data.admininfo,
            extend:{
                index_url: 'general/profile/index',
                edit_url: 'general/profile/update'
            },
            columns:[
                {field: 'avatar',edit:'hidden'},
                {field: 'username', title: __('用户名'),edit:'readonly'},
                {field: 'mobile', title: __('手机号'),edit:'text',rules:'required;mobile'},
                {field: 'nickname', title: __('昵称'),edit:'text',rules:'required'},
                {field: 'third_id', title: __('微信'),edit:Yunqi.data.thirdLogin?'slot':false,rules:'required'},
                {field: 'password', title: __('密码'),edit: {form:'input',type:'password',placeholder:'不修改密码请留空'}},
            ],
            log:[
                {field: 'id',title: __('ID'),width:70},
                {field: 'title',title: __('标题')},
                {field: 'url',title: __('链接'),formatter: Yunqi.formatter.link,width:240},
                {field: 'ip',title: __('IP'),width:140},
                {field: 'createtime',title: __('访问时间'),sortable: true,width:150,formatter:Yunqi.formatter.datetime},
            ],
            avatar:'',
        },
        onShow:function (){
            this.avatar=this.$refs.yunform.data.avatar;
        },
        methods: {
            changeImg:function (r){
                this.avatar=r;
            },
            onSubmit:function (data){
                data.avatar=this.avatar;
                return true;
            },
            changValue:function (e){
                this.$refs.yunform.setValue('third_id',e);
            }
        }
    }
