reg.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>广西自学考试网上系统</title>
  5. <meta charset="UTF-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <!-- import CSS -->
  8. <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
  9. <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
  10. <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
  11. <link rel="stylesheet" href="https://lib.baomitu.com/element-ui/2.12.0/theme-chalk/index.css">
  12. <link rel="stylesheet" href="./css/icons.css">
  13. <!-- <link rel="stylesheet" href="./css/select-dropdown.css"> -->
  14. <!-- <link rel="stylesheet" href="./css/select.css"> -->
  15. <!-- <link href="./vendor/step/bootstrap.min.css" rel="stylesheet"> -->
  16. <!-- <link href="./vendor/step/gloab.css" rel="stylesheet"> -->
  17. <script src="./vendor/md5/md5.js" type="text/javascript"></script>
  18. <!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>-->
  19. </head>
  20. <body>
  21. <div id="app" style="width:60%;left:20%;position:absolute;margin: 10px 10px;display: none;">
  22. <el-card class="box-card" body-style="max-height: 200px;">
  23. <!-- <div class="step">
  24. <ul>
  25. <li class="col-xs-3 on">
  26. <span class="num">
  27. <em class="f-r5"></em>
  28. <i>1</i>
  29. </span>
  30. <span class="line_bg lbg-r"></span>
  31. <p class="lbg-txt">填写基础信息</p>
  32. </li>
  33. <li class="col-xs-3 on">
  34. <span class="num">
  35. <em class="f-r5"></em>
  36. <i>2</i>
  37. </span>
  38. <span class="line_bg lbg-l"></span>
  39. <span class="line_bg lbg-r"></span>
  40. <p class="lbg-txt">完善资料并上传照片</p>
  41. </li>
  42. <li class="col-xs-3">
  43. <span class="num">
  44. <em class="f-r5"></em>
  45. <i>3</i>
  46. </span>
  47. <span class="line_bg lbg-l"></span>
  48. <span class="line_bg lbg-r"></span>
  49. <p class="lbg-txt">生成准考证</p>
  50. </li>
  51. <li class="col-xs-3">
  52. <span class="num">
  53. <em class="f-r5"></em>
  54. <i>4</i>
  55. </span>
  56. <span class="line_bg lbg-l"></span>
  57. <p class="lbg-txt">课程报考</p>
  58. </li>
  59. </ul>
  60. </div> -->
  61. <img src="./img/1.png" style="width: 700px;">
  62. </el-card>
  63. <br>
  64. <el-card class="box-card" v-loading="loading" element-loading-text="初始化数据加载中...">
  65. <div slot="header" class="clearfix">
  66. <div style="text-align: center;font-size: 15px;">
  67. 广西自考考生注册
  68. </div>
  69. </div>
  70. <div style="margin-bottom: 8px;font-size: 16px">
  71. <el-alert title="请考生认真如实填写有关个人档案信息。其中的姓名、性别、身份证号,一旦确认即不可以随意更改。更改需要到自考办现场申请并需提交公安部门证明。" type="warning":closable="false">
  72. </el-alert>
  73. </div>
  74. <center>
  75. <div style="width: 600px">
  76. <el-tabs type="border-card">
  77. <el-tab-pane label="新考生" @click(initParam())>
  78. <!-- <div style="width: 400px"> -->
  79. <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="120px">
  80. <el-row>
  81. <el-col :span="24">
  82. <!--
  83. <el-form-item label="身份证正面照片">
  84. <el-button type="primary" @click="cardOcr()" style="float: left;" title="读取身份证照片信息,自动填充。(可以不上传)">上传身份证照片</el-button> 温馨提醒:身份证照片大小不能超过1.5M。
  85. </el-form-item>
  86. <!--
  87. <el-form-item label="">
  88. &nbsp;
  89. </el-form-item>
  90. -->
  91. </el-col>
  92. </el-row>
  93. <el-row>
  94. <el-col :span="24">
  95. <el-form-item label="证件号码" required prop="cert_no">
  96. <el-input v-model="stdRegInfo.cert_no" maxlength="18" @blur="cert_no_blur" v-bind:readonly="identifyOrc.orcSuccess" placeholder="请填写证件号码"></el-input>
  97. <div style="width: 230px; position: absolute; left: 280px; top: 0px;">
  98. <el-checkbox label="身份证" v-model="isSFZ" @change="isSFZChange">身份证</el-checkbox>
  99. </div>
  100. </el-form-item>
  101. </el-col>
  102. </el-row>
  103. <!-- <el-row>
  104. <el-col :span="24">
  105. <el-form-item label="是否身份证">
  106. <el-checkbox label="是否身份证" v-model="isSFZ" @change="isSFZChange()">是否身份证</el-checkbox>
  107. </el-form-item>
  108. </el-col>
  109. </el-row>-->
  110. <el-row>
  111. <el-col :span="24">
  112. <el-form-item label="姓名" prop="std_name">
  113. <el-input v-model="stdRegInfo.std_name" placeholder="请填写姓名"></el-input>
  114. </el-form-item>
  115. </el-col>
  116. </el-row>
  117. <!--
  118. <el-row>
  119. <el-col :span="24">
  120. <el-form-item label="英文名(非必填)" prop="std_eng_name">
  121. <el-input v-model="stdRegInfo.std_eng_name"></el-input>
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. -->
  126. <!-- v-if="isSFZ" -->
  127. <el-row>
  128. <el-col :span="24">
  129. <el-form-item label="性别" prop="std_sex">
  130. <el-select v-model="stdRegInfo.std_sex" filterable placeholder="请选择性别">
  131. <el-option v-for="item in sexArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
  132. </el-select>
  133. </el-form-item>
  134. </el-col>
  135. </el-row>
  136. <!--
  137. <el-row v-if="isSFZ && stdRegInfo.cert_no.length ==18">
  138. <el-col :span="24">
  139. <el-form-item label="出生日期" prop="std_birth">
  140. <el-input v-model="stdRegInfo.std_birth" disabled></el-input>
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. -->
  145. <el-row>
  146. <el-col :span="24">
  147. <el-form-item label="密码" prop="std_pass1">
  148. <el-input type="password" v-model="stdRegInfo.std_pass1" placeholder="密码必须包含字母、数字、特殊字符至少8个字符!"></el-input>
  149. </el-form-item>
  150. </el-col>
  151. </el-row>
  152. <el-row>
  153. <el-col :span="24">
  154. <el-form-item label="确认密码" prop="std_pass2">
  155. <el-input type="password" v-model="stdRegInfo.std_pass2" placeholder="确认密码必须与密码一致!"></el-input>
  156. </el-form-item>
  157. </el-col>
  158. </el-row>
  159. <el-row>
  160. <el-col :span="24">
  161. <div style="text-align: center;margin-bottom: 3px">
  162. <el-form-item>
  163. <div style="margin-top: 10px;">
  164. <el-button type="primary" id="sbt" @click="onSubmit('new')">提交注册信息</el-button>
  165. <el-button @click="goLogin">返回登录页面</el-button>
  166. </div>
  167. <!-- <div class="footer abs-bottom">
  168. <center>
  169. <font style="font-size: 15px">
  170. 启明禾木软件 @ 2019
  171. </font>
  172. </center>
  173. </div> -->
  174. </el-form-item>
  175. </div>
  176. </el-col>
  177. </el-row>
  178. </el-form>
  179. <!-- </div> -->
  180. </el-tab-pane>
  181. <el-tab-pane label="老考生十二位准考证查询">
  182. <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="120px">
  183. <el-row>
  184. <el-col :span="24">
  185. <el-form-item label="">
  186. &nbsp;
  187. </el-form-item>
  188. </el-col>
  189. </el-row>
  190. <el-row>
  191. <el-col :span="24">
  192. <el-form-item label="老准考证号">
  193. <el-input type="input" v-model="ticket_no_old"></el-input>
  194. </el-form-item>
  195. <div style="width: 230px; position: absolute; left: 418px; top: 0px;">
  196. <el-button type="primary" @click="check()">验证</el-button>
  197. </div>
  198. </el-col>
  199. </el-row>
  200. <!--
  201. <el-row>
  202. <el-col :span="12">
  203. <el-form-item label="十三位准考证">
  204. {{stdRegInfo.old_ticket_no1}}
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="12">
  208. <el-form-item label="非十三位准考证">
  209. {{stdRegInfo.old_ticket_no2}}
  210. </el-form-item>
  211. </el-col>
  212. </el-row>
  213. <el-row>
  214. <el-col :span="24">
  215. <el-form-item label="证件号码" required prop="cert_no">
  216. <el-input v-model="stdRegInfo.cert_no" maxlength="18" @blur="cert_no_blur"></el-input>
  217. <div style="width: 230px; position: absolute; left: 280px; top: 0px;">
  218. <el-checkbox label="身份证" v-model="isSFZ" @change="isSFZChange">身份证</el-checkbox>
  219. </div>
  220. </el-form-item>
  221. </el-col>
  222. </el-row>
  223. -->
  224. <!-- <el-row>
  225. <el-col :span="24">
  226. <el-form-item label="是否身份证">
  227. <el-checkbox label="是否身份证" v-model="isSFZ" @change="isSFZChange()">是否身份证</el-checkbox>
  228. </el-form-item>
  229. </el-col>
  230. </el-row>
  231. <el-row>
  232. <el-col :span="24">
  233. <el-form-item label="姓名" prop="std_name">
  234. <el-input v-model="stdRegInfo.std_name" disabled></el-input>
  235. </el-form-item>
  236. </el-col>
  237. </el-row>
  238. <el-row>
  239. <el-col :span="24">
  240. <el-form-item label="英文名(非必填)" prop="std_eng_name">
  241. <el-input v-model="stdRegInfo.std_eng_name"></el-input>
  242. </el-form-item>
  243. </el-col>
  244. </el-row>
  245. -->
  246. <!-- v-if="isSFZ" -->
  247. <!--
  248. <el-row>
  249. <el-col :span="24">
  250. <el-form-item label="性别" prop="std_sex">
  251. <el-select v-model="stdRegInfo.std_sex" filterable placeholder="请选择性别">
  252. <el-option v-for="item in sexArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
  253. </el-select>
  254. </el-form-item>
  255. </el-col>
  256. </el-row>
  257. <el-row v-if="isSFZ && stdRegInfo.cert_no.length ==18">
  258. <el-col :span="24">
  259. <el-form-item label="出生日期" prop="std_birth">
  260. <el-input v-model="stdRegInfo.std_birth" disabled></el-input>
  261. </el-form-item>
  262. </el-col>
  263. </el-row>
  264. <el-row>
  265. <el-col :span="24">
  266. <el-form-item label="密码" prop="std_pass1">
  267. <el-input type="password" v-model="stdRegInfo.std_pass1"></el-input>
  268. </el-form-item>
  269. </el-col>
  270. </el-row>
  271. <el-row>
  272. <el-col :span="24">
  273. <el-form-item label="确认密码" prop="std_pass2">
  274. <el-input type="password" v-model="stdRegInfo.std_pass2"></el-input>
  275. </el-form-item>
  276. </el-col>
  277. </el-row>
  278. -->
  279. <el-row>
  280. <el-col :span="20">
  281. <div style="text-align: center;margin-bottom: 3px">
  282. <el-form-item>
  283. <div style="margin-top: 10px;">
  284. <el-button type="primary" @click="onSubmit('old')" v-if="checkOldStd">提交注册信息</el-button>
  285. <el-button @click="goLogin">返回登录页面</el-button>
  286. </div>
  287. <!-- <div class="footer abs-bottom">
  288. <center>
  289. <font style="font-size: 15px">
  290. 启明禾木软件 @ 2019
  291. </font>
  292. </center>
  293. </div> -->
  294. </el-form-item>
  295. </div>
  296. </el-col>
  297. </el-row>
  298. </el-form>
  299. </el-tab-pane>
  300. </el-tabs>
  301. </div>
  302. </center>
  303. </el-tabs>
  304. </el-card>
  305. <el-dialog title="" width="400px" :visible.sync="dialogVisible">
  306. <el-form>
  307. <el-form-item label="新老生">
  308. <el-select size="medium" v-model="isNewStd" filterable clearable placeholder="请选择新老考生" @change="isNewStdChange" >
  309. <el-option label="新生" value="1"></el-option>
  310. <el-option label="老生" value="0"></el-option>
  311. </el-select>
  312. </el-form-item>
  313. <el-form-item label="老准考证号" v-if="isNewStd==0">
  314. <el-input type="input" v-model="stdRegInfo.ticket_no_old"></el-input> &nbsp;
  315. </el-form-item>
  316. <center v-if="isNewStd==0"><el-button @click="check()">验证</el-button></center>
  317. </el-form>
  318. </el-dialog>
  319. <el-dialog title="上传身份证正面" width="400px" :visible.sync="identifyOrc.ocrDialogVisible">
  320. <el-form>
  321. <el-form-item label="" style="margin-bottom: 0px;padding-bottom: 0px;">
  322. <input type="file" id="file" @change="uploadImg($event)" accept="image/jpg" style="width:100%;height: 100%;margin-bottom: 0px;padding-bottom: 0px;"></input> &nbsp;
  323. </el-form-item>
  324. <el-form-item label="">
  325. <div class="el-form-item">
  326. <div class="el-form-item__content">
  327. <div class="el-input el-input-group el-input-group--prepend">
  328. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  329. <i class="fa fa-hand-o-right fa-fw"></i>
  330. </div>
  331. <input v-model="identifyOrc.validateCode" maxlength="4" type="text" style="width:240px;" autocomplete="off" placeholder="校验码" class="el-input__inner">
  332. <img :src="validateCodesrc" @click="loadValidateCode" style="cursor:pointer; position: absolute;top: 0px;right: 0px;;height: 96%;width: 87px;">
  333. </div>
  334. </div>
  335. </div>
  336. </el-form-item>
  337. <center
  338. ><el-button type="primary" @click="uploadIndentify()">提交</el-button>
  339. </center>
  340. </el-form>
  341. </el-dialog>
  342. </div>
  343. </body>
  344. <!-- import Vue before Element -->
  345. <!-- <script src="https://unpkg.com/vue/dist/vue.js"></script> -->
  346. <script src="https://lib.baomitu.com/vue/2.5.17/vue.min.js"></script>
  347. <!-- import JavaScript -->
  348. <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
  349. <script src="https://lib.baomitu.com/element-ui/2.4.11/index.js"></script>
  350. <script src="https://lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
  351. <script src="./vendor/jqueryPlugPop/plug-in.min.js"></script>
  352. <script src="./js/tool.js"></script>
  353. <script>
  354. new Vue({
  355. el: '#app',
  356. data: function () {
  357. var validateSpecChar = function(rule, value, callback) {
  358. if(value && value.length>15){
  359. callback(new Error('请输入正确中文姓名且长度在15个字范围内!'));
  360. }
  361. //var regEn = /^[\u4e00-\u9fa5·\u36c3\u4DAE]{0,15}$/;
  362. var regEn =/^((?![\u3000-\u303F])[\u2E80-\uFE4F]|\·)*(?![\u3000-\u303F])[\u2E80-\uFE4F](\·)*$/;
  363. if (!regEn.test(value)) {
  364. callback(new Error('请输入正确中文姓名且长度在15个字范围内!'));
  365. } else {
  366. callback();
  367. }
  368. };
  369. var validateConfirmPass = function(rule, value, callback) {
  370. var this_ = window['Vue'];
  371. var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
  372. // var regex = /^[A-Za-z0-9]{8,20}$/;
  373. // var regex = new RegExp("^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,}$");
  374. if (value === '') {
  375. callback(new Error('请再次输入密码'));
  376. } else if (value !== this_.stdRegInfo.std_pass1) {
  377. callback(new Error('两次输入密码不一致!'));
  378. } else if (!regex.test(this_.stdRegInfo.std_pass1)) {
  379. callback(new Error('密码必须包含字母、数字、特殊字符至少8个字符!'));
  380. // callback();
  381. } else {
  382. //密码复杂度检查
  383. callback();
  384. }
  385. };
  386. var validateConfirmPass1 = function(rule, value, callback) {
  387. var this_ = window['Vue'];
  388. var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
  389. // var regex = /^[A-Za-z0-9]{8,20}$/;
  390. // var regex = new RegExp("^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,}$");
  391. if (value === '') {
  392. callback(new Error('请再次输入密码'));
  393. } else if (this_.stdRegInfo.std_pass2 && value !== this_.stdRegInfo.std_pass2) {
  394. callback(new Error('两次输入密码不一致!'));
  395. } else if (!regex.test(this_.stdRegInfo.std_pass1)) {
  396. callback(new Error('密码中必须包含字母、数字、特殊字符至少8个字符!'));
  397. // callback();
  398. } else {
  399. //密码复杂度检查
  400. callback();
  401. }
  402. };
  403. var checkPhone = function(rule, value, callback) {
  404. if (!value) {
  405. callback(new Error('请输入联系电话'));
  406. } else {
  407. var reg = /^1[0|1|2|3|4|5|6|7|8|9][0-9]\d{8}$/
  408. console.log(reg.test(value));
  409. if (reg.test(value)) {
  410. callback();
  411. } else {
  412. callback(new Error('请输入正确的手机号'));
  413. }
  414. }
  415. };
  416. var checkNPostNumber = function(rule, value, callback) {
  417. if (value) {
  418. var reg = /^\d{6}$/;
  419. if (!reg.test(value)) {
  420. callback(new Error('请输入正确的6位邮政编码'));
  421. } else {
  422. callback();
  423. }
  424. } else {
  425. callback();
  426. }
  427. };
  428. var validateCertNo = function(rule, value, callback) {
  429. if ((new RegExp(/^[a-zA-Z0-9]+$/g).test(value))) {
  430. callback();
  431. } else {
  432. callback(new Error('证件号只允许填数字和英文'));
  433. }
  434. }
  435. return {
  436. randomnum:null,
  437. validateCodesrc:null,
  438. validateCode_check:"",
  439. loading: false,
  440. loaded: false,
  441. dialogVisible:false,
  442. ticket_no_old:"",
  443. isNewStd:"1",
  444. checkOldStd: false,
  445. isSFZ:true,
  446. identifyOrc:{
  447. ocrDialogVisible:false,
  448. file:"",
  449. validateCode:"",
  450. orcSuccess:false,
  451. },
  452. stdRegInfo: {
  453. std_name: "",
  454. std_pass1: "",
  455. std_pass2: "",
  456. cert_no: "",
  457. std_sex: "",
  458. std_eng_name: "",
  459. political_status: "",
  460. std_nation: "",
  461. std_family_reg: "",
  462. school_id: "",
  463. std_edu: "",
  464. std_occupation: "",
  465. std_healthy: "",
  466. std_birth: "",
  467. major_id: "",
  468. major_code: "",
  469. major_name: "",
  470. std_mobile: "",
  471. std_postcode: "",
  472. std_address: "",
  473. email: "",
  474. remark: "",
  475. },
  476. stdRegInfoRule: {
  477. std_name: [
  478. { required: true, message: '请输入姓名', trigger: 'blur' },
  479. { validator: validateSpecChar, trigger: ['blur', 'change'] },
  480. ],
  481. std_pass1: [
  482. { required: true, message: '请输入密码', trigger: 'blur' },
  483. { validator: validateConfirmPass1, trigger: 'blur' },
  484. ],
  485. std_pass2: [
  486. { required: true, message: '请输入确认密码', trigger: 'blur' },
  487. { validator: validateConfirmPass, trigger: 'blur' },
  488. ],
  489. cert_no: [
  490. { required: true, message: '请输入证件号码', trigger: 'blur' },
  491. { validator: validateCertNo, trigger: ['blur', 'change'] },
  492. ],
  493. std_sex: [
  494. { required: true, message: '请输入性别', trigger: 'blur' },
  495. ],
  496. // std_birth: [
  497. // { required: true, message: '请输入出生日期', trigger: 'blur' },
  498. // ]
  499. },
  500. sexArray: [],
  501. }
  502. },
  503. mounted: function() {
  504. window['Vue'] = this;
  505. var _this = this;
  506. this.loading = true;
  507. // ajaxRequest("",'/std/stdRegInfo/init.htm',{},function(resp){
  508. // if(resp.success){
  509. // let map = resp.map;
  510. // _this.majorArray = map.dict['majorArray'];
  511. // _this.nationArray = map.dict['nationArray'];
  512. // _this.occupationArray = map.dict['occupationArray'];
  513. // _this.familyRegArray = map.dict['familyRegArray'];
  514. // _this.politicalStatusArray = map.dict['politicalStatusArray'];
  515. // _this.sexArray = map.dict['sexArray'];
  516. // _this.healthyArray = map.dict['healthyArray'];
  517. // _this.eduArray = map.dict['eduArray'];
  518. // _this.orgArray = map.dict['orgArray'];
  519. // }
  520. // _this.loading = false;
  521. // })
  522. this.sexArray = [{ dict_name: "StdSexType", dict_value: "1", dict_text: "男", dict_order: 1 },{ dict_name: "StdSexType", dict_value: "2", dict_text: "女", dict_order: 2 }];
  523. this.loading = false;
  524. // this.dialogVisible = true;
  525. },
  526. created: function() {
  527. var this_ = this;
  528. setTimeout( function(){
  529. // this_.loaded = true;
  530. document.getElementById("app").style.display="block";
  531. }, 500);
  532. },
  533. methods: {
  534. uploadIndentify:function(){
  535. if(!this.identifyOrc.file){
  536. $.Pop("请选择身份证照片!", 'alert', function () {});
  537. return;
  538. }
  539. if(!this.identifyOrc.validateCode){
  540. $.Pop("请填写校验码!", 'alert', function () {});
  541. return;
  542. }
  543. var this_ = this;
  544. ajaxRequest("", '/std/identifyOrc.htm', { file: this.identifyOrc.file,validateCode:this.identifyOrc.validateCode }, function (resp) {
  545. if(resp.success){
  546. // $.Pop("识别成功,如果信息有误请重新提交!", 'alert', function () {});
  547. this_.stdRegInfo.cert_no = resp.map.cert_no;
  548. this_.stdRegInfo.std_sex = resp.map.std_sex;
  549. // this_.stdRegInfo.std_nation = resp.map.std_nation;
  550. if( this_.stdRegInfo.cert_no && this_.stdRegInfo.cert_no.length == 18){
  551. //生日
  552. this_.stdRegInfo.std_birth = this_.stdRegInfo.cert_no.substring(6,14);
  553. //性别
  554. this_.stdRegInfo.std_sex = (parseInt(this_.stdRegInfo.cert_no.substring(16,17)) % 2) == 1?"1":"2";
  555. this_.stdRegInfo.cert_no = this_.stdRegInfo.cert_no.toUpperCase();
  556. }
  557. this_.stdRegInfo.std_name = resp.map.std_name;
  558. this_.stdRegInfo.std_address = resp.map.std_address;
  559. this_.identifyOrc.orcSuccess=true;
  560. this_.identifyOrc.ocrDialogVisible=false;
  561. }else{
  562. $.Pop(resp.errorMsg, 'alert', function () {});
  563. this_.loadValidateCode();
  564. }
  565. })
  566. },
  567. uploadImg:function(e) {
  568. let _this = this;
  569. //上传图片
  570. let file = e.target.files[0];
  571. _this.fileName = file.name;
  572. if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
  573. this.alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种", "信息提示");
  574. return false;
  575. }
  576. let reader = new FileReader();
  577. reader.onload = function(e) {
  578. _this.identifyOrc.file = e.target.result;
  579. };
  580. // 转化为base64
  581. reader.readAsDataURL(file)
  582. },
  583. loadValidateCode:function() {
  584. this.randomnum = Date.parse(new Date());
  585. this.validateCodesrc= basePath + "/std/validateCode.htm?"+this.randomnum;
  586. },
  587. cardOcr:function(){
  588. this.identifyOrc.ocrDialogVisible=true;
  589. this.loadValidateCode();
  590. },
  591. initParam: function(){
  592. this.ticket_no_old = "";
  593. this.stdRegInfo.std_name = ""
  594. this.stdRegInfo.old_ticket_no1 = "";
  595. this.stdRegInfo.old_ticket_no2 = "";
  596. this.checkOldStd = false;
  597. },
  598. switchNewOld: function(){
  599. this.stdRegInfo.old_ticket_no1 = "";
  600. this.stdRegInfo.old_ticket_no2 = "";
  601. },
  602. check: function(){
  603. if(!this.ticket_no_old){
  604. $.Pop("请填写老转考证号!", 'alert', function () {});
  605. return;
  606. }
  607. var this_ = this;
  608. ajaxRequest("", '/std/checkOldTicketNo.htm', { ticket_no_old: this.ticket_no_old }, function (resp) {
  609. if(resp.success){
  610. if(!resp.entity) {
  611. $.Pop("无该准考证号相关信息,请求重新填写!", 'alert', function () {});
  612. return;
  613. }
  614. this_.stdRegInfo.std_name = resp.entity.xingming.trim();
  615. this_.stdRegInfo.old_ticket_no1 = resp.entity.kaohao?resp.entity.kaohao.trim():"";
  616. this_.stdRegInfo.old_ticket_no2 = resp.entity.jiukaohao?resp.entity.jiukaohao.trim():"";
  617. this_.checkOldStd = true;
  618. }else{
  619. this_.checkOldStd = false;
  620. $.Pop(resp.errorMsg, 'alert', function () {});
  621. }
  622. })
  623. },
  624. cert_no_blur: function(){
  625. if(this.isSFZ == true){
  626. this.isSFZChange(true);
  627. }
  628. },
  629. isNewStdChange: function(val){
  630. },
  631. //身份证规则验证
  632. isSFZChange: function(val){
  633. if(val == true){
  634. if( this.stdRegInfo.cert_no && this.stdRegInfo.cert_no.length == 18){
  635. //生日
  636. this.stdRegInfo.std_birth = this.stdRegInfo.cert_no.substring(6,14);
  637. //性别
  638. this.stdRegInfo.std_sex = (parseInt(this.stdRegInfo.cert_no.substring(16,17)) % 2) == 1?"1":"2";
  639. this.stdRegInfo.cert_no = this.stdRegInfo.cert_no.toUpperCase();
  640. }
  641. }
  642. },
  643. majorChange: function(major_id, o1, o2) {
  644. if (!major_id) return;
  645. for (var i = 0; i < this.majorArray.length; i++) {
  646. var item = this.majorArray[i];
  647. if (item.id == major_id) {
  648. this.stdRegInfo.major_name = item.major_name
  649. this.stdRegInfo.major_code = item.major_code
  650. }
  651. }
  652. },
  653. schoolIdChange: function(schoolId, o1, o2) {
  654. this.assistOrgArray = [];
  655. //非社会考生查询助学班
  656. if (!schoolId && (schoolId + "") != "99999999") return;
  657. var _this = this;
  658. ajaxRequest("", '/std/assistListAll.htm', { pid: schoolId }, function (resp) {
  659. _this.assistOrgArray = resp.array;
  660. })
  661. },
  662. validateForm: function() {
  663. this.$refs['stdRegInfo'].validate(function(valid) {
  664. if (valid) {
  665. return true;
  666. } else {
  667. console.log('error submit!!');
  668. return false;
  669. }
  670. });
  671. },
  672. goLogin: function() {
  673. window.location.href = "./login.html";
  674. },
  675. onSubmit: function(type) {
  676. if(this.isSFZ == true && this.stdRegInfo.cert_no.length !=18){
  677. if(this.stdRegInfo.cert_no.length == 0){
  678. $.Pop("请填写证件号码!", 'alert', function () {});
  679. }else{
  680. $.Pop("身份证号只能填写18位!", 'alert', function () {});
  681. }
  682. return;
  683. }
  684. this.$refs['stdRegInfo'].validate(function(valid) {
  685. var this_ = window['Vue'];
  686. if (valid) {
  687. //clone对象
  688. var stdRegInfo = JSON.parse(JSON.stringify(this_.stdRegInfo));
  689. //MD5密码加密
  690. stdRegInfo['std_pass'] = hex_md5(stdRegInfo['std_pass1']);
  691. if(this_.isSFZ == true){
  692. stdRegInfo['cert_type'] = 1;
  693. }else{
  694. stdRegInfo['cert_type'] = 0;
  695. }
  696. //删除过程数据
  697. delete stdRegInfo['std_pass1'];
  698. delete stdRegInfo['std_pass2'];
  699. if(type == 'new'){
  700. delete stdRegInfo['old_ticket_no1'];
  701. delete stdRegInfo['old_ticket_no2'];
  702. }
  703. // 图像识别出的身份证,证件类型是身份证不允许修改
  704. if(type == 'new' && this_.identifyOrc && this_.identifyOrc.orcSuccess && this_.identifyOrc.orcSuccess==true){
  705. stdRegInfo['cert_type'] = 1;
  706. }
  707. $('#sbt').hide();
  708. ajaxRequest("", '/std/stdRegInfo/reg.htm', stdRegInfo, function (resp) {
  709. if (resp.success) {
  710. $('#sbt').show();
  711. //提示注册成功 跳转登录页面
  712. $.Pop('注册保存成功,即将跳转登录页面', 'alert', function () {
  713. setTimeout(function() {
  714. window.location.href = "./login.html";
  715. }, 300);
  716. })
  717. } else {
  718. $('#sbt').show();
  719. $.Pop(resp.errorMsg, 'alert', function () {
  720. });
  721. }
  722. })
  723. } else {
  724. console.log('error submit!!');
  725. }
  726. });
  727. }
  728. }
  729. });
  730. </script>
  731. <style scoped>
  732. .footer {
  733. height: 30px;
  734. }
  735. .abs-bottom {
  736. width: 100%;
  737. position: absolute;
  738. bottom: 0;
  739. left: 0;
  740. right: 0;
  741. margin-bottom: 5px
  742. }
  743. #particles-js {
  744. position: absolute;
  745. top: 0;
  746. left: 0;
  747. right: 0;
  748. bottom: 0;
  749. }
  750. .particles-js-canvas-el {
  751. background-color: aliceblue
  752. }
  753. .btn-long {
  754. width: 100%;
  755. }
  756. .el-select {
  757. width: 100%;
  758. }
  759. .el-card__header {
  760. padding: 8px 8px !important;
  761. }
  762. body {
  763. background-color: #F3F3F3;
  764. }
  765. .el-checkbox__inner{
  766. vertical-align: text-top !important;
  767. }
  768. .el-checkbox__input{
  769. margin-bottom: 6px !important;
  770. }
  771. .el-alert--warning {
  772. background-color: #fdf6ec !important;
  773. color: #e6a23c;
  774. }
  775. .el-alert {
  776. margin: 20px 0 0;
  777. }
  778. .el-alert {
  779. width: 100%;
  780. padding: 8px 16px;
  781. margin: 0;
  782. box-sizing: border-box;
  783. border-radius: 4px;
  784. position: relative;
  785. background-color: #fff;
  786. overflow: hidden;
  787. opacity: 1;
  788. display: flex;
  789. align-items: center;
  790. transition: opacity .2s;
  791. }
  792. .el-tabs__nav{
  793. width: 100% !important
  794. }
  795. .el-tabs__item{
  796. width: 50% !important
  797. }
  798. .el-input__icon{
  799. height:14px !important
  800. }
  801. .el-icon-arrow-up{
  802. background: url(../image/icon/up.png) !important;
  803. background-repeat: no-repeat !important;
  804. margin-right: 2px !important;
  805. background-position: center !important;
  806. margin-top: 14px !important;
  807. }
  808. </style>
  809. </html>