ExamPaperPendingTrial.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. <template>
  2. <section class="content">
  3. <div v-show="isClear == 1">
  4. <LinkTitlesCustom :current-paths="['卷库管理 ', '待审列表']" />
  5. </div>
  6. <div class="box-body">
  7. <el-form
  8. :inline="true"
  9. :model="formSearch"
  10. label-position="right"
  11. label-width="70px"
  12. >
  13. <el-row>
  14. <el-col :span="6">
  15. <el-form-item label="课程名称">
  16. <el-select
  17. v-model="formSearch.courseNo"
  18. class="search_width"
  19. filterable
  20. :remote-method="getCourses"
  21. remote
  22. clearable
  23. placeholder="全部"
  24. size="small"
  25. @focus="(e) => getCourses(e.target.value)"
  26. >
  27. <el-option
  28. v-for="item in courseInfoSelect"
  29. :key="item.courseNo"
  30. :label="item.courseInfo"
  31. :value="item.courseNo"
  32. >
  33. </el-option>
  34. </el-select>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="6">
  38. <el-form-item label="试卷名称">
  39. <el-input
  40. v-model="formSearch.name"
  41. class="search_width"
  42. placeholder="试卷名称"
  43. size="small"
  44. ></el-input>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="6">
  48. <el-form-item label="审核状态">
  49. <el-select
  50. v-model="formSearch.auditStatus"
  51. class="search_width"
  52. clearable
  53. placeholder="请选择"
  54. size="small"
  55. >
  56. <el-option label="初级待审" value="FIRST_PENDING_TRIAL">
  57. </el-option>
  58. <el-option label="中级待审" value="SECOND_PENDING_TRIAL">
  59. </el-option>
  60. <el-option label="高级待审" value="THIRD_PENDING_TRIAL">
  61. </el-option>
  62. <el-option label="已撤回" value="WITHDRAW"> </el-option>
  63. <el-option label="审核未通过" value="NOT_PASS"> </el-option>
  64. </el-select>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="6">
  68. <el-form-item label="录入人">
  69. <el-input
  70. v-model="formSearch.creator"
  71. class="search_width"
  72. placeholder="录入人"
  73. size="small"
  74. ></el-input>
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. <el-row>
  79. <el-col :span="6">
  80. <el-form-item label="修改人">
  81. <el-input
  82. v-model="formSearch.lastModifyName"
  83. class="search_width"
  84. placeholder="修改人"
  85. size="small"
  86. ></el-input>
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="6">
  90. <div class="search_down">
  91. <el-button size="small" type="primary" @click="searchFrom"
  92. ><i class="el-icon-search"></i> 查询</el-button
  93. >
  94. <el-button size="small" @click="resetForm"
  95. ><i class="el-icon-refresh"></i> 重 置</el-button
  96. >
  97. </div>
  98. </el-col>
  99. </el-row>
  100. <div
  101. style="width: 100%; border-bottom: 1px solid #ddd; margin: 10px 0"
  102. ></div>
  103. <el-row>
  104. <el-form-item>
  105. <span>批量操作:</span>
  106. <el-button
  107. :disabled="noBatchSelected"
  108. size="mini"
  109. type="danger"
  110. plain
  111. @click="deletePapers"
  112. >批量删除</el-button
  113. >
  114. <el-button
  115. :disabled="noBatchSelected"
  116. size="mini"
  117. type="primary"
  118. plain
  119. @click="auditPapers('PASS')"
  120. >批量通过</el-button
  121. >
  122. <el-button
  123. :disabled="noBatchSelected"
  124. size="mini"
  125. type="primary"
  126. plain
  127. @click="auditPapers('NOT_PASS')"
  128. >批量不通过</el-button
  129. >
  130. <el-button
  131. :disabled="noBatchSelected"
  132. size="mini"
  133. type="primary"
  134. plain
  135. @click="withdrawPapers()"
  136. >批量撤回</el-button
  137. >
  138. <el-button
  139. :disabled="noBatchSelected"
  140. size="mini"
  141. type="primary"
  142. plain
  143. @click="submitPapers()"
  144. >批量提交</el-button
  145. >
  146. </el-form-item>
  147. </el-row>
  148. </el-form>
  149. <div style="width: 100%; margin-bottom: 10px"></div>
  150. <el-table
  151. v-loading="loading"
  152. element-loading-text="拼命加载中"
  153. :data="tableData"
  154. border
  155. style="width: 100%"
  156. @selection-change="selectChange"
  157. >
  158. <el-table-column type="selection" width="40"></el-table-column>
  159. <el-table-column label="课程名称" width="180">
  160. <template slot-scope="scope">
  161. <span>{{ scope.row.course.name }}</span>
  162. </template>
  163. </el-table-column>
  164. <el-table-column label="课程代码" width="80">
  165. <template slot-scope="scope">
  166. <span>{{ scope.row.course.code }}</span>
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="试卷名称" width="180">
  170. <template slot-scope="scope">
  171. <span>{{ scope.row.name }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. label="试卷总分"
  176. width="103"
  177. sortable
  178. prop="totalScore"
  179. >
  180. </el-table-column>
  181. <el-table-column
  182. label="试卷难度"
  183. width="103"
  184. sortable
  185. prop="difficultyDegree"
  186. >
  187. </el-table-column>
  188. <el-table-column
  189. label="大题数量"
  190. width="103"
  191. sortable
  192. prop="paperDetailCount"
  193. >
  194. </el-table-column>
  195. <el-table-column width="100" label="审核状态">
  196. <span slot-scope="scope">{{
  197. scope.row.auditStatus | paperAuditStatusFilter
  198. }}</span>
  199. </el-table-column>
  200. <el-table-column label="录入员" width="150">
  201. <template slot-scope="scope">
  202. <span>{{ scope.row.creator }}</span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. label="创建时间"
  207. width="153"
  208. sortable
  209. prop="creationDate"
  210. >
  211. </el-table-column>
  212. <el-table-column label="修改人" width="150">
  213. <template slot-scope="scope">
  214. <span>{{ scope.row.lastModifyName }}</span>
  215. </template>
  216. </el-table-column>
  217. <el-table-column
  218. label="修改时间"
  219. width="153"
  220. sortable
  221. prop="updateDate"
  222. >
  223. </el-table-column>
  224. <el-table-column label="操作" width="270" fixed="right">
  225. <template slot-scope="scope">
  226. <div class="operate_left">
  227. <el-button
  228. size="mini"
  229. type="primary"
  230. plain
  231. @click="editImportPaper(scope.row)"
  232. ><i class="el-icon-view"></i>详情</el-button
  233. >
  234. <el-dropdown
  235. v-show="isShowAuditBtn(scope.row)"
  236. class="button_left"
  237. >
  238. <el-button type="primary" size="mini" plain>
  239. 审核<i class="el-icon-arrow-down el-icon--right"></i>
  240. </el-button>
  241. <el-dropdown-menu slot="dropdown">
  242. <el-dropdown-item>
  243. <el-button
  244. size="mini"
  245. type="success"
  246. @click="auditPaper('PASS', scope.row.id)"
  247. >
  248. <i class="el-icon-success"></i>通过
  249. </el-button>
  250. </el-dropdown-item>
  251. <el-dropdown-item>
  252. <el-button
  253. size="mini"
  254. type="danger"
  255. @click="auditPaper('NOT_PASS', scope.row.id)"
  256. >
  257. <i class="el-icon-error"></i>不通过
  258. </el-button>
  259. </el-dropdown-item>
  260. </el-dropdown-menu>
  261. </el-dropdown>
  262. <el-dropdown class="button_left">
  263. <el-button type="primary" size="mini" plain>
  264. 更多 <i class="el-icon-arrow-down el-icon--right"></i>
  265. </el-button>
  266. <el-dropdown-menu slot="dropdown">
  267. <el-dropdown-item>
  268. <el-button
  269. v-show="isShowDeleteBtn(scope.row)"
  270. size="mini"
  271. type="danger"
  272. @click="deletePaper(scope.row)"
  273. ><i class="el-icon-delete"></i>删除</el-button
  274. >
  275. </el-dropdown-item>
  276. <el-dropdown-item>
  277. <el-button
  278. v-show="isShowWithdrawBtn(scope.row)"
  279. size="mini"
  280. type="primary"
  281. plain
  282. @click="withdrawPaper(scope.row)"
  283. ><i class="el-icon-tickets"></i>撤回</el-button
  284. >
  285. </el-dropdown-item>
  286. <el-dropdown-item>
  287. <el-button
  288. v-show="isShowSubmitBtn(scope.row)"
  289. size="mini"
  290. type="primary"
  291. plain
  292. @click="submitPaper(scope.row)"
  293. ><i class="el-icon-finished"></i>提交</el-button
  294. >
  295. </el-dropdown-item>
  296. <el-dropdown-item>
  297. <el-button
  298. size="mini"
  299. type="primary"
  300. plain
  301. @click="exportPaper(scope.row)"
  302. ><i class="el-icon-download"></i>下载</el-button
  303. >
  304. </el-dropdown-item>
  305. </el-dropdown-menu>
  306. </el-dropdown>
  307. </div>
  308. </template>
  309. </el-table-column>
  310. </el-table>
  311. <div class="page pull-right">
  312. <el-pagination
  313. :current-page="currentPage"
  314. :page-size="pageSize"
  315. :page-sizes="[10, 20, 50, 100, 200, 300]"
  316. layout="total, sizes, prev, pager, next, jumper"
  317. :total="total"
  318. @current-change="handleCurrentChange"
  319. @size-change="handleSizeChange"
  320. >
  321. </el-pagination>
  322. </div>
  323. </div>
  324. <el-dialog title="审核试卷" width="50%" :visible.sync="auditPaperDialog">
  325. <AuditPaper
  326. v-if="auditPaperDialog"
  327. :paper-ids="selectedPaperIds"
  328. :audit-result="auditResult"
  329. @afterAudit="afterAudit"
  330. ></AuditPaper>
  331. </el-dialog>
  332. </section>
  333. </template>
  334. <script>
  335. import { QUESTION_API } from "@/constants/constants";
  336. import { LEVEL_TYPE } from "../constants/constants";
  337. import { mapState } from "vuex";
  338. import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
  339. import AuditPaper from "./AuditPaper.vue";
  340. export default {
  341. components: { LinkTitlesCustom, AuditPaper },
  342. data() {
  343. return {
  344. auditPaperDialog: false,
  345. auditResult: "",
  346. publicityDis: false,
  347. difficultyDegreeDis: false,
  348. quesLoading: false,
  349. quesPropertyDialog: false,
  350. difficultyDegree: 0.1,
  351. publicity: true,
  352. isClear: 0,
  353. courseLoading: false,
  354. formSearch: {
  355. courseNo: "",
  356. courseName: "",
  357. creator: "",
  358. lastModifyName: "",
  359. auditStatus: "",
  360. name: "",
  361. },
  362. tableData: [],
  363. currentPage: 1,
  364. pageSize: 10,
  365. total: 0,
  366. loading: false,
  367. courseList: [],
  368. levelList: LEVEL_TYPE,
  369. dialogVisible: false,
  370. selectedPaperIds: [],
  371. fileList: [],
  372. uploadAction: "",
  373. formUpload: {
  374. paperName: "",
  375. },
  376. uploadData: {},
  377. fileLoading: false,
  378. exportDialog: false,
  379. exportModel: {
  380. id: "",
  381. courseCode: "",
  382. courseName: "",
  383. exportContentList: [],
  384. seqMode: "MODE1",
  385. },
  386. isShow: true,
  387. dialogModel: false,
  388. rowIds: [],
  389. isShowPrintExamPackage: false,
  390. isShowPrintExamPackagePassword: false,
  391. printExamPackagePassword: "",
  392. printFrom: {
  393. examId: "",
  394. },
  395. rules: {
  396. examId: [{ required: true, message: "请输入名称", trigger: "change" }],
  397. },
  398. };
  399. },
  400. computed: {
  401. ...mapState({
  402. user: (state) => state.user,
  403. }),
  404. paperIds() {
  405. var paperIds = "";
  406. for (let paperId of this.selectedPaperIds) {
  407. if (!paperIds) {
  408. paperIds += paperId;
  409. } else {
  410. paperIds += "," + paperId;
  411. }
  412. }
  413. return paperIds;
  414. },
  415. courseInfoSelect() {
  416. var courseList = [];
  417. for (let course of this.courseList) {
  418. var courseInfo = course.name + "(" + course.code + ")";
  419. var courseNo = course.code;
  420. var courseName = course.name;
  421. courseList.push({
  422. courseNo: courseNo,
  423. courseInfo: courseInfo,
  424. courseName: courseName,
  425. });
  426. }
  427. return courseList;
  428. },
  429. noBatchSelected() {
  430. return this.selectedPaperIds.length === 0;
  431. },
  432. },
  433. watch: {
  434. $route: "initVue",
  435. },
  436. created() {
  437. this.initVue();
  438. },
  439. methods: {
  440. getCourseName(courseNo) {
  441. for (let course of this.courseList) {
  442. if (course.code == courseNo) {
  443. this.formSearch.courseName = course.name;
  444. }
  445. }
  446. },
  447. editImportPaper(row) {
  448. //缓存查询对象
  449. this.getCourseName(this.formSearch.courseNo);
  450. sessionStorage.setItem("paper", JSON.stringify(this.formSearch));
  451. sessionStorage.setItem("paper_currentPage", this.currentPage);
  452. sessionStorage.setItem("question_back", "false");
  453. this.$router.push({
  454. path:
  455. "/edit_paper_pending_trial/" + row.id + "/exam_paper_pending_trial",
  456. });
  457. },
  458. afterAudit() {
  459. this.auditPaperDialog = false;
  460. this.searchPaper();
  461. },
  462. auditPapers(pass) {
  463. this.auditResult = pass;
  464. this.auditPaperDialog = true;
  465. },
  466. auditPaper(pass, id) {
  467. this.auditResult = pass;
  468. this.selectedPaperIds = [];
  469. this.selectedPaperIds.push(id);
  470. this.auditPaperDialog = true;
  471. },
  472. isShowAuditBtn(row) {
  473. if (
  474. row.auditStatus != "WITHDRAW" &&
  475. row.auditStatus != "NOT_PASS" &&
  476. this.isMyAudit(row)
  477. ) {
  478. return true;
  479. } else {
  480. return false;
  481. }
  482. },
  483. isMyAudit(row) {
  484. if (
  485. row.auditStatus == "FIRST_PENDING_TRIAL" &&
  486. this.user.auditAuthority == "FIRST"
  487. ) {
  488. return true;
  489. }
  490. if (
  491. row.auditStatus == "SECOND_PENDING_TRIAL" &&
  492. this.user.auditAuthority == "SECOND"
  493. ) {
  494. return true;
  495. }
  496. if (
  497. row.auditStatus == "THIRD_PENDING_TRIAL" &&
  498. this.user.auditAuthority == "THIRD"
  499. ) {
  500. return true;
  501. }
  502. return false;
  503. },
  504. exportPaper(row) {
  505. var key = this.user.key;
  506. var token = this.user.token;
  507. window.open(
  508. QUESTION_API +
  509. "/originalPaper/export/" +
  510. row.id +
  511. "?$key=" +
  512. key +
  513. "&$token=" +
  514. token
  515. );
  516. },
  517. submitPapers() {
  518. this.$confirm("确认提交试卷吗?", "提示", {
  519. type: "warning",
  520. }).then(() => {
  521. this.loading = true;
  522. this.$http
  523. .post(
  524. QUESTION_API + "/paper/submit",
  525. new URLSearchParams({ paperIds: this.selectedPaperIds })
  526. )
  527. .then(
  528. () => {
  529. this.$notify({
  530. message: "提交成功",
  531. type: "success",
  532. });
  533. this.searchPaper();
  534. },
  535. (error) => {
  536. this.$notify({
  537. message: error.response.data.desc,
  538. type: "error",
  539. });
  540. this.loading = false;
  541. }
  542. );
  543. });
  544. },
  545. submitPaper(row) {
  546. this.$confirm("确认提交试卷吗?", "提示", {
  547. type: "warning",
  548. }).then(() => {
  549. this.selectedPaperIds = [];
  550. this.selectedPaperIds.push(row.id);
  551. this.loading = true;
  552. this.$http
  553. .post(
  554. QUESTION_API + "/paper/submit",
  555. new URLSearchParams({ paperIds: this.selectedPaperIds })
  556. )
  557. .then(
  558. () => {
  559. this.$notify({
  560. message: "提交成功",
  561. type: "success",
  562. });
  563. this.searchPaper();
  564. },
  565. (error) => {
  566. this.$notify({
  567. message: error.response.data.desc,
  568. type: "error",
  569. });
  570. this.loading = false;
  571. }
  572. );
  573. });
  574. },
  575. isShowSubmitBtn(row) {
  576. if (row.creationBy == this.user.userId && row.auditStatus == "WITHDRAW") {
  577. return true;
  578. } else {
  579. return false;
  580. }
  581. },
  582. isShowWithdrawBtn(row) {
  583. if (
  584. row.creationBy == this.user.userId &&
  585. row.auditStatus != "WITHDRAW" &&
  586. row.auditStatus != "NOT_PASS"
  587. ) {
  588. return true;
  589. } else {
  590. return false;
  591. }
  592. },
  593. withdrawPapers() {
  594. this.$confirm("确认撤回试卷吗?", "提示", {
  595. type: "warning",
  596. }).then(() => {
  597. this.loading = true;
  598. this.$http
  599. .post(
  600. QUESTION_API + "/paper/withdraw",
  601. new URLSearchParams({ paperIds: this.selectedPaperIds })
  602. )
  603. .then(
  604. () => {
  605. this.$notify({
  606. message: "撤回成功",
  607. type: "success",
  608. });
  609. this.searchPaper();
  610. },
  611. (error) => {
  612. this.$notify({
  613. message: error.response.data.desc,
  614. type: "error",
  615. });
  616. this.loading = false;
  617. }
  618. );
  619. });
  620. },
  621. withdrawPaper(row) {
  622. this.$confirm("确认撤回试卷吗?", "提示", {
  623. type: "warning",
  624. }).then(() => {
  625. this.loading = true;
  626. this.selectedPaperIds = [];
  627. this.selectedPaperIds.push(row.id);
  628. this.$http
  629. .post(
  630. QUESTION_API + "/paper/withdraw",
  631. new URLSearchParams({ paperIds: this.selectedPaperIds })
  632. )
  633. .then(
  634. () => {
  635. this.$notify({
  636. message: "撤回成功",
  637. type: "success",
  638. });
  639. this.searchPaper();
  640. },
  641. (error) => {
  642. this.$notify({
  643. message: error.response.data.desc,
  644. type: "error",
  645. });
  646. this.loading = false;
  647. }
  648. );
  649. });
  650. },
  651. isShowDeleteBtn(row) {
  652. if (row.creationBy == this.user.userId && row.auditStatus == "WITHDRAW") {
  653. return true;
  654. } else {
  655. return false;
  656. }
  657. },
  658. deletePapers() {
  659. this.$confirm("确认删除试卷吗?", "提示", {
  660. type: "warning",
  661. }).then(() => {
  662. this.loading = true;
  663. this.$http
  664. .post(
  665. QUESTION_API + "/paper/audit/delete",
  666. new URLSearchParams({ paperIds: this.selectedPaperIds })
  667. )
  668. .then(
  669. () => {
  670. this.$notify({
  671. message: "删除成功",
  672. type: "success",
  673. });
  674. this.searchPaper();
  675. },
  676. (error) => {
  677. this.$notify({
  678. message: error.response.data.desc,
  679. type: "error",
  680. });
  681. this.loading = false;
  682. }
  683. );
  684. });
  685. },
  686. deletePaper(row) {
  687. this.$confirm("确认删除试卷吗?", "提示", {
  688. type: "warning",
  689. }).then(() => {
  690. this.loading = true;
  691. this.selectedPaperIds = [];
  692. this.selectedPaperIds.push(row.id);
  693. this.$http
  694. .post(
  695. QUESTION_API + "/paper/audit/delete",
  696. new URLSearchParams({ paperIds: this.selectedPaperIds })
  697. )
  698. .then(
  699. () => {
  700. this.$notify({
  701. message: "删除成功",
  702. type: "success",
  703. });
  704. this.searchPaper();
  705. },
  706. (error) => {
  707. this.$notify({
  708. message: error.response.data.desc,
  709. type: "error",
  710. });
  711. this.loading = false;
  712. }
  713. );
  714. });
  715. },
  716. resetForm() {
  717. this.formSearch = {
  718. courseNo: "",
  719. courseName: "",
  720. level: "",
  721. name: "",
  722. };
  723. },
  724. //查询
  725. searchFrom() {
  726. this.currentPage = 1;
  727. this.searchPaper();
  728. },
  729. searchPaper() {
  730. this.selectedPaperIds = [];
  731. var pageNo = this.currentPage;
  732. this.currentPage = 1;
  733. this.loading = true;
  734. var url =
  735. QUESTION_API +
  736. "/exam_pending_trial_paper/" +
  737. pageNo +
  738. "/" +
  739. this.pageSize;
  740. this.$http.get(url, { params: this.formSearch }).then((response) => {
  741. this.tableData = response.data.content;
  742. this.total = response.data.totalElements;
  743. this.currentPage = Number(pageNo);
  744. });
  745. this.loading = false;
  746. },
  747. handleCurrentChange(val) {
  748. this.currentPage = val;
  749. this.searchPaper();
  750. },
  751. handleSizeChange(val) {
  752. this.pageSize = val;
  753. this.currentPage = 1;
  754. this.searchPaper();
  755. },
  756. getCourseObj(courseNo) {
  757. for (let course of this.courseList) {
  758. if (course.code == courseNo) {
  759. return course;
  760. }
  761. }
  762. return "";
  763. },
  764. selectChange(row) {
  765. this.selectedPaperIds = [];
  766. row.forEach((element) => {
  767. this.selectedPaperIds.push(element.id);
  768. });
  769. },
  770. //查询所有课程
  771. getCourses(query) {
  772. if (query) {
  773. query = query.trim();
  774. }
  775. this.courseLoading = true;
  776. this.$http
  777. .get(QUESTION_API + "/course/query?name=" + query + "&enable=true")
  778. .then((response) => {
  779. this.courseList = response.data;
  780. this.courseLoading = false;
  781. });
  782. },
  783. removeItem() {
  784. sessionStorage.removeItem("paper");
  785. sessionStorage.removeItem("paper_currentPage");
  786. },
  787. cancel(formData) {
  788. this.resetForm2(formData);
  789. this.dialogModel = false;
  790. },
  791. resetForm2(formData) {
  792. this.printFrom.examId = "";
  793. this.$refs[formData].clearValidate();
  794. },
  795. initVue() {
  796. this.isClear = this.$route.params.isClear;
  797. if (this.isClear == 0 || !this.isClear) {
  798. this.removeItem();
  799. this.formSearch = {
  800. courseNo: "",
  801. courseName: "",
  802. level: "",
  803. name: "",
  804. };
  805. this.currentPage = 1;
  806. } else {
  807. this.formSearch = JSON.parse(sessionStorage.getItem("paper"));
  808. this.currentPage =
  809. sessionStorage.getItem("paper_currentPage") == null
  810. ? 1
  811. : parseInt(sessionStorage.getItem("paper_currentPage"));
  812. }
  813. this.getCourses(this.formSearch.courseName);
  814. this.searchPaper();
  815. },
  816. },
  817. };
  818. </script>
  819. <style scoped src="../styles/Common.css"></style>