<template>
    <div>
        <!--单位机构身份空间组件1开始-->
        <div class="identity_org_pc_1"><!--使用此组件，请复制此div-->
            <div class="container">
                <div class="container-bg">
                    <div class="row">
                        <div class="col-lg-12 orgcenter-info">
                            <div class="row">
                                <div class="col-lg-5 col-md-5 col-sm-12">
                                    <div class="orgcenter-info-header clearfix">
                                        <span class="sp1">
                                            <a href="">
                                                <img v-if="!userinfo.bsLogo" src="../../theme-chalk/src/images/head002.png" alt="">
                                                <img v-if="userinfo.bsLogo" :src="userinfo.bsLogo" alt="">
                                            </a>
                                        </span>
                                        <span class="sp2">
                           <span class="spp1">{{userinfo.bsName}}</span>
                           <span v-if="userinfo.bsOrganization" class="spp2">企业认证</span>
                            <span v-if="!userinfo.bsOrganization" class="spp2">未认证</span>
                           <!--<span class="spp3"><i>最近登录：</i>2020-08-01 12:20:20</span>-->
                        </span>
                                    </div>
                                </div>
                                <div class="col-lg-2 col-md-2 col-sm-6">
                                    <div class="orgcenter-info-data">
                                        <ul>
                                            <li><span>已认证培训学时：</span>{{countlist.finishedStudylength?countlist.finishedStudylength:0}}人次</li>
                                            <li><span>累计培训人次(人次)：</span>{{countlist.userTotalNum?countlist.userTotalNum:0}}人次</li>
                                            <li><span>本年度培训人次：</span>{{countlist.userYearNum?countlist.userYearNum:0}}人</li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="col-lg-5 col-md-5 col-sm-6">
                                    <div class="percenter-right-data-huantu-part">
                                        <span class="sp1" id="huantu6"></span>
                                        <span class="sp2"><i>{{countlist.unitNum?countlist.unitNum:0}}</i>/92</span>
                                        <span class="sp3">累计培训单位(个)</span>
                                    </div>
                                    <div class="percenter-right-data-huantu-part">
                                        <span class="sp1" id="huantu7"></span>
                                        <span class="sp2"><i>{{countlist.csNum?countlist.csNum:0}}</i>/92</span>
                                        <span class="sp3">已报课程(个)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-3 col-md-4 col-sm-5 col-xs-12 percenter-left-padding">
                            <div class="percenter-left">
                                <div class="percenter-left-nav">
                                    <ul>
                                        <li><span><a href="">申报管理</a></span>
                                            <ul class="second-ul">
                                                <li  v-if="!userIden.objId" v-bind:class="{'on':sitemenu===5}" v-on:click="sitemenu=5">
                                                    <a href="javascript:;">机构入驻申报</a>
                                                </li>
                                                <li  v-if="userIden.objId" v-bind:class="{'on':sitemenu===6}" v-on:click="sitemenu=6">
                                                    <a href="javascript:;">机构入驻申报查看</a>
                                                </li>
                                                <li v-bind:class="{'on':sitemenu===1}" v-on:click="sitemenu=1"><a href="javascript:;">培训课程申报</a></li>
                                            </ul>
                                        </li>
                                        <!--<li><span><a href="">学时管理</a></span></li>-->
                                        <li><span><a href="">接入管理</a></span>
                                            <ul class="second-ul">
                                                <li v-bind:class="{'on':sitemenu===2}" v-on:click="sitemenu=2"><a href="javascript:;">接入文档下载</a></li>
                                                <!--<li><a href="">接入测试</a></li>-->
                                                <!--<li><a href="">正式上线</a></li>-->
                                                <!--<li><a href="">接入日志</a></li>-->
                                            </ul>
                                        </li>
                                        <li v-on:click="sitemenu=3"><span><a href="javascript:;">交易中心</a></span></li>
                                        <li v-on:click="sitemenu=4"><span><a href="javascript:;">信息设置</a></span></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-9 col-md-8 col-sm-7 col-xs-12 percenter-right-padding">
                            <div class="percenter-right">
                                <!--功能模块：两个btn：学时查询、报名查询-->
                                <!--<div class="orgcenter-btn">-->
                                    <!--<a href="" class="orgcenter-a1">学时查询</a>-->
                                    <!--<a href="" class="orgcenter-a2">报名查询</a>-->
                                <!--</div>-->
                                <div class="percenter-right-notice" v-if="sitemenu==0"><!--功能模块：近期公告-->
                                    <div class="percenter-right-title">
                                        <span>近期公告</span>
                                    </div>
                                    <ul class="percenter-right-notice-ul clearfix">
                                        <li v-for="(notice,index) in noticelist" :key="index" v-bind:class="{'hot':notice.posid==1}" @click.prevent="goDetails(notice.articleId)">
                                            <a href="javascript:;" @click.prevent="goDetails(notice.articleId)">{{notice.title}}</a>
                                            <span>{{notice.newsPubDate}}</span>
                                        </li>
                                    </ul>
                                </div>
                                <div class="orgcenter-peixun-shenbao" v-if="sitemenu==1"><!--功能模块：培训课程申报-->
                                    <div class="percenter-right-title">
                                        <span>培训课程申报</span>
                                    </div>
                                    <div class="orgcenter-peixun-shenbao-hd">
                                        <ul>
                                            <li v-bind:class="{'on':tab===0}" v-on:click="tab=0" >已申报课程</li>
                                            <li v-bind:class="{'on':tab===1}" v-on:click="tab=1;ruleForm=[]" >课程申报</li>
                                            <!--<li v-bind:class="{'on':tab===2}" v-on:click="tab=2" >批量申报</li>-->
                                            <li v-bind:class="{'on':tab===3}" v-if="tab==3">课程申报编辑</li>
                                        </ul>
                                    </div>
                                    <div class="orgcenter-peixun-shenbao-bd">
                                        <div v-if="tab==0" class="orgcenter-peixun-shenbao-part">
                                            <!--<div class="percenter-right-myplan-filtrate clearfix">-->
                                                <!--<select name="" id="" class="width1">-->
                                                    <!--<option value="">2020年度</option>-->
                                                    <!--<option value="">2019年度</option>-->
                                                <!--</select>-->
                                                <!--<select name="" id="" class="width2">-->
                                                    <!--<option value="">近三个月</option>-->
                                                    <!--<option value="">全部</option>-->
                                                <!--</select>-->
                                                <!--<select name="" id="" class="width1">-->
                                                    <!--<option value="">三岗培训</option>-->
                                                    <!--<option value="">全部培训</option>-->
                                                <!--</select>-->
                                                <!--<select name="" id="" class="width1">-->
                                                    <!--<option value="">选择完成状态</option>-->
                                                    <!--<option value="">未完成</option>-->
                                                <!--</select>-->
                                                <!--<button>搜索</button>-->
                                            <!--</div>-->
                                            <div class="common-table">
                                                <table>
                                                    <thead>
                                                    <td>申报课程名称</td>
                                                    <td width="110px">申报课程学时</td>
                                                    <td>申报课程金额</td>
                                                    <td>申报时间</td>
                                                    <td width="90px">审核状态</td>
                                                    <td width="90px">审核意见</td>
                                                    <td width="90px">操作</td>
                                                    </thead>
                                                    <tr v-for="(item, index) in courselist" :key="index">
                                                        <td class="blacktext">{{item.csName}}</td>
                                                        <td>{{item.csStudylength}}</td>
                                                        <td>{{item.csAmount}}</td>
                                                        <td>{{item.applayDate}}</td>
                                                        <td v-if="item.crStatus == 0" class="redtext a-details">未提交</td>
                                                        <td v-if="item.crStatus == 1" class="orangetext">审核中</td>
                                                        <td v-if="item.crStatus == 2" class="bluetext">审核通过</td>
                                                        <td v-if="item.crStatus == 3" class="redtext a-details">未通过</td>
                                                        <td v-if="item.crStatus == 4" class="bluetext">不需要审核</td>
                                                        <td>{{item.crContent}}</td>
                                                        <td class="bluetext">
                                                            <a v-if="item.crStatus == 0" href="javascript:;" @click="audit(item.crId)">[提交审核]</a>
                                                            <a v-if="item.crStatus == 2" :href="item.thirdCsPlayUrl" target="_blank">[查看详情]</a>
                                                            <a v-if="item.crStatus == 0" href="javascript:;" @click="deletecr(item.crId)">[删除]</a>
                                                            <a v-if="item.crStatus == 0" href="javascript:;" @click="edit(item.crId)">[修改]</a>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <div class="tp-page">
                                                    <el-pagination
                                                            background
                                                            layout="total, sizes, prev, pager, next, jumper"
                                                            :page-sizes="[10, 15, 20, 25]"
                                                            @current-change="courseChange"
                                                            @prev-click="courseprevClick"
                                                            @next-click="coursenextClick"
                                                            @size-change="coursesizeChange"
                                                            :total="coursenum">
                                                    </el-pagination>
                                                </div>
                                            </div>
                                        </div>
                                        <div v-if="tab==1" class="orgcenter-peixun-shenbao-part">
                                            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="course-info">
                                                <el-form-item label="项目" prop="proId">
                                                    <el-select v-model="ruleForm.proId" placeholder="请选择培训项目">
                                                        <el-option v-for="(item, index) in programlist" :key="index" :label="item.proName" :value="item.proId"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                                <el-form-item label="教学计划" prop="tcId">
                                                    <el-select v-model="tcId" placeholder="请选择教学计划">
                                                        <el-option v-for="(item, index) in protealist" :key="index" :label="item.tcName" :value="item.tcId"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                                <el-form-item label="知识点" prop="tkId">
                                                    <el-select v-model="ruleForm.tkId" placeholder="请选择知识点">
                                                        <el-option v-for="(item, index) in proledglist" :key="index" :label="item.tkName" :value="item.tkId"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                                <el-form-item label="课程编码" prop="thirdCsId">
                                                    <el-input v-model="ruleForm.thirdCsId" placeholder="课程的ID编码"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程名称" prop="csName">
                                                    <el-input v-model="ruleForm.csName"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程学时" prop="csStudylength">
                                                    <el-input v-model="ruleForm.csStudylength"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程金额" prop="csAmount">
                                                    <el-input v-model="ruleForm.csAmount" placeholder="单位（元）"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程链接" prop="thirdCsPlayUrl">
                                                    <el-input v-model="ruleForm.thirdCsPlayUrl" placeholder="http://..."></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程封面" prop="csPhotoimageUrl">
                                                    <el-upload
                                                            class="avatar-uploader"
                                                            :action="uploadurl"
                                                            :show-file-list="false"
                                                            :on-success="csphotohandleAvatarSuccess"
                                                            :before-upload="beforeAvatarUpload">
                                                        <img v-if="csPhotoimageUrl" :src="csPhotoimageUrl" class="avatar">
                                                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                                    </el-upload>
                                                </el-form-item>

                                                <el-form-item>
                                                    <el-button type="primary" @click="submitForm('ruleForm',1)">提交申报</el-button>
                                                    <el-button type="primary" @click="submitForm('ruleForm',0)">保存申报记录</el-button>
                                                    <el-button @click="resetForm('ruleForm')">重置</el-button>
                                                </el-form-item>
                                            </el-form>
                                        </div>
                                        <div v-if="tab==2" class="orgcenter-peixun-shenbao-part">
                                            <div class="order_confirm_download">
                                                <span class="sp1">下载批量申报文件模板：<a href="">批量导入课程模板样本.xsl</a></span>
                                                <span class="sp2">上传数据excel文件<input type="button" value="选择文件"
                                                                                    class="choose-btn"><a href="">金属非金属矿山主要负责人培训报名人员名单.xls</a><input
                                                        type="button" value="导入名单" class="import-btn"></span>
                                            </div>
                                            <div class="common-table">
                                                <table>
                                                    <thead>
                                                    <td>申报课程名称</td>
                                                    <td width="90px">培训类别</td>
                                                    <td>所属培训计划</td>
                                                    <td>申报时间</td>
                                                    <td width="90px">培训学时</td>
                                                    </thead>
                                                    <tr>
                                                        <td class="textleft blacktext">露天或地下开采安全（小型露天采石场含排土场）课程一</td>
                                                        <td>三岗培训</td>
                                                        <td>金属非金属矿山主要负责人培训</td>
                                                        <td>2020-05-12 10:20:20</td>
                                                        <td>12</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="textleft blacktext">露天或地下开采安全（小型露天采石场含排土场）课程一</td>
                                                        <td>三岗培训</td>
                                                        <td>金属非金属矿山主要负责人培训</td>
                                                        <td>2020-05-12 10:20:20</td>
                                                        <td>12</td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <span class="orangebtn"><a href="">确认并申报</a></span>
                                        </div>
                                        <div v-if="tab==3" class="orgcenter-peixun-shenbao-part">
                                            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="course-info">
                                                <el-form-item label="知识点" prop="tkId">
                                                    <el-select v-model="ruleForm.tkId" placeholder="请选择知识点">
                                                        <el-option v-for="(item, index) in proledglist" :key="index" :label="item.tkName" :value="item.tkId"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                                <el-form-item label="课程编码" prop="thirdCsId">
                                                    <el-input v-model="ruleForm.thirdCsId"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程名称" prop="csName">
                                                    <el-input v-model="ruleForm.csName"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程学时" prop="csStudylength">
                                                    <el-input v-model="ruleForm.csStudylength"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程金额" prop="csAmount">
                                                    <el-input v-model="ruleForm.csAmount"></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程链接" prop="thirdCsPlayUrl">
                                                    <el-input v-model="ruleForm.thirdCsPlayUrl" placeholder="http://..."></el-input>
                                                </el-form-item>
                                                <el-form-item label="课程封面" prop="csPhotoimageUrl">
                                                    <el-upload
                                                            class="avatar-uploader"
                                                            :action="uploadurl"
                                                            :show-file-list="false"
                                                            :on-success="csphotohandleAvatarSuccess"
                                                            :before-upload="beforeAvatarUpload">
                                                        <img v-if="csPhotoimageUrl" :src="csPhotoimageUrl" class="avatar">
                                                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                                    </el-upload>
                                                </el-form-item>

                                                <el-form-item>
                                                    <el-button type="primary" @click="submitForm('ruleForm',1)">提交申报</el-button>
                                                    <el-button type="primary" @click="submitForm('ruleForm',0)">保存申报记录</el-button>
                                                    <el-button @click="resetForm('ruleForm')">重置</el-button>
                                                </el-form-item>
                                            </el-form>
                                        </div>
                                    </div>

                                </div>
                                <!--功能模块：我的证书-->
                                <div class="percenter-right-dongtai" v-if="sitemenu==2">
                                    <div class="percenter-right-title">
                                        <span>接入文档</span>
                                    </div>
                                    <table class="percenter-right-dongtai-table">
                                        <tr>
                                            <td class="td3">【金属非金属矿山培训】安全生产法规与安全生产管理证书</td>
                                            <td class="td1">2020-07-01 14:30:20</td>
                                            <td class="td1"><a href="">下载</a></td>
                                        </tr>
                                        <tr>
                                            <td class="td3">【金属非金属矿山培训】安全生产法规与安全生产管理证书</td>
                                            <td class="td1">2020-07-01 14:30:20</td>
                                            <td class="td1"><a href="">下载</a></td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="percenter-right-myplan" v-if="sitemenu==3"><!--功能模块：我的订单-->
                                    <div class="percenter-right-title">
                                        <span>我的订单</span>
                                    </div>
                                    <!--<div class="percenter-right-myplan-filtrate clearfix">-->
                                        <!--<select name="" id="" class="width1">-->
                                            <!--<option value="">2020年度</option>-->
                                            <!--<option value="">2019年度</option>-->
                                        <!--</select>-->
                                        <!--<select name="" id="" class="width2">-->
                                            <!--<option value="">近三个月</option>-->
                                            <!--<option value="">全部</option>-->
                                        <!--</select>-->
                                        <!--<select name="" id="" class="width1">-->
                                            <!--<option value="">三岗培训</option>-->
                                            <!--<option value="">全部培训</option>-->
                                        <!--</select>-->
                                        <!--<select name="" id="" class="width1">-->
                                            <!--<option value="">选择完成状态</option>-->
                                            <!--<option value="">未完成</option>-->
                                        <!--</select>-->
                                        <!--<button>搜索</button>-->
                                    <!--</div>-->
                                    <table class="myplan-table" v-for="(item, index) in orderlist" :key="index">
                                        <tr class="tb-border">
                                            <td class="tb-center tb-orangetext tb-boldtext" style="width: 15%;">订单名称</td>
                                            <td colspan="5" class="tb-title">{{item.name}}
                                                <span v-if="item.status=='3'">【已完成】</span>
                                                <span v-if="item.status=='2'">【过期作废】</span>
                                                <span v-if="item.status=='1'">【待支付】</span>
                                                <span v-if="item.status=='6'">【退单】</span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tb-center tb-orangetext">订单编号</td>
                                            <td colspan="2" class="tb-graytext">{{item.sn}}</td>
                                            <td class="tb-center tb-orangetext">订单金额</td>
                                            <td colspan="2" class="tb-bluetext">￥{{item.realPrice}}</td>
                                        </tr>
                                        <tr>
                                            <td class="tb-center tb-orangetext">订单时间</td>
                                            <td colspan="2" class="tb-graytext">{{item.createDate}}</td>
                                            <td class="tb-center tb-orangetext">下单人</td>
                                            <td colspan="2" class="tb-redtext">{{item.userName}}</td>
                                        </tr>
                                        <tr>
                                            <td class="tb-center tb-orangetext">订单备注</td>
                                            <td colspan="5" class="tb-graytext tb-zhengshu">{{item.remark}}<span>
                                                <a href="javascript:;" v-if="item.status=='1'" @click="toPay(item.orderId,item.bsId)">继续支付</a>
                                            </span>
                                            </td>
                                        </tr>
                                    </table>

                                    <div class="tp-page">
                                        <el-pagination
                                                background
                                                layout="total, sizes, prev, pager, next, jumper"
                                                :page-sizes="[10, 15, 20, 25]"
                                                @current-change="orderChange"
                                                @prev-click="orderprevClick"
                                                @next-click="ordernextClick"
                                                @size-change="ordersizeChange"
                                                :total="ordernum">
                                        </el-pagination>
                                    </div>
                                </div>
                                <div class="percenter-right-company" v-if="sitemenu==4">
                                    <div class="percenter-right-title">
                                        <span>信息修改</span>
                                    </div>
                                    <el-form :model="userData" :rules="rules" ref="userData" label-width="100px" class="userData-info">
                                        <el-form-item label="商家名称" prop="bsName">
                                            <el-input v-model="userData.bsName"></el-input>
                                        </el-form-item>
                                        <el-form-item label="组织机构代码" prop="bsOrganization">
                                            <el-input v-model="userData.bsOrganization"></el-input>
                                        </el-form-item>
                                        <el-form-item label="商家联系人" prop="bsConcatName">
                                            <el-input v-model="userData.bsConcatName"></el-input>
                                        </el-form-item>
                                        <el-form-item label="联系电话" prop="bsPhone">
                                            <el-input v-model.number="userData.bsPhone"></el-input>
                                        </el-form-item>
                                        <el-form-item label="地址" prop="bsAddress">
                                            <el-input v-model="userData.bsAddress"></el-input>
                                        </el-form-item>
                                        <el-form-item label="简介" prop="bsInfo">
                                            <el-input type="textarea" v-model="userData.bsInfo"></el-input>
                                        </el-form-item>
                                        <el-form-item label="机构logo" prop="imageUrl">
                                            <el-upload
                                                    class="avatar-uploader"
                                                    :action="uploadurl"
                                                    :show-file-list="false"
                                                    :on-success="handleAvatarSuccess"
                                                    :before-upload="beforeAvatarUpload">
                                                <img v-if="imageUrl" :src="imageUrl" class="avatar">
                                                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                            </el-upload>
                                        </el-form-item>
                                        <el-form-item>
                                            <el-button type="primary" @click="usersave('userData')">确认并保存</el-button>
                                        </el-form-item>
                                    </el-form>
                                </div>
                                <div class="percenter-right-company" v-if="sitemenu==5">
                                    <div class="percenter-right-title">
                                        <span>入驻申报</span>
                                    </div>
                                    <el-form :model="userData" :rules="rules" ref="userData" label-width="100px" class="userData-info">
                                        <el-form-item label="商家名称" prop="bsName">
                                            <el-input v-model="userData.bsName"></el-input>
                                        </el-form-item>
                                        <el-form-item label="组织机构代码" prop="bsOrganization">
                                            <el-input v-model="userData.bsOrganization"></el-input>
                                        </el-form-item>
                                        <el-form-item label="商家联系人" prop="bsConcatName">
                                            <el-input v-model="userData.bsConcatName"></el-input>
                                        </el-form-item>
                                        <el-form-item label="联系电话" prop="bsPhone">
                                            <el-input v-model.number="userData.bsPhone"></el-input>
                                        </el-form-item>
                                        <el-form-item label="地址" prop="bsAddress">
                                            <el-input v-model="userData.bsAddress"></el-input>
                                        </el-form-item>
                                        <el-form-item label="订单支付地址" prop="callbaclUrl01">
                                            <el-input v-model="userData.callbaclUrl01"></el-input>
                                        </el-form-item>
                                        <el-form-item label="学习课程地址" prop="callbaclUrl02">
                                            <el-input v-model="userData.callbaclUrl02"></el-input>
                                        </el-form-item>
                                        <el-form-item label="简介" prop="bsInfo">
                                            <el-input type="textarea" v-model="userData.bsInfo"></el-input>
                                        </el-form-item>
                                        <el-form-item label="文件上传" prop="fileList">
                                            <el-upload
                                                    class="upload-demo"
                                                    :action="uploadfileurl"
                                                    :on-success="handleSuccess"
                                                    :on-change="handleChange"
                                                    :file-list="fileList">
                                                <el-button size="small" type="primary">点击上传</el-button>
                                                <div slot="tip" class="el-upload__tip">只能上传<a>模板文件[下载]</a></div>
                                            </el-upload>
                                        </el-form-item>
                                        <el-form-item label="机构logo" prop="imageUrl">
                                            <el-upload
                                            class="avatar-uploader"
                                            :action="uploadurl"
                                            :show-file-list="false"
                                            :on-success="handleAvatarSuccess"
                                            :before-upload="beforeAvatarUpload">
                                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
                                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                            </el-upload>
                                            </el-form-item>
                                        <el-form-item>
                                            <el-button v-if="!userIden.objId" type="primary" @click="bssave('userData')">确认入驻</el-button>
                                        </el-form-item>
                                    </el-form>
                                </div>
                                <div class="percenter-right-company" v-if="sitemenu==6">
                                    <div class="percenter-right-title">
                                        <span>入驻申报查看</span>
                                    </div>
                                    <el-form :model="userData" :rules="rules" ref="userData" label-width="100px" class="userData-info">
                                        <el-form-item label="商家名称" prop="bsName">
                                            {{userData.bsName?userData.bsName:'暂无商家名称'}}
                                        </el-form-item>
                                        <el-form-item label="组织机构代码" prop="bsOrganization">
                                            {{userData.bsOrganization?userData.bsOrganization:'暂无组织机构代码'}}
                                        </el-form-item>
                                        <el-form-item label="商家联系人" prop="bsConcatName">
                                            {{userData.bsConcatName?userData.bsConcatName:'暂无商家联系人'}}
                                        </el-form-item>
                                        <el-form-item label="联系电话" prop="bsPhone">
                                            {{userData.bsPhone?userData.bsPhone:'暂无联系电话'}}
                                        </el-form-item>
                                        <el-form-item label="地址" prop="bsAddress">
                                            {{userData.bsAddress?userData.bsAddress:'暂无地址'}}
                                        </el-form-item>
                                        <el-form-item label="订单支付地址" prop="callbaclUrl01">
                                            {{userData.callbaclUrl01?userData.callbaclUrl01:'暂无订单支付地址'}}
                                        </el-form-item>
                                        <el-form-item label="学习课程地址" prop="callbaclUrl02">
                                            {{userData.callbaclUrl02?userData.callbaclUrl02:'暂无学习课程地址'}}
                                        </el-form-item>
                                        <el-form-item label="简介" prop="bsInfo">
                                            {{userData.bsInfo?userData.bsInfo:'暂无简介'}}
                                        </el-form-item>
                                        <el-form-item label="文件" prop="fileList">
                                            {{userData.fileList?userData.fileList:'暂无文件'}}
                                        </el-form-item>
                                        <el-form-item label="机构logo" prop="imageUrl">
                                            <el-image
                                                    style="width: 100px; height: 100px"
                                                    :src="imageUrl"
                                                    fit="fill">
                                            </el-image>

                                        </el-form-item>
                                    </el-form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!--单位机构身份空间组件1结束-->
    </div>
