index.vue 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036
  1. <template>
  2. <d2-container class="page" id="by_paperApply" style="margin-top:0px;padding-top:0px;">
  3. <el-tabs value="first">
  4. <el-tab-pane label="毕业论文答辩申请" name="first">
  5. <div style="margin-bottom: 8px; border-left: 3px solid; color: rgb(230, 162, 60);">
  6. <div role="alert" class="el-alert" style="height: 85px !important;background-color:#fdf6ec;" v-if="timeLimit">
  7. <div class="el-alert__content">
  8. <span class="el-alert__title">毕业论文答辩在线申请时间:<font style="color:red;">{{timeLimit.paper_start_time}} 到 {{timeLimit.paper_end_time}}</font></span>
  9. <br>
  10. <div class="el-alert__title" v-if="ByPaperApplyControl" v-html="ByPaperApplyControl"></div>
  11. </div>
  12. </div>
  13. </div>
  14. <!-- <div v-if="canApply"> -->
  15. <div v-if="canApply">
  16. <el-button type="primary" @click="goApply()">申请毕业论文答辩</el-button>
  17. </div>
  18. <el-table
  19. v-loading="loading"
  20. :data="applyList"
  21. style="width: 100%">
  22. <el-table-column
  23. prop="ticket_no"
  24. label="准考证"
  25. width="120">
  26. </el-table-column>
  27. <el-table-column
  28. prop="major_name"
  29. label="专业名称"
  30. width="220">
  31. </el-table-column>
  32. <el-table-column
  33. prop="major_level"
  34. label="专业层次"
  35. width="80"
  36. >
  37. </el-table-column>
  38. <el-table-column
  39. prop="school_name"
  40. label="主考院校"
  41. width="220"
  42. >
  43. </el-table-column>
  44. <el-table-column
  45. prop="status_text"
  46. label="状态"
  47. width="200">
  48. </el-table-column>
  49. <el-table-column
  50. label="操作"
  51. fixed="right"
  52. width="140">
  53. <template slot-scope="scope">
  54. <el-button @click="showAuditInfo(scope.row)">查看审批意见</el-button>
  55. <!-- 驳回 -->
  56. <div v-if="scope.row.is_auth_back == 1">
  57. <el-button @click="goEdit(scope.row)">修改申请信息</el-button>
  58. </div>
  59. </template>
  60. </el-table-column>
  61. </el-table>
  62. <el-dialog title="审批信息列表" width="800px" :visible.sync="auditDialogVisible">
  63. <el-table
  64. v-loading="loading"
  65. :data="auditInfoArray"
  66. style="width: 800px">
  67. <el-table-column
  68. type="index"
  69. label="序号"
  70. width="60">
  71. </el-table-column>
  72. <el-table-column
  73. prop="auth_remark"
  74. label="审批内容"
  75. width="350">
  76. </el-table-column>
  77. <el-table-column
  78. prop="auth_type_text"
  79. label="审批环节"
  80. width="160">
  81. </el-table-column>
  82. <el-table-column
  83. prop="auth_time"
  84. label="审批时间"
  85. width="160"
  86. >
  87. </el-table-column>
  88. </el-table>
  89. </el-dialog>
  90. <el-dialog title="毕业论文答辩申请" width="800px" :visible.sync="applyDialogVisible">
  91. <div v-show="curStep == 1 && stdRegInfo">
  92. <table style="font-size: 14px;width:100%">
  93. <tr>
  94. <td align='right'>我是:</td>
  95. <td>
  96. <el-select size="medium" v-model="stdRegInfo.std_source" filterable placeholder="请选择考生来源" @change="std_sourceChange">
  97. <el-option label="社会考生" value="1"></el-option>
  98. <el-option label="助学考生" value="3"></el-option>
  99. </el-select>
  100. </td>
  101. </tr>
  102. <tr style="height: 40px;">
  103. <td align='right'>原报考专业:</td>
  104. <td>{{old_std_major}}</td>
  105. </tr>
  106. <tr style="height: 40px;" v-if="newMajorInfo">
  107. <td align='right'>对应新专业:</td>
  108. <td>{{newMajorInfo}}</td>
  109. </tr>
  110. <tr>
  111. <td align='right'>选择毕业专业层次:</td>
  112. <td>
  113. <el-select size="medium" v-model="stdRegInfo.major_level" filterable clearable placeholder="请选择专业层次" @change="majorLevelChange" title="只有本科需要申请毕业论文答辩">
  114. <el-option v-for="(item,index) in majorLevelArray" v-if="item.dict_value == '1'" :key="index" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
  115. </el-select>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td align='right'>选择毕业专业:</td>
  120. <td>
  121. <el-select size="medium" v-model="selected_major_id" filterable clearable placeholder="请选择专业" @change="majorChange">
  122. <el-option v-for="item in byMajorArray" :key="item.id" :label="item.major_full_name" :value="item.id"></el-option>
  123. </el-select>
  124. </td>
  125. </tr>
  126. <tr style="height: 40px;">
  127. <td align='right'>对应旧专业:</td>
  128. <td>
  129. <table style="width:200px;font-size: 13px;">
  130. <!-- <tr> -->
  131. <!-- <td>序号</td> -->
  132. <!-- <td>专业代码</td> -->
  133. <!-- <td>专业名称</td> -->
  134. <!-- </tr> -->
  135. <tr v-for="(item, index) in oldMajorArray" :key="index">
  136. <!-- <td>{{index+1}}</td> -->
  137. <td>{{item.major_code}} - {{item.major_name}}</td>
  138. </tr>
  139. </table>
  140. </td>
  141. </tr>
  142. <tr style="height: 40px;">
  143. <td align='right'>主考院校:</td>
  144. <td>
  145. <span v-if="stdRegInfo.std_source == '1'" style="font-size: 14px;color: #606266;">{{school_name}}</span>
  146. <el-select size="medium" v-if="stdRegInfo.std_source == '3'" clearable v-model="stdRegInfo.school_id" @change="schoolChange" filterable placeholder="请选择主考院校">
  147. <el-option v-for="(item,index) in orgArray_std_source_3" :label="item.org_code+' | '+item.org_name" :value="item.id" :key="index"></el-option>
  148. </el-select>
  149. </td>
  150. </tr>
  151. </table>
  152. <br>
  153. <center>
  154. <el-button type="primary" @click="applyInfoConfirm = true;goApply()">确定</el-button>
  155. </center>
  156. </div>
  157. <div v-show="curStep == 2">
  158. <el-row>
  159. <el-col :span="18">
  160. <table class="el-table" style="width:760px;margin-left:10px;">
  161. <tr class="el-table__row">
  162. <td colspan="6" style="text-overflow: ellipsis;">毕业论文答辩申请列表> 新增毕业论文答辩信息</td>
  163. </tr>
  164. <tr class="el-table__row">
  165. <td>姓名</td>
  166. <td>{{stdRegInfo.std_name}}</td>
  167. <td>身份证号</td>
  168. <td>{{stdRegInfo.cert_no}}</td>
  169. <td rowspan="5">
  170. <center>
  171. <!-- 无毕业申请图片显示 考生图片-->
  172. <img v-if="stdRegInfo.photo_url && !by_photo_url_p && (!selected_apply || !selected_apply.by_photo)" style="width:140px;height:170px;border:1px;border-color:black;" :src="photo_url">
  173. <!-- 有毕业申请图片显示毕业图片-->
  174. <!--
  175. <img v-if="(selected_apply && selected_apply.by_photo) || by_photo_url_p" style="width:140px;height:170px;border:1px;border-color:black;" :src="by_photo_url"><br>
  176. <el-button type="primary" @click="toUploadByImg()" title="考生照片不符合毕业要求时,请上传毕业照片。">上传照片</el-button>
  177. -->
  178. </center>
  179. </td>
  180. </tr>
  181. <tr class="el-table__row">
  182. <td>民族</td>
  183. <td>{{stdRegInfo.std_nation_text}}</td>
  184. <td>政治面貌</td>
  185. <td>{{stdRegInfo.political_status_text}}</td>
  186. </tr>
  187. <tr class="el-table__row">
  188. <td>户籍类型</td>
  189. <td>{{stdRegInfo.std_family_reg_text}}</td>
  190. <td>学历</td>
  191. <td>
  192. {{stdRegInfo.std_edu_text}}
  193. </td>
  194. </tr>
  195. <tr class="el-table__row">
  196. <td>职业</td>
  197. <td>{{stdRegInfo.std_occupation_text}}</td>
  198. <td>联系电话</td>
  199. <td>{{stdRegInfo.std_mobile}}</td>
  200. </tr>
  201. <tr class="el-table__row">
  202. <td>邮政编码</td>
  203. <td>{{stdRegInfo.std_postcode}}</td>
  204. <td>电子邮箱</td>
  205. <td>{{stdRegInfo.std_email}}</td>
  206. </tr>
  207. </table>
  208. <br>
  209. <table style="font-size: 14px;width:100%">
  210. <tr>
  211. <td align='right' style="width: 80px;">专业层次:</td>
  212. <td>
  213. <el-select size="medium" v-model="stdRegInfo.major_level" disabled="disabled" filterable clearable placeholder="请选择专业层次" @change="majorLevelChange" >
  214. <el-option v-for="(item,index) in majorLevelArray" :key="index" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
  215. </el-select>
  216. </td>
  217. </tr>
  218. <tr>
  219. <td align='right'>毕业专业:</td>
  220. <td>
  221. <el-select size="medium" v-model="selected_major_id" disabled="disabled" filterable clearable placeholder="请选择专业" @change="majorChange">
  222. <el-option v-for="item in byMajorArray" :key="item.id" :label="item.major_code+' | '+item.major_name" :value="item.id"></el-option>
  223. </el-select>
  224. </td>
  225. </tr>
  226. <tr style="height: 40px;">
  227. <td align='right'>主考院校:</td>
  228. <td>
  229. <span v-if="stdRegInfo.std_source == '1'" style="font-size: 14px;color: #606266;">{{school_name}}</span>
  230. <el-select size="medium" v-if="stdRegInfo.std_source == '3'" disabled="disabled" clearable v-model="stdRegInfo.school_id" filterable placeholder="请选择主考院校">
  231. <el-option v-for="(item,index) in orgArray_std_source_3" :label="item.org_code+' | '+item.org_name" :value="item.id" :key="index"></el-option>
  232. </el-select>
  233. </td>
  234. </tr>
  235. </table>
  236. </el-col>
  237. <el-col :span="6">
  238. </el-col>
  239. </el-row>
  240. <el-row>
  241. <el-col :span="24">
  242. <table style="width:100%">
  243. <tr>
  244. <td colspan="4" align="center">
  245. <h4>考生填写栏 </h4>
  246. </td>
  247. </tr>
  248. <tr>
  249. <!-- <td>
  250. 考生填写栏
  251. </td> -->
  252. <td>
  253. <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="80px" size="mini">
  254. <el-row>
  255. <el-col :span="12" style="height:37px;">
  256. <el-form-item label="姓名" prop="std_name" label-width="140px">
  257. <el-input size="mini" disabled clearable v-model="stdRegInfo.std_name" style="width:180px;"></el-input>
  258. <!-- {{stdRegInfo.std_name}} -->
  259. </el-form-item>
  260. </el-col>
  261. <el-col :span="12" style="height:37px;">
  262. <el-form-item label="性别" prop="std_sex" label-width="140px">
  263. <el-select v-model="stdRegInfo.std_sex" filterable placeholder="请选择性别" style="width:180px;">
  264. <el-option v-for="(item,index) in sexArray" :key="'sexArray_'+index" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
  265. </el-select>
  266. </el-form-item>
  267. </el-col>
  268. </el-row>
  269. <el-row>
  270. <el-col :span="12" style="height:37px;">
  271. <el-form-item label="出生年月" required prop="std_birth" label-width="140px">
  272. <el-date-picker size="mini" value-format="yyyy-MM-dd" type="date" v-model="stdRegInfo.std_birth" placeholder="选择出生年月" style="width:180px;"></el-date-picker>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="12" style="height:37px;">
  276. <el-form-item label="民族" prop="std_nation" label-width="140px">
  277. <el-select size="mini" clearable v-model="stdRegInfo.std_nation" filterable placeholder="请选择民族" style="width:180px;">
  278. <el-option v-for="(item,index) in nationArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value" :key="index"></el-option>
  279. </el-select>
  280. </el-form-item>
  281. </el-col>
  282. </el-row>
  283. <el-row>
  284. <el-col :span="12" style="height:37px;">
  285. <el-form-item label="联系电话" prop="std_mobile" label-width="140px">
  286. <el-input size="mini" clearable v-model="stdRegInfo.std_mobile" maxlength="11" style="width:180px;"></el-input>
  287. </el-form-item>
  288. </el-col>
  289. <el-col :span="12" style="height:37px;">
  290. <el-form-item label="邮政编码" prop="std_postcode" label-width="140px">
  291. <el-input size="mini" clearable v-model="stdRegInfo.std_postcode" maxlength="6" style="width:180px;"></el-input>
  292. </el-form-item>
  293. </el-col>
  294. </el-row>
  295. <el-row>
  296. <el-col :span="12" style="height:37px;">
  297. <el-form-item label=" QQ号码" prop="qq" label-width="140px">
  298. <el-input size="mini" clearable v-model="stdRegInfo.qq" maxlength="16" style="width:180px;"></el-input>
  299. </el-form-item>
  300. </el-col>
  301. <el-col :span="12" style="height:37px;">
  302. </el-col>
  303. </el-row>
  304. <!--
  305. <el-row>
  306. <el-col :span="24" style="height:37px;">
  307. <el-form-item label="专(本)科何专业及发证单位" prop="pre_edu" label-width="210px">
  308. <el-input size="mini" clearable v-model="stdRegInfo.pre_edu" maxlength="30" style="width:290px;"></el-input>
  309. </el-form-item>
  310. </el-col>
  311. </el-row>
  312. -->
  313. <el-row>
  314. <el-col :span="24" style="height:37px;">
  315. <el-form-item label="工作单位" label-width="140px">
  316. <el-input size="mini" clearable v-model="stdRegInfo.std_work_unit" style="width:360px;" title="如有工作单位,请填写工作单位。" maxlength="30"></el-input>
  317. </el-form-item>
  318. </el-col>
  319. </el-row>
  320. <el-row>
  321. <el-col :span="24" style="height:37px;">
  322. <el-form-item label="通讯地址" prop="std_address" label-width="140px">
  323. <el-input size="mini" clearable v-model="stdRegInfo.std_address" style="width:360px;" maxlength="75"></el-input>
  324. </el-form-item>
  325. </el-col>
  326. </el-row>
  327. <el-row>
  328. <el-col :span="24" style="height:37px;">
  329. <el-form-item label="申报论题" prop="paper_title" label-width="140px">
  330. <el-input size="mini" clearable v-model="stdRegInfo.paper_title" maxlength="50" style="width:360px;"></el-input>
  331. </el-form-item>
  332. </el-col>
  333. </el-row>
  334. <el-row>
  335. <el-col :span="24" style="height:37px;">
  336. <el-form-item label="备注" prop="remark" label-width="140px">
  337. <el-input size="mini" clearable v-model="stdRegInfo.remark" maxlength="75" style="width:360px;"></el-input>
  338. </el-form-item>
  339. </el-col>
  340. </el-row>
  341. </el-form>
  342. </td>
  343. </tr>
  344. </table>
  345. </el-col>
  346. </el-row>
  347. <center>
  348. <br>
  349. <el-button type="primary" @click="submit()">提交申请</el-button>
  350. <el-button type="primary" @click="colseWin()">关闭</el-button>
  351. </center>
  352. </div>
  353. <div v-show="curStep == 3">
  354. <!-- v-if="this.isAllowGraduate" -->
  355. <div>
  356. <center>
  357. <div v-if="msgArray.length >0" style="font-size: 16px;margin-buttom:5px;color:red">
  358. <div v-for="(msg,index) in msgArray" :key="index">
  359. <table style="margin-left:20px">
  360. <tr>
  361. <td>{{index+1}}.</td>
  362. <td>{{msg}}</td>
  363. </tr>
  364. </table>
  365. </div>
  366. <br>
  367. </div>
  368. <div>
  369. <!-- {{checkMsg}}请完善【考生填写栏】信息 -->
  370. <span style="font-size: 35px;color: black;margin-buttom:5px">毕&nbsp;&nbsp;业&nbsp;&nbsp;生&nbsp;&nbsp;登&nbsp;&nbsp;记&nbsp;&nbsp;表 </span>
  371. <br>
  372. <table width="100%">
  373. <tr>
  374. <td colspan="4" align="center">
  375. <font style="font-size:20px" v-if="selected_major">
  376. (大学<u>{{selected_major.major_level==0?'专':'本'}}</u>科)
  377. </font>
  378. </td>
  379. </tr>
  380. <tr>
  381. <!-- <td style="width:20px">
  382. 考生基础信息
  383. </td> -->
  384. <td>
  385. <table width="100%" height="100%">
  386. <tr>
  387. <td colspan="4" align="center">
  388. <h4>考生基础信息</h4>
  389. </td>
  390. </tr>
  391. <tr v-if="countryCityMap">
  392. <td align="right">市&nbsp;地:</td>
  393. <td align="left">
  394. <!-- {{countryCityMap.city_name}} -->
  395. </td>
  396. <td align="right">县&nbsp;(市):</td>
  397. <td align="left">
  398. <!-- {{countryCityMap.country_name}} -->
  399. </td>
  400. </tr>
  401. <tr>
  402. <td align="right">主考院校:</td>
  403. <td align="left">
  404. {{school_name}}
  405. </td>
  406. <td align="right">专业:</td>
  407. <td align="left" v-if="selected_major">
  408. {{selected_major.major_code}} - {{selected_major.major_name}}
  409. </td>
  410. </tr>
  411. <tr>
  412. <td align="right">毕业证号:</td>
  413. <td align="left">
  414. {{diaplmaNo}}
  415. </td>
  416. <td align="right">身份证号:</td>
  417. <td align="left">
  418. {{stdRegInfo.cert_no}}
  419. </td>
  420. </tr>
  421. </table>
  422. </td>
  423. </tr>
  424. <tr>
  425. <td colspan="5">
  426. <el-table
  427. v-loading="loading"
  428. :data="courseScoreList"
  429. style="width: 760px">
  430. <el-table-column
  431. label="序号"
  432. type="index"
  433. width="50">
  434. </el-table-column>
  435. <el-table-column
  436. prop="course_code"
  437. label="课程代码"
  438. width="80">
  439. </el-table-column>
  440. <el-table-column
  441. prop="course_name"
  442. label="课程名称"
  443. width="200">
  444. </el-table-column>
  445. <!-- <el-table-column
  446. prop="score_source"
  447. label="成绩来源"
  448. width="80"
  449. >
  450. </el-table-column> -->
  451. <el-table-column
  452. prop="score_source"
  453. label="成绩来源"
  454. width="100"
  455. >
  456. <template slot-scope="scope">
  457. <span v-if="scope.row.final_score == 0">
  458. 实践课
  459. </span>
  460. <span v-else-if="scope.row.final_score == 3">
  461. 沟通课
  462. </span>
  463. <span v-else>
  464. <span v-if="scope.row.score_source == 0">
  465. <!-- 校考导入 -->
  466. 校考
  467. </span>
  468. <span v-if="scope.row.score_source == 1">
  469. <!-- 统考导入 -->
  470. 统考
  471. </span>
  472. <span v-if="scope.row.score_source == 2">
  473. 顶替
  474. </span>
  475. <span v-if="scope.row.score_source == 3">
  476. 被顶替
  477. </span>
  478. <span v-if="scope.row.score_source == 4">
  479. 手工增加
  480. </span>
  481. <span v-if="scope.row.score_source == 5">
  482. 免考
  483. </span>
  484. <span v-if="scope.row.score_source == 6">
  485. 外省转入
  486. </span>
  487. <span v-if="scope.row.score_source == 7">
  488. <!-- 网考合成 -->
  489. 合成成绩
  490. </span>
  491. <span v-if="scope.row.score_source == 8">
  492. <!-- 衔接合成 -->
  493. 合成成绩
  494. </span>
  495. <span v-if="scope.row.score_source == 9">
  496. <!-- 百分百合成 -->
  497. 合成成绩
  498. </span>
  499. <span v-if="scope.row.score_source == 10">
  500. <!-- 手工评卷 -->
  501. 统考
  502. </span>
  503. <span v-if="scope.row.score_source == 11">
  504. 毕业论文
  505. </span>
  506. <span v-if="scope.row.score_source == 12">
  507. 关联准考证
  508. </span>
  509. <span v-if="scope.row.score_source == 13">
  510. 手工转入
  511. </span>
  512. <span v-if="scope.row.score_source == 14">
  513. 违规
  514. </span>
  515. <span v-if="scope.row.score_source == 15">
  516. 作弊
  517. </span>
  518. </span>
  519. </template>
  520. </el-table-column>
  521. <!-- <el-table-column
  522. prop="origin_score"
  523. label="原始成绩"
  524. width="100"
  525. >
  526. </el-table-column> -->
  527. <el-table-column
  528. prop="final_score"
  529. label="最终成绩(合成后)"
  530. width="150">
  531. <template slot-scope="scope">
  532. <span v-if="scope.row.final_score == 998 || scope.row.final_score == 999 || scope.row.final_score == 200 ">
  533. 免考
  534. </span>
  535. <span v-else-if="scope.row.final_score == 887 || scope.row.final_score == 888">
  536. 课程顶替
  537. </span>
  538. <span v-else-if="scope.row.final_score == 201">
  539. 及格
  540. </span>
  541. <span v-else-if="scope.row.final_score == 202">
  542. 良好
  543. </span>
  544. <span v-else-if="scope.row.final_score == 203">
  545. 中等
  546. </span>
  547. <span v-else-if="scope.row.final_score == 204">
  548. 优秀
  549. </span>
  550. <span v-else-if="scope.row.final_score == -1">
  551. 舞弊
  552. </span>
  553. <span v-else-if="scope.row.final_score == -3">
  554. 违纪
  555. </span>
  556. <span v-else-if="scope.row.final_score == -9">
  557. 缺考
  558. </span>
  559. <span v-else-if="scope.row.final_score != 887 && scope.row.final_score != 888 && scope.row.final_score != 998 && scope.row.final_score != 999">
  560. {{scope.row.final_score}}
  561. </span>
  562. </template>
  563. </el-table-column>
  564. <el-table-column
  565. prop="is_pass"
  566. label="是否合格"
  567. width="100">
  568. </el-table-column>
  569. </el-table>
  570. </td>
  571. </tr>
  572. <tr>
  573. <td colspan="4" align="center">
  574. <h4>考生填写栏 </h4>
  575. </td>
  576. </tr>
  577. <tr>
  578. <!-- <td>
  579. 考生填写栏
  580. </td> -->
  581. <td>
  582. <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="80px" size="mini">
  583. <el-row>
  584. <el-col :span="12" style="height:37px;">
  585. <el-form-item label="姓名" prop="std_name" label-width="140px">
  586. <el-input size="mini" disabled clearable v-model="stdRegInfo.std_name" style="width:180px;"></el-input>
  587. <!-- {{stdRegInfo.std_name}} -->
  588. </el-form-item>
  589. </el-col>
  590. <el-col :span="12" style="height:37px;">
  591. <el-form-item label="性别" prop="std_sex" label-width="140px">
  592. <el-select v-model="stdRegInfo.std_sex" filterable placeholder="请选择性别" style="width:180px;">
  593. <el-option v-for="(item,index) in sexArray" :key="'sexArray_'+index" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value"></el-option>
  594. </el-select>
  595. </el-form-item>
  596. </el-col>
  597. </el-row>
  598. <el-row>
  599. <el-col :span="24">
  600. <font style="color:red;margin-left:10px;margin-bottom:0px;">
  601. 注意:以下省(市、自治区),市(县)请填写籍贯信息
  602. </font>
  603. </el-col>
  604. </el-row>
  605. <el-row>
  606. <el-col :span="12" style="height:37px;">
  607. <el-form-item label="出生年月" required prop="std_birth" label-width="140px">
  608. <el-date-picker size="mini" value-format="yyyy-MM-dd" type="date" v-model="stdRegInfo.std_birth" placeholder="选择出生年月" style="width:180px;"></el-date-picker>
  609. </el-form-item>
  610. </el-col>
  611. <el-col :span="12" style="height:37px;">
  612. <el-form-item label="考前学历" prop="std_edu" label-width="140px">
  613. <el-select size="mini" clearable v-model="stdRegInfo.std_edu" filterable placeholder="请选择学历" style="width:180px;">
  614. <el-option v-for="(item,index) in eduArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value" :key="index"></el-option>
  615. </el-select>
  616. </el-form-item>
  617. </el-col>
  618. </el-row>
  619. <el-row>
  620. <el-col :span="12" style="height:37px;">
  621. <el-form-item label="民族" prop="std_nation" label-width="140px">
  622. <el-select size="mini" clearable v-model="stdRegInfo.std_nation" filterable placeholder="请选择民族" style="width:180px;">
  623. <el-option v-for="(item,index) in nationArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value" :key="index"></el-option>
  624. </el-select>
  625. </el-form-item>
  626. </el-col>
  627. <el-col :span="12" style="height:37px;">
  628. <el-form-item label="政治面貌" prop="political_status" label-width="140px">
  629. <el-select size="mini" clearable v-model="stdRegInfo.political_status" filterable placeholder="请选择政治面貌" style="width:180px;">
  630. <el-option v-for="(item,index) in politicalStatusArray" :label="item.dict_value+' | '+item.dict_text" :value="item.dict_value" :key="index"></el-option>
  631. </el-select>
  632. </el-form-item>
  633. </el-col>
  634. </el-row>
  635. <el-row>
  636. <el-col :span="12" style="height:37px;">
  637. <el-form-item label="联系电话" prop="std_mobile" label-width="140px">
  638. <el-input size="mini" clearable v-model="stdRegInfo.std_mobile" maxlength="11" style="width:180px;"></el-input>
  639. </el-form-item>
  640. </el-col>
  641. <el-col :span="12" style="height:37px;">
  642. <el-form-item label="邮政编码" prop="std_postcode" label-width="140px">
  643. <el-input size="mini" clearable v-model="stdRegInfo.std_postcode" maxlength="6" style="width:180px;"></el-input>
  644. </el-form-item>
  645. </el-col>
  646. </el-row>
  647. <el-row>
  648. <el-col :span="24" style="height:37px;">
  649. <el-form-item label="工作单位" label-width="140px">
  650. <el-input size="mini" clearable v-model="stdRegInfo.std_work_unit" style="width:360px;" title="如有工作单位,请填写工作单位。"></el-input>
  651. </el-form-item>
  652. </el-col>
  653. </el-row>
  654. <el-row>
  655. <el-col :span="24" style="height:37px;">
  656. <el-form-item label="家庭地址" prop="std_address" label-width="140px">
  657. <el-input size="mini" clearable v-model="stdRegInfo.std_address" style="width:360px;"></el-input>
  658. </el-form-item>
  659. </el-col>
  660. <!-- <el-col :span="12">
  661. <el-form-item label="电子邮件" prop="std_email">
  662. <el-input size="mini" clearable v-model="stdRegInfo.std_email"></el-input>
  663. </el-form-item>
  664. </el-col> -->
  665. </el-row>
  666. <el-row>
  667. <el-col :span="24">
  668. <el-form-item label="学历证明">
  669. <div style="width:500px">
  670. <el-upload
  671. :http-request = "customUpload"
  672. action=""
  673. class="upload-demo"
  674. ref="upload"
  675. :on-preview="handlePreview"
  676. :on-remove="handleRemove"
  677. :before-upload="beforeUpload"
  678. :before-remove="beforeRemove"
  679. :limit="1"
  680. :on-exceed="handleExceed"
  681. :on-change="handleChange"
  682. :auto-upload="true"
  683. :file-list="fileList"
  684. >
  685. <el-button size="small" type="primary">点击上传</el-button>
  686. <div slot="tip" class="el-upload__tip" style="color:red">注意:申请本科毕业,学信网学历验证不通过,请上传学历证明文件(如专科毕业证等)</div>
  687. <div slot="tip" class="el-upload__tip" style="color:red">只允许上传一个文件(图片或者压缩包),多个文件请压缩成压缩包再上传</div>
  688. </el-upload>
  689. </div>
  690. </el-form-item>
  691. </el-col>
  692. </el-row>
  693. </el-form>
  694. </td>
  695. </tr>
  696. </table>
  697. <table>
  698. <thead>
  699. <tr>
  700. <td colspan="5" align="center">
  701. <h4>个人简历(考生本人填写) </h4>
  702. </td>
  703. </tr>
  704. <tr>
  705. <th valign="bottom" style="width:35px">序号</th>
  706. <th valign="bottom" style="width:145px">起止年月</th>
  707. <th valign="bottom" style="width:350px">在何地,何单位学习和工作<br><font style="color:red">简历信息从高中阶段开始</font></th>
  708. <th valign="bottom" style="width:170px">任何职务</th>
  709. <!-- <th><el-button type="primary" @click="addRow(i)">添加</el-button></th> -->
  710. <th> <li class="el-icon-plus" style="color:green;cursor:pointer;" title="点击新增一行" @click="addRow(i)"></li></th>
  711. </tr>
  712. </thead>
  713. <tr v-for="(i,index) in stdResumeList" :key="i.id" v-if="i != null">
  714. <td valign="bottom" align="center">{{index+1}}</td>
  715. <td valign="bottom" align="center">
  716. <el-date-picker size="mini" value-format="yyyy-MM-dd" type="date" v-model="i.start_date" placeholder="选择开始日期" style="width:135px;padding:0px;margin:0px;"></el-date-picker>
  717. <br>
  718. <el-date-picker size="mini" value-format="yyyy-MM-dd" type="date" v-model="i.end_date" placeholder="选择结束日期" style="width:135px;padding:0px;margin:0px;"></el-date-picker>
  719. </td>
  720. <td valign="bottom">
  721. <el-input size="medium" v-model="i.work_exp" placeholder="请输入工作经验。简历起止年月不允许断档。"></el-input>
  722. </td>
  723. <td valign="bottom">
  724. <el-input size="medium" v-model="i.position" placeholder="请输入职务"></el-input>
  725. </td>
  726. <td valign="bottom" align="center">
  727. <!-- <el-button type="primary" @click="delRow(i)">删除</el-button> -->
  728. <li class="el-icon-close" style="color:red;cursor:pointer;" title="点击删除该行" @click="delRow(index)"></li>
  729. </td>
  730. </tr>
  731. </table>
  732. <el-button type="primary" @click="submit()">核实并提交申请</el-button>
  733. <el-button type="primary" @click="colseWin()">关闭</el-button>
  734. </div>
  735. </center>
  736. </div>
  737. <!-- <div v-if="!this.isAllowGraduate">
  738. <center>
  739. <div style="font-size: 25px;color: green;margin-buttom:5px;color:red">
  740. <div v-for="(msg,index) in msgArray" :key="index">
  741. <table style="margin-left:20px">
  742. <tr>
  743. <td>{{index+1}}.</td>
  744. <td>{{msg}}</td>
  745. </tr>
  746. </table>
  747. </div>
  748. <br>
  749. <el-button disabled="" type="primary" @click="submit()">核实并提交申请</el-button>
  750. <el-button type="primary" @click="colseWin()">关闭</el-button>
  751. </div>
  752. </center>
  753. </div> -->
  754. </div>
  755. </el-dialog>
  756. <!-- 考生图片上传 -->
  757. <el-dialog id="imgUploadDiv"
  758. title="图片上传"
  759. :visible.sync="imgUploadDialogVisible"
  760. width="1200px"
  761. height="600px"
  762. center>
  763. <span>
  764. <el-row>
  765. <el-col :span="6" class="tip" style="margin:0px !important;height: 490px;font-size: 15px;">
  766. <font style="font-weight:600">考生注意:</font><font color="red">本照片即为今后的毕业证照片,请注意照片形象和质量要求。</font><br>
  767. <font style="font-weight:600">位置要求:</font>高度,头上空1/10,头部占7/10,宽度;肩部占1/5,左右各空1/10<br>
  768. <font style="font-weight:600">背景要求:</font>蓝底或白底<br>
  769. <font style="font-weight:600">文件格式:</font>jpg格式<br>
  770. <font style="font-weight:600">像素要求:</font>288*384,300DPI,文件最大不超过1MB<br>
  771. <font style="font-weight:600">形象要求:</font>免冠证件照,着有领衣服,表情评和,正面直视,衣着整洁。 <br>
  772. <font style="font-weight:600;">上传限制:</font><font color="red">照片上传后,不允许再修改,请慎重点击上传图片。</font> <br>
  773. </el-col>
  774. <el-col :span="9">
  775. <center>
  776. <vueCropper
  777. ref="cropper"
  778. :img="option.img"
  779. :outputSize="option.size"
  780. :outputType="option.outputType"
  781. :info="false"
  782. :full="option.full"
  783. :canMove="option.canMove"
  784. :canMoveBox="option.canMoveBox"
  785. :canScale="option.canScale"
  786. :fixedBox="option.fixedBox"
  787. :original="option.original"
  788. :autoCrop="option.autoCrop"
  789. :autoCropWidth="option.autoCropWidth"
  790. :autoCropHeight="option.autoCropHeight"
  791. :centerBox="option.centerBox"
  792. :high="option.high"
  793. :infoTrue="option.infoTrue"
  794. @realTime="realTime"
  795. @imgLoad="imgLoad"
  796. @cropMoving="cropMoving"
  797. :enlarge="option.enlarge"
  798. ></vueCropper>
  799. <!-- <i class="el-icon-zoom-in"></i>
  800. <i class="el-icon-zoom-out"></i>
  801. <i class="el-icon-arrow-left"></i>
  802. <i class="el-icon-arrow-right"></i> -->
  803. <!-- <button @click="changeScale(1)" class="btn">+</button>
  804. <button @click="changeScale(-1)" class="btn">-</button>
  805. <button @click="rotateLeft" class="btn">rotateLeft</button>
  806. <button @click="rotateRight" class="btn">rotateRight</button> -->
  807. <div style="margin-top:5px">
  808. <el-button icon="el-icon-refresh" size="mini" @click="refreshCrop"></el-button>
  809. <el-button icon="el-icon-download" size="mini" @click="down('blob')"></el-button>
  810. <el-button icon="el-icon-zoom-in" size="mini" @click="changeScale(1)"></el-button>
  811. <el-button icon="el-icon-zoom-out" size="mini" @click="changeScale(-1)"></el-button>
  812. <el-button icon="fa fa-rotate-left" size="mini" @click="rotateLeft"></el-button>
  813. <el-button icon="fa fa-rotate-right" size="mini" @click="rotateRight"></el-button>
  814. </div>
  815. </center>
  816. </el-col>
  817. <el-col :span="9">
  818. <center>
  819. <div class="show-preview" :style="{'width': previews.w + 'px', 'height': previews.h + 'px', 'overflow': 'hidden',}">
  820. <div :style="previews.div">
  821. <img :src="previews.url" :style="previews.img">
  822. </div>
  823. </div>
  824. </center>
  825. </el-col>
  826. </el-row>
  827. </span>
  828. <span slot="footer" class="dialog-footer">
  829. <!-- image/png, image/jpeg, image/gif, -->
  830. <input type="file" id="uploads" ref="uploadBtn" :value="imgFile" style="position:absolute; clip:rect(0 0 0 0);" accept="image/jpg" @change="uploadImg($event, 1)">
  831. <el-button size="mini" @click="chooseFile()">选择本地图片</el-button>
  832. <el-button size="mini" type="primary" @click="finishUpload('blob')">上传图片</el-button>
  833. <el-button size="mini" @click="imgUploadDialogVisible = false">取消</el-button>
  834. </span>
  835. </el-dialog>
  836. </el-tab-pane>
  837. </el-tabs>
  838. </d2-container>
  839. </template>
  840. <script>
  841. import { mapState, mapActions } from "vuex";
  842. import { json } from "body-parser";
  843. import { isIPv4 } from "net";
  844. import { log } from 'util';
  845. import { VueCropper } from "vue-cropper";
  846. export default {
  847. components: { VueCropper },
  848. computed: {
  849. ...mapState({
  850. stdReg: state => state.enrol.StdReg,
  851. StdImageArray: state => state.enrol.StdImageArray,
  852. FrameParam: state => state.enrol.FrameParam
  853. }),
  854. photo_url() {
  855. if(window.isRemotePhoto =='1'){
  856. return `${window.photoHttp}${this.stdReg.photo_path}`;
  857. }else{
  858. this.randomNum = new Date().getTime();
  859. return `${window.uploadServerUrl}${this.stdReg.photo_url}?${
  860. this.randomNum
  861. }`;
  862. }
  863. },
  864. by_photo_url() {
  865. this.randomNum = new Date().getTime();
  866. if(this.selected_apply && this.selected_apply.by_photo){
  867. return `${window.uploadServerUrl}${this.selected_apply.by_photo}?${
  868. this.randomNum
  869. }`;
  870. }else if(this.by_photo_url_p){
  871. return `${window.uploadServerUrl}${this.by_photo_url_p}?${
  872. this.randomNum
  873. }`;
  874. }
  875. },
  876. },
  877. data() {
  878. var checkPhone = (rule, value, callback) => {
  879. if (!value) {
  880. return callback(new Error("请输入联系电话"));
  881. } else {
  882. const reg = /^1[0|1|2|3|4|5|6|7|8|9][0-9]\d{8}$/;
  883. // console.log(reg.test(value));
  884. if (reg.test(value)) {
  885. callback();
  886. } else {
  887. return callback(new Error("请输入正确的手机号"));
  888. }
  889. }
  890. };
  891. return {
  892. loading: false,
  893. majorList: null,
  894. applyDialogVisible: false,
  895. auditDialogVisible: false,
  896. auditInfoArray: null,
  897. curStep: 1,
  898. selected_major_id: null,
  899. selected_major: null,
  900. selected_apply: null,
  901. canApply: false,
  902. timeLimit: null,
  903. applyList: null,
  904. ByPaperApplyControl: null,
  905. // isAllowGraduate: false,
  906. inBlackList: false,
  907. blackList: null,
  908. isNeedPreEduApply: true,
  909. courseScoreList: null,
  910. paperFailed: false,
  911. diaplmaNo: null, //毕业证号
  912. msgArray: [],
  913. checkMsg: null,
  914. ticketList: null,
  915. std: null,
  916. courseScoreList: null,
  917. //数据字典 start
  918. majorArray: null,
  919. nationArray: null,
  920. occupationArray: null,
  921. familyRegArray: null,
  922. politicalStatusArray: null,
  923. sexArray: null,
  924. healthyArray: null,
  925. eduArray: null,
  926. //数据字典 end
  927. stdResumeList: [],
  928. stdRegInfo: {
  929. std_name: "",
  930. std_pass1: "",
  931. std_pass2: "",
  932. std_eng_name: "",
  933. cert_no: "",
  934. std_sex: "",
  935. std_source: "",
  936. political_status: "",
  937. std_nation: "",
  938. std_family_reg: "",
  939. school_id: "",
  940. std_edu: "",
  941. std_occupation: "",
  942. std_healthy: "",
  943. std_birth: "",
  944. major_id: "",
  945. major_code: "",
  946. major_name: "",
  947. std_mobile: "",
  948. std_postcode: "",
  949. std_address: "",
  950. email: "",
  951. remark: "",
  952. std_work_unit: "",
  953. major_level:"",
  954. navtiv_prov:"",
  955. navtiv_city:"",
  956. paper_title:"",
  957. qq:"",
  958. },
  959. // remark: "",
  960. stdRegInfoRule: {
  961. std_source: [
  962. { required: true, message: "请输入考生来源", trigger: "blur" }
  963. ],
  964. political_status: [
  965. { required: true, message: "请输入政治面貌", trigger: "blur" }
  966. ],
  967. std_nation: [
  968. { required: true, message: "请输入民族", trigger: "blur" }
  969. ],
  970. std_family_reg: [
  971. { required: true, message: "请输入籍贯", trzaigger: "blur" }
  972. ],
  973. school_id: [
  974. { required: true, message: "请输入考生来源", trigger: "blur" }
  975. ],
  976. std_edu: [{ required: true, message: "请输入学历", trigger: "blur" }],
  977. std_occupation: [
  978. { required: true, message: "请输入职业", trigger: "blur" }
  979. ],
  980. std_healthy: [
  981. { required: true, message: "请输入健康状况", trigger: "blur" }
  982. ],
  983. std_birth: [
  984. { required: true, message: "请输入出生年月", trigger: "blur" }
  985. ],
  986. std_mobile: [
  987. { required: true, message: "请输入联系电话", trigger: "blur" },
  988. { validator: checkPhone, trigger: "blur" }
  989. ],
  990. std_address: [
  991. { required: true, message: "请输入通讯地址", trigger: "blur" }
  992. ],
  993. // pre_edu: [
  994. // { required: true, message: "请输入专(本)科何专业及发证单位", trigger: "blur" }
  995. // ],
  996. std_postcode: [
  997. { required: true, message: "请输入邮政编码", trigger: "blur" }
  998. ],
  999. major_id: [{ required: true, message: "请输入专业", trigger: "blur" }],
  1000. std_email: [
  1001. {
  1002. type: "email",
  1003. message: "请输入正确的邮箱地址",
  1004. trigger: ["blur", "change"]
  1005. }
  1006. ],
  1007. std_work_unit: [
  1008. { required: true, message: "请输入工作单位", trigger: "blur" }
  1009. ],
  1010. native_prov: [
  1011. { required: true, message: "请输入省", trigger: "blur" }
  1012. ],
  1013. native_city: [
  1014. { required: true, message: "请输入市", trigger: "blur" }
  1015. ],
  1016. },
  1017. orgArray_std_source_3:[],
  1018. school_name:"",
  1019. majorLevelArray:[],
  1020. majorArraySource:[],
  1021. byMajorArray:[],
  1022. byMajorArraySource:[],
  1023. majorLevelArray:[],
  1024. applyInfoConfirm:false,
  1025. oldMajorInfo:"",
  1026. old_std_major:"",
  1027. newMajorInfo:"",
  1028. oldMajorArray:[],
  1029. countryCityMap:null,
  1030. city_data:[],
  1031. prov:[],
  1032. city:[],
  1033. showByImgDialog:false,
  1034. orderOrgArray_std_source_1:[],
  1035. by_photo_url_p:"",
  1036. by_file_item:"",//前端临时使用
  1037. by_file:"",//后台参数
  1038. imgUploadDialogVisible: false,
  1039. crap: false,
  1040. previews: {},
  1041. option: {
  1042. img: "",
  1043. size: 0.9,//压缩质量
  1044. full: false,
  1045. outputType: "jpg",
  1046. canMove: true,
  1047. fixedBox: true,
  1048. original: true,
  1049. canMoveBox: true,
  1050. canScale:true,
  1051. autoCrop: true,
  1052. // 只有自动截图开启 宽度高度才生效
  1053. autoCropWidth: 320,//288 % 0.9 = 288
  1054. autoCropHeight: 426.7,//384 % 0.9 = 384
  1055. centerBox: false,
  1056. high: true,
  1057. cropData: {},
  1058. enlarge: 0.9,//值为1时有bug
  1059. infoTrue: false
  1060. },
  1061. fileName: "", //本机文件地址
  1062. imgFile: "",
  1063. fileList: [],
  1064. };
  1065. },
  1066. async mounted() {
  1067. this.loading = true;
  1068. this.init();
  1069. this.loading = false;
  1070. const resp = await this.$http.get("/std/stdRegInfo/init.htm");
  1071. let dict = resp.data.map.dict;
  1072. this.majorLevelArray = dict["majorLevelArray"];
  1073. this.majorArraySource = dict["majorArray"];
  1074. this.byMajorArraySource = dict["byMajorArray"];
  1075. this.initStdApplyInfo();
  1076. },
  1077. methods: {
  1078. //初始化列表查询
  1079. async init() {
  1080. this.applyInfoConfirm = false;
  1081. let res = await this.$http.post(
  1082. "/by/byPaperApply/listAll.htm",
  1083. {},
  1084. this.$http.headers.FORM
  1085. );
  1086. this.canApply = res.data.map.canApply;
  1087. this.timeLimit = res.data.map.byTimeConfig;
  1088. this.majorList = res.data.map.majorList;
  1089. this.applyList = res.data.map.applyList;
  1090. this.ByPaperApplyControl = res.data.map.ByPaperApplyControl;
  1091. await this.initorderOrgArray_std_source_1();
  1092. },
  1093. async initStdApplyInfo(){
  1094. //初始化考生类型
  1095. this.stdRegInfo.std_source = String(this.stdReg.std_source);
  1096. this.std_sourceChange(this.stdRegInfo.std_source);
  1097. //初始化专业等级
  1098. this.initMajorLevel();
  1099. //初始化专业
  1100. // this.selected_major_id = this.stdReg.major_id;
  1101. // console.log(this.selected_major_id);
  1102. // this.majorChange(this.selected_major_id);
  1103. //主考院校
  1104. // this.stdRegInfo.school_id = this.stdReg.school_id;
  1105. },
  1106. async initMajorLevel(){
  1107. let res = await this.$http.post("/std/stdRegInfo/getStdMajor.htm");
  1108. if(!res.data.entity) return null;
  1109. let stdMajor = res.data.entity;
  1110. this.stdRegInfo.major_level = String(stdMajor.major_level);
  1111. this.old_std_major = stdMajor.major_code + '-' + stdMajor.major_name;
  1112. // let majorArray = this.$options.filters["dataArrayFilter"](this.majorArraySource, {
  1113. // major_level:stdMajor.major_level
  1114. // });
  1115. //
  1116. // this.majorArray.concat(majorArray);
  1117. await this.majorLevelChange(this.stdRegInfo.major_level);
  1118. // this.byMajorArray.push(stdMajor);
  1119. await this.initNewMajor(stdMajor.id);
  1120. return stdMajor;
  1121. },
  1122. async showAuditInfo(item) {
  1123. let { data } = await this.$http.post(
  1124. "/by/byPaperApplyAudit/listByApply.htm",
  1125. this.Qs.stringify({
  1126. apply_id: item.id
  1127. }),
  1128. this.$http.headers.FORM
  1129. );
  1130. this.auditInfoArray = data.array;
  1131. this.auditDialogVisible = true;
  1132. },
  1133. //跳转申请页面
  1134. async goApply(apply) {
  1135. if(!String(this.selected_major_id)){
  1136. this.alert("请选择毕业专业!");
  1137. return;
  1138. }
  1139. if(null != this.stdRegInfo && null != this.stdRegInfo.major_level && "1" != this.stdRegInfo.major_level){
  1140. this.stdRegInfo.major_level = '1';
  1141. this.majorLevelChange(this.stdRegInfo.major_level);
  1142. // this.stdRegInfo.major_id = '';
  1143. // this.stdMajor.major_level = '1';
  1144. // this.stdMajor.major_id= '';
  1145. //this.alert("专科毕业不需要申请毕业论文答辩!个人信息修改专业层次为本科后,可以申请。");
  1146. //return;
  1147. }
  1148. if (this.selected_apply) {
  1149. // this.selected_apply = apply;
  1150. // this.remark = this.selected_apply.remark;
  1151. //处理附件的初始化
  1152. //if(this.selected_apply.by_file){
  1153. // this.fileList = [{name:`${this.selected_apply.by_file}`,url:`${window.uploadServerUrl}${this.selected_apply.by_file}`}]
  1154. // this.by_file = this.selected_apply.by_file ;
  1155. //}
  1156. } else {
  1157. this.selected_apply = null;
  1158. // this.remark = "";
  1159. }
  1160. if (!this.applyInfoConfirm) {
  1161. this.curStep = 1;
  1162. this.$nextTick(() => {
  1163. if (this.majorList.length > 0 && !this.selected_major_id) {
  1164. this.selected_major_id = this.majorList[0].major_id;
  1165. }
  1166. });
  1167. // return;
  1168. }
  1169. for (const key in this.item) {
  1170. if (this.item.hasOwnProperty(key)) {
  1171. this.item[key] = "";
  1172. }
  1173. }
  1174. // this.loading = true;
  1175. // let loading = this.showLoading();
  1176. const resp = await this.$http.get("/std/stdRegInfo/init.htm");
  1177. let dict = resp.data.map.dict;
  1178. this.majorArray = dict["majorArray"];
  1179. this.nationArray = dict["nationArray"];
  1180. this.occupationArray = dict["occupationArray"];
  1181. this.familyRegArray = dict["familyRegArray"];
  1182. this.politicalStatusArray = dict["politicalStatusArray"];
  1183. this.sexArray = dict["sexArray"];
  1184. this.healthyArray = dict["healthyArray"];
  1185. this.eduArray = dict["eduArray"];
  1186. if (!this.applyInfoConfirm) {
  1187. this.applyDialogVisible = true;
  1188. return;
  1189. }
  1190. if(!String(this.stdRegInfo.school_id)){
  1191. this.alert("主考院校不能为空");
  1192. return ;
  1193. }
  1194. let { data } = await this.$http.post(
  1195. "/by/byPaperApply/getcheckinfo.htm",
  1196. this.Qs.stringify({
  1197. stdId: this.stdReg.id,
  1198. majorId: this.selected_major_id,
  1199. schoolId: this.stdRegInfo.school_id
  1200. }),
  1201. this.$http.headers.FORM
  1202. );
  1203. if(!data.success){
  1204. this.alert(data.errorMsg);
  1205. // this.hideLoading(loading);
  1206. // return;
  1207. }
  1208. this.selected_major = data.map.major;
  1209. let std_source = this.stdRegInfo.std_source;
  1210. let major_level = this.stdRegInfo.major_level;
  1211. let school_id = this.stdRegInfo.school_id;
  1212. this.stdRegInfo = this.initStdRegInfo(data.map.stdRegInfo); //data.map.stdRegInfo ;//
  1213. this.stdRegInfo.std_source = std_source;
  1214. this.stdRegInfo.major_level = major_level;
  1215. this.stdRegInfo.school_id = school_id;
  1216. if(this.selected_apply){
  1217. if(this.selected_apply.std_birth){
  1218. this.stdRegInfo.std_birth = this.selected_apply.std_birth;
  1219. }
  1220. if(this.selected_apply.telephone){
  1221. this.stdRegInfo.std_mobile = this.selected_apply.telephone;
  1222. }
  1223. if(this.selected_apply.post_code){
  1224. this.stdRegInfo.std_postcode = this.selected_apply.post_code;
  1225. }
  1226. if(this.selected_apply.qq){
  1227. this.stdRegInfo.qq = this.selected_apply.qq;
  1228. }
  1229. //if(this.selected_apply.pre_edu){
  1230. // this.stdRegInfo.pre_edu = this.selected_apply.pre_edu;
  1231. // }
  1232. if(this.selected_apply.work_unit){
  1233. this.stdRegInfo.std_work_unit = this.selected_apply.work_unit;
  1234. }
  1235. if(this.selected_apply.address){
  1236. this.stdRegInfo.std_address = this.selected_apply.address;
  1237. }
  1238. if(this.selected_apply.paper_title){
  1239. this.stdRegInfo.paper_title = this.selected_apply.paper_title;
  1240. }
  1241. if(this.selected_apply.remark){
  1242. this.stdRegInfo.remark = this.selected_apply.remark;
  1243. }
  1244. }
  1245. this.initDictData();
  1246. this.curStep = 2;
  1247. // this.loading = false;
  1248. // this.hideLoading(loading);
  1249. this.applyDialogVisible = true;
  1250. },
  1251. async initorderOrgArray_std_source_1(){
  1252. let { data } = await this.$http.get("/pl/byApply/orderOrgList.htm");
  1253. if(data.success){
  1254. this.orderOrgArray_std_source_1 = data.array;
  1255. }else{
  1256. this.alert(data.errorMsg);
  1257. }
  1258. },
  1259. initStdRegInfo(std) {
  1260. std.std_edu = String(std.std_edu);
  1261. std.std_nation = String(std.std_nation);
  1262. std.std_family_reg = String(std.std_family_reg);
  1263. std.political_status = String(std.political_status);
  1264. return std;
  1265. },
  1266. goEdit(item) {
  1267. // test TODO
  1268. if(!this.timeLimit){
  1269. this.alert("现时间段不允许修改!");
  1270. return;
  1271. }
  1272. this.selected_apply = item;
  1273. // test TODO
  1274. this.timeLimit.id = item.by_time_config_id;
  1275. // this.selected_major_id = item.major_id;
  1276. this.stdRegInfo.std_source = String(item.std_source);
  1277. this.std_sourceChange(this.stdRegInfo.std_source);
  1278. this.stdRegInfo.school_id = item.school_id;
  1279. this.stdRegInfo.remark = item.remark;
  1280. this.stdRegInfo.std_sex = item.std_sex;
  1281. this.stdRegInfo.native_prov = item.native_prov;
  1282. this.stdRegInfo.native_city = item.native_city;
  1283. this.stdRegInfo.std_nation = item.nation;
  1284. this.stdRegInfo.political_status = item.political;
  1285. this.stdRegInfo.std_work_unit = item.work_unit;
  1286. this.stdRegInfo.std_address = item.address;
  1287. this.stdRegInfo.std_postcode = item.post_code;
  1288. this.diaplma_no = item.diaplma_no;
  1289. this.stdRegInfo.std_mobile = item.telephone;
  1290. this.diaplmaNo = item.diaplmaNo;
  1291. this.school_name = item.school_name;
  1292. this.goApply(item);
  1293. },
  1294. //初始化话个人信息字典数据
  1295. initDictData() {
  1296. this.stdRegInfo.std_nation_text = this.findDict(
  1297. this.nationArray,
  1298. this.stdRegInfo.std_nation
  1299. );
  1300. this.stdRegInfo.std_occupation_text = this.findDict(
  1301. this.occupationArray,
  1302. this.stdRegInfo.std_occupation
  1303. );
  1304. this.stdRegInfo.std_family_reg_text = this.findDict(
  1305. this.familyRegArray,
  1306. this.stdRegInfo.std_family_reg
  1307. );
  1308. this.stdRegInfo.political_status_text = this.findDict(
  1309. this.politicalStatusArray,
  1310. this.stdRegInfo.political_status
  1311. );
  1312. this.stdRegInfo.std_edu_text = this.findDict(
  1313. this.eduArray,
  1314. this.stdRegInfo.std_edu
  1315. );
  1316. },
  1317. newStdResume() {
  1318. return {
  1319. start_date: "",
  1320. end_date: "",
  1321. work_exp: "",
  1322. position: ""
  1323. };
  1324. },
  1325. async initStep3() {
  1326. if(this.selected_apply){
  1327. //初始化简历
  1328. let { data } = await this.$http.post(
  1329. "/by/byPaperApply/getResumeList.htm",
  1330. this.Qs.stringify({
  1331. id: this.selected_apply.id
  1332. }),
  1333. this.$http.headers.FORM
  1334. );
  1335. let resumeList = data.array;
  1336. this.stdResumeList = [];
  1337. for (let i = 0; i < resumeList.length; i++) {
  1338. const item = resumeList[i];
  1339. this.stdResumeList.push({
  1340. start_date: item.start_date,
  1341. end_date: item.end_date,
  1342. work_exp: item.work_exp,
  1343. position: item.position
  1344. })
  1345. }
  1346. }else{
  1347. this.stdResumeList = [];
  1348. this.stdResumeList.push(this.newStdResume());
  1349. this.stdResumeList.push(this.newStdResume());
  1350. this.stdResumeList.push(this.newStdResume());
  1351. }
  1352. },
  1353. addRow() {
  1354. if (this.stdResumeList.length == 8) {
  1355. this.alert("最多8条数据");
  1356. return;
  1357. }
  1358. this.stdResumeList.push(this.newStdResume());
  1359. },
  1360. delRow(index) {
  1361. let newList = [];
  1362. for (let i = 0; i < this.stdResumeList.length; i++) {
  1363. if (i != index) {
  1364. // this.stdResumeList[i] == null;
  1365. newList.push(this.stdResumeList[i]);
  1366. }
  1367. }
  1368. this.stdResumeList = newList;
  1369. },
  1370. async submit(file_path) {
  1371. // if(null == this.stdRegInfo.pre_edu|| "" == this.stdRegInfo.pre_edu){
  1372. // this.alert("请填写专(本)科何专业及发证单位!");
  1373. // return;
  1374. // }
  1375. if(null == this.stdRegInfo.std_address|| "" == this.stdRegInfo.std_address){
  1376. this.alert("请填写通讯地址!");
  1377. return;
  1378. }
  1379. let loading = this.showLoading();
  1380. this.$refs["stdRegInfo"].validate(async valid => {
  1381. if (valid) {
  1382. //验证
  1383. if (this.selected_apply) {
  1384. let loading = this.showLoading();
  1385. let { data } = await this.$http.post(
  1386. "by/byPaperApply/reApply.htm",
  1387. this.Qs.stringify({
  1388. id: this.selected_apply.id,
  1389. major_id: this.selected_major_id,
  1390. std_source: this.stdRegInfo.std_source,
  1391. school_id: this.stdRegInfo.school_id,
  1392. remark: this.stdRegInfo.remark,
  1393. std_sex: this.stdRegInfo.std_sex,
  1394. nation: this.stdRegInfo.std_nation,
  1395. political: this.stdRegInfo.political_status,
  1396. //pre_edu: this.stdRegInfo.pre_edu,
  1397. work_unit: this.stdRegInfo.std_work_unit,
  1398. address: this.stdRegInfo.std_address,
  1399. post_code: this.stdRegInfo.std_postcode,
  1400. std_birth_str: this.stdRegInfo.std_birth,
  1401. telephone: this.stdRegInfo.std_mobile,
  1402. by_photo:this.by_photo_url_p,
  1403. paper_title:this.stdRegInfo.paper_title,
  1404. qq:this.stdRegInfo.qq
  1405. }),
  1406. this.$http.headers.FORM
  1407. );
  1408. this.hideLoading(loading);
  1409. if (data.success) {
  1410. this.alert("提交成功");
  1411. this.init();
  1412. this.$nextTick(() => {
  1413. this.applyDialogVisible = false;
  1414. });
  1415. } else {
  1416. this.hideLoading(loading);
  1417. this.alert(data.errorMsg);
  1418. }
  1419. } else {
  1420. if(!String(this.stdRegInfo.school_id)){
  1421. this.hideLoading(loading);
  1422. this.alert("主考院校id为空!");
  1423. return;
  1424. }
  1425. let { data } = await this.$http.post(
  1426. "by/byPaperApply/apply.htm",
  1427. this.Qs.stringify({
  1428. major_id: this.selected_major_id,
  1429. std_source: this.stdRegInfo.std_source,
  1430. school_id: this.stdRegInfo.school_id,
  1431. remark: this.stdRegInfo.remark,
  1432. std_sex: this.stdRegInfo.std_sex,
  1433. nation: this.stdRegInfo.std_nation,
  1434. political: this.stdRegInfo.political_status,
  1435. // pre_edu: this.stdRegInfo.pre_edu,
  1436. work_unit: this.stdRegInfo.std_work_unit,
  1437. address: this.stdRegInfo.std_address,
  1438. post_code: this.stdRegInfo.std_postcode,
  1439. std_birth_str: this.stdRegInfo.std_birth,
  1440. telephone: this.stdRegInfo.std_mobile,
  1441. by_photo:this.by_photo_url_p,
  1442. paper_title:this.stdRegInfo.paper_title,
  1443. qq:this.stdRegInfo.qq
  1444. }),
  1445. this.$http.headers.FORM
  1446. );
  1447. this.hideLoading(loading);
  1448. if (data.success) {
  1449. this.alert("提交成功");
  1450. this.init();
  1451. this.$nextTick(() => {
  1452. this.applyDialogVisible = false;
  1453. });
  1454. } else {
  1455. this.hideLoading(loading);
  1456. this.alert(data.errorMsg);
  1457. return false;
  1458. }
  1459. }
  1460. } else {
  1461. this.hideLoading(loading);
  1462. this.alert("请完成必填项!");
  1463. return false;
  1464. }
  1465. });
  1466. },
  1467. colseWin() {
  1468. this.applyDialogVisible = false;
  1469. this.curStep = 1;
  1470. this.selected_major_id = null;
  1471. this.applyInfoConfirm = false;
  1472. this.stdRegInfo.major_level = "";
  1473. this.stdRegInfo.school_id = "";
  1474. this.initStdApplyInfo();
  1475. },
  1476. async schoolChange(school_id){
  1477. let sch = _.find(this.orgArray_std_source_3,(item,index)=>{
  1478. return item.id == school_id;
  1479. })
  1480. ;
  1481. if(sch){
  1482. this.school_name = sch.org_code + "-" + sch.org_name;
  1483. }
  1484. },
  1485. async initSchoolName(major_id){
  1486. if(!major_id)return;
  1487. let orgArray = [];
  1488. this.stdRegInfo.school_id = "";
  1489. let res = await this.$http.post("/std/cfOrganization/querySchoolListByMajorId.htm",
  1490. this.Qs.stringify({
  1491. major_id: major_id,
  1492. }));
  1493. orgArray = res.data.array;
  1494. //
  1495. if(orgArray.length >=0){
  1496. this.stdRegInfo.school_id = orgArray[0].id;
  1497. this.school_name = orgArray[0].org_code + "-" + orgArray[0].org_name;
  1498. // this.stdRegInfo.school_id = this.orgArray[0].id;
  1499. }
  1500. },
  1501. async std_sourceChange(std_source){
  1502. //非助学班返回
  1503. // console.log("std_source:"+std_source+" orgArray_std_source_3:"+this.orgArray_std_source_3.length);
  1504. if(std_source != '3' || this.orgArray_std_source_3.length >0){
  1505. //社会考生 联动主考院校名称
  1506. if(String(this.selected_major_id)){
  1507. this.majorChange(this.selected_major_id);
  1508. }
  1509. return;
  1510. }
  1511. //请求所有主考院校数据
  1512. let res = await this.$http.post("/std/cfOrganization/listOrderForByPage.htm",
  1513. this.Qs.stringify({
  1514. org_type: 1,
  1515. }));
  1516. this.orgArray_std_source_3 = res.data.array;
  1517. },
  1518. async majorChange(major_id){
  1519. if(!String(major_id))return;
  1520. this.school_name = "";
  1521. this.initOldMajor(major_id);
  1522. if(String(this.stdRegInfo.std_source) != "1") return;
  1523. this.initSchoolName(major_id);
  1524. },
  1525. async initOldMajor(major_id){
  1526. let res = await this.$http.post("/by/byPaperApply/getOlaMajorInfoBynewMajorId.htm",
  1527. this.Qs.stringify({
  1528. major_id: major_id,
  1529. }));
  1530. this.oldMajorArray = res.data.array;
  1531. // let major = res.data.map;
  1532. // if(major){
  1533. // this.oldMajorInfo = major.major_code + "-" + major.major_name;
  1534. // }else{
  1535. // this.oldMajorInfo = "无";
  1536. // }
  1537. // console.log(this.oldMajorInfo);
  1538. },
  1539. //初始化
  1540. async initNewMajor(major_id){
  1541. let res = await this.$http.post("/by/byPaperApply/getNewMajorInfoByOldMajorId.htm",
  1542. this.Qs.stringify({
  1543. major_id: major_id,
  1544. }));
  1545. if(res.data.array.length >0){
  1546. let major = res.data.array[0];
  1547. this.newMajorInfo = major.major_code + major.major_name;
  1548. this.selected_major_id = major.id;
  1549. this.majorChange(major.id);
  1550. }
  1551. },
  1552. async majorLevelChange(value){
  1553. if(!value){ return;}
  1554. // if(!this.firstLoad)
  1555. this.stdRegInfo.major_id = "";
  1556. this.selected_major_id = null;
  1557. this.oldMajorArray = [];
  1558. this.school_name = "";
  1559. let loading = this.showLoading();
  1560. this.byMajorArray = this.$options.filters["dataArrayFilter"](this.byMajorArraySource, {
  1561. major_level:parseInt(value)
  1562. });
  1563. this.hideLoading(loading);
  1564. },
  1565. cityChange(name){
  1566. if(!name) return;
  1567. this.stdRegInfo.native_city = String(name);
  1568. this.$forceUpdate();
  1569. },
  1570. toUploadByImg(){
  1571. this.imgUploadDialogVisible = true;
  1572. this.$forceUpdate();
  1573. },
  1574. // 图片操作--------------------------------
  1575. chooseFile() {
  1576. this.$refs["uploadBtn"].click();
  1577. },
  1578. changeImg() {
  1579. this.option.img = this.lists[~~(Math.random() * this.lists.length)].img;
  1580. },
  1581. startCrop() {
  1582. // start
  1583. this.crap = true;
  1584. this.$refs.cropper.startCrop();
  1585. },
  1586. stopCrop() {
  1587. // stop
  1588. this.crap = false;
  1589. this.$refs.cropper.stopCrop();
  1590. },
  1591. clearCrop() {
  1592. // clear
  1593. this.$refs.cropper.clearCrop();
  1594. },
  1595. refreshCrop() {
  1596. // clear
  1597. this.$refs.cropper.refresh();
  1598. },
  1599. changeScale(num) {
  1600. num = num || 1;
  1601. this.$refs.cropper.changeScale(num);
  1602. },
  1603. rotateLeft() {
  1604. this.$refs.cropper.rotateLeft();
  1605. },
  1606. rotateRight() {
  1607. this.$refs.cropper.rotateRight();
  1608. },
  1609. //下载图片
  1610. down(type) {
  1611. console.log('down')
  1612. var aLink = document.createElement('a')
  1613. aLink.download = 'author-img'
  1614. if (type === 'blob') {
  1615. this.$refs.cropper.getCropBlob((data) => {
  1616. this.downImg = window.URL.createObjectURL(data)
  1617. aLink.href = window.URL.createObjectURL(data)
  1618. aLink.click()
  1619. })
  1620. } else {
  1621. this.$refs.cropper.getCropData((data) => {
  1622. this.downImg = data;
  1623. aLink.href = data;
  1624. aLink.click()
  1625. })
  1626. }
  1627. },
  1628. finish(type) {
  1629. // 输出
  1630. // var test = window.open('about:blank')
  1631. // test.document.body.innerHTML = '图片生成中..'
  1632. if (type === "blob") {
  1633. this.$refs.cropper.getCropBlob(data => {
  1634. var img = window.URL.createObjectURL(data);
  1635. this.model = true;
  1636. this.modelSrc = img;
  1637. });
  1638. } else {
  1639. this.$refs.cropper.getCropData(data => {
  1640. this.model = true;
  1641. this.modelSrc = data;
  1642. });
  1643. }
  1644. },
  1645. //上传图片到剪切板
  1646. uploadImg(e, num) {
  1647. console.log("uploadImg");
  1648. let _this = this;
  1649. //上传图片
  1650. let file = e.target.files[0];
  1651. _this.fileName = file.name;
  1652. if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
  1653. this.alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种", "信息提示");
  1654. return false;
  1655. }
  1656. let reader = new FileReader();
  1657. reader.onload = e => {
  1658. let data;
  1659. if (typeof e.target.result === "object") {
  1660. // 把Array Buffer转化为blob 如果是base64不需要
  1661. data = window.URL.createObjectURL(new Blob([e.target.result]));
  1662. } else {
  1663. data = e.target.result;
  1664. }
  1665. if (num === 1) {
  1666. _this.option.img = data;
  1667. } else if (num === 2) {
  1668. _this.example2.img = data;
  1669. }
  1670. };
  1671. // 转化为base64
  1672. // reader.readAsDataURL(file)
  1673. // 转化为blob
  1674. reader.readAsArrayBuffer(file);
  1675. },
  1676. // 实时预览函数
  1677. realTime(data) {
  1678. var previews = data;
  1679. var h = 0.5;
  1680. var w = 0.2;
  1681. this.previewStyle1 = {
  1682. width: previews.w + "px",
  1683. height: previews.h + "px",
  1684. overflow: "hidden",
  1685. margin: "0",
  1686. zoom: h
  1687. };
  1688. this.previewStyle2 = {
  1689. width: previews.w + "px",
  1690. height: previews.h + "px",
  1691. overflow: "hidden",
  1692. margin: "0",
  1693. zoom: w
  1694. };
  1695. if (data.url) {
  1696. // data.img['position'] = 'absolute';
  1697. data.img["left"] = "490px";
  1698. }
  1699. data.img['margin-right']='29px';
  1700. this.previews = data;
  1701. },
  1702. cropMoving(data) {
  1703. this.option.cropData = data;
  1704. },
  1705. imgLoad(msg) {
  1706. console.log(msg);
  1707. },
  1708. //剪裁图片完成上传
  1709. finishUpload(type) {
  1710. console.log("finish");
  1711. let _this = this;
  1712. let formData = new FormData();
  1713. // 输出
  1714. if(!this.$refs.cropper.imgs){
  1715. this.alert("请选择图片再上传");
  1716. return;
  1717. }
  1718. if (type === "blob") {
  1719. this.$refs.cropper.getCropBlob(data => {
  1720. let loading = this.showLoading();
  1721. let img = window.URL.createObjectURL(data);
  1722. _this.model = true;
  1723. _this.modelSrc = img;
  1724. formData.append("file", data, _this.fileName);
  1725. _this.$http
  1726. .post('/pl/byPaperApply/upload.htm', formData, {
  1727. contentType: false,
  1728. processData: false,
  1729. headers: { "Content-Type": "application/x-www-form-urlencoded" }
  1730. })
  1731. .then( res => {
  1732. _this.hideLoading(loading);
  1733. _this.by_photo_url_p = res.data.map.file_path;
  1734. _this.randomNum = new Date().getTime();
  1735. if (res.data.success) {
  1736. _this.$message({
  1737. type: "success",
  1738. message: "上传成功"
  1739. });
  1740. }else{
  1741. _this.alert(res.data.errorMsg, "信息提示");
  1742. }
  1743. });
  1744. });
  1745. } else {
  1746. this.$refs.cropper.getCropData(data => {
  1747. this.model = true;
  1748. this.modelSrc = data;
  1749. });
  1750. }
  1751. },
  1752. // 上传附件 start
  1753. handleRemove(file, fileList) {
  1754. return;
  1755. // debugger
  1756. // this.by_file_item = null;
  1757. },
  1758. handlePreview(file) {
  1759. console.log(file);
  1760. },
  1761. handleExceed(files, fileList) {
  1762. this.$message.warning("只能上传一个附件!");
  1763. },
  1764. beforeUpload(file, fileList) {
  1765. return true;
  1766. },
  1767. beforeRemove(file, fileList) {
  1768. //解决删除上传 文件错误问题
  1769. this.$refs.upload.clearFiles();
  1770. },
  1771. handleChange(file, fileList) {
  1772. if (fileList.length > 0) {
  1773. this.by_file_item = file;
  1774. } else {
  1775. this.by_file = "";
  1776. }
  1777. },
  1778. customUpload(file) {
  1779. this.fileUpload(file).then(response => {
  1780. //上传成功提交表单
  1781. if (response.data.success) {
  1782. let filePath = response.data.entity;
  1783. this.by_file = filePath;
  1784. } else {
  1785. this.alert(response.data.errorMsg);
  1786. //异常自动清除文件列表
  1787. this.$refs.upload.clearFiles();
  1788. }
  1789. });
  1790. //解决删除上传 文件错误问题
  1791. const prom = new Promise((resolve, reject) => {})
  1792. prom.abort = () => {}
  1793. return prom
  1794. },
  1795. fileUpload(fileobj) {
  1796. let param = new FormData();
  1797. param.append("file", fileobj.file);
  1798. return this.$http.request({
  1799. method: "post",
  1800. url: "pl/byApply/uploadFile.htm",
  1801. headers: { "Content-Type": "multipart/form-data" },
  1802. data: param
  1803. });
  1804. },
  1805. },
  1806. };
  1807. </script>
  1808. <style lang="scss" scoped>
  1809. @import "~@/assets/style/public.scss";
  1810. #by_paperApply {
  1811. .el-dialog__body {
  1812. padding: 5px !important;
  1813. margin: 5px;
  1814. }
  1815. .vue-cropper {
  1816. height: 490px;
  1817. width: 400px;
  1818. }
  1819. .show-preview {
  1820. border: 1px solid #6fb8ff;
  1821. }
  1822. }
  1823. </style>