index.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. <template>
  2. <div id="dataConfig">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. :shType="shType"
  10. >
  11. <template slot="customize">
  12. <el-button size="small" type="success" @click="moreActive"
  13. >批量导出</el-button
  14. >
  15. </template>
  16. </search-box-new>
  17. <table-list
  18. :tableSets="tableSet"
  19. :tableData="tableData"
  20. :navText="navText"
  21. @addClick="addClick"
  22. :loading="loading"
  23. @editInfo="editInfo"
  24. >
  25. <template slot="btn" slot-scope="props">
  26. <el-button
  27. type="text"
  28. @click="addClick(props.scope.row, 0)"
  29. :disabled="
  30. !(
  31. props.scope.row.changeStatus === 2 || props.scope.row.status === 2
  32. )
  33. "
  34. >审核</el-button
  35. >
  36. <el-button type="text" @click="openRecord(props.scope.row)"
  37. >审核记录</el-button
  38. >
  39. </template>
  40. </table-list>
  41. <pagination
  42. :total="total"
  43. :pageSize="formData.pageSize"
  44. :currentPage="formData.pageNum"
  45. @handleSizeChange="handleSizeChange"
  46. @handleCurrentChange="handleCurrentChange"
  47. />
  48. <el-dialog
  49. @closed="loadingClose"
  50. :visible.sync="dialogVisible"
  51. width="1000px"
  52. :show-close="false"
  53. :close-on-click-modal="false"
  54. >
  55. <div slot="title" class="hearders">
  56. <div class="leftTitle">资料审核</div>
  57. <div class="rightBoxs">
  58. <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
  59. </div>
  60. </div>
  61. <div slot="title" class="topStys">
  62. <div class="btnsTys">学员编码:{{ listData.userAccount }}</div>
  63. <div class="btnsTys">学员姓名:{{ listData.realname }}</div>
  64. <div class="btnsTys">学员身份证号码:{{ listData.idCard }}</div>
  65. <div class="btnsTys">绑定手机号码:{{ listData.telphone }}</div>
  66. <div style="clear: both"></div>
  67. </div>
  68. <div class="heightstybox gdt">
  69. <ul>
  70. <li class="dissty" v-for="(item, index) in listInfos" :key="index">
  71. <div
  72. style="
  73. width: 50px;
  74. color: red;
  75. align-self: flex-start;
  76. flex-shrink: 0;
  77. "
  78. >
  79. {{ item.status === 1 ? "有变更" : "" }}
  80. </div>
  81. <div class="stys">{{ item.fieldName }}:</div>
  82. <div v-if="pdStatus(item.fieldKey)">
  83. <div
  84. v-if="item.fieldKey === 'recent_photos'"
  85. style="width: 145px; height: 160px"
  86. >
  87. <el-image
  88. v-if="item.value"
  89. style="width: 100%; height: 100%"
  90. :src="$methodsTools.splitImgHost(item.value)"
  91. :preview-src-list="[$methodsTools.splitImgHost(item.value)]"
  92. >
  93. </el-image>
  94. <p v-else>暂无上传图片</p>
  95. </div>
  96. <div v-else-if="item.fieldKey === 'commitment_electr_signature'">
  97. <div>
  98. 本人自愿做出如下承诺:本人己仔细阅读《广东
  99. 省住房和城乡建设厅关于推进住房和城乡建设领域施
  100. 工现场专业人员职业培训工作的通知》
  101. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  102. 特此承诺!
  103. </div>
  104. <div
  105. style="width: 300px; height: 150px; border: 1px solid #999"
  106. v-if="item.value"
  107. >
  108. <el-image
  109. style="width: 100%; height: 100%"
  110. :src="$methodsTools.splitImgHost(item.value)"
  111. :preview-src-list="[$methodsTools.splitImgHost(item.value)]"
  112. >
  113. </el-image>
  114. </div>
  115. <p v-else>暂无上传图片</p>
  116. </div>
  117. <div
  118. v-else
  119. style="width: 224px; height: 160px; position: relative"
  120. >
  121. <el-image
  122. v-if="item.value"
  123. style="width: 100%; height: 100%"
  124. :src="
  125. $methodsTools.splitImgHost(
  126. item.value + '?r=' + Math.random()
  127. )
  128. "
  129. :preview-src-list="[
  130. $methodsTools.splitImgHost(
  131. item.value + '?r=' + Math.random()
  132. ),
  133. ]"
  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: "educationTypeId",
  460. placeholder: "教育类型",
  461. scope: "educationType",
  462. },
  463. {
  464. prop: "businessId",
  465. placeholder: "业务层次",
  466. scope: "businessLevel",
  467. edu: "educationTypeId",
  468. },
  469. {
  470. prop: "schoolId",
  471. placeholder: "院校",
  472. scope: "schoolList",
  473. edu: "educationTypeId",
  474. },
  475. {
  476. prop: "majorId",
  477. placeholder: "专业",
  478. scope: "Professional",
  479. edu: "educationTypeId",
  480. },
  481. {
  482. prop: "changeStatus",
  483. placeholder: "变更状态",
  484. scope: "select",
  485. options: [
  486. {
  487. label: "正常",
  488. value: 1,
  489. },
  490. {
  491. label: "有变更",
  492. value: 2,
  493. },
  494. ],
  495. },
  496. {
  497. prop1: "searchStartTime",
  498. prop2: "searchEndTime",
  499. placeholder1: "查询开始时间",
  500. placeholder2: "查询结束时间",
  501. scope: "moreDataPicker",
  502. Diszing: true,
  503. },
  504. {
  505. prop: "realname",
  506. placeholder: "请输入学员姓名",
  507. },
  508. ],
  509. formData: {
  510. status: "",
  511. pageSize: 10,
  512. pageNum: 1,
  513. },
  514. showIS: true,
  515. // 表单
  516. tableSet: [
  517. {
  518. label: "学员编码",
  519. prop: "userAccount",
  520. hidden: true,
  521. },
  522. {
  523. label: "学员姓名",
  524. prop: "realname",
  525. hidden: true,
  526. },
  527. {
  528. label: "学员身份证",
  529. prop: "idCard",
  530. hidden: true,
  531. },
  532. {
  533. label: "绑定手机号",
  534. prop: "telphone",
  535. hidden: true,
  536. },
  537. {
  538. label: "所购商品",
  539. hidden: true,
  540. scope: "getShops",
  541. },
  542. {
  543. label: "填写资料审核状态",
  544. prop: "status",
  545. hidden: true,
  546. scope: "isOptions",
  547. options: [
  548. {
  549. label: "通过",
  550. value: 1,
  551. },
  552. {
  553. label: "待审核",
  554. value: 2,
  555. },
  556. {
  557. label: "不通过",
  558. value: 3,
  559. },
  560. ],
  561. },
  562. {
  563. label: "填写资料变更状态",
  564. prop: "changeStatus",
  565. hidden: true,
  566. scope: "isOptions",
  567. options: [
  568. {
  569. label: "正常",
  570. value: 1,
  571. },
  572. {
  573. label: "有变更",
  574. value: 2,
  575. style: "color:red",
  576. },
  577. ],
  578. },
  579. {
  580. label: "第一次提交资料时间",
  581. prop: "oneTime",
  582. hidden: true,
  583. scope: "aTimeList",
  584. },
  585. {
  586. label: "最后一次提交资料时间",
  587. prop: "lastTime",
  588. hidden: true,
  589. scope: "aTimeList",
  590. },
  591. {
  592. label: "最后一次审核人",
  593. prop: "createByName",
  594. hidden: true,
  595. },
  596. {
  597. label: "最后一次审核时间",
  598. prop: "auditTime",
  599. hidden: true,
  600. scope: "aTimeList",
  601. },
  602. ],
  603. tableData: [], //表单数据
  604. total: 0, //一共多少条
  605. // 弹窗数据
  606. listData: {},
  607. statusPop: -1,
  608. dialogVisible: false,
  609. //表单验证
  610. rules: {
  611. natureName: [
  612. { required: true, message: "请输入收费性质名称", trigger: "blur" },
  613. ],
  614. status: [{ required: true, message: "请选择状态", trigger: "change" }],
  615. },
  616. listInfos: [],
  617. recordList: [{ keyValueArrays: [] }], //记录列表
  618. activeIndex: 0,
  619. activeDCIndex: 0, //导出按钮索引
  620. DCLIST: [
  621. { label: "全部", value: 0 },
  622. { label: "待审核", value: 2 },
  623. { label: "审核通过", value: 1 },
  624. { label: "审核不通过", value: 3 },
  625. ], //导出按钮列表
  626. };
  627. },
  628. mounted() {
  629. if (
  630. this.$route.params.educationId &&
  631. this.$route.params.businessId &&
  632. this.$route.params.type
  633. ) {
  634. this.$set(
  635. this.formData,
  636. "educationTypeId",
  637. this.$route.params.educationId
  638. );
  639. this.$set(this.formData, "businessId", this.$route.params.businessId);
  640. this.$set(this.formData, "status", this.$route.params.type);
  641. this.$refs.searchBox.changeEducationType(
  642. this.$route.params.educationId,
  643. true
  644. );
  645. this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
  646. }
  647. this.search();
  648. },
  649. activated() {
  650. this.search();
  651. },
  652. methods: {
  653. uploadImg(int) {
  654. var self = this;
  655. if (self.listInfos[int].fieldKey === "idcard_face_photo") {
  656. console.log("file1", this.$refs.file1);
  657. var file = this.$refs.file1[0].files[0];
  658. }
  659. if (self.listInfos[int].fieldKey === "idcard_national_photo") {
  660. var file = self.$refs.file2[0].files[0];
  661. }
  662. if (file === undefined) {
  663. return;
  664. }
  665. if (file.size > 2 * 1024 * 1024) {
  666. self.$message.error("图片不得大于2MB");
  667. return;
  668. }
  669. if (self.listInfos[int].fieldKey === "idcard_face_photo") {
  670. var type = self.$refs.file1[0].value
  671. .toLowerCase()
  672. .split(".")
  673. .splice(-1);
  674. }
  675. if (self.listInfos[int].fieldKey === "idcard_national_photo") {
  676. var type = self.$refs.file2[0].value
  677. .toLowerCase()
  678. .split(".")
  679. .splice(-1);
  680. }
  681. if (
  682. type[0] != "jpg" &&
  683. type[0] != "png" &&
  684. type[0] != "jpeg" &&
  685. type[0] != "gif"
  686. ) {
  687. self.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  688. self.$refs.file1[0].value = "";
  689. self.$refs.file2[0].value = "";
  690. return;
  691. }
  692. this.$upload.upload(file, 0).then((res) => {
  693. self.listInfos[int].value = res;
  694. var data = { id: self.listData.id, idCard1: "", idCard2: "" };
  695. if (self.listInfos[int].fieldKey === "idcard_face_photo") {
  696. data.idCard1 = res;
  697. }
  698. if (self.listInfos[int].fieldKey === "idcard_national_photo") {
  699. data.idCard2 = res;
  700. }
  701. self.baseprofileeditcard(data);
  702. });
  703. },
  704. baseprofileeditcard(data) {
  705. this.$api.baseprofileeditcard(data).then((res) => {
  706. this.$message.success("保存成功");
  707. this.addClick(data, 0);
  708. });
  709. },
  710. transange(ange, int) {
  711. var data = {
  712. id: this.listData.id,
  713. idCard1: "",
  714. idCard2: "",
  715. degree: ange,
  716. };
  717. if (this.listInfos[int].fieldKey === "idcard_face_photo") {
  718. data.idCard1 = this.listInfos[int].value;
  719. }
  720. if (this.listInfos[int].fieldKey === "idcard_national_photo") {
  721. data.idCard2 = this.listInfos[int].value;
  722. }
  723. this.baseprofileeditcard(data);
  724. },
  725. exputs(data) {
  726. // if (!data.businessId) {
  727. // this.$message.warning("请选择业务层次");
  728. // return;
  729. // }
  730. this.$modal.loading("正在导出数据,请稍后...");
  731. this.$api
  732. .inquirebaseprofileExport(data)
  733. .then(async (res) => {
  734. for (let k in res.data) {
  735. if (res.data[k].code === 200) {
  736. await this.dowmFunc(res, k);
  737. } else {
  738. this.$message.error("code值错误:", res.data[k].code);
  739. }
  740. }
  741. })
  742. .catch((err) => {
  743. let { message } = err;
  744. if (message.includes("timeout")) {
  745. this.$message.error(
  746. "数据体量过大,无法正常导出,请调整导出的日期范围,缩小数据体量"
  747. );
  748. }
  749. })
  750. .finally(() => {
  751. this.$modal.closeLoading();
  752. });
  753. },
  754. dowmFunc(res, k) {
  755. return new Promise((resolve, reject) => {
  756. let url =
  757. baseUrls.baseURL + "common/download?fileName=" + res.data[k].msg;
  758. let link = document.createElement("a");
  759. let fileName = "导入模板" + ".xlsx";
  760. document.body.appendChild(link);
  761. link.href = url;
  762. link.dowmload = fileName;
  763. link.click();
  764. link.remove();
  765. setTimeout(() => {
  766. resolve();
  767. }, 200);
  768. });
  769. },
  770. moreActive() {
  771. let data = {
  772. changeStatus: this.formData.changeStatus || "",
  773. status: this.formData.status || 0,
  774. educationTypeId: this.formData.educationTypeId || "",
  775. businessId: this.formData.businessId || "",
  776. majorId: this.formData.majorId || "",
  777. schoolId: this.formData.schoolId || "",
  778. realname: this.formData.realname || "",
  779. searchStartTime: this.formData.searchStartTime / 1000 || "",
  780. searchEndTime: this.formData.searchEndTime / 1000 || "",
  781. };
  782. this.exputs(data);
  783. },
  784. changeIndex(v) {
  785. if (this.activeIndex === v) {
  786. return;
  787. }
  788. this.showIS = false;
  789. this.activeIndex = v;
  790. setTimeout(() => {
  791. this.showIS = true;
  792. }, 50);
  793. },
  794. openRecord(v) {
  795. this.$api
  796. .inquirebaseprofilelistRecord({ userId: v.userId, goodsId: v.goodsId })
  797. .then((res) => {
  798. if (!res.rows.length) {
  799. this.$message.warning("该条数据无审核记录");
  800. return;
  801. }
  802. res.rows.forEach((item) => {
  803. item.keyValue = JSON.parse(item.keyValue);
  804. var arst = [];
  805. for (let k in item.keyValue) {
  806. if (item.keyValue[k].fieldName) {
  807. arst.push(item.keyValue[k]);
  808. }
  809. }
  810. item.keyValueArrays = arst;
  811. });
  812. this.activeIndex = 0;
  813. this.recordList = res.rows;
  814. this.dialogVisibleRecord = true;
  815. });
  816. },
  817. pdStatus(int) {
  818. if (
  819. int === "recent_photos" ||
  820. int === "idcard_face_photo" ||
  821. int === "idcard_national_photo" ||
  822. int === "commitment_electr_signature" ||
  823. int === "commitment_seal"
  824. ) {
  825. return true;
  826. }
  827. },
  828. //1通过 3不通过
  829. submitTable(int) {
  830. this.disabledBtn = true;
  831. var data = JSON.parse(JSON.stringify(this.listData));
  832. for (let k in data.keyValue) {
  833. data.keyValue[k].status = 0;
  834. }
  835. data.keyValue = JSON.stringify(data.keyValue);
  836. data.status = int;
  837. data.changeStatus = 1;
  838. this.$api
  839. .editbaseprofilesss(data)
  840. .then((res) => {
  841. this.$message.success("提交成功");
  842. this.search();
  843. this.dialogVisible = false;
  844. })
  845. .catch(() => {
  846. this.disabledBtn = false;
  847. });
  848. },
  849. loadingClose() {
  850. this.disabledBtn = false;
  851. },
  852. editInfo(v) {
  853. this.addClick(v, 0);
  854. },
  855. search(int) {
  856. this.loading = true;
  857. if (int === 1) {
  858. this.formData.pageNum = 1;
  859. }
  860. if (int === 2) {
  861. this.formData = {
  862. status: "",
  863. pageSize: 10,
  864. pageNum: 1,
  865. };
  866. }
  867. var data = JSON.parse(JSON.stringify(this.formData));
  868. if (this.formData.searchStartTime) {
  869. data.searchStartTime = data.searchStartTime / 1000;
  870. }
  871. if (this.formData.searchEndTime) {
  872. data.searchEndTime = data.searchEndTime / 1000;
  873. }
  874. this.$api
  875. .inquirebaseprofile(data)
  876. .then((res) => {
  877. this.tableData = res.rows;
  878. this.total = res.total;
  879. this.navText.index = res.total;
  880. })
  881. .finally(() => {
  882. this.loading = false;
  883. });
  884. },
  885. init() {
  886. this.search(2);
  887. },
  888. del(v) {
  889. this.$alert(
  890. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  891. "提示",
  892. {
  893. dangerouslyUseHTMLString: true,
  894. }
  895. )
  896. .then(() => {
  897. var data = {
  898. natureId: v.natureId,
  899. status: -1,
  900. };
  901. this.$api.editpaynature(data).then((res) => {
  902. this.$message.success("删除成功");
  903. this.search();
  904. });
  905. })
  906. .catch(() => {
  907. this.$message({
  908. type: "info",
  909. message: "已取消删除",
  910. });
  911. });
  912. },
  913. addClick(v, int) {
  914. if (v === undefined) {
  915. this.listData = {};
  916. } else {
  917. this.$api.obtainbaseprofile(v.id).then((res) => {
  918. res.data.keyValue = JSON.parse(res.data.keyValue);
  919. this.listData = res.data;
  920. var arst = [];
  921. for (let k in res.data.keyValue) {
  922. if (res.data.keyValue[k].fieldName) {
  923. arst.push(res.data.keyValue[k]);
  924. }
  925. }
  926. this.listInfos = arst;
  927. });
  928. }
  929. this.dialogVisible = true;
  930. },
  931. close() {
  932. this.dialogVisible = false;
  933. },
  934. handleSizeChange(v) {
  935. this.formData.pageSize = v;
  936. this.formData.pageNum = 1;
  937. this.search();
  938. },
  939. handleCurrentChange(v) {
  940. this.formData.pageNum = v;
  941. this.search();
  942. },
  943. },
  944. };
  945. </script>
  946. <style lang="less" scoped>
  947. // 进入前和结束后的状态
  948. .v-enter,
  949. .v-leave-to {
  950. opacity: 0;
  951. // transform: translateX(80px);
  952. }
  953. // 进入和离开的动画时间段
  954. .v-enter-active,
  955. .v-leave-active {
  956. transition: all 0.5s ease;
  957. }
  958. .gdt {
  959. /* 设置滚动条的样式 */
  960. &::-webkit-scrollbar {
  961. width: 8px;
  962. }
  963. /* 滚动槽 */
  964. &::-webkit-scrollbar-track {
  965. box-shadow: inset 6px rgba(0, 0, 0, 0.3);
  966. border-radius: 10px;
  967. }
  968. /* 滚动条滑块 */
  969. &::-webkit-scrollbar-thumb {
  970. border-radius: 10px;
  971. background: rgba(0, 0, 0, 0.1);
  972. box-shadow: inset 6px rgba(0, 0, 0, 0.5);
  973. }
  974. &::-webkit-scrollbar-thumb:window-inactive {
  975. background: rgba(182, 182, 182, 0.4);
  976. }
  977. }
  978. .max_heightAuto {
  979. padding: 0px 10px;
  980. max-height: 560px;
  981. overflow-y: auto;
  982. }
  983. .float_lefts {
  984. float: left;
  985. padding: 0px 10px;
  986. border-radius: 12px;
  987. background-color: #eee;
  988. height: 35px;
  989. line-height: 35px;
  990. margin-right: 10px;
  991. }
  992. .lsTYs {
  993. height: 40px;
  994. border-top: 1px solid #999;
  995. border-left: 1px solid #999;
  996. border-right: 1px solid #999;
  997. line-height: 39px;
  998. cursor: pointer;
  999. text-align: center;
  1000. &:last-child {
  1001. border-bottom: 1px solid #999 !important;
  1002. }
  1003. }
  1004. .swq {
  1005. text-align: center;
  1006. border-bottom: 1px solid #eee;
  1007. }
  1008. .active {
  1009. color: blue;
  1010. }
  1011. .heightstybox {
  1012. padding: 20px;
  1013. height: 600px;
  1014. overflow-y: auto;
  1015. }
  1016. .dissty {
  1017. display: flex;
  1018. align-items: center;
  1019. padding: 20px;
  1020. border-bottom: 1px dotted #999;
  1021. }
  1022. .stys {
  1023. flex-shrink: 0;
  1024. align-self: flex-start;
  1025. width: 200px;
  1026. padding-left: 50px;
  1027. }
  1028. .topStys {
  1029. padding: 20px;
  1030. background-color: rgb(215, 215, 215);
  1031. display: flex;
  1032. align-items: center;
  1033. overflow-x: auto;
  1034. .btnsTys {
  1035. flex-shrink: 0;
  1036. margin-right: 16px;
  1037. padding: 0px 7px;
  1038. background-color: #fff;
  1039. border-radius: 4px;
  1040. font-size: 14px;
  1041. height: 40px;
  1042. line-height: 40px;
  1043. }
  1044. }
  1045. /deep/.el-button {
  1046. border-radius: 8px;
  1047. }
  1048. /deep/ .el-dialog__body {
  1049. padding: 10px 0px;
  1050. }
  1051. /deep/.el-dialog {
  1052. border-radius: 8px;
  1053. .el-dialog__header {
  1054. padding: 0;
  1055. .hearders {
  1056. height: 40px;
  1057. display: flex;
  1058. align-items: center;
  1059. justify-content: space-between;
  1060. padding: 0px 18px 0px 20px;
  1061. border-bottom: 1px solid #e2e2e2;
  1062. .leftTitle {
  1063. font-size: 14px;
  1064. font-weight: bold;
  1065. color: #2f4378;
  1066. }
  1067. .rightBoxs {
  1068. display: flex;
  1069. align-items: center;
  1070. img {
  1071. width: 14px;
  1072. height: 14px;
  1073. margin-left: 13px;
  1074. cursor: pointer;
  1075. }
  1076. }
  1077. }
  1078. }
  1079. .el-dialog__footer {
  1080. padding: 0;
  1081. .dialog-footer {
  1082. padding: 0px 40px;
  1083. height: 70px;
  1084. border-top: 1px solid #e2e2e2;
  1085. display: flex;
  1086. align-items: center;
  1087. justify-content: center;
  1088. }
  1089. }
  1090. }
  1091. .imgBox {
  1092. width: 100%;
  1093. // height: 210px;
  1094. border: 1px solid #e2e2e2;
  1095. border-radius: 8px;
  1096. padding: 8px 8px 3px;
  1097. display: flex;
  1098. flex-direction: column;
  1099. align-items: center;
  1100. .imgLabel {
  1101. flex: 1;
  1102. width: 100%;
  1103. border: 1px dotted #e2e2e2;
  1104. color: #999;
  1105. font-size: 14px;
  1106. cursor: pointer;
  1107. border-radius: 8px;
  1108. .msPhoto {
  1109. display: flex;
  1110. justify-content: center;
  1111. align-items: center;
  1112. max-width: 100%;
  1113. max-height: 270px;
  1114. img {
  1115. max-width: 100%;
  1116. max-height: 270px;
  1117. }
  1118. }
  1119. .imgbbx {
  1120. display: flex;
  1121. flex-direction: column;
  1122. align-items: center;
  1123. justify-content: center;
  1124. width: 100%;
  1125. height: 100%;
  1126. i {
  1127. font-weight: bold;
  1128. margin: 14px 0;
  1129. font-size: 24px;
  1130. }
  1131. }
  1132. }
  1133. p {
  1134. margin: 5px 0px;
  1135. }
  1136. }
  1137. </style>