index.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196
  1. <template>
  2. <div id="dataConfig">
  3. <input v-show="false" id="file" type="file" @change="exportFunc" />
  4. <search-box-new
  5. ref="searchBox"
  6. :formData="formData"
  7. :formList="formList"
  8. @search="search"
  9. @init="init"
  10. :shType="shType"
  11. >
  12. <template slot="customize" v-if="false">
  13. <el-button size="small" type="success" @click="moreActive"
  14. >批量导出</el-button
  15. >
  16. </template>
  17. </search-box-new>
  18. <table-list
  19. :tableSets="tableSet"
  20. :tableData="tableData"
  21. :navText="navText"
  22. @addClick="addClick"
  23. :loading="loading"
  24. @editInfo="editInfo"
  25. >
  26. <template slot="customize" v-if="formData.status == 1">
  27. <el-button size="small" type="success" @click="studentLeadInfo"
  28. >学员资料导入</el-button
  29. ><el-button size="small" type="success" @click="studentExport"
  30. >学员资料导出</el-button
  31. >
  32. </template>
  33. <template slot="btn" slot-scope="props">
  34. <el-button
  35. type="text"
  36. @click="addClick(props.scope.row, 0)"
  37. :disabled="
  38. !(
  39. props.scope.row.changeStatus === 2 || props.scope.row.status === 2
  40. )
  41. "
  42. >审核</el-button
  43. >
  44. <el-button type="text" @click="openRecord(props.scope.row)"
  45. >审核记录</el-button
  46. >
  47. </template>
  48. </table-list>
  49. <pagination
  50. :total="total"
  51. :pageSize="formData.pageSize"
  52. :currentPage="formData.pageNum"
  53. @handleSizeChange="handleSizeChange"
  54. @handleCurrentChange="handleCurrentChange"
  55. />
  56. <el-dialog
  57. @closed="loadingClose"
  58. :visible.sync="dialogVisible"
  59. width="1000px"
  60. :show-close="false"
  61. :close-on-click-modal="false"
  62. >
  63. <div slot="title" class="hearders">
  64. <div class="leftTitle">资料审核</div>
  65. <div class="rightBoxs">
  66. <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
  67. </div>
  68. </div>
  69. <div slot="title" class="topStys">
  70. <div class="btnsTys">学员编码:{{ listData.userAccount }}</div>
  71. <div class="btnsTys">学员姓名:{{ listData.realname }}</div>
  72. <div class="btnsTys">学员身份证号码:{{ listData.idCard }}</div>
  73. <div class="btnsTys">绑定手机号码:{{ listData.telphone }}</div>
  74. <div style="clear: both"></div>
  75. </div>
  76. <div class="heightstybox gdt">
  77. <ul>
  78. <li class="dissty" v-for="(item, index) in listInfos" :key="index">
  79. <div
  80. style="
  81. width: 50px;
  82. color: red;
  83. align-self: flex-start;
  84. flex-shrink: 0;
  85. "
  86. >
  87. {{ item.status === 1 ? "有变更" : "" }}
  88. </div>
  89. <div class="stys">{{ item.fieldName }}:</div>
  90. <div v-if="pdStatus(item.fieldKey)">
  91. <div
  92. v-if="item.fieldKey === 'recent_photos'"
  93. style="width: 145px; height: 160px"
  94. >
  95. <el-image
  96. v-if="item.value"
  97. style="width: 100%; height: 100%"
  98. :src="$methodsTools.splitImgHost(item.value)"
  99. :preview-src-list="[$methodsTools.splitImgHost(item.value)]"
  100. >
  101. </el-image>
  102. <p v-else>暂无上传图片</p>
  103. </div>
  104. <div v-else-if="item.fieldKey === 'commitment_electr_signature'">
  105. <div>
  106. 本人自愿做出如下承诺:本人己仔细阅读《广东
  107. 省住房和城乡建设厅关于推进住房和城乡建设领域施
  108. 工现场专业人员职业培训工作的通知》
  109. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  110. 特此承诺!
  111. </div>
  112. <div
  113. style="width: 300px; height: 150px; border: 1px solid #999"
  114. v-if="item.value"
  115. >
  116. <el-image
  117. style="width: 100%; height: 100%"
  118. :src="$methodsTools.splitImgHost(item.value)"
  119. :preview-src-list="[$methodsTools.splitImgHost(item.value)]"
  120. >
  121. </el-image>
  122. </div>
  123. <p v-else>暂无上传图片</p>
  124. </div>
  125. <div
  126. v-else
  127. style="width: 224px; height: 160px; position: relative"
  128. >
  129. <el-image
  130. v-if="item.value"
  131. style="width: 100%; height: 100%"
  132. :src="$methodsTools.splitImgHost(item.value + '?r=' + Math.random())"
  133. :preview-src-list="[$methodsTools.splitImgHost(item.value + '?r=' + Math.random())]"
  134. >
  135. </el-image>
  136. <p v-else>暂无上传图片</p>
  137. <div
  138. v-if="
  139. item.value &&
  140. (item.fieldKey === 'idcard_face_photo' ||
  141. item.fieldKey === 'idcard_national_photo')
  142. "
  143. style="
  144. height: 26px;
  145. bottom: 0px;
  146. width: 100%;
  147. background-color: rgb(141 141 141 / 50%);
  148. text-align: center;
  149. font-size: 28px;
  150. color: #0cdb31;
  151. position: absolute;
  152. "
  153. >
  154. <i
  155. class="el-icon-refresh-left"
  156. style="margin-right: 20px"
  157. @click="transange(-90, index)"
  158. title="向左旋转90度"
  159. ></i>
  160. <i
  161. class="el-icon-refresh-right"
  162. @click="transange(90, index)"
  163. title="向右旋转90度"
  164. ></i>
  165. </div>
  166. <div style="position: absolute; right: -100px; bottom: 0px">
  167. <el-button
  168. v-if="item.value && item.fieldKey === 'idcard_face_photo'"
  169. size="mini"
  170. type="success"
  171. onclick="document.querySelector('#file1').click()"
  172. >更换照片</el-button
  173. >
  174. <input
  175. v-if="item.value && item.fieldKey === 'idcard_face_photo'"
  176. id="file1"
  177. type="file"
  178. ref="file1"
  179. style="display: none"
  180. @change="uploadImg(index)"
  181. />
  182. <el-button
  183. v-if="
  184. item.value && item.fieldKey === 'idcard_national_photo'
  185. "
  186. type="success"
  187. size="mini"
  188. onclick="document.querySelector('#file2').click()"
  189. >更换照片</el-button
  190. >
  191. <input
  192. v-if="
  193. item.value && item.fieldKey === 'idcard_national_photo'
  194. "
  195. id="file2"
  196. type="file"
  197. ref="file2"
  198. style="display: none"
  199. @change="uploadImg(index)"
  200. />
  201. </div>
  202. </div>
  203. </div>
  204. <div v-else>{{ item.value }}</div>
  205. </li>
  206. <li class="dissty" style="border-bottom: none">
  207. <div class="stys">审核结果反馈:</div>
  208. <el-input
  209. v-model="listData.text"
  210. type="textarea"
  211. :rows="5"
  212. ></el-input>
  213. </li>
  214. </ul>
  215. </div>
  216. <span slot="footer" class="dialog-footer">
  217. <el-button @click="close">取 消</el-button>
  218. <el-button :loading="disabledBtn" @click="submitTable(1)" type="success"
  219. >审核通过</el-button
  220. >
  221. <el-button :loading="disabledBtn" @click="submitTable(3)" type="danger"
  222. >审核不通过</el-button
  223. >
  224. </span>
  225. </el-dialog>
  226. <el-dialog
  227. :visible.sync="dialogVisibleRecord"
  228. width="1000px"
  229. :show-close="false"
  230. :close-on-click-modal="false"
  231. >
  232. <div slot="title" class="hearders">
  233. <div class="leftTitle">资料审核</div>
  234. <div class="rightBoxs">
  235. <img
  236. src="@/assets/images/Close@2x.png"
  237. alt=""
  238. @click="dialogVisibleRecord = false"
  239. />
  240. </div>
  241. </div>
  242. <div slot="title" class="topStys">
  243. <div class="btnsTys">
  244. 学员编码:{{ recordList[activeIndex].userAccount }}
  245. </div>
  246. <div class="btnsTys">
  247. 学员姓名:{{ recordList[activeIndex].realname }}
  248. </div>
  249. <div class="btnsTys">
  250. 学员身份证号码:{{ recordList[activeIndex].idCard }}
  251. </div>
  252. <div class="btnsTys">
  253. 绑定手机号码:{{ recordList[activeIndex].telphone }}
  254. </div>
  255. <div style="clear: both"></div>
  256. </div>
  257. <el-row :gutter="20">
  258. <el-col :span="6">
  259. <ul class="max_heightAuto">
  260. <li
  261. class="lsTYs"
  262. v-for="(item, index) in recordList"
  263. :key="index"
  264. :class="index === activeIndex ? 'active' : ''"
  265. @click="changeIndex(index)"
  266. >
  267. {{ $methodsTools.onlyForma(item.auditTime) }}
  268. </li>
  269. </ul>
  270. </el-col>
  271. <el-col :span="18">
  272. <transition>
  273. <div class="heightstybox gdt" v-if="showIS">
  274. <ul>
  275. <li>
  276. <div class="float_lefts">
  277. 审核人:{{ recordList[activeIndex].createByName }}
  278. </div>
  279. <div class="float_lefts">
  280. {{
  281. recordList[activeIndex].status === 1
  282. ? "审核通过"
  283. : recordList[activeIndex].status === 2
  284. ? "待审核"
  285. : recordList[activeIndex].status === 3
  286. ? "审核不通过"
  287. : "无审核状态"
  288. }}
  289. </div>
  290. <div style="clear: both"></div>
  291. </li>
  292. <li
  293. class="dissty"
  294. v-for="(item, index) in recordList[activeIndex]
  295. .keyValueArrays"
  296. :key="index"
  297. >
  298. <div class="stys">{{ item.fieldName }}:</div>
  299. <div v-if="pdStatus(item.fieldKey)">
  300. <div
  301. v-if="item.fieldKey === 'recent_photos'"
  302. style="width: 145px; height: 160px"
  303. >
  304. <el-image
  305. v-if="item.value"
  306. style="width: 100%; height: 100%"
  307. :src="$methodsTools.splitImgHost(item.value)"
  308. :preview-src-list="[
  309. $methodsTools.splitImgHost(item.value),
  310. ]"
  311. >
  312. </el-image>
  313. <p v-else>暂无上传图片</p>
  314. </div>
  315. <div
  316. v-else-if="
  317. item.fieldKey === 'commitment_electr_signature'
  318. "
  319. >
  320. <div>
  321. 本人自愿做出如下承诺:本人己仔细阅读《广东
  322. 省住房和城乡建设厅关于推进住房和城乡建设领域施
  323. 工现场专业人员职业培训工作的通知》
  324. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  325. 特此承诺!
  326. </div>
  327. <div
  328. style="
  329. width: 300px;
  330. height: 150px;
  331. border: 1px solid #999;
  332. "
  333. v-if="item.value"
  334. >
  335. <el-image
  336. style="width: 100%; height: 100%"
  337. :src="$methodsTools.splitImgHost(item.value)"
  338. :preview-src-list="[
  339. $methodsTools.splitImgHost(item.value),
  340. ]"
  341. >
  342. </el-image>
  343. </div>
  344. <p v-else>暂无上传图片</p>
  345. </div>
  346. <div v-else style="width: 224px; height: 160px">
  347. <el-image
  348. v-if="item.value"
  349. style="width: 100%; height: 100%"
  350. :src="$methodsTools.splitImgHost(item.value)"
  351. :preview-src-list="[
  352. $methodsTools.splitImgHost(item.value),
  353. ]"
  354. >
  355. </el-image>
  356. <p v-else>暂无上传图片</p>
  357. </div>
  358. </div>
  359. <div v-else>{{ item.value }}</div>
  360. </li>
  361. <li class="dissty" style="border-bottom: none">
  362. <div class="stys">审核结果反馈:</div>
  363. <div>
  364. {{ recordList[activeIndex].text }}
  365. </div>
  366. </li>
  367. </ul>
  368. </div>
  369. </transition>
  370. </el-col>
  371. </el-row>
  372. <span slot="footer" class="dialog-footer">
  373. <el-button @click="dialogVisibleRecord = false">取 消</el-button>
  374. </span>
  375. </el-dialog>
  376. <el-dialog
  377. :visible.sync="dialogDR"
  378. width="660px"
  379. :show-close="false"
  380. :close-on-click-modal="false"
  381. >
  382. <div slot="title" class="hearders">
  383. <div class="leftTitle">批量导出</div>
  384. <div class="rightBoxs">
  385. <img
  386. src="@/assets/images/Close@2x.png"
  387. alt=""
  388. @click="dialogDR = false"
  389. />
  390. </div>
  391. </div>
  392. <div>
  393. <div class="swq">
  394. <img
  395. style="width: 182px; height: 168px"
  396. src="@/assets/images/dc.png"
  397. alt=""
  398. />
  399. </div>
  400. <div style="padding: 40px">
  401. <el-row>
  402. <el-col :span="12"
  403. ><div style="text-align: end; padding-right: 14px">
  404. 填写资料审核状态:
  405. </div></el-col
  406. >
  407. <el-col :span="12">
  408. <el-radio-group v-model="activeDCIndex">
  409. <el-radio
  410. style="display: block; margin-bottom: 16px"
  411. v-for="(items, indexs) in DCLIST"
  412. :key="indexs"
  413. :label="items.value"
  414. >{{ items.label }}</el-radio
  415. >
  416. </el-radio-group>
  417. </el-col>
  418. </el-row>
  419. </div>
  420. </div>
  421. <span slot="footer" class="dialog-footer">
  422. <el-button @click="dialogDR = false">取消</el-button>
  423. <el-button type="primary" @click="exputs">确定</el-button>
  424. </span>
  425. </el-dialog>
  426. </div>
  427. </template>
  428. <script>
  429. import * as baseUrls from "@/utils/request.js";
  430. import searchBoxNew from "@/components/searchBoxNew";
  431. import tableList from "@/components/tableList";
  432. import pagination from "@/components/pagination";
  433. export default {
  434. name: "DataConfig",
  435. components: { searchBoxNew, tableList, pagination },
  436. data() {
  437. return {
  438. dialogDR: false,
  439. disabledBtn: false,
  440. dialogVisibleRecord: false,
  441. shType: true,
  442. loading: false, //当前表单加载是否加载动画
  443. navText: {
  444. title: "填写资料审核",
  445. index: 0,
  446. ch: "条",
  447. num: true,
  448. border: true,
  449. choice: true,
  450. addHide: true,
  451. backFatherBtn: {
  452. status: false,
  453. title: "未定义",
  454. },
  455. },
  456. //搜索
  457. formList: [
  458. {
  459. prop: "changeStatus",
  460. placeholder: "变更状态",
  461. scope: "select",
  462. options: [
  463. {
  464. label: "正常",
  465. value: 1,
  466. },
  467. {
  468. label: "有变更",
  469. value: 2,
  470. },
  471. ],
  472. },
  473. {
  474. prop1: "applyStartTime",
  475. prop2: "applyEndTime",
  476. placeholder1: "报名开始时间",
  477. placeholder2: "报名结束时间",
  478. scope: "moreDataPicker",
  479. Diszing: true,
  480. },
  481. {
  482. prop: "companyName",
  483. placeholder: "请输入公司名称",
  484. },
  485. {
  486. prop: "realname",
  487. placeholder: "请输入学员姓名",
  488. },
  489. ],
  490. formData: {
  491. status: "",
  492. pageSize: 10,
  493. pageNum: 1,
  494. },
  495. showIS: true,
  496. // 表单
  497. tableSet: [
  498. {
  499. label: "学员编码",
  500. prop: "userAccount",
  501. hidden: true,
  502. },
  503. {
  504. label: "学员姓名",
  505. prop: "realname",
  506. hidden: true,
  507. },
  508. {
  509. label: "学员身份证",
  510. prop: "idCard",
  511. hidden: true,
  512. },
  513. {
  514. label: "绑定手机号",
  515. prop: "telphone",
  516. hidden: true,
  517. },
  518. {
  519. label: "公司名称",
  520. prop: "companyName",
  521. hidden: true,
  522. },
  523. {
  524. label: "所购商品",
  525. hidden: true,
  526. scope: "getShops",
  527. },
  528. {
  529. label: "填写资料审核状态",
  530. prop: "status",
  531. hidden: true,
  532. scope: "isOptions",
  533. options: [
  534. {
  535. label: "通过",
  536. value: 1,
  537. },
  538. {
  539. label: "待审核",
  540. value: 2,
  541. },
  542. {
  543. label: "不通过",
  544. value: 3,
  545. },
  546. ],
  547. },
  548. {
  549. label: "填写资料变更状态",
  550. prop: "changeStatus",
  551. hidden: true,
  552. scope: "isOptions",
  553. options: [
  554. {
  555. label: "正常",
  556. value: 1,
  557. },
  558. {
  559. label: "有变更",
  560. value: 2,
  561. style: "color:red",
  562. },
  563. ],
  564. },
  565. {
  566. label: "报名时间",
  567. prop: "applyTime",
  568. hidden: true,
  569. scope: "aTimeList",
  570. },
  571. {
  572. label: "第一次提交资料时间",
  573. prop: "oneTime",
  574. hidden: true,
  575. scope: "aTimeList",
  576. },
  577. {
  578. label: "最后一次提交资料时间",
  579. prop: "lastTime",
  580. hidden: true,
  581. scope: "aTimeList",
  582. },
  583. {
  584. label: "最后一次审核人",
  585. prop: "createByName",
  586. hidden: true,
  587. },
  588. {
  589. label: "最后一次审核时间",
  590. prop: "auditTime",
  591. hidden: true,
  592. scope: "aTimeList",
  593. },
  594. ],
  595. tableData: [], //表单数据
  596. total: 0, //一共多少条
  597. // 弹窗数据
  598. listData: {},
  599. statusPop: -1,
  600. dialogVisible: false,
  601. //表单验证
  602. rules: {
  603. natureName: [
  604. { required: true, message: "请输入收费性质名称", trigger: "blur" },
  605. ],
  606. status: [{ required: true, message: "请选择状态", trigger: "change" }],
  607. },
  608. listInfos: [],
  609. recordList: [{ keyValueArrays: [] }], //记录列表
  610. activeIndex: 0,
  611. activeDCIndex: 0, //导出按钮索引
  612. DCLIST: [
  613. { label: "全部", value: 0 },
  614. { label: "待审核", value: 2 },
  615. { label: "审核通过", value: 1 },
  616. { label: "审核不通过", value: 3 },
  617. ], //导出按钮列表
  618. };
  619. },
  620. async mounted() {
  621. await this.moRenBus();
  622. this.search();
  623. },
  624. async activated() {
  625. await this.moRenBus();
  626. this.search();
  627. },
  628. methods: {
  629. uploadImg(int) {
  630. var self = this;
  631. if (self.listInfos[int].fieldKey === "idcard_face_photo") {
  632. console.log("file1", this.$refs.file1);
  633. var file = this.$refs.file1[0].files[0];
  634. }
  635. if (self.listInfos[int].fieldKey === "idcard_national_photo") {
  636. var file = self.$refs.file2[0].files[0];
  637. }
  638. if (file === undefined) {
  639. return;
  640. }
  641. if (file.size > 2 * 1024 * 1024) {
  642. self.$message.error("图片不得大于2MB");
  643. return;
  644. }
  645. if (self.listInfos[int].fieldKey === "idcard_face_photo") {
  646. var type = self.$refs.file1[0].value
  647. .toLowerCase()
  648. .split(".")
  649. .splice(-1);
  650. }
  651. if (self.listInfos[int].fieldKey === "idcard_national_photo") {
  652. var type = self.$refs.file2[0].value
  653. .toLowerCase()
  654. .split(".")
  655. .splice(-1);
  656. }
  657. if (
  658. type[0] != "jpg" &&
  659. type[0] != "png" &&
  660. type[0] != "jpeg" &&
  661. type[0] != "gif"
  662. ) {
  663. self.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  664. self.$refs.file1[0].value = "";
  665. self.$refs.file2[0].value = "";
  666. return;
  667. }
  668. this.$upload.upload(file, 0).then((res) => {
  669. self.listInfos[int].value = res;
  670. var data = { id: self.listData.id, idCard1: "", idCard2: "" };
  671. if (self.listInfos[int].fieldKey === "idcard_face_photo") {
  672. data.idCard1 = res;
  673. }
  674. if (self.listInfos[int].fieldKey === "idcard_national_photo") {
  675. data.idCard2 = res;
  676. }
  677. self.baseprofileeditcard(data);
  678. });
  679. },
  680. baseprofileeditcard(data) {
  681. this.$api.baseprofileeditcard(data).then((res) => {
  682. this.$message.success("保存成功");
  683. this.addClick(data, 0);
  684. });
  685. },
  686. transange(ange, int) {
  687. var data = {
  688. id: this.listData.id,
  689. idCard1: "",
  690. idCard2: "",
  691. degree: ange,
  692. };
  693. if (this.listInfos[int].fieldKey === "idcard_face_photo") {
  694. data.idCard1 = this.listInfos[int].value;
  695. }
  696. if (this.listInfos[int].fieldKey === "idcard_national_photo") {
  697. data.idCard2 = this.listInfos[int].value;
  698. }
  699. this.baseprofileeditcard(data);
  700. },
  701. /**
  702. * 默认选择考前培训-施工七大员
  703. */
  704. moRenBus() {
  705. return new Promise((resolve, reject) => {
  706. this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
  707. for (let i = 0; i < res.rows.length; i++) {
  708. if (res.rows[i].educationName === "考前培训") {
  709. this.$api
  710. .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
  711. .then((result) => {
  712. for (let j = 0; j < result.rows.length; j++) {
  713. if (
  714. result.rows[j].projectName === "施工现场专业人员" &&
  715. result.rows[j].businessName === "七大员"
  716. ) {
  717. this.$set(
  718. this.formData,
  719. "educationTypeId",
  720. res.rows[i].id
  721. );
  722. this.$set(this.formData, "businessId", result.rows[j].id);
  723. resolve();
  724. break;
  725. }
  726. }
  727. });
  728. break;
  729. }
  730. }
  731. });
  732. });
  733. },
  734. exputs(data) {
  735. // if (!data.businessId) {
  736. // this.$message.warning("请选择业务层次");
  737. // return;
  738. // }
  739. this.$modal.loading("正在导出数据,请稍后...");
  740. this.$api
  741. .inquirebaseprofileExport(data)
  742. .then(async (res) => {
  743. for (let k in res.data) {
  744. if (res.data[k].code === 200) {
  745. await this.dowmFunc(res, k);
  746. } else {
  747. this.$message.error("code值错误:", res.data[k].code);
  748. }
  749. }
  750. })
  751. .catch((err) => {
  752. let { message } = err;
  753. if (message.includes("timeout")) {
  754. this.$message.error(
  755. "数据体量过大,无法正常导出,请调整导出的日期范围,缩小数据体量"
  756. );
  757. }
  758. })
  759. .finally(() => {
  760. this.$modal.closeLoading();
  761. });
  762. },
  763. dowmFunc(res, k) {
  764. return new Promise((resolve, reject) => {
  765. let url =
  766. baseUrls.baseURL + "common/download?fileName=" + res.data[k].msg;
  767. let link = document.createElement("a");
  768. let fileName = "导入模板" + ".xlsx";
  769. document.body.appendChild(link);
  770. link.href = url;
  771. link.dowmload = fileName;
  772. link.click();
  773. link.remove();
  774. setTimeout(() => {
  775. resolve();
  776. }, 200);
  777. });
  778. },
  779. studentLeadInfo() {
  780. document.getElementById("file").click();
  781. },
  782. //学员资料导入
  783. exportFunc(e) {
  784. let formData = new FormData();
  785. formData.append("file", e.target.files[0]);
  786. this.$api
  787. .systemapplyuserprofile(formData)
  788. .then((res) => {
  789. this.search(2);
  790. })
  791. .finally(() => {
  792. e.target.value = "";
  793. });
  794. },
  795. studentExport() {
  796. let data = {
  797. changeStatus: this.formData.changeStatus || "",
  798. companyName: this.formData.companyName || "",
  799. status:
  800. this.formData.status && this.formData.status !== 0
  801. ? [this.formData.status]
  802. : [],
  803. educationTypeId: this.formData.educationTypeId || "",
  804. businessId: this.formData.businessId || "",
  805. realname: this.formData.realname || "",
  806. applyStartTime: this.formData.applyStartTime / 1000 || "",
  807. applyEndTime: this.formData.applyEndTime / 1000 || "",
  808. };
  809. this.$api.systemapplyuserprofileexport(data).then((res) => {
  810. let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
  811. let link = document.createElement("a");
  812. let fileName = "导入模板" + ".xlsx";
  813. document.body.appendChild(link);
  814. link.href = url;
  815. link.dowmload = fileName;
  816. link.click();
  817. link.remove();
  818. });
  819. },
  820. moreActive() {
  821. let data = {
  822. changeStatus: this.formData.changeStatus || "",
  823. companyName: this.formData.companyName || "",
  824. status: this.formData.status || 0,
  825. educationTypeId: this.formData.educationTypeId || "",
  826. businessId: this.formData.businessId || "",
  827. realname: this.formData.realname || "",
  828. applyStartTime: this.formData.applyStartTime / 1000 || "",
  829. applyEndTime: this.formData.applyEndTime / 1000 || "",
  830. };
  831. this.exputs(data);
  832. },
  833. changeIndex(v) {
  834. if (this.activeIndex === v) {
  835. return;
  836. }
  837. this.showIS = false;
  838. this.activeIndex = v;
  839. setTimeout(() => {
  840. this.showIS = true;
  841. }, 50);
  842. },
  843. openRecord(v) {
  844. this.$api
  845. .inquirebaseprofilelistRecord({ userId: v.userId, goodsId: v.goodsId })
  846. .then((res) => {
  847. if (!res.rows.length) {
  848. this.$message.warning("该条数据无审核记录");
  849. return;
  850. }
  851. res.rows.forEach((item) => {
  852. item.keyValue = JSON.parse(item.keyValue);
  853. var arst = [];
  854. for (let k in item.keyValue) {
  855. if (item.keyValue[k].fieldName) {
  856. arst.push(item.keyValue[k]);
  857. }
  858. }
  859. item.keyValueArrays = arst;
  860. });
  861. this.activeIndex = 0;
  862. this.recordList = res.rows;
  863. this.dialogVisibleRecord = true;
  864. });
  865. },
  866. pdStatus(int) {
  867. if (
  868. int === "recent_photos" ||
  869. int === "idcard_face_photo" ||
  870. int === "idcard_national_photo" ||
  871. int === "commitment_electr_signature" ||
  872. int === "commitment_seal"
  873. ) {
  874. return true;
  875. }
  876. },
  877. //1通过 3不通过
  878. submitTable(int) {
  879. this.disabledBtn = true;
  880. var data = JSON.parse(JSON.stringify(this.listData));
  881. for (let k in data.keyValue) {
  882. data.keyValue[k].status = 0;
  883. }
  884. data.keyValue = JSON.stringify(data.keyValue);
  885. data.status = int;
  886. data.changeStatus = 1;
  887. this.$api
  888. .editbaseprofilesss(data)
  889. .then((res) => {
  890. this.$message.success("提交成功");
  891. this.search();
  892. this.dialogVisible = false;
  893. })
  894. .catch(() => {
  895. this.disabledBtn = false;
  896. });
  897. },
  898. loadingClose() {
  899. this.disabledBtn = false;
  900. },
  901. editInfo(v) {
  902. this.addClick(v, 0);
  903. },
  904. search(int) {
  905. this.loading = true;
  906. if (int === 1) {
  907. this.formData.pageNum = 1;
  908. }
  909. if (int === 2) {
  910. this.formData = {
  911. status: "",
  912. pageSize: 10,
  913. pageNum: 1,
  914. educationTypeId: this.formData.educationTypeId,
  915. businessId: this.formData.businessId,
  916. };
  917. }
  918. var data = JSON.parse(JSON.stringify(this.formData));
  919. console.log(this.formData, "data");
  920. if (this.formData.applyStartTime) {
  921. data.applyStartTime = data.applyStartTime / 1000;
  922. }
  923. if (this.formData.applyEndTime) {
  924. data.applyEndTime = data.applyEndTime / 1000;
  925. }
  926. this.$api
  927. .inquirebaseprofile(data)
  928. .then((res) => {
  929. this.tableData = res.rows;
  930. this.total = res.total;
  931. this.navText.index = res.total;
  932. })
  933. .finally(() => {
  934. this.loading = false;
  935. });
  936. },
  937. init() {
  938. this.search(2);
  939. },
  940. del(v) {
  941. this.$alert(
  942. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  943. "提示",
  944. {
  945. dangerouslyUseHTMLString: true,
  946. }
  947. )
  948. .then(() => {
  949. var data = {
  950. natureId: v.natureId,
  951. status: -1,
  952. };
  953. this.$api.editpaynature(data).then((res) => {
  954. this.$message.success("删除成功");
  955. this.search();
  956. });
  957. })
  958. .catch(() => {
  959. this.$message({
  960. type: "info",
  961. message: "已取消删除",
  962. });
  963. });
  964. },
  965. addClick(v, int) {
  966. if (v === undefined) {
  967. this.listData = {};
  968. } else {
  969. this.$api.obtainbaseprofile(v.id).then((res) => {
  970. res.data.keyValue = JSON.parse(res.data.keyValue);
  971. this.listData = res.data;
  972. var arst = [];
  973. for (let k in res.data.keyValue) {
  974. if (res.data.keyValue[k].fieldName) {
  975. arst.push(res.data.keyValue[k]);
  976. }
  977. }
  978. this.listInfos = arst;
  979. });
  980. }
  981. this.dialogVisible = true;
  982. },
  983. close() {
  984. this.dialogVisible = false;
  985. },
  986. handleSizeChange(v) {
  987. this.formData.pageSize = v;
  988. this.formData.pageNum = 1;
  989. this.search();
  990. },
  991. handleCurrentChange(v) {
  992. this.formData.pageNum = v;
  993. this.search();
  994. },
  995. },
  996. };
  997. </script>
  998. <style lang="less" scoped>
  999. // 进入前和结束后的状态
  1000. .v-enter,
  1001. .v-leave-to {
  1002. opacity: 0;
  1003. // transform: translateX(80px);
  1004. }
  1005. // 进入和离开的动画时间段
  1006. .v-enter-active,
  1007. .v-leave-active {
  1008. transition: all 0.5s ease;
  1009. }
  1010. .gdt {
  1011. /* 设置滚动条的样式 */
  1012. &::-webkit-scrollbar {
  1013. width: 8px;
  1014. }
  1015. /* 滚动槽 */
  1016. &::-webkit-scrollbar-track {
  1017. box-shadow: inset 6px rgba(0, 0, 0, 0.3);
  1018. border-radius: 10px;
  1019. }
  1020. /* 滚动条滑块 */
  1021. &::-webkit-scrollbar-thumb {
  1022. border-radius: 10px;
  1023. background: rgba(0, 0, 0, 0.1);
  1024. box-shadow: inset 6px rgba(0, 0, 0, 0.5);
  1025. }
  1026. &::-webkit-scrollbar-thumb:window-inactive {
  1027. background: rgba(182, 182, 182, 0.4);
  1028. }
  1029. }
  1030. .max_heightAuto {
  1031. padding: 0px 10px;
  1032. max-height: 560px;
  1033. overflow-y: auto;
  1034. }
  1035. .float_lefts {
  1036. float: left;
  1037. padding: 0px 10px;
  1038. border-radius: 12px;
  1039. background-color: #eee;
  1040. height: 35px;
  1041. line-height: 35px;
  1042. margin-right: 10px;
  1043. }
  1044. .lsTYs {
  1045. height: 40px;
  1046. border-top: 1px solid #999;
  1047. border-left: 1px solid #999;
  1048. border-right: 1px solid #999;
  1049. line-height: 39px;
  1050. cursor: pointer;
  1051. text-align: center;
  1052. &:last-child {
  1053. border-bottom: 1px solid #999 !important;
  1054. }
  1055. }
  1056. .swq {
  1057. text-align: center;
  1058. border-bottom: 1px solid #eee;
  1059. }
  1060. .active {
  1061. color: blue;
  1062. }
  1063. .heightstybox {
  1064. padding: 20px;
  1065. height: 600px;
  1066. overflow-y: auto;
  1067. }
  1068. .dissty {
  1069. display: flex;
  1070. align-items: center;
  1071. padding: 20px;
  1072. border-bottom: 1px dotted #999;
  1073. }
  1074. .stys {
  1075. flex-shrink: 0;
  1076. align-self: flex-start;
  1077. width: 200px;
  1078. padding-left: 50px;
  1079. }
  1080. .topStys {
  1081. padding: 20px;
  1082. background-color: rgb(215, 215, 215);
  1083. display: flex;
  1084. align-items: center;
  1085. overflow-x: auto;
  1086. .btnsTys {
  1087. flex-shrink: 0;
  1088. margin-right: 16px;
  1089. padding: 0px 7px;
  1090. background-color: #fff;
  1091. border-radius: 4px;
  1092. font-size: 14px;
  1093. height: 40px;
  1094. line-height: 40px;
  1095. }
  1096. }
  1097. /deep/.el-button {
  1098. border-radius: 8px;
  1099. }
  1100. /deep/ .el-dialog__body {
  1101. padding: 10px 0px;
  1102. }
  1103. /deep/.el-dialog {
  1104. border-radius: 8px;
  1105. .el-dialog__header {
  1106. padding: 0;
  1107. .hearders {
  1108. height: 40px;
  1109. display: flex;
  1110. align-items: center;
  1111. justify-content: space-between;
  1112. padding: 0px 18px 0px 20px;
  1113. border-bottom: 1px solid #e2e2e2;
  1114. .leftTitle {
  1115. font-size: 14px;
  1116. font-weight: bold;
  1117. color: #2f4378;
  1118. }
  1119. .rightBoxs {
  1120. display: flex;
  1121. align-items: center;
  1122. img {
  1123. width: 14px;
  1124. height: 14px;
  1125. margin-left: 13px;
  1126. cursor: pointer;
  1127. }
  1128. }
  1129. }
  1130. }
  1131. .el-dialog__footer {
  1132. padding: 0;
  1133. .dialog-footer {
  1134. padding: 0px 40px;
  1135. height: 70px;
  1136. border-top: 1px solid #e2e2e2;
  1137. display: flex;
  1138. align-items: center;
  1139. justify-content: center;
  1140. }
  1141. }
  1142. }
  1143. .imgBox {
  1144. width: 100%;
  1145. // height: 210px;
  1146. border: 1px solid #e2e2e2;
  1147. border-radius: 8px;
  1148. padding: 8px 8px 3px;
  1149. display: flex;
  1150. flex-direction: column;
  1151. align-items: center;
  1152. .imgLabel {
  1153. flex: 1;
  1154. width: 100%;
  1155. border: 1px dotted #e2e2e2;
  1156. color: #999;
  1157. font-size: 14px;
  1158. cursor: pointer;
  1159. border-radius: 8px;
  1160. .msPhoto {
  1161. display: flex;
  1162. justify-content: center;
  1163. align-items: center;
  1164. max-width: 100%;
  1165. max-height: 270px;
  1166. img {
  1167. max-width: 100%;
  1168. max-height: 270px;
  1169. }
  1170. }
  1171. .imgbbx {
  1172. display: flex;
  1173. flex-direction: column;
  1174. align-items: center;
  1175. justify-content: center;
  1176. width: 100%;
  1177. height: 100%;
  1178. i {
  1179. font-weight: bold;
  1180. margin: 14px 0;
  1181. font-size: 24px;
  1182. }
  1183. }
  1184. }
  1185. p {
  1186. margin: 5px 0px;
  1187. }
  1188. }
  1189. </style>