PaperPendingTrial.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  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. courseInfoSelect() {
  405. var courseList = [];
  406. for (let course of this.courseList) {
  407. var courseInfo = course.name + "(" + course.code + ")";
  408. var courseNo = course.code;
  409. var courseName = course.name;
  410. courseList.push({
  411. courseNo: courseNo,
  412. courseInfo: courseInfo,
  413. courseName: courseName,
  414. });
  415. }
  416. return courseList;
  417. },
  418. noBatchSelected() {
  419. return this.selectedPaperIds.length === 0;
  420. },
  421. },
  422. watch: {
  423. $route: "initVue",
  424. },
  425. created() {
  426. this.initVue();
  427. },
  428. methods: {
  429. getCourseName(courseNo) {
  430. for (let course of this.courseList) {
  431. if (course.code == courseNo) {
  432. this.formSearch.courseName = course.name;
  433. }
  434. }
  435. },
  436. editImportPaper(row) {
  437. //缓存查询对象
  438. this.getCourseName(this.formSearch.courseNo);
  439. sessionStorage.setItem("paper", JSON.stringify(this.formSearch));
  440. sessionStorage.setItem("paper_currentPage", this.currentPage);
  441. sessionStorage.setItem("question_back", "false");
  442. this.$router.push({
  443. path: "/edit_paper_pending_trial/" + row.id + "/paper_pending_trial",
  444. });
  445. },
  446. afterAudit() {
  447. this.auditPaperDialog = false;
  448. this.searchPaper();
  449. },
  450. auditPapers(pass) {
  451. this.auditResult = pass;
  452. this.auditPaperDialog = true;
  453. },
  454. auditPaper(pass, id) {
  455. this.auditResult = pass;
  456. this.selectedPaperIds = [];
  457. this.selectedPaperIds.push(id);
  458. this.auditPaperDialog = true;
  459. },
  460. isShowAuditBtn(row) {
  461. if (
  462. row.auditStatus != "WITHDRAW" &&
  463. row.auditStatus != "NOT_PASS" &&
  464. this.isMyAudit(row)
  465. ) {
  466. return true;
  467. } else {
  468. return false;
  469. }
  470. },
  471. isMyAudit(row) {
  472. if (
  473. row.auditStatus == "FIRST_PENDING_TRIAL" &&
  474. this.user.auditAuthority == "FIRST"
  475. ) {
  476. return true;
  477. }
  478. if (
  479. row.auditStatus == "SECOND_PENDING_TRIAL" &&
  480. this.user.auditAuthority == "SECOND"
  481. ) {
  482. return true;
  483. }
  484. if (
  485. row.auditStatus == "THIRD_PENDING_TRIAL" &&
  486. this.user.auditAuthority == "THIRD"
  487. ) {
  488. return true;
  489. }
  490. return false;
  491. },
  492. exportPaper(row) {
  493. var key = this.user.key;
  494. var token = this.user.token;
  495. window.open(
  496. QUESTION_API +
  497. "/originalPaper/export/" +
  498. row.id +
  499. "?$key=" +
  500. key +
  501. "&$token=" +
  502. token
  503. );
  504. },
  505. submitPapers() {
  506. this.$confirm("确认提交试卷吗?", "提示", {
  507. type: "warning",
  508. }).then(() => {
  509. this.loading = true;
  510. this.$http
  511. .post(
  512. QUESTION_API + "/paper/submit",
  513. new URLSearchParams({ paperIds: this.selectedPaperIds })
  514. )
  515. .then(
  516. () => {
  517. this.$notify({
  518. message: "提交成功",
  519. type: "success",
  520. });
  521. this.searchPaper();
  522. },
  523. (error) => {
  524. this.$notify({
  525. message: error.response.data.desc,
  526. type: "error",
  527. });
  528. this.loading = false;
  529. }
  530. );
  531. });
  532. },
  533. submitPaper(row) {
  534. this.$confirm("确认提交试卷吗?", "提示", {
  535. type: "warning",
  536. }).then(() => {
  537. this.selectedPaperIds = [];
  538. this.selectedPaperIds.push(row.id);
  539. this.loading = true;
  540. this.$http
  541. .post(
  542. QUESTION_API + "/paper/submit",
  543. new URLSearchParams({ paperIds: this.selectedPaperIds })
  544. )
  545. .then(
  546. () => {
  547. this.$notify({
  548. message: "提交成功",
  549. type: "success",
  550. });
  551. this.searchPaper();
  552. },
  553. (error) => {
  554. this.$notify({
  555. message: error.response.data.desc,
  556. type: "error",
  557. });
  558. this.loading = false;
  559. }
  560. );
  561. });
  562. },
  563. isShowSubmitBtn(row) {
  564. if (row.creationBy == this.user.userId && row.auditStatus == "WITHDRAW") {
  565. return true;
  566. } else {
  567. return false;
  568. }
  569. },
  570. isShowWithdrawBtn(row) {
  571. if (
  572. row.creationBy == this.user.userId &&
  573. row.auditStatus != "WITHDRAW" &&
  574. row.auditStatus != "NOT_PASS"
  575. ) {
  576. return true;
  577. } else {
  578. return false;
  579. }
  580. },
  581. withdrawPapers() {
  582. this.$confirm("确认撤回试卷吗?", "提示", {
  583. type: "warning",
  584. }).then(() => {
  585. this.loading = true;
  586. this.$http
  587. .post(
  588. QUESTION_API + "/paper/withdraw",
  589. new URLSearchParams({ paperIds: this.selectedPaperIds })
  590. )
  591. .then(
  592. () => {
  593. this.$notify({
  594. message: "撤回成功",
  595. type: "success",
  596. });
  597. this.searchPaper();
  598. },
  599. (error) => {
  600. this.$notify({
  601. message: error.response.data.desc,
  602. type: "error",
  603. });
  604. this.loading = false;
  605. }
  606. );
  607. });
  608. },
  609. withdrawPaper(row) {
  610. this.$confirm("确认撤回试卷吗?", "提示", {
  611. type: "warning",
  612. }).then(() => {
  613. this.loading = true;
  614. this.selectedPaperIds = [];
  615. this.selectedPaperIds.push(row.id);
  616. this.$http
  617. .post(
  618. QUESTION_API + "/paper/withdraw",
  619. new URLSearchParams({ paperIds: this.selectedPaperIds })
  620. )
  621. .then(
  622. () => {
  623. this.$notify({
  624. message: "撤回成功",
  625. type: "success",
  626. });
  627. this.searchPaper();
  628. },
  629. (error) => {
  630. this.$notify({
  631. message: error.response.data.desc,
  632. type: "error",
  633. });
  634. this.loading = false;
  635. }
  636. );
  637. });
  638. },
  639. isShowDeleteBtn(row) {
  640. if (row.creationBy == this.user.userId && row.auditStatus == "WITHDRAW") {
  641. return true;
  642. } else {
  643. return false;
  644. }
  645. },
  646. deletePapers() {
  647. this.$confirm("确认删除试卷吗?", "提示", {
  648. type: "warning",
  649. }).then(() => {
  650. this.loading = true;
  651. this.$http
  652. .post(
  653. QUESTION_API + "/paper/audit/delete",
  654. new URLSearchParams({ paperIds: this.selectedPaperIds })
  655. )
  656. .then(
  657. () => {
  658. this.$notify({
  659. message: "删除成功",
  660. type: "success",
  661. });
  662. this.searchPaper();
  663. },
  664. (error) => {
  665. this.$notify({
  666. message: error.response.data.desc,
  667. type: "error",
  668. });
  669. this.loading = false;
  670. }
  671. );
  672. });
  673. },
  674. deletePaper(row) {
  675. this.$confirm("确认删除试卷吗?", "提示", {
  676. type: "warning",
  677. }).then(() => {
  678. this.loading = true;
  679. this.selectedPaperIds = [];
  680. this.selectedPaperIds.push(row.id);
  681. this.$http
  682. .post(
  683. QUESTION_API + "/paper/audit/delete",
  684. new URLSearchParams({ paperIds: this.selectedPaperIds })
  685. )
  686. .then(
  687. () => {
  688. this.$notify({
  689. message: "删除成功",
  690. type: "success",
  691. });
  692. this.searchPaper();
  693. },
  694. (error) => {
  695. this.$notify({
  696. message: error.response.data.desc,
  697. type: "error",
  698. });
  699. this.loading = false;
  700. }
  701. );
  702. });
  703. },
  704. resetForm() {
  705. this.formSearch = {
  706. courseNo: "",
  707. courseName: "",
  708. level: "",
  709. name: "",
  710. };
  711. },
  712. //查询
  713. searchFrom() {
  714. this.currentPage = 1;
  715. this.searchPaper();
  716. },
  717. searchPaper() {
  718. this.selectedPaperIds = [];
  719. var pageNo = this.currentPage;
  720. this.currentPage = 1;
  721. this.loading = true;
  722. var url =
  723. QUESTION_API + "/pending_trial_paper/" + pageNo + "/" + this.pageSize;
  724. this.$http.get(url, { params: this.formSearch }).then((response) => {
  725. this.tableData = response.data.content;
  726. this.total = response.data.totalElements;
  727. this.currentPage = Number(pageNo);
  728. });
  729. this.loading = false;
  730. },
  731. handleCurrentChange(val) {
  732. this.currentPage = val;
  733. this.searchPaper();
  734. },
  735. handleSizeChange(val) {
  736. this.pageSize = val;
  737. this.currentPage = 1;
  738. this.searchPaper();
  739. },
  740. getCourseObj(courseNo) {
  741. for (let course of this.courseList) {
  742. if (course.code == courseNo) {
  743. return course;
  744. }
  745. }
  746. return "";
  747. },
  748. selectChange(row) {
  749. this.selectedPaperIds = [];
  750. row.forEach((element) => {
  751. this.selectedPaperIds.push(element.id);
  752. });
  753. },
  754. //查询所有课程
  755. getCourses(query) {
  756. if (query) {
  757. query = query.trim();
  758. }
  759. this.courseLoading = true;
  760. this.$http
  761. .get(QUESTION_API + "/course/query?name=" + query + "&enable=true")
  762. .then((response) => {
  763. this.courseList = response.data;
  764. this.courseLoading = false;
  765. });
  766. },
  767. removeItem() {
  768. sessionStorage.removeItem("paper");
  769. sessionStorage.removeItem("paper_currentPage");
  770. },
  771. cancel(formData) {
  772. this.resetForm2(formData);
  773. this.dialogModel = false;
  774. },
  775. resetForm2(formData) {
  776. this.printFrom.examId = "";
  777. this.$refs[formData].clearValidate();
  778. },
  779. initVue() {
  780. this.isClear = this.$route.params.isClear;
  781. if (this.isClear == 0 || !this.isClear) {
  782. this.removeItem();
  783. this.formSearch = {
  784. courseNo: "",
  785. courseName: "",
  786. level: "",
  787. name: "",
  788. };
  789. this.currentPage = 1;
  790. } else {
  791. this.formSearch = JSON.parse(sessionStorage.getItem("paper"));
  792. this.currentPage =
  793. sessionStorage.getItem("paper_currentPage") == null
  794. ? 1
  795. : parseInt(sessionStorage.getItem("paper_currentPage"));
  796. }
  797. this.getCourses(this.formSearch.courseName);
  798. this.searchPaper();
  799. },
  800. },
  801. };
  802. </script>
  803. <style scoped src="../styles/Common.css"></style>