</template>
<!--<script>-->
    <!--$('.identity_org_pc_1 .orgcenter-peixun-shenbao').slide({-->
        <!--titCell: '.orgcenter-peixun-shenbao-hd ul li',-->
        <!--mainCell: '.orgcenter-peixun-shenbao-bd',-->
        <!--trigger: 'click'-->
    <!--});-->
<!--</script>-->
<script type="text/babel">
    import formMixin from '../../../src/mixins/formMixin';
    import lenye_base from 'lenye_base';
    import echarts from 'echarts';

    export default {
        name: 'ElAccountCompany',
        mixins: [formMixin],
        components: {},
        data() {
            return {
                ruleForm: {
                    proId: '',
                    proName: '',
                    thirdCsId: '',
                    csName: '',
                    csStudylength: '',
                    csAmount: '',
                    tkId: '',
                    tkName: '',
                    bsId: '',
                    crStatus: '',
                    tcId: '',
                    tcName: '',
                    proCatId: '',
                    thirdCsPlayUrl: '',
                    csPhoto: ''
                },
                tcId: '',
                tcName: '',
                crId: '', //仅仅用做修改
                fileList: [],
                courselist: [],
                coursenum: 0,
                courserows: 10,
                coursepage: 1,
                programlist: [],
                protealist: [],
                proledglist: [],
                orderlist: [],
                ordernum: 0,
                orderrows: 10,
                orderpage: 1,
                noticelist: [],
                //    站点数据
                siteData: '',
                //    用户数据
                userData: '',
                userinfo: '',
                userIden: '',
                custId: '',
                countlist: [],
                sitemenu: 0, //侧边选中
                tab: 0, //tab切换
                uploadfileurl: '',
                imageUrl: '',
                imageUrlid: '',
                csPhotoimageUrl: '',
                csPhotoimageUrlid: '',
                uploadurl: '',
                rules: {
                    custName: [
                        { required: true, message: '请输入姓名', trigger: 'blur' },
                        { min: 0, max: 18, message: '长度在 0 到 18 个字符', trigger: 'blur' }
                    ],
                    idcarNo: [
                        { required: false, message: '请输入证件号', trigger: 'blur' },
                        {
                            pattern: /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/,
                            message: '请输入正确的证件号',
                            trigger: 'blur'
                        }
                    ],
                    phone: [
                        { required: true, message: '请输入手机号', trigger: 'blur' },
                        {
                            pattern: /^((0\d{2,3}-\d{7,8})|(1[358497]\d{9}))$/,
                            message: '请输入合法手机号',
                            trigger: 'blur'
                        }
                    ],
                    proId: [
                        { required: true, message: '请选择项目', trigger: 'change' }
                    ],
                    tcId: [
                        { required: true, message: '请选择教学计划', trigger: 'change' }
                    ],
                    tkId: [
                        { required: true, message: '请选择知识点', trigger: 'change' }
                    ],
                    thirdCsId: [
                        { required: true, message: '请填写课程编码', trigger: 'blur' }
                    ],
                    csName: [
                        { required: true, message: '请填写课程名称', trigger: 'blur' }
                    ],
                    csStudylength: [
                        { required: true, message: '请填写课程学时', trigger: 'blur' }
                    ],
                    csAmount: [
                        { required: true, message: '请填写课程金额', trigger: 'blur' }
                    ],
                    thirdCsPlayUrl: [
                        { required: true, message: '请填写课程链接', trigger: 'blur' }
                    ]
                }
            };
        },
        created() {
            this.siteData = lenye_base.site_data.getsiteData();
            console.log('站点', this.siteData);
            this.userData = lenye_base.user_data.getuserData();
            console.log('个人信息', this.userData);
            console.log('个人信息', localStorage.getItem('userData'));
            this.custId = JSON.parse(localStorage.getItem('userData')).custId;
            this.uploadfileurl = lenye_base.base_data.getapiUrl() + lenye_base.api_url.file.upload;
            console.log('uploadfileurl', this.uploadfileurl);
        },
        mounted() {
            console.log('站点数据', this.siteData);
            this.uploadurl = lenye_base.base_data.getapiUrl() + lenye_base.api_url.file.upload;
            this.getData();
            this.getuserIden();
            // this.getuserdetail(1);
            this.getcountdetail();
        },
        watch: {
            'sitemenu'(newvalue) {
                if (newvalue === 1) {
                    this.getcourselist();
                } else if (newvalue === 2) {
                    //
                } else if (newvalue === 3) {
                    this.getuserorder();
                } else if (newvalue === 4) {
                    this.getunitdetail();
                } else if (newvalue === 5) {
                    this.getuserdetail();
                }
            },
            'tab'(newvalue) {
                if (newvalue === 0) {
                    this.getcourselist();
                } else if (newvalue === 1) {
                    this.getprogramlist();
                }
            },
            'ruleForm.proId'(newvlaue) {
                console.log('新的项目' + newvlaue);
                this.protealist = [];
                this.tcId = '';
                this.tcName = '';
                this.getprotealist();
            },
            'tcId'(newvlaue) {
                console.log('新的教学计划' + newvlaue);
                this.ruleForm.tcId = newvlaue;
                this.getproledglist();
            }
        },
        methods: {
            // 详情
            goDetails(articleId) {
                window.open(`/infodetail?id=${articleId}`);
            },
            //    获取公告列表
            getData() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.news.queryShowPage, lenye_base.base_data.getformatting({
                    siteId: this.siteData.siteId,
                    sorts: 'updateDate=0',
                    catName: '近期公告',
                    page: 1,
                    rows: 8
                }), function (e) {
                    console.log('近期公告', e);
                    that.noticelist = e.data;
                });
            },
            //    判断用户身份
            getuserIden() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.base.custUserIdentityqueryUserIdentities, lenye_base.base_data.getformatting({
                }), function (e) {
                    console.log('我的身份信息', e);
                    if (e.success === '1') {
                        console.log('fuzhi+++');
                        that.userIden = e.data[0];
                        console.log('gerenxinxi');
                        that.getuserdetail(1);
                    };
                });
            },
            //    获取个人信息详情
            getuserdetail(type) {
                const that = this;
                if (this.userIden.objId) {
                    lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.base.thirdBusinessMngqueryById, lenye_base.base_data.getformatting({
                        bsId: this.userIden.objId
                    }), function (e) {
                        console.log('我的信息', e);
                        if (type === 1) {
                            that.userinfo = e.data;
                        };
                        that.userData = e.data;
                        that.imageUrl = e.data.bsLogo;
                    });
                }
            },
            getcountdetail() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.lucene.pageQuery, lenye_base.base_data.getformatting({
                    indexName: 'bscount',
                    queryType: '1',
                    queryParams: "{'bsId': '" + this.userData.bsId + "'}"
                }), function (e) {
                    console.log('统计', e);
                    if (e.data[0]) {
                        that.countlist = e.data[0];
                    }
                });
                let huantu6 = echarts.init(document.getElementById('huantu6'));
                let huantu7 = echarts.init(document.getElementById('huantu7'));
                huantu6.setOption({
                    backgroundColor: '#fff',
                    title: {
                        text: ``,
                        subtext: '',
                        left: 'center',
                        top: 'center',//top待调整
                        textStyle: {
                            color: '#000',
                            fontSize: 18
                        },
                        subtextStyle: {
                            color: '#000',
                            fontSize: 14,
                            top: 'center'
                        },
                        itemGap: -4//主副标题间距
                    },
                    series: [{
                        name: 'pie1',
                        type: 'pie',
                        clockWise: true,
                        radius: ['46px', '50px'],
                        itemStyle: {
                            normal: {
                                label: {
                                    show: false
                                },
                                labelLine: {
                                    show: false
                                }
                            }
                        },
                        hoverAnimation: false,
                        data: [{
                            value: 80,
                            name: 'completed',
                            itemStyle: {
                                normal: {
                                    borderWidth: 6,
                                    borderColor: {
                                        colorStops: [{
                                            offset: 0,
                                            color: '#ce34e9'// 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#2edce4'// 100% 处的颜色
                                        }]
                                    },
                                    color: { // 完成的圆环的颜色
                                        colorStops: [{
                                            offset: 0,
                                            color: '#ce34e9'// 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#2edce4' // 100% 处的颜色
                                        }]
                                    },
                                    label: {
                                        show: false
                                    },
                                    labelLine: {
                                        show: false
                                    }
                                }
                            }
                        }, {
                            name: 'gap',
                            value: 100 - 80,
                            itemStyle: {
                                normal: {
                                    label: {
                                        show: false
                                    },
                                    labelLine: {
                                        show: false
                                    },
                                    color: 'rgba(0, 0, 0, 0)',
                                    borderColor: 'rgba(0, 0, 0, 0)',
                                    borderWidth: 0
                                }
                            }
                        }]
                    }]
                });
                huantu7.setOption({
                    backgroundColor: '#fff',
                    title: {
                        text: ``,
                        subtext: '',
                        left: 'center',
                        top: 'center',//top待调整
                        textStyle: {
                            color: '#000',
                            fontSize: 18
                        },
                        subtextStyle: {
                            color: '#000',
                            fontSize: 14,
                            top: 'center'
                        },
                        itemGap: -4//主副标题间距
                    },
                    series: [{
                        name: 'pie1',
                        type: 'pie',
                        clockWise: true,
                        radius: ['46px', '50px'],
                        itemStyle: {
                            normal: {
                                label: {
                                    show: false
                                },
                                labelLine: {
                                    show: false
                                }
                            }
                        },
                        hoverAnimation: false,
                        data: [{
                            value: 80,
                            name: 'completed',
                            itemStyle: {
                                normal: {
                                    borderWidth: 6,
                                    borderColor: {
                                        colorStops: [{
                                            offset: 0,
                                            color: '#0cf9fc'// 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#3c59fe'// 100% 处的颜色
                                        }]
                                    },
                                    color: { // 完成的圆环的颜色
                                        colorStops: [{
                                            offset: 0,
                                            color: '#0cf9fc'// 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#3c59fe' // 100% 处的颜色
                                        }]
                                    },
                                    label: {
                                        show: false
                                    },
                                    labelLine: {
                                        show: false
                                    }
                                }
                            }
                        }, {
                            name: 'gap',
                            value: 100 - 80,
                            itemStyle: {
                                normal: {
                                    label: {
                                        show: false
                                    },
                                    labelLine: {
                                        show: false
                                    },
                                    color: 'rgba(0, 0, 0, 0)',
                                    borderColor: 'rgba(0, 0, 0, 0)',
                                    borderWidth: 0
                                }
                            }
                        }]
                    }]
                });
            },
            //    获取单位信息详情
            getunitdetail() {
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.base.unitdetail, lenye_base.base_data.getformatting({
                    pt4dict: ''
                }), function (e) {
                    console.log('单位信息', e);
                });
            },
            //    已申报课程
            getcourselist() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentCourseRecordqueryPage, lenye_base.base_data.getformatting({
                    bsId: this.userData.bsId,
                    rows: this.courserows,
                    page:  this.coursepage,
                    sorts: 'applayDate=0'
                }), function (e){
                    console.log('已申报课程', e);
                    that.courselist = e.data;
                    that.coursenum = e.totalCount;
                });
            },
            // 翻页：当前页数的显示条数改变触发
            coursesizeChange(rows) {
                console.log(rows);
                this.courserows = rows;
                this.getcourselist();
            },
            // 翻页：选中当前页
            courseChange(page) {
                console.log(page);
                this.coursepage = page;
                this.getcourselist();
            },
            // 翻页：上一页
            courseprevClick(page) {
                console.log(page);
                this.coursepage = page;
                this.getcourselist();
            },
            // 翻页：下一页
            coursenextClick(page) {
                console.log(page);
                this.coursepage = page;
                this.getcourselist();
            },
            //    项目列表
            getprogramlist() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.queryUsablePage, lenye_base.base_data.getformatting({
                    siteIds: this.siteData.siteId
                }), function (e) {
                    that.programlist = e.data;
                });
            },
            // handleChange(params) {
            //     const {value, label} = params;
            //     this.ruleForm.proId = value;
            //     this.ruleForm.proCatId = label;
            //     this.getprotealist();
            // },
            //    教学计划列表
            getprotealist() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.queryUsableList, lenye_base.base_data.getformatting({
                    proId: this.ruleForm.proId
                }), function (e) {
                    that.protealist = e.data;
                });
            },
            //    知识点列表
            getproledglist() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentKnowledgequeryList, lenye_base.base_data.getformatting({
                    tcId: this.tcId
                }), function (e) {
                    that.proledglist = e.data;
                });
            },
            submitForm(formName, status) {
                const that = this;
                if (!this.csPhotoimageUrl) {
                    that.$message({
                        showClose: true,
                        message: '请上传封面',
                        type: 'warning'
                    });
                    return false;
                }
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        if (this.crId) {
                            lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentCourseRecordupdate, lenye_base.base_data.getformatting({
                                crId: this.crId,
                                tcId: this.tcId,
                                tkId: this.ruleForm.tkId,
                                thirdCsId: this.ruleForm.thirdCsId,
                                csName: this.ruleForm.csName,
                                csStudylength: this.ruleForm.csStudylength,
                                csAmount: this.ruleForm.csAmount,
                                crStatus: 0,
                                thirdCsPlayUrl: this.ruleForm.thirdCsPlayUrl,
                                csPhoto: this.csPhotoimageUrlid
                            }), function (e) {
                                console.log(status);
                                if (e.success === '1') {
                                    if (status === 0) {
                                        that.$message({
                                            showClose: true,
                                            message: '保存成功',
                                            type: 'success'
                                        });
                                        that.tab = 0;
                                        that.crId = '';
                                    } else {
                                        that.audit(e.data,that.crId);
                                    }
                                } else {
                                    that.$message({
                                        showClose: true,
                                        message: e.message,
                                        type: 'warning'
                                    });
                                }
                            });
                        } else {
                            lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentCourseRecordsave, lenye_base.base_data.getformatting({
                                bsId: this.userData.bsId,
                                tcId: this.tcId,
                                tkId: this.ruleForm.tkId,
                                thirdCsId: this.ruleForm.thirdCsId,
                                csName: this.ruleForm.csName,
                                csStudylength: this.ruleForm.csStudylength,
                                csAmount: this.ruleForm.csAmount,
                                crStatus: 0,
                                thirdCsPlayUrl: this.ruleForm.thirdCsPlayUrl,
                                csPhoto: this.csPhotoimageUrlid
                            }), function (e) {
                                console.log(status);
                                if (e.success === '1') {
                                    if (status === 0) {
                                        that.$message({
                                            showClose: true,
                                            message: '保存成功',
                                            type: 'success'
                                        });
                                        that.tab = 0;
                                    } else {
                                        that.audit(e.data);
                                    }
                                } else {
                                    that.$message({
                                        showClose: true,
                                        message: e.message,
                                        type: 'warning'
                                    });
                                }
                            });
                        };
                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            //提交审核
            audit(e,id) {
                const that = this;
                if (id) {
                    e = id;
                } ;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentCourseRecordsubAudit, lenye_base.base_data.getformatting({
                    crId: e
                }), function (data) {
                    if (data.success === '1') {
                        that.$message({
                            showClose: true,
                            message: '提交成功',
                            type: 'success'
                        });
                        that.tab = 0;
                    } else {
                        that.$message({
                            showClose: true,
                            message: data.message,
                            type: 'warning'
                        });
                    };
                });
            },
            //修改
            edit(e) {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentCourseRecordqueryById, lenye_base.base_data.getformatting({
                    crId: e
                }), function (data) {
                    if (data.success === '1') {
                        that.ruleForm = data.data;
                        that.tab = 3;
                        that.crId = data.data.crId;
                    } else {
                        that.$message({
                            showClose: true,
                            message: data.message,
                            type: 'warning'
                        });
                    };
                });
            },
            //删除
            deletecr(e) {
                const that = this;
                that.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.schoolclass.proTeachcontentCourseRecorddeleteById, lenye_base.base_data.getformatting({
                        crId: e
                    }), function (data) {
                        if (data.success === '1') {
                            that.$message({
                                type: 'success',
                                message: '删除成功!'
                            });
                            that.getcourselist();
                        } else {
                            that.$message({
                                showClose: true,
                                message: data.message,
                                type: 'warning'
                            });
                        };
                    });
                }).catch(() => {
                    that.$message({
                        type: 'info',
                        message: '已取消删除'
                    });
                });
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
                this.csPhotoimageUrl = '';
            },
            //    获取订单列表
            getuserorder() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.orderform.queryManagePageByCurId, lenye_base.base_data.getformatting({
                    page: this.orderpage,
                    rows: this.orderrows
                }), function (e) {
                    // console.log('我的订单', e);
                    that.orderlist = e.data;
                    that.ordernum = e.totalCount;
                });
            },
            // 翻页：当前页数的显示条数改变触发
            ordersizeChange(rows) {
                console.log(rows);
                this.orderrows = rows;
                this.getuserorder();
            },
            // 翻页：选中当前页
            orderChange(page) {
                console.log(page);
                this.orderpage = page;
                this.getuserorder();
            },
            // 翻页：上一页
            orderprevClick(page) {
                console.log(page);
                this.orderpage = page;
                this.getuserorder();
            },
            // 翻页：下一页
            ordernextClick(page) {
                console.log(page);
                this.orderpage = page;
                this.getuserorder();
            },
            usersave() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.base.thirdBusinessMngupdate, lenye_base.base_data.getformatting({
                    bsId: that.userData.bsId,
                    bsName: that.userData.bsName,
                    bsOrganization: that.userData.bsOrganization,
                    bsConcatName: that.userData.bsConcatName,
                    bsPhone: that.userData.bsPhone,
                    bsAddress: that.userData.bsAddress,
                    bsLogo: that.imageUrlid,
                    bsInfo: that.userData.bsInfo,
                    callbaclUrl01: that.userData.callbaclUrl01,
                    callbaclUrl02: that.userData.callbaclUrl02
                }), function (e) {
                    if (e.success === 1) {
                        that.$message({
                            showClose: true,
                            message: '保存成功',
                            type: 'success'
                        });
                        window.location.reload();
                    } else {
                        that.$message({
                            showClose: true,
                            message: e.cause,
                            type: 'warning'
                        });
                    };
                });
            },
            handleRemove(file, fileList) {
                console.log('文件：' + file);
                console.log('文件列表：' + fileList);
            },
            handlePreview(file) {
                console.log('文件：' + file);
            },
            beforeRemove(file, fileList) {
                return this.$confirm(`确定移除 ${ file.name }？`);
            },
            handleChange(file, fileList) {
                console.log(file);
                console.log(fileList);
                this.fileList = fileList.slice(-3);
            },
            handleSuccess(res, file) {
                console.log(res);
                console.log(file);
                this.fileList[0].name = res.data.fileName;
                this.fileList[0].url = res.data.fileUrl;
            },
            bssave() {
                const that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.base.thirdBusinessMnginsert, lenye_base.base_data.getformatting({
                    custId: this.custId,
                    bsName: that.userData.bsName,
                    bsOrganization: that.userData.bsOrganization,
                    bsConcatName: that.userData.bsConcatName,
                    bsPhone: that.userData.bsPhone,
                    bsAddress: that.userData.bsAddress,
                    bsLogo: that.imageUrlid,
                    bsInfo: that.userData.bsInfo
                }), function (e) {
                    if (e.success === '1') {
                        lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.base.thirdBusinessMngsubAudit, lenye_base.base_data.getformatting({
                            bsId: e.data
                        }), function (data) {
                            if (data.success === '1') {
                                that.$message({
                                    showClose: true,
                                    message: '提交成功',
                                    type: 'success'
                                });
                                window.location.reload();
                            } else {
                                that.$message({
                                    showClose: true,
                                    message: data.message,
                                    type: 'warning'
                                });
                            };
                        });
                    } else {
                        that.$message({
                            showClose: true,
                            message: e.message + e.cause,
                            type: 'warning'
                        });
                    };
                });
            },
            handleAvatarSuccess(res, file) {
                console.log(res);
                console.log(file);
                // this.imageUrl = URL.createObjectURL(file.raw);
                this.imageUrlid = res.data.fileId;
                this.imageUrl = res.data.fileUrl;
            },
            csphotohandleAvatarSuccess(res, file) {
                this.csPhotoimageUrlid = res.data.fileId;
                this.csPhotoimageUrl = res.data.fileUrl;
                // this.$refs.image.clearValidate();
                this.$refs['image'].clearValidate()
            },
            beforeAvatarUpload(file) {
                console.log(file);
                const isJPG = file.type === 'image/jpeg' || 'image/png';
                const isLt2M = file.size / 1024 / 1024 < 2;

                if (!isJPG) {
                    this.$message.error('上传头像图片只能是 JPG 格式!');
                }
                if (!isLt2M) {
                    this.$message.error('上传头像图片大小不能超过 2MB!');
                }
                return isJPG && isLt2M;
            }
        }
    };
</script>
<style scoped>
</style>
