123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>广西自学考试网上系统</title>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <!-- import CSS -->
- <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
- <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
- <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
- <link rel="stylesheet" href="https://lib.baomitu.com/element-ui/2.12.0/theme-chalk/index.css">
- <link rel="stylesheet" href="./css/icons.css">
- <!-- <link rel="stylesheet" href="./css/select-dropdown.css"> -->
- <!-- <link rel="stylesheet" href="./css/select.css"> -->
- <!-- <link href="./vendor/step/bootstrap.min.css" rel="stylesheet"> -->
- <!-- <link href="./vendor/step/gloab.css" rel="stylesheet"> -->
- <script src="./vendor/md5/md5.js" type="text/javascript"></script>
- <!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>-->
- </head>
- <body>
- <div id="app" style="width:60%;left:20%;position:absolute;margin: 10px 10px;display: none;">
- <el-card class="box-card" body-style="max-height: 200px;">
- <!-- <div class="step">
- <ul>
- <li class="col-xs-3 on">
- <span class="num">
- <em class="f-r5"></em>
- <i>1</i>
- </span>
- <span class="line_bg lbg-r"></span>
- <p class="lbg-txt">填写基础信息</p>
- </li>
- <li class="col-xs-3 on">
- <span class="num">
- <em class="f-r5"></em>
- <i>2</i>
- </span>
- <span class="line_bg lbg-l"></span>
- <span class="line_bg lbg-r"></span>
- <p class="lbg-txt">完善资料并上传照片</p>
- </li>
- <li class="col-xs-3">
- <span class="num">
- <em class="f-r5"></em>
- <i>3</i>
- </span>
- <span class="line_bg lbg-l"></span>
- <span class="line_bg lbg-r"></span>
- <p class="lbg-txt">生成准考证</p>
- </li>
- <li class="col-xs-3">
- <span class="num">
- <em class="f-r5"></em>
- <i>4</i>
- </span>
- <span class="line_bg lbg-l"></span>
- <p class="lbg-txt">课程报考</p>
- </li>
- </ul>
- </div> -->
- <img src="./img/1.png" style="width: 700px;">
- </el-card>
- <br>
- <el-card class="box-card" v-loading="loading" element-loading-text="初始化数据加载中...">
- <div slot="header" class="clearfix">
- <div style="text-align: center;font-size: 15px;">
- 广西自考考生注册
- </div>
- </div>
- <div style="margin-bottom: 8px;font-size: 16px">
- <el-alert title="请考生认真如实填写有关个人档案信息。其中的姓名、性别、身份证号,一旦确认即不可以随意更改。更改需要到自考办现场申请并需提交公安部门证明。" type="warning":closable="false">
- </el-alert>
- </div>
-
- <center>
- <div style="width: 600px">
- <el-tabs type="border-card">
- <el-tab-pane label="新考生" @click(initParam())>
- <!-- <div style="width: 400px"> -->
- <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="120px">
- <el-row>
- <el-col :span="24">
- <!--
- <el-form-item label="身份证正面照片">
- <el-button type="primary" @click="cardOcr()" style="float: left;" title="读取身份证照片信息,自动填充。(可以不上传)">上传身份证照片</el-button> 温馨提醒:身份证照片大小不能超过1.5M。
- </el-form-item>
-
- <!--
- <el-form-item label="">
-
- </el-form-item>
- -->
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="证件号码" required prop="cert_no">
- <el-input v-model="stdRegInfo.cert_no" maxlength="18" @blur="cert_no_blur" v-bind:readonly="identifyOrc.orcSuccess" placeholder="请填写证件号码"></el-input>
- <div style="width: 230px; position: absolute; left: 280px; top: 0px;">
- <el-checkbox label="身份证" v-model="isSFZ" @change="isSFZChange">身份证</el-checkbox>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- <el-row>
- <el-col :span="24">
- <el-form-item label="是否身份证">
- <el-checkbox label="是否身份证" v-model="isSFZ" @change="isSFZChange()">是否身份证</el-checkbox>
- </el-form-item>
- </el-col>
- </el-row>-->
- <el-row>
- <el-col :span="24">
- <el-form-item label="姓名" prop="std_name">
- <el-input v-model="stdRegInfo.std_name" placeholder="请填写姓名"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!--
- <el-row>
- <el-col :span="24">
- <el-form-item label="英文名(非必填)" prop="std_eng_name">
- <el-input v-model="stdRegInfo.std_eng_name"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- -->
- <!-- v-if="isSFZ" -->
- <el-row>
- <el-col :span="24">
- <el-form-item label="性别" prop="std_sex">
- <el-select v-model="stdRegInfo.std_sex" filterable placeholder="请选择性别">
- <el-option v-for="item in sexArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <!--
- <el-row v-if="isSFZ && stdRegInfo.cert_no.length ==18">
- <el-col :span="24">
- <el-form-item label="出生日期" prop="std_birth">
- <el-input v-model="stdRegInfo.std_birth" disabled></el-input>
- </el-form-item>
- </el-col>
-
- </el-row>
- -->
- <el-row>
- <el-col :span="24">
- <el-form-item label="密码" prop="std_pass1">
- <el-input type="password" v-model="stdRegInfo.std_pass1" placeholder="密码必须包含字母、数字、特殊字符至少8个字符!"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="确认密码" prop="std_pass2">
- <el-input type="password" v-model="stdRegInfo.std_pass2" placeholder="确认密码必须与密码一致!"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <div style="text-align: center;margin-bottom: 3px">
- <el-form-item>
- <div style="margin-top: 10px;">
- <el-button type="primary" id="sbt" @click="onSubmit('new')">提交注册信息</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
- <!-- <div class="footer abs-bottom">
- <center>
- <font style="font-size: 15px">
- 启明禾木软件 @ 2019
- </font>
- </center>
- </div> -->
- </el-form-item>
- </div>
- </el-col>
- </el-row>
- </el-form>
- <!-- </div> -->
- </el-tab-pane>
- <el-tab-pane label="老考生十二位准考证查询">
- <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="120px">
- <el-row>
- <el-col :span="24">
- <el-form-item label="">
-
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="老准考证号">
- <el-input type="input" v-model="ticket_no_old"></el-input>
- </el-form-item>
- <div style="width: 230px; position: absolute; left: 418px; top: 0px;">
- <el-button type="primary" @click="check()">验证</el-button>
- </div>
- </el-col>
- </el-row>
- <!--
- <el-row>
- <el-col :span="12">
- <el-form-item label="十三位准考证">
- {{stdRegInfo.old_ticket_no1}}
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="非十三位准考证">
- {{stdRegInfo.old_ticket_no2}}
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="证件号码" required prop="cert_no">
- <el-input v-model="stdRegInfo.cert_no" maxlength="18" @blur="cert_no_blur"></el-input>
- <div style="width: 230px; position: absolute; left: 280px; top: 0px;">
- <el-checkbox label="身份证" v-model="isSFZ" @change="isSFZChange">身份证</el-checkbox>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- -->
- <!-- <el-row>
- <el-col :span="24">
- <el-form-item label="是否身份证">
- <el-checkbox label="是否身份证" v-model="isSFZ" @change="isSFZChange()">是否身份证</el-checkbox>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="姓名" prop="std_name">
- <el-input v-model="stdRegInfo.std_name" disabled></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="英文名(非必填)" prop="std_eng_name">
- <el-input v-model="stdRegInfo.std_eng_name"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- -->
- <!-- v-if="isSFZ" -->
- <!--
- <el-row>
- <el-col :span="24">
- <el-form-item label="性别" prop="std_sex">
- <el-select v-model="stdRegInfo.std_sex" filterable placeholder="请选择性别">
- <el-option v-for="item in sexArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-if="isSFZ && stdRegInfo.cert_no.length ==18">
- <el-col :span="24">
- <el-form-item label="出生日期" prop="std_birth">
- <el-input v-model="stdRegInfo.std_birth" disabled></el-input>
- </el-form-item>
- </el-col>
-
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="密码" prop="std_pass1">
- <el-input type="password" v-model="stdRegInfo.std_pass1"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="确认密码" prop="std_pass2">
- <el-input type="password" v-model="stdRegInfo.std_pass2"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- -->
- <el-row>
- <el-col :span="20">
- <div style="text-align: center;margin-bottom: 3px">
- <el-form-item>
- <div style="margin-top: 10px;">
- <el-button type="primary" @click="onSubmit('old')" v-if="checkOldStd">提交注册信息</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
- <!-- <div class="footer abs-bottom">
- <center>
- <font style="font-size: 15px">
- 启明禾木软件 @ 2019
- </font>
- </center>
- </div> -->
- </el-form-item>
- </div>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- </el-tabs>
- </div>
- </center>
- </el-tabs>
- </el-card>
- <el-dialog title="" width="400px" :visible.sync="dialogVisible">
- <el-form>
- <el-form-item label="新老生">
- <el-select size="medium" v-model="isNewStd" filterable clearable placeholder="请选择新老考生" @change="isNewStdChange" >
- <el-option label="新生" value="1"></el-option>
- <el-option label="老生" value="0"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="老准考证号" v-if="isNewStd==0">
- <el-input type="input" v-model="stdRegInfo.ticket_no_old"></el-input>
- </el-form-item>
- <center v-if="isNewStd==0"><el-button @click="check()">验证</el-button></center>
- </el-form>
- </el-dialog>
- <el-dialog title="上传身份证正面" width="400px" :visible.sync="identifyOrc.ocrDialogVisible">
- <el-form>
-
- <el-form-item label="" style="margin-bottom: 0px;padding-bottom: 0px;">
- <input type="file" id="file" @change="uploadImg($event)" accept="image/jpg" style="width:100%;height: 100%;margin-bottom: 0px;padding-bottom: 0px;"></input>
- </el-form-item>
- <el-form-item label="">
- <div class="el-form-item">
- <div class="el-form-item__content">
- <div class="el-input el-input-group el-input-group--prepend">
- <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
- <i class="fa fa-hand-o-right fa-fw"></i>
- </div>
- <input v-model="identifyOrc.validateCode" maxlength="4" type="text" style="width:240px;" autocomplete="off" placeholder="校验码" class="el-input__inner">
- <img :src="validateCodesrc" @click="loadValidateCode" style="cursor:pointer; position: absolute;top: 0px;right: 0px;;height: 96%;width: 87px;">
- </div>
- </div>
-
- </div>
- </el-form-item>
- <center
- ><el-button type="primary" @click="uploadIndentify()">提交</el-button>
- </center>
- </el-form>
- </el-dialog>
- </div>
- </body>
- <!-- import Vue before Element -->
- <!-- <script src="https://unpkg.com/vue/dist/vue.js"></script> -->
- <script src="https://lib.baomitu.com/vue/2.5.17/vue.min.js"></script>
- <!-- import JavaScript -->
- <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
- <script src="https://lib.baomitu.com/element-ui/2.4.11/index.js"></script>
- <script src="https://lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
- <script src="./vendor/jqueryPlugPop/plug-in.min.js"></script>
- <script src="./js/tool.js"></script>
- <script>
- new Vue({
- el: '#app',
- data: function () {
- var validateSpecChar = function(rule, value, callback) {
- if(value && value.length>15){
- callback(new Error('请输入正确中文姓名且长度在15个字范围内!'));
- }
- //var regEn = /^[\u4e00-\u9fa5·\u36c3\u4DAE]{0,15}$/;
- var regEn =/^((?![\u3000-\u303F])[\u2E80-\uFE4F]|\·)*(?![\u3000-\u303F])[\u2E80-\uFE4F](\·)*$/;
- if (!regEn.test(value)) {
- callback(new Error('请输入正确中文姓名且长度在15个字范围内!'));
- } else {
- callback();
- }
- };
- var validateConfirmPass = function(rule, value, callback) {
- var this_ = window['Vue'];
- var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
- // var regex = /^[A-Za-z0-9]{8,20}$/;
- // var regex = new RegExp("^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,}$");
-
- if (value === '') {
- callback(new Error('请再次输入密码'));
- } else if (value !== this_.stdRegInfo.std_pass1) {
- callback(new Error('两次输入密码不一致!'));
- } else if (!regex.test(this_.stdRegInfo.std_pass1)) {
- callback(new Error('密码必须包含字母、数字、特殊字符至少8个字符!'));
- // callback();
- } else {
- //密码复杂度检查
- callback();
- }
- };
- var validateConfirmPass1 = function(rule, value, callback) {
- var this_ = window['Vue'];
- var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
- // var regex = /^[A-Za-z0-9]{8,20}$/;
- // var regex = new RegExp("^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,}$");
-
- if (value === '') {
- callback(new Error('请再次输入密码'));
- } else if (this_.stdRegInfo.std_pass2 && value !== this_.stdRegInfo.std_pass2) {
- callback(new Error('两次输入密码不一致!'));
- } else if (!regex.test(this_.stdRegInfo.std_pass1)) {
- callback(new Error('密码中必须包含字母、数字、特殊字符至少8个字符!'));
- // callback();
- } else {
- //密码复杂度检查
- callback();
- }
- };
- var checkPhone = function(rule, value, callback) {
- if (!value) {
- callback(new Error('请输入联系电话'));
- } else {
- var reg = /^1[0|1|2|3|4|5|6|7|8|9][0-9]\d{8}$/
- console.log(reg.test(value));
- if (reg.test(value)) {
- callback();
- } else {
- callback(new Error('请输入正确的手机号'));
- }
- }
- };
- var checkNPostNumber = function(rule, value, callback) {
- if (value) {
- var reg = /^\d{6}$/;
- if (!reg.test(value)) {
- callback(new Error('请输入正确的6位邮政编码'));
- } else {
- callback();
- }
- } else {
- callback();
- }
- };
- var validateCertNo = function(rule, value, callback) {
- if ((new RegExp(/^[a-zA-Z0-9]+$/g).test(value))) {
- callback();
- } else {
- callback(new Error('证件号只允许填数字和英文'));
- }
- }
- return {
- randomnum:null,
- validateCodesrc:null,
- validateCode_check:"",
- loading: false,
- loaded: false,
- dialogVisible:false,
- ticket_no_old:"",
- isNewStd:"1",
- checkOldStd: false,
- isSFZ:true,
- identifyOrc:{
- ocrDialogVisible:false,
- file:"",
- validateCode:"",
- orcSuccess:false,
- },
- stdRegInfo: {
- std_name: "",
- std_pass1: "",
- std_pass2: "",
- cert_no: "",
- std_sex: "",
- std_eng_name: "",
- political_status: "",
- std_nation: "",
- std_family_reg: "",
- school_id: "",
- std_edu: "",
- std_occupation: "",
- std_healthy: "",
- std_birth: "",
- major_id: "",
- major_code: "",
- major_name: "",
- std_mobile: "",
- std_postcode: "",
- std_address: "",
- email: "",
- remark: "",
- },
- stdRegInfoRule: {
- std_name: [
- { required: true, message: '请输入姓名', trigger: 'blur' },
- { validator: validateSpecChar, trigger: ['blur', 'change'] },
- ],
- std_pass1: [
- { required: true, message: '请输入密码', trigger: 'blur' },
- { validator: validateConfirmPass1, trigger: 'blur' },
- ],
- std_pass2: [
- { required: true, message: '请输入确认密码', trigger: 'blur' },
- { validator: validateConfirmPass, trigger: 'blur' },
- ],
- cert_no: [
- { required: true, message: '请输入证件号码', trigger: 'blur' },
- { validator: validateCertNo, trigger: ['blur', 'change'] },
- ],
- std_sex: [
- { required: true, message: '请输入性别', trigger: 'blur' },
- ],
- // std_birth: [
- // { required: true, message: '请输入出生日期', trigger: 'blur' },
- // ]
- },
- sexArray: [],
-
- }
- },
- mounted: function() {
- window['Vue'] = this;
- var _this = this;
- this.loading = true;
- // ajaxRequest("",'/std/stdRegInfo/init.htm',{},function(resp){
- // if(resp.success){
- // let map = resp.map;
- // _this.majorArray = map.dict['majorArray'];
- // _this.nationArray = map.dict['nationArray'];
- // _this.occupationArray = map.dict['occupationArray'];
- // _this.familyRegArray = map.dict['familyRegArray'];
- // _this.politicalStatusArray = map.dict['politicalStatusArray'];
- // _this.sexArray = map.dict['sexArray'];
- // _this.healthyArray = map.dict['healthyArray'];
- // _this.eduArray = map.dict['eduArray'];
- // _this.orgArray = map.dict['orgArray'];
- // }
- // _this.loading = false;
- // })
- this.sexArray = [{ dict_name: "StdSexType", dict_value: "1", dict_text: "男", dict_order: 1 },{ dict_name: "StdSexType", dict_value: "2", dict_text: "女", dict_order: 2 }];
- this.loading = false;
- // this.dialogVisible = true;
- },
- created: function() {
- var this_ = this;
- setTimeout( function(){
- // this_.loaded = true;
- document.getElementById("app").style.display="block";
- }, 500);
- },
- methods: {
-
- uploadIndentify:function(){
-
- if(!this.identifyOrc.file){
- $.Pop("请选择身份证照片!", 'alert', function () {});
- return;
- }
- if(!this.identifyOrc.validateCode){
- $.Pop("请填写校验码!", 'alert', function () {});
- return;
- }
- var this_ = this;
- ajaxRequest("", '/std/identifyOrc.htm', { file: this.identifyOrc.file,validateCode:this.identifyOrc.validateCode }, function (resp) {
- if(resp.success){
-
- // $.Pop("识别成功,如果信息有误请重新提交!", 'alert', function () {});
- this_.stdRegInfo.cert_no = resp.map.cert_no;
- this_.stdRegInfo.std_sex = resp.map.std_sex;
- // this_.stdRegInfo.std_nation = resp.map.std_nation;
- if( this_.stdRegInfo.cert_no && this_.stdRegInfo.cert_no.length == 18){
- //生日
- this_.stdRegInfo.std_birth = this_.stdRegInfo.cert_no.substring(6,14);
- //性别
- this_.stdRegInfo.std_sex = (parseInt(this_.stdRegInfo.cert_no.substring(16,17)) % 2) == 1?"1":"2";
- this_.stdRegInfo.cert_no = this_.stdRegInfo.cert_no.toUpperCase();
- }
- this_.stdRegInfo.std_name = resp.map.std_name;
- this_.stdRegInfo.std_address = resp.map.std_address;
- this_.identifyOrc.orcSuccess=true;
- this_.identifyOrc.ocrDialogVisible=false;
- }else{
- $.Pop(resp.errorMsg, 'alert', function () {});
- this_.loadValidateCode();
- }
- })
- },
- uploadImg:function(e) {
- let _this = this;
- //上传图片
- let file = e.target.files[0];
- _this.fileName = file.name;
- if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
- this.alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种", "信息提示");
- return false;
- }
-
- let reader = new FileReader();
- reader.onload = function(e) {
-
- _this.identifyOrc.file = e.target.result;
- };
- // 转化为base64
- reader.readAsDataURL(file)
- },
- loadValidateCode:function() {
- this.randomnum = Date.parse(new Date());
- this.validateCodesrc= basePath + "/std/validateCode.htm?"+this.randomnum;
- },
- cardOcr:function(){
- this.identifyOrc.ocrDialogVisible=true;
- this.loadValidateCode();
- },
- initParam: function(){
- this.ticket_no_old = "";
- this.stdRegInfo.std_name = ""
- this.stdRegInfo.old_ticket_no1 = "";
- this.stdRegInfo.old_ticket_no2 = "";
- this.checkOldStd = false;
- },
- switchNewOld: function(){
- this.stdRegInfo.old_ticket_no1 = "";
- this.stdRegInfo.old_ticket_no2 = "";
- },
- check: function(){
- if(!this.ticket_no_old){
- $.Pop("请填写老转考证号!", 'alert', function () {});
- return;
- }
-
- var this_ = this;
- ajaxRequest("", '/std/checkOldTicketNo.htm', { ticket_no_old: this.ticket_no_old }, function (resp) {
-
- if(resp.success){
- if(!resp.entity) {
- $.Pop("无该准考证号相关信息,请求重新填写!", 'alert', function () {});
- return;
- }
-
- this_.stdRegInfo.std_name = resp.entity.xingming.trim();
- this_.stdRegInfo.old_ticket_no1 = resp.entity.kaohao?resp.entity.kaohao.trim():"";
- this_.stdRegInfo.old_ticket_no2 = resp.entity.jiukaohao?resp.entity.jiukaohao.trim():"";
- this_.checkOldStd = true;
- }else{
- this_.checkOldStd = false;
- $.Pop(resp.errorMsg, 'alert', function () {});
- }
- })
- },
- cert_no_blur: function(){
- if(this.isSFZ == true){
- this.isSFZChange(true);
- }
- },
- isNewStdChange: function(val){
-
- },
- //身份证规则验证
- isSFZChange: function(val){
- if(val == true){
- if( this.stdRegInfo.cert_no && this.stdRegInfo.cert_no.length == 18){
- //生日
- this.stdRegInfo.std_birth = this.stdRegInfo.cert_no.substring(6,14);
- //性别
- this.stdRegInfo.std_sex = (parseInt(this.stdRegInfo.cert_no.substring(16,17)) % 2) == 1?"1":"2";
- this.stdRegInfo.cert_no = this.stdRegInfo.cert_no.toUpperCase();
- }
-
- }
- },
- majorChange: function(major_id, o1, o2) {
- if (!major_id) return;
- for (var i = 0; i < this.majorArray.length; i++) {
- var item = this.majorArray[i];
- if (item.id == major_id) {
- this.stdRegInfo.major_name = item.major_name
- this.stdRegInfo.major_code = item.major_code
- }
- }
- },
- schoolIdChange: function(schoolId, o1, o2) {
- this.assistOrgArray = [];
- //非社会考生查询助学班
- if (!schoolId && (schoolId + "") != "99999999") return;
- var _this = this;
- ajaxRequest("", '/std/assistListAll.htm', { pid: schoolId }, function (resp) {
- _this.assistOrgArray = resp.array;
- })
- },
- validateForm: function() {
- this.$refs['stdRegInfo'].validate(function(valid) {
- if (valid) {
- return true;
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- goLogin: function() {
- window.location.href = "./login.html";
- },
- onSubmit: function(type) {
- if(this.isSFZ == true && this.stdRegInfo.cert_no.length !=18){
- if(this.stdRegInfo.cert_no.length == 0){
- $.Pop("请填写证件号码!", 'alert', function () {});
- }else{
- $.Pop("身份证号只能填写18位!", 'alert', function () {});
- }
-
- return;
- }
- this.$refs['stdRegInfo'].validate(function(valid) {
- var this_ = window['Vue'];
- if (valid) {
- //clone对象
- var stdRegInfo = JSON.parse(JSON.stringify(this_.stdRegInfo));
- //MD5密码加密
- stdRegInfo['std_pass'] = hex_md5(stdRegInfo['std_pass1']);
- if(this_.isSFZ == true){
- stdRegInfo['cert_type'] = 1;
- }else{
- stdRegInfo['cert_type'] = 0;
- }
- //删除过程数据
- delete stdRegInfo['std_pass1'];
- delete stdRegInfo['std_pass2'];
- if(type == 'new'){
- delete stdRegInfo['old_ticket_no1'];
- delete stdRegInfo['old_ticket_no2'];
- }
- // 图像识别出的身份证,证件类型是身份证不允许修改
- if(type == 'new' && this_.identifyOrc && this_.identifyOrc.orcSuccess && this_.identifyOrc.orcSuccess==true){
- stdRegInfo['cert_type'] = 1;
- }
- $('#sbt').hide();
- ajaxRequest("", '/std/stdRegInfo/reg.htm', stdRegInfo, function (resp) {
-
- if (resp.success) {
- $('#sbt').show();
- //提示注册成功 跳转登录页面
- $.Pop('注册保存成功,即将跳转登录页面', 'alert', function () {
- setTimeout(function() {
- window.location.href = "./login.html";
- }, 300);
- })
- } else {
- $('#sbt').show();
- $.Pop(resp.errorMsg, 'alert', function () {
- });
- }
- })
- } else {
- console.log('error submit!!');
- }
- });
- }
- }
- });
- </script>
- <style scoped>
- .footer {
- height: 30px;
- }
- .abs-bottom {
- width: 100%;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- margin-bottom: 5px
- }
- #particles-js {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- }
- .particles-js-canvas-el {
- background-color: aliceblue
- }
- .btn-long {
- width: 100%;
- }
- .el-select {
- width: 100%;
- }
- .el-card__header {
- padding: 8px 8px !important;
- }
- body {
- background-color: #F3F3F3;
- }
- .el-checkbox__inner{
- vertical-align: text-top !important;
- }
- .el-checkbox__input{
- margin-bottom: 6px !important;
- }
- .el-alert--warning {
- background-color: #fdf6ec !important;
- color: #e6a23c;
- }
- .el-alert {
- margin: 20px 0 0;
- }
- .el-alert {
- width: 100%;
- padding: 8px 16px;
- margin: 0;
- box-sizing: border-box;
- border-radius: 4px;
- position: relative;
- background-color: #fff;
- overflow: hidden;
- opacity: 1;
- display: flex;
- align-items: center;
- transition: opacity .2s;
- }
- .el-tabs__nav{
- width: 100% !important
- }
- .el-tabs__item{
- width: 50% !important
- }
- .el-input__icon{
- height:14px !important
- }
- .el-icon-arrow-up{
- background: url(../image/icon/up.png) !important;
- background-repeat: no-repeat !important;
- margin-right: 2px !important;
- background-position: center !important;
- margin-top: 14px !important;
- }
-
- </style>
- </html>
|