byTrainee.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224
  1. <template>
  2. <div id="byTrainee">
  3. <div class="dis_fs">
  4. <div class="dis_left">
  5. <div class="dis_fs">
  6. <input type="text" class="inputSty" v-model="formData.searchKey" />
  7. <div class="btnSearchSty" @click="getStudent">查询</div>
  8. <div class="btnSearchSty" @click="getStudent(1)">重置</div>
  9. </div>
  10. <ul>
  11. <li
  12. class="listy"
  13. :class="active === item.userId ? 'active' : ''"
  14. v-for="(item, index) in studentList"
  15. :key="index"
  16. @click="changeNewActive(item)"
  17. >
  18. {{ item.realname }} {{ item.idCard }}
  19. </li>
  20. </ul>
  21. <el-pagination
  22. style="text-align: center"
  23. small
  24. layout="prev, pager, next"
  25. :total="total"
  26. :current-page.sync="formData.pageNum"
  27. @current-change="handleCurrentChange"
  28. >
  29. </el-pagination>
  30. </div>
  31. <div class="dis_right" v-if="active">
  32. <el-table
  33. ref="multipleTable"
  34. :data="tableData"
  35. border
  36. :header-cell-style="{
  37. 'background-color': '#eee',
  38. padding: '8px',
  39. color: '#333',
  40. }"
  41. @expand-change="expandChange"
  42. >
  43. <!-- 插槽 -->
  44. <el-table-column type="expand">
  45. <template slot-scope="props">
  46. <el-table
  47. ref="multipleTable"
  48. :data="props.row.children"
  49. border
  50. :header-cell-style="{
  51. 'background-color': '#eee',
  52. padding: '8px',
  53. color: '#333',
  54. }"
  55. >
  56. <el-table-column
  57. v-for="(item, index) in tableSet"
  58. :width="item.width"
  59. :key="index"
  60. :label="item.label"
  61. align="center"
  62. :show-overflow-tooltip="true"
  63. header-align="center"
  64. >
  65. <template slot-scope="scope">
  66. <div v-if="item.scope === 'isOptions'">
  67. <template v-for="(itemt, indext) in item.options">
  68. <span
  69. :key="indext"
  70. v-if="itemt.value === scope.row[item.prop]"
  71. >{{ itemt.label }}</span
  72. >
  73. </template>
  74. </div>
  75. <div v-else-if="item.scope === 'resultType'">
  76. {{ scope.row[item.prop1] }}
  77. <span
  78. :style="
  79. scope.row[item.prop2] === 1
  80. ? 'color:purple'
  81. : scope.row[item.prop2] === 0
  82. ? 'color:red;'
  83. : ''
  84. "
  85. >
  86. {{
  87. scope.row[item.prop2] === 1
  88. ? "通过"
  89. : scope.row[item.prop2] === 0
  90. ? "不通过"
  91. : ""
  92. }}
  93. </span>
  94. </div>
  95. <div v-else-if="item.scope === 'goodsInfos'">
  96. {{
  97. scope.row[item.prop1] +
  98. "-" +
  99. scope.row[item.prop2] +
  100. "-"
  101. }}<span style="color: red"
  102. >¥{{ scope.row[item.prop3] }}</span
  103. >
  104. </div>
  105. <div v-else-if="item.scope === 'applyInfos'">
  106. <div>{{ scope.row[item.prop] }}</div>
  107. {{
  108. $methodsTools.onlyForma(scope.row[item.prop1], false)
  109. }}
  110. {{
  111. scope.row[item.prop2]
  112. ? scope.row[item.prop2].replace("-", ":")
  113. : ""
  114. }}-{{
  115. scope.row[item.prop3]
  116. ? scope.row[item.prop3].replace("-", ":")
  117. : ""
  118. }}
  119. </div>
  120. <span v-else-if="item.scope === 'aTimeList'">{{
  121. scope.row[item.prop] === null
  122. ? "--"
  123. : $methodsTools.onlyForma(scope.row[item.prop])
  124. }}</span>
  125. <div v-else>{{ scope.row[item.prop] }}</div>
  126. </template>
  127. </el-table-column>
  128. <el-table-column
  129. label="操作"
  130. align="center"
  131. fixed="right"
  132. width="180px"
  133. v-if="false"
  134. >
  135. <template slot-scope="scope">
  136. <el-button
  137. type="text"
  138. :disabled="
  139. scope.row.subscribeStatus === 2 ||
  140. scope.row.examStatus !== 0
  141. "
  142. @click="openClearYX(scope.row)"
  143. >取消预约</el-button
  144. ><el-button
  145. type="text"
  146. :disabled="scope.row.subscribeStatus === 2"
  147. @click="editExam(scope.row)"
  148. >考试登记</el-button
  149. ><el-button
  150. type="text"
  151. :disabled="scope.row.subscribeStatus === 2"
  152. @click="openZS(scope.row)"
  153. >成绩和证书登记</el-button
  154. >
  155. </template>
  156. </el-table-column>
  157. </el-table>
  158. </template></el-table-column
  159. >
  160. <!-- 插槽 -->
  161. <template v-for="(item, index) in tableList">
  162. <el-table-column
  163. v-if="item.scope !== 'inputs'"
  164. :width="item.width"
  165. :key="index"
  166. :label="item.label"
  167. align="center"
  168. :show-overflow-tooltip="true"
  169. header-align="center"
  170. >
  171. <template slot-scope="scope">
  172. <div v-if="item.scope === 'goodsName'">
  173. {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}-
  174. <span style="color: red">¥{{ scope.row[item.prop3] }}</span>
  175. </div>
  176. <div v-else-if="item.scope === 'numTypes'">
  177. 总:{{ scope.row[item.prop1] }} 消耗:{{
  178. scope.row[item.prop2]
  179. }}
  180. 剩余:{{ scope.row[item.prop1] - scope.row[item.prop2] }}
  181. <el-button type="text" @click="seeInfos(scope.row, item.type)"
  182. >查看</el-button
  183. >
  184. </div></template
  185. >
  186. </el-table-column></template
  187. >
  188. </el-table>
  189. <pagination
  190. :total="totalRight"
  191. :pageSize="tabSearchData.pageSize"
  192. :currentPage="tabSearchData.pageNum"
  193. @handleSizeChange="handleSizeChange"
  194. @handleCurrentChange="handleCurrentChanges"
  195. />
  196. </div>
  197. <p v-else style="text-align: center; width: 100%">请选择学员</p>
  198. </div>
  199. <el-dialog
  200. :visible.sync="dialogCG"
  201. width="560px"
  202. :show-close="false"
  203. :close-on-click-modal="false"
  204. >
  205. <div slot="title" class="hearders">
  206. <div class="leftTitle">考试登记</div>
  207. <div class="rightBoxs">
  208. <img
  209. src="@/assets/images/Close@2x.png"
  210. alt=""
  211. @click="dialogCG = false"
  212. />
  213. </div>
  214. </div>
  215. <div>
  216. <div class="aListBottom">{{ listData.realname }}</div>
  217. <el-form
  218. :model="listData"
  219. label-width="120px"
  220. class="demo-ruleForm"
  221. :rules="rules"
  222. ref="listData"
  223. >
  224. <el-form-item label="考试登记状态" prop="examStatus">
  225. <el-radio-group v-model="listData.examStatus">
  226. <el-radio :label="1">正常</el-radio>
  227. <el-radio :label="2">缺考</el-radio>
  228. <el-radio :label="3">作弊</el-radio>
  229. <el-radio :label="4">替考</el-radio>
  230. </el-radio-group>
  231. </el-form-item>
  232. <el-form-item label="考试登记补充" prop="remark">
  233. <el-input
  234. v-model="listData.remark"
  235. type="textarea"
  236. :rows="4"
  237. ></el-input>
  238. </el-form-item>
  239. </el-form>
  240. </div>
  241. <span slot="footer" class="dialog-footer">
  242. <el-button @click="dialogCG = false">取消</el-button>
  243. <el-button
  244. :disabled="
  245. listData.performance != null || listData.performance != undefined
  246. "
  247. type="primary"
  248. @click="submitChecks('listData')"
  249. >确定</el-button
  250. >
  251. </span>
  252. </el-dialog>
  253. <el-dialog
  254. :visible.sync="dialogDJ"
  255. width="420px"
  256. :show-close="false"
  257. :close-on-click-modal="false"
  258. >
  259. <div slot="title" class="hearders">
  260. <div class="leftTitle">取消预约</div>
  261. <div class="rightBoxs">
  262. <img
  263. src="@/assets/images/Close@2x.png"
  264. alt=""
  265. @click="dialogDJ = false"
  266. />
  267. </div>
  268. </div>
  269. <div>
  270. <div class="aListBottom">{{ listData.realname }}</div>
  271. <p style="margin: 0px">您确定要取消所选学员的考试预约吗?</p>
  272. <p style="margin: 0px">取消后将无法恢复,请慎重考虑!</p>
  273. </div>
  274. <span slot="footer" class="dialog-footer">
  275. <el-button @click="dialogDJ = false">取消</el-button>
  276. <el-button type="primary" @click="submitChecksDJ">确定</el-button>
  277. </span>
  278. </el-dialog>
  279. <el-dialog
  280. :visible.sync="dialogPLS"
  281. width="460px"
  282. :show-close="false"
  283. :close-on-click-modal="false"
  284. >
  285. <div slot="title" class="hearders">
  286. <div class="leftTitle">成绩和证书登记</div>
  287. <div class="rightBoxs">
  288. <img
  289. src="@/assets/images/Close@2x.png"
  290. alt=""
  291. @click="dialogPLS = false"
  292. />
  293. </div>
  294. </div>
  295. <div>
  296. <div class="aListBottom">{{ listData.realname }}</div>
  297. <el-form label-width="100px">
  298. <el-form-item label="考试成绩" required>
  299. <el-input-number
  300. :controls="false"
  301. v-model="listData.performance"
  302. :min="0"
  303. ></el-input-number
  304. >分
  305. </el-form-item>
  306. <el-form-item label="考试结果" required>
  307. <el-radio-group v-model="listData.result">
  308. <el-radio :label="1">通过</el-radio>
  309. <el-radio :label="0">不通过</el-radio>
  310. </el-radio-group>
  311. </el-form-item>
  312. <el-form-item label="证书编号">
  313. <el-input v-model="listData.certificateCode"></el-input>
  314. </el-form-item>
  315. <el-form-item label="登记补充">
  316. <el-input
  317. v-model="listData.remark"
  318. type="textarea"
  319. :rows="4"
  320. ></el-input>
  321. </el-form-item>
  322. </el-form>
  323. </div>
  324. <span slot="footer" class="dialog-footer">
  325. <el-button @click="dialogPLS = false">取消</el-button>
  326. <el-button type="primary" @click="submitChecksPals">确定</el-button>
  327. </span>
  328. </el-dialog>
  329. <el-dialog
  330. :visible.sync="dialoginfoWatch"
  331. width="760px"
  332. :show-close="false"
  333. :close-on-click-modal="false"
  334. >
  335. <div slot="title" class="hearders">
  336. <div class="leftTitle">
  337. {{
  338. activeInfoType === 1
  339. ? "考试次数"
  340. : activeInfoType === 2
  341. ? "前培次数"
  342. : "未知"
  343. }}
  344. </div>
  345. <div class="rightBoxs">
  346. <img
  347. src="@/assets/images/Close@2x.png"
  348. alt=""
  349. @click="dialoginfoWatch = false"
  350. />
  351. </div>
  352. </div>
  353. <div>
  354. <el-form :model="infoData" class="demo-form-inline" label-width="120px">
  355. <el-button type="info" style="margin-bottom: 20px" size="mini"
  356. >商品自带{{
  357. activeInfoType === 1
  358. ? "考试次数"
  359. : activeInfoType === 2
  360. ? "前培次数"
  361. : "未知"
  362. }}</el-button
  363. >
  364. <el-form-item label="商品名称:">
  365. <span
  366. >{{ infoData.goodsCode }}-{{ infoData.goodsName }}-¥{{
  367. infoData.standPrice
  368. }}</span
  369. >
  370. </el-form-item>
  371. <el-form-item
  372. :label="
  373. activeInfoType === 1
  374. ? '考试次数:'
  375. : activeInfoType === 2
  376. ? '前培次数:'
  377. : '未知'
  378. "
  379. >
  380. <span>{{
  381. activeInfoType === 1
  382. ? infoData.examNumber - infoData.examNumberAll
  383. : activeInfoType === 2
  384. ? infoData.doNumber - infoData.doNumberAll
  385. : ""
  386. }}</span>
  387. </el-form-item>
  388. <div v-if="activeInfoType === 1">
  389. <el-button type="info" style="margin-bottom: 20px" size="mini"
  390. >补考商品自带考试次数</el-button
  391. >
  392. <div
  393. v-for="(item, index) in infoData.userExamGoodsSupplement"
  394. :key="index"
  395. >
  396. <el-form-item label="商品名称:">
  397. <span
  398. >{{ item.code }}-{{ item.goodsName }}({{
  399. item.educationName +
  400. "-" +
  401. item.projectName +
  402. "-" +
  403. item.businessName
  404. }})-¥{{ item.standPrice }}</span
  405. >
  406. </el-form-item>
  407. <el-col :span="24"
  408. ><el-form-item label="考试次数:">{{
  409. item.examNumber
  410. }}</el-form-item></el-col
  411. >
  412. <!-- <el-col :span="16"
  413. ><el-form-item label="使用有效期:"
  414. >{{ $methodsTools.onlyForma(item.makeStartTime, false) }}至{{
  415. $methodsTools.onlyForma(item.makeEndTime, false)
  416. }}</el-form-item
  417. ></el-col
  418. > -->
  419. </div>
  420. </div>
  421. <div v-if="activeInfoType === 2">
  422. <el-button type="info" style="margin-bottom: 20px" size="mini"
  423. >前培商品自带前培次数</el-button
  424. >
  425. <div
  426. v-for="(item, index) in infoData.userExamGoodsSupplementVos"
  427. :key="index"
  428. >
  429. <el-form-item label="商品名称:">
  430. <span
  431. >{{ item.code }}-{{ item.goodsName }}({{
  432. item.educationName +
  433. "-" +
  434. item.projectName +
  435. "-" +
  436. item.businessName
  437. }})-¥{{ item.standPrice }}</span
  438. >
  439. </el-form-item>
  440. <el-col :span="24"
  441. ><el-form-item label="前培次数:">{{
  442. item.doNumber
  443. }}</el-form-item></el-col
  444. >
  445. <!-- <el-col :span="16"
  446. ><el-form-item label="使用有效期:"
  447. >{{ $methodsTools.onlyForma(item.makeStartTime, false) }}至{{
  448. $methodsTools.onlyForma(item.makeEndTime, false)
  449. }}</el-form-item
  450. ></el-col
  451. > -->
  452. </div>
  453. </div>
  454. <el-button type="info" style="margin-bottom: 20px" size="mini"
  455. >消耗{{
  456. activeInfoType === 1
  457. ? "考试次数"
  458. : activeInfoType === 2
  459. ? "前培次数"
  460. : "未知"
  461. }}</el-button
  462. >
  463. <el-form-item
  464. :label="
  465. activeInfoType === 1
  466. ? '考试次数:'
  467. : activeInfoType === 2
  468. ? '前培次数:'
  469. : '未知'
  470. "
  471. >
  472. <span>{{
  473. activeInfoType === 1
  474. ? infoData.expendNumber
  475. : activeInfoType === 2
  476. ? infoData.expendBefore
  477. : ""
  478. }}</span>
  479. </el-form-item>
  480. <el-button type="info" style="margin-bottom: 20px" size="mini">{{
  481. activeInfoType === 1
  482. ? "剩余考试次数"
  483. : activeInfoType === 2
  484. ? "剩余前培次数"
  485. : "未知"
  486. }}</el-button>
  487. <el-form-item
  488. :label="
  489. activeInfoType === 1
  490. ? '剩余考试次数:'
  491. : activeInfoType === 2
  492. ? '剩余前培次数:'
  493. : '未知'
  494. "
  495. >
  496. <span>{{
  497. activeInfoType === 1
  498. ? infoData.examNumber - infoData.expendNumber
  499. : activeInfoType === 2
  500. ? infoData.doNumber - infoData.expendBefore
  501. : ""
  502. }}</span>
  503. </el-form-item>
  504. </el-form>
  505. </div>
  506. <span slot="footer" class="dialog-footer">
  507. <el-button @click="dialoginfoWatch = false">取 消</el-button>
  508. </span>
  509. </el-dialog>
  510. </div>
  511. </template>
  512. <script>
  513. import pagination from "@/components/pagination";
  514. export default {
  515. name: "ByTrainee",
  516. components: { pagination },
  517. data() {
  518. return {
  519. active: "",
  520. studentList: [],
  521. formData: {
  522. pageNum: 1,
  523. pageSize: 10,
  524. },
  525. tabSearchData: {
  526. userId: "",
  527. pageNum: 1,
  528. pageSize: 10,
  529. },
  530. totalRight: 0,
  531. tableList: [
  532. {
  533. label: "所购商品",
  534. prop1: "goodsCode",
  535. prop2: "goodsName",
  536. prop3: "standPrice",
  537. scope: "goodsName",
  538. },
  539. {
  540. label: "考试次数",
  541. prop1: "examNumber",
  542. prop2: "expendNumber",
  543. scope: "numTypes",
  544. type: 1,
  545. },
  546. {
  547. label: "前培次数",
  548. prop1: "doNumber",
  549. prop2: "expendBefore",
  550. scope: "numTypes",
  551. type: 2,
  552. },
  553. ],
  554. tableData: [],
  555. tableSet: [
  556. {
  557. label: "预约考试",
  558. prop: "subscribeStatus",
  559. hidden: true,
  560. width: "130px",
  561. scope: "isOptions",
  562. options: [
  563. {
  564. label: "正常",
  565. value: 1,
  566. },
  567. {
  568. label: "取消",
  569. value: 2,
  570. },
  571. ],
  572. },
  573. {
  574. label: "前培标记",
  575. prop: "beforeStatus",
  576. hidden: true,
  577. width: "130px",
  578. scope: "isOptions",
  579. options: [
  580. {
  581. label: "已开通",
  582. value: 1,
  583. },
  584. {
  585. label: "未开通",
  586. value: 0,
  587. },
  588. ],
  589. },
  590. {
  591. label: "考试登记",
  592. prop: "examStatus",
  593. hidden: true,
  594. width: "130px",
  595. scope: "isOptions",
  596. options: [
  597. {
  598. label: "待登记",
  599. value: 0,
  600. },
  601. {
  602. label: "正常",
  603. value: 1,
  604. },
  605. {
  606. label: "缺考",
  607. value: 2,
  608. },
  609. {
  610. label: "作弊",
  611. value: 3,
  612. },
  613. {
  614. label: "替考",
  615. value: 4,
  616. },
  617. ],
  618. },
  619. {
  620. label: "考试成绩和结果",
  621. prop1: "performance",
  622. prop2: "result",
  623. hidden: true,
  624. width: "130px",
  625. scope: "resultType",
  626. },
  627. {
  628. label: "证书编号",
  629. prop: "certificateCode",
  630. hidden: true,
  631. width: "130px",
  632. },
  633. {
  634. label: "考试标题",
  635. prop: "applyName",
  636. hidden: true,
  637. width: "130px",
  638. },
  639. {
  640. label: "学员姓名",
  641. prop: "realname",
  642. hidden: true,
  643. width: "130px",
  644. },
  645. {
  646. label: "学员身份证",
  647. prop: "idCard",
  648. hidden: true,
  649. width: "170px",
  650. },
  651. {
  652. label: "所购商品",
  653. prop1: "goodsCode",
  654. prop2: "goodsName",
  655. prop3: "standPrice",
  656. hidden: true,
  657. width: "220px",
  658. scope: "goodsInfos",
  659. },
  660. {
  661. label: "学员报考类型",
  662. prop: "studentType",
  663. hidden: true,
  664. width: "130px",
  665. scope: "isOptions",
  666. options: [
  667. {
  668. label: "非补考学员",
  669. value: 1,
  670. },
  671. {
  672. label: "补考学员",
  673. value: 2,
  674. },
  675. ],
  676. },
  677. {
  678. label: "所报专业",
  679. prop: "categoryName",
  680. hidden: true,
  681. width: "130px",
  682. },
  683. {
  684. label: "预约场次(考试地点和时间)",
  685. prop: "applySiteAddress",
  686. prop1: "applySiteExamTime",
  687. prop2: "applySiteStartTime",
  688. prop3: "applySiteEndTime",
  689. hidden: true,
  690. width: "280px",
  691. scope: "applyInfos",
  692. },
  693. {
  694. label: "考试次数消耗",
  695. prop: "examExpend",
  696. hidden: true,
  697. width: "130px",
  698. },
  699. {
  700. label: "预约场次(考培地点和时间)",
  701. prop: "applySiteAddressTrain",
  702. prop1: "applySiteExamTrainTime",
  703. prop2: "applySiteStartTrainTime",
  704. prop3: "applySiteEndTrainTime",
  705. hidden: true,
  706. width: "280px",
  707. scope: "applyInfos",
  708. },
  709. {
  710. label: "前培次数消耗",
  711. prop: "beforeExpend",
  712. hidden: true,
  713. width: "130px",
  714. },
  715. {
  716. label: "创建时间",
  717. prop: "createTime",
  718. hidden: true,
  719. scope: "aTimeList",
  720. width: "160px",
  721. },
  722. ],
  723. total: 0,
  724. dialogDJ: false,
  725. dialogCG: false,
  726. dialogPLS: false,
  727. dialoginfoWatch: false,
  728. listData: {},
  729. infoData: {},
  730. activeInfoType: 0, //1考试次数2前培次数---头部标题变化
  731. rules: {
  732. examStatus: [
  733. { required: true, message: "请选择考试登记状态", trigger: "change" },
  734. ],
  735. },
  736. };
  737. },
  738. mounted() {
  739. this.getStudent();
  740. },
  741. activated() {
  742. this.getStudent();
  743. },
  744. methods: {
  745. seeInfos(row, int) {
  746. this.activeInfoType = int;
  747. this.$api
  748. .inquiresystemsubscribeUserExam({
  749. goodsId: row.goodsId,
  750. userId: row.userId,
  751. })
  752. .then((res) => {
  753. this.infoData = JSON.parse(JSON.stringify(res.data));
  754. this.infoData.doNumberAll = 0;
  755. this.infoData.examNumberAll = 0;
  756. this.infoData.userExamGoodsSupplement.forEach((item) => {
  757. this.infoData.examNumberAll += item.examNumber;
  758. });
  759. this.infoData.userExamGoodsSupplementVos.forEach((item) => {
  760. this.infoData.doNumberAll += item.doNumber;
  761. });
  762. this.dialoginfoWatch = true;
  763. });
  764. },
  765. openZS(row) {
  766. if (row.examStatus !== 1) {
  767. this.$message.warning("考试登记状态为正常的计划才可执行该操作");
  768. return;
  769. }
  770. this.listData = JSON.parse(JSON.stringify(row));
  771. this.dialogPLS = true;
  772. },
  773. submitChecksPals() {
  774. if (!this.listData.performance && this.listData.performance !== 0) {
  775. this.$message.warning(`未填写考试成绩,请填写考试成绩!`);
  776. return;
  777. }
  778. if (!this.listData.result && this.listData.result !== 0) {
  779. this.$message.warning(`未选择考试结果,请选择考试结果!`);
  780. return;
  781. }
  782. var data = JSON.parse(JSON.stringify(this.listData));
  783. this.$api.appsystemsubscribe([data]).then((res) => {
  784. var dat = {
  785. subscribeId: this.listData.subscribeId,
  786. };
  787. this.$api.inquiresystemsubscribelist(dat).then((res) => {
  788. for (let k = 0; k < res.rows.length; k++) {
  789. for (let i = 0; i < res.rows[k].examApplySite.length; i++) {
  790. for (
  791. let j = 0;
  792. j < res.rows[k].examApplySite[i].examApplySiteTime.length;
  793. j++
  794. ) {
  795. res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime =
  796. JSON.parse(
  797. res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime
  798. );
  799. }
  800. }
  801. for (let i = 0; i < res.rows[k].examApplySiteTrain.length; i++) {
  802. for (
  803. let j = 0;
  804. j < res.rows[k].examApplySiteTrain[i].examApplySiteTime.length;
  805. j++
  806. ) {
  807. res.rows[k].examApplySiteTrain[i].examApplySiteTime[
  808. j
  809. ].siteTime = JSON.parse(
  810. res.rows[k].examApplySiteTrain[i].examApplySiteTime[j]
  811. .siteTime
  812. );
  813. }
  814. }
  815. }
  816. let ast = res.rows[0];
  817. for (let i = 0; i < this.tableData.length; i++) {
  818. if (this.tableData[i].goodsId === data.goodsId) {
  819. for (let k = 0; k < this.tableData[i].children.length; k++) {
  820. if (
  821. this.tableData[i].children[k].subscribeId === data.subscribeId
  822. ) {
  823. this.$set(this.tableData[i].children, k, ast);
  824. }
  825. }
  826. }
  827. }
  828. this.$message.success("已修改成绩和证书登记");
  829. this.dialogPLS = false;
  830. });
  831. });
  832. },
  833. openClearYX(row) {
  834. this.listData = JSON.parse(JSON.stringify(row));
  835. this.dialogDJ = true;
  836. },
  837. submitChecksDJ() {
  838. var data = JSON.parse(JSON.stringify(this.listData));
  839. data.subscribeId = [data.subscribeId];
  840. data.subscribeStatus = 2;
  841. this.$api.editsystemsubscribe(data).then((res) => {
  842. var dat = {
  843. subscribeId: this.listData.subscribeId,
  844. };
  845. this.$api.inquiresystemsubscribelist(dat).then((res) => {
  846. for (let k = 0; k < res.rows.length; k++) {
  847. for (let i = 0; i < res.rows[k].examApplySite.length; i++) {
  848. for (
  849. let j = 0;
  850. j < res.rows[k].examApplySite[i].examApplySiteTime.length;
  851. j++
  852. ) {
  853. res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime =
  854. JSON.parse(
  855. res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime
  856. );
  857. }
  858. }
  859. for (let i = 0; i < res.rows[k].examApplySiteTrain.length; i++) {
  860. for (
  861. let j = 0;
  862. j < res.rows[k].examApplySiteTrain[i].examApplySiteTime.length;
  863. j++
  864. ) {
  865. res.rows[k].examApplySiteTrain[i].examApplySiteTime[
  866. j
  867. ].siteTime = JSON.parse(
  868. res.rows[k].examApplySiteTrain[i].examApplySiteTime[j]
  869. .siteTime
  870. );
  871. }
  872. }
  873. }
  874. let ast = res.rows[0];
  875. for (let i = 0; i < this.tableData.length; i++) {
  876. if (this.tableData[i].goodsId === data.goodsId) {
  877. for (let k = 0; k < this.tableData[i].children.length; k++) {
  878. if (
  879. this.tableData[i].children[k].subscribeId ===
  880. data.subscribeId[0]
  881. ) {
  882. this.$set(this.tableData[i].children, k, ast);
  883. }
  884. }
  885. }
  886. }
  887. });
  888. this.$message.success("已取消预约");
  889. this.dialogDJ = false;
  890. });
  891. },
  892. editExam(row) {
  893. this.listData = JSON.parse(JSON.stringify(row));
  894. this.dialogCG = true;
  895. },
  896. submitChecks(formName) {
  897. this.$refs[formName].validate((valid) => {
  898. if (valid) {
  899. if (!this.listData.examStatus) {
  900. this.$message.warning("请选择考试登记状态");
  901. return;
  902. }
  903. this.submitForm();
  904. } else {
  905. console.log("error submit!!");
  906. return false;
  907. }
  908. });
  909. },
  910. submitForm() {
  911. var data = JSON.parse(JSON.stringify(this.listData));
  912. data.subscribeId = [data.subscribeId];
  913. this.$api.editsystemsubscribe(data).then((res) => {
  914. var dat = {
  915. subscribeId: this.listData.subscribeId,
  916. };
  917. this.$api.inquiresystemsubscribelist(dat).then((res) => {
  918. for (let k = 0; k < res.rows.length; k++) {
  919. for (let i = 0; i < res.rows[k].examApplySite.length; i++) {
  920. for (
  921. let j = 0;
  922. j < res.rows[k].examApplySite[i].examApplySiteTime.length;
  923. j++
  924. ) {
  925. res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime =
  926. JSON.parse(
  927. res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime
  928. );
  929. }
  930. }
  931. for (let i = 0; i < res.rows[k].examApplySiteTrain.length; i++) {
  932. for (
  933. let j = 0;
  934. j < res.rows[k].examApplySiteTrain[i].examApplySiteTime.length;
  935. j++
  936. ) {
  937. res.rows[k].examApplySiteTrain[i].examApplySiteTime[
  938. j
  939. ].siteTime = JSON.parse(
  940. res.rows[k].examApplySiteTrain[i].examApplySiteTime[j]
  941. .siteTime
  942. );
  943. }
  944. }
  945. }
  946. let ast = res.rows[0];
  947. for (let i = 0; i < this.tableData.length; i++) {
  948. if (this.tableData[i].goodsId === data.goodsId) {
  949. for (let k = 0; k < this.tableData[i].children.length; k++) {
  950. if (
  951. this.tableData[i].children[k].subscribeId ===
  952. data.subscribeId[0]
  953. ) {
  954. this.$set(this.tableData[i].children, k, ast);
  955. }
  956. }
  957. }
  958. }
  959. });
  960. this.$message.success("考试登记修改成功");
  961. this.dialogCG = false;
  962. });
  963. },
  964. async expandChange(row, e) {
  965. if (e.length > 0) {
  966. //获取后台数据
  967. const result = await this.getApis({
  968. userId: row.userId,
  969. goodsId: row.goodsId,
  970. });
  971. //便利table数组,找到符合本行数据,赋值
  972. this.tableData.forEach((item, index) => {
  973. if (row.goodsId === item.goodsId) {
  974. item.children = result;
  975. }
  976. });
  977. }
  978. },
  979. getApis(data) {
  980. return new Promise((resolve, reject) => {
  981. this.$api.inquiresystemsubscribelist(data).then((res) => {
  982. // for (let k = 0; k < res.rows.length; k++) {
  983. // for (let i = 0; i < res.rows[k].examApplySite.length; i++) {
  984. // for (
  985. // let j = 0;
  986. // j < res.rows[k].examApplySite[i].examApplySiteTime.length;
  987. // j++
  988. // ) {
  989. // res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime =
  990. // JSON.parse(
  991. // res.rows[k].examApplySite[i].examApplySiteTime[j].siteTime
  992. // );
  993. // }
  994. // }
  995. // for (let i = 0; i < res.rows[k].examApplySiteTrain.length; i++) {
  996. // for (
  997. // let j = 0;
  998. // j < res.rows[k].examApplySiteTrain[i].examApplySiteTime.length;
  999. // j++
  1000. // ) {
  1001. // res.rows[k].examApplySiteTrain[i].examApplySiteTime[
  1002. // j
  1003. // ].siteTime = JSON.parse(
  1004. // res.rows[k].examApplySiteTrain[i].examApplySiteTime[j]
  1005. // .siteTime
  1006. // );
  1007. // }
  1008. // }
  1009. // }
  1010. resolve(res.rows);
  1011. });
  1012. });
  1013. },
  1014. acs(int) {
  1015. if (int === 2) {
  1016. this.tabSearchData.pageSize = 10;
  1017. this.tabSearchData.pageNum = 1;
  1018. }
  1019. this.$api
  1020. .inquiresystemsubscribelistUserExam(this.tabSearchData)
  1021. .then((res) => {
  1022. this.totalRight = res.total;
  1023. this.active = this.tabSearchData.userId;
  1024. this.tableData = res.rows.map((item) => {
  1025. return {
  1026. ...item,
  1027. children: [],
  1028. //新增空数组children装展开行内容
  1029. };
  1030. });
  1031. });
  1032. },
  1033. changeNewActive(item) {
  1034. if (item.userId === this.active) {
  1035. return;
  1036. }
  1037. this.tabSearchData.userId = item.userId;
  1038. this.acs(2);
  1039. },
  1040. getStudent(int) {
  1041. if (int === 1) {
  1042. this.formData = {
  1043. pageNum: 1,
  1044. pageSize: 10,
  1045. };
  1046. }
  1047. this.$api.inquiresystemsubscribelistUser(this.formData).then((res) => {
  1048. this.total = res.total;
  1049. this.studentList = res.rows;
  1050. });
  1051. },
  1052. handleCurrentChange(v) {
  1053. this.formData.pageNum = v;
  1054. this.getStudent();
  1055. },
  1056. handleSizeChange(v) {
  1057. this.tabSearchData.pageSize = v;
  1058. this.tabSearchData.pageNum = 1;
  1059. this.acs();
  1060. },
  1061. handleCurrentChanges(v) {
  1062. this.tabSearchData.pageNum = v;
  1063. this.acs();
  1064. },
  1065. },
  1066. };
  1067. </script>
  1068. <style lang="less" scoped>
  1069. .dis_fs {
  1070. margin-top: 12px;
  1071. display: flex;
  1072. .dis_left {
  1073. min-width: 250px;
  1074. background-color: #eee;
  1075. margin-right: 20px;
  1076. padding: 10px 14px;
  1077. .inputSty {
  1078. width: 133px;
  1079. outline: none;
  1080. height: 26px;
  1081. }
  1082. .btnSearchSty {
  1083. border: 1px solid #666;
  1084. background-color: #fff;
  1085. padding: 0px 6px;
  1086. font-size: 14px;
  1087. height: 26px;
  1088. line-height: 26px;
  1089. border-left: none;
  1090. cursor: pointer;
  1091. }
  1092. }
  1093. .dis_right {
  1094. flex: 1;
  1095. }
  1096. }
  1097. .listy {
  1098. margin-bottom: 6px;
  1099. padding: 4px;
  1100. font-size: 14px;
  1101. cursor: pointer;
  1102. border: 1px solid transparent;
  1103. }
  1104. .active {
  1105. border: 1px solid #000;
  1106. background-color: #fff;
  1107. }
  1108. /deep/.el-button {
  1109. border-radius: 8px;
  1110. }
  1111. /deep/.el-dialog {
  1112. border-radius: 8px;
  1113. .el-dialog__header {
  1114. padding: 0;
  1115. .hearders {
  1116. height: 40px;
  1117. display: flex;
  1118. align-items: center;
  1119. justify-content: space-between;
  1120. padding: 0px 18px 0px 20px;
  1121. border-bottom: 1px solid #e2e2e2;
  1122. .leftTitle {
  1123. font-size: 14px;
  1124. font-weight: bold;
  1125. color: #2f4378;
  1126. }
  1127. .rightBoxs {
  1128. display: flex;
  1129. align-items: center;
  1130. img {
  1131. width: 14px;
  1132. height: 14px;
  1133. margin-left: 13px;
  1134. cursor: pointer;
  1135. }
  1136. }
  1137. }
  1138. }
  1139. .el-dialog__footer {
  1140. padding: 0;
  1141. .dialog-footer {
  1142. padding: 0px 40px;
  1143. height: 70px;
  1144. border-top: 1px solid #e2e2e2;
  1145. display: flex;
  1146. align-items: center;
  1147. justify-content: flex-end;
  1148. }
  1149. }
  1150. }
  1151. .imgBox {
  1152. width: 100%;
  1153. // height: 210px;
  1154. border: 1px solid #e2e2e2;
  1155. border-radius: 8px;
  1156. padding: 8px 8px 3px;
  1157. display: flex;
  1158. flex-direction: column;
  1159. align-items: center;
  1160. .imgLabel {
  1161. flex: 1;
  1162. width: 100%;
  1163. border: 1px dotted #e2e2e2;
  1164. color: #999;
  1165. font-size: 14px;
  1166. cursor: pointer;
  1167. border-radius: 8px;
  1168. .msPhoto {
  1169. display: flex;
  1170. justify-content: center;
  1171. align-items: center;
  1172. max-width: 100%;
  1173. max-height: 270px;
  1174. img {
  1175. max-width: 100%;
  1176. max-height: 270px;
  1177. }
  1178. }
  1179. .imgbbx {
  1180. display: flex;
  1181. flex-direction: column;
  1182. align-items: center;
  1183. justify-content: center;
  1184. width: 100%;
  1185. height: 100%;
  1186. i {
  1187. font-weight: bold;
  1188. margin: 14px 0;
  1189. font-size: 24px;
  1190. }
  1191. }
  1192. }
  1193. p {
  1194. margin: 5px 0px;
  1195. }
  1196. }
  1197. .aListBottom {
  1198. margin-bottom: 20px;
  1199. padding: 0px 6px;
  1200. border: 1px solid #999;
  1201. border-radius: 4px;
  1202. height: 30px;
  1203. line-height: 30px;
  1204. display: inline-block;
  1205. }
  1206. .liBVS {
  1207. margin-right: 20px;
  1208. margin-bottom: 12px;
  1209. padding: 0px 6px;
  1210. border: 1px solid #999;
  1211. border-radius: 4px;
  1212. height: 30px;
  1213. line-height: 30px;
  1214. display: inline-block;
  1215. float: left;
  1216. }
  1217. .clsw {
  1218. margin-left: 4px;
  1219. cursor: pointer;
  1220. color: #f56c6c;
  1221. }
  1222. </style>