GenPaper.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
  1. <template>
  2. <section class="content">
  3. <div v-show="isClear == 1">
  4. <LinkTitlesCustom :currentPaths="['题库管理 ', '考试试卷管理']" />
  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. class="search_width"
  18. v-model="formSearch.courseNo"
  19. filterable
  20. :remote-method="getCourses"
  21. remote
  22. clearable
  23. placeholder="全部"
  24. size="small"
  25. >
  26. <el-option
  27. v-for="item in courseInfoSelect"
  28. :label="item.courseInfo"
  29. :value="item.courseNo"
  30. :key="item.courseNo"
  31. >
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="6">
  37. <el-form-item label="试卷名称">
  38. <el-input
  39. class="search_width"
  40. v-model="formSearch.name"
  41. placeholder="试卷名称"
  42. size="small"
  43. ></el-input>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :span="6">
  47. <el-form-item label="层次">
  48. <el-select
  49. class="search_width"
  50. v-model="formSearch.level"
  51. clearable
  52. placeholder="请选择"
  53. size="small"
  54. >
  55. <el-option
  56. v-for="item in levelList"
  57. :label="item.label"
  58. :value="item.value"
  59. :key="item.value"
  60. >
  61. </el-option>
  62. </el-select>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="6">
  66. <div class="search_down">
  67. <el-button size="small" type="primary" @click="searchFrom"
  68. ><i class="el-icon-search"></i> 查询</el-button
  69. >
  70. <el-button size="small" @click="resetForm"
  71. ><i class="el-icon-refresh"></i> 重 置</el-button
  72. >
  73. <el-button size="small" type="primary" @click="genPaperDetail"
  74. ><i class="el-icon-plus"></i> 组卷</el-button
  75. >
  76. </div>
  77. </el-col>
  78. </el-row>
  79. <div
  80. style="width: 100%; border-bottom: 1px solid #ddd; margin: 10px 0;"
  81. ></div>
  82. <el-row>
  83. <el-form-item>
  84. <span>批量操作:</span>
  85. <el-button
  86. size="small"
  87. type="danger"
  88. @click="batchDeleteGenPaper"
  89. :disabled="noBatchSelected"
  90. >
  91. <i class="el-icon-delete"></i> 删除成卷
  92. </el-button>
  93. <el-button
  94. size="small"
  95. type="primary"
  96. @click="openBatchExportPaperDialog"
  97. ><i class="el-icon-download"></i> 下载成卷</el-button
  98. >
  99. </el-form-item>
  100. </el-row>
  101. </el-form>
  102. <div style="width: 100%;margin-bottom: 10px;"></div>
  103. <el-table
  104. v-loading="loading"
  105. element-loading-text="拼命加载中"
  106. :data="tableData"
  107. border
  108. style="width: 100%"
  109. @selection-change="selectChange"
  110. >
  111. <el-table-column type="selection" width="35"></el-table-column>
  112. <el-table-column label="课程名称" width="180">
  113. <template slot-scope="scope">
  114. <span>{{ scope.row.course.name }}</span>
  115. </template>
  116. </el-table-column>
  117. <el-table-column label="课程代码" width="80">
  118. <template slot-scope="scope">
  119. <span>{{ scope.row.course.code }}</span>
  120. </template>
  121. </el-table-column>
  122. <el-table-column label="试卷名称" width="180">
  123. <template slot-scope="scope">
  124. <span>{{ scope.row.name }}</span>
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="试卷总分" width="80">
  128. <template slot-scope="scope">
  129. <span>{{ scope.row.totalScore }}</span>
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="试卷难度" width="80">
  133. <template slot-scope="scope">
  134. <span>{{ scope.row.difficultyDegree }}</span>
  135. </template>
  136. </el-table-column>
  137. <el-table-column label="大题数量" width="80">
  138. <template slot-scope="scope">
  139. <span>{{ scope.row.paperDetailCount }}</span>
  140. </template>
  141. </el-table-column>
  142. <el-table-column label="录入员" width="150">
  143. <template slot-scope="scope">
  144. <span>{{ scope.row.creator }}</span>
  145. </template>
  146. </el-table-column>
  147. <el-table-column label="创建时间" width="153">
  148. <template slot-scope="scope">
  149. <span>{{ scope.row.createTime }}</span>
  150. </template>
  151. </el-table-column>
  152. <el-table-column label="修改人" width="150">
  153. <template slot-scope="scope">
  154. <span>{{ scope.row.lastModifyName }}</span>
  155. </template>
  156. </el-table-column>
  157. <el-table-column label="操作" width="180" fixed="right">
  158. <template slot-scope="scope">
  159. <div class="operate_left">
  160. <el-button
  161. size="mini"
  162. type="primary"
  163. @click="editGenPaper(scope.row)"
  164. plain
  165. ><i class="el-icon-edit"></i>编辑</el-button
  166. >
  167. <el-dropdown class="button_left">
  168. <el-button type="primary" size="mini" plain>
  169. 更多 <i class="el-icon-arrow-down el-icon--right"></i>
  170. </el-button>
  171. <el-dropdown-menu slot="dropdown">
  172. <el-dropdown-item>
  173. <el-button
  174. size="mini"
  175. type="primary"
  176. @click="openExportDialog(scope.row)"
  177. plain
  178. ><i class="el-icon-download"></i> 下载</el-button
  179. >
  180. </el-dropdown-item>
  181. <el-dropdown-item>
  182. <el-button
  183. size="mini"
  184. type="primary"
  185. @click="previewPDF2(scope.row)"
  186. plain
  187. ><i class="el-icon-zoom-in"></i> 预览</el-button
  188. >
  189. </el-dropdown-item>
  190. <el-dropdown-item>
  191. <el-button
  192. size="mini"
  193. type="primary"
  194. @click="openPrint(scope.row)"
  195. plain
  196. ><i class="el-icon-share"></i> 发送</el-button
  197. >
  198. </el-dropdown-item>
  199. <el-dropdown-item>
  200. <el-button
  201. size="mini"
  202. type="danger"
  203. @click="deleteGenPaper(scope.row)"
  204. ><i class="el-icon-delete"></i> 删除</el-button
  205. >
  206. </el-dropdown-item>
  207. </el-dropdown-menu>
  208. </el-dropdown>
  209. </div>
  210. </template>
  211. </el-table-column>
  212. </el-table>
  213. <div class="page pull-right">
  214. <el-pagination
  215. @current-change="handleCurrentChange"
  216. :current-page="currentPage"
  217. :page-size="pageSize"
  218. layout="total, prev, pager, next, jumper"
  219. :total="total"
  220. >
  221. </el-pagination>
  222. </div>
  223. </div>
  224. <el-dialog title="导出" :visible.sync="exportDialog">
  225. <el-form :model="exportModel" label-position="right" label-width="80px">
  226. <el-row v-if="isShow">
  227. <el-col :md="12">
  228. <el-form-item label="课程名称">
  229. {{ exportModel.courseName }}
  230. </el-form-item>
  231. </el-col>
  232. </el-row>
  233. <el-row v-if="isShow">
  234. <el-col :md="12">
  235. <el-form-item label="课程代码">
  236. {{ exportModel.courseCode }}
  237. </el-form-item>
  238. </el-col>
  239. </el-row>
  240. <el-row>
  241. <el-col :md="24">
  242. <el-form-item label="导出内容">
  243. <el-checkbox-group v-model="exportModel.exportContentList">
  244. <el-checkbox label="PAPER">试卷</el-checkbox>
  245. <el-checkbox label="ANSWER">答案</el-checkbox>
  246. <el-checkbox label="COMPUTERTEST_PACKAGE"
  247. >机考数据包</el-checkbox
  248. >
  249. <el-checkbox
  250. v-if="isShowPrintExamPackage"
  251. label="PRINT_EXAM_PACKAGE"
  252. >分布式印刷数据包
  253. </el-checkbox>
  254. <el-input
  255. v-if="isShowPrintExamPackagePassword"
  256. v-model="printExamPackagePassword"
  257. placeholder="加密密码 (可选)"
  258. type="password"
  259. style="width: 150px"
  260. ></el-input>
  261. </el-checkbox-group>
  262. </el-form-item>
  263. </el-col>
  264. </el-row>
  265. <el-row>
  266. <el-col :md="24" class="text-center">
  267. <el-button type="primary" @click="exportPaperInfo"
  268. >开始导出</el-button
  269. >
  270. </el-col>
  271. </el-row>
  272. </el-form>
  273. </el-dialog>
  274. <el-dialog title="传送印刷平台" :visible.sync="dialogModel" width="500px">
  275. <el-form
  276. :model="printFrom"
  277. ref="printFrom"
  278. :rules="rules"
  279. label-position="right"
  280. label-width="120px"
  281. inline-message
  282. >
  283. <el-row>
  284. <el-form-item label="学校名称">
  285. <el-input
  286. class="dialog_input_width"
  287. v-model="this.Org.name"
  288. :disabled="true"
  289. ></el-input>
  290. </el-form-item>
  291. </el-row>
  292. <el-row>
  293. <el-form-item label="考试名称" prop="examId">
  294. <el-select
  295. class="dialog_input_width"
  296. v-model="printFrom.examId"
  297. filterable
  298. clearable
  299. :remote-method="getExams"
  300. remote
  301. placeholder="请选择"
  302. >
  303. <el-option
  304. v-for="item in examList"
  305. :label="item.name"
  306. :value="item.id"
  307. :key="item.id"
  308. ></el-option>
  309. </el-select>
  310. </el-form-item>
  311. </el-row>
  312. <el-row class="margin_top_10 margin_left_120">
  313. <el-button type="primary" @click="sendPrint('printFrom')"
  314. >保 存</el-button
  315. >
  316. <el-button @click="resetForm2('printFrom')"
  317. ><i class="el-icon-refresh"></i> 重 置</el-button
  318. >
  319. <el-button @click="cancel('printFrom')" type="primary"
  320. ><i class="el-icon-arrow-left"></i> 返 回</el-button
  321. >
  322. </el-row>
  323. </el-form>
  324. </el-dialog>
  325. </section>
  326. </template>
  327. <script>
  328. import { CORE_API, QUESTION_API, EXAM_WORK_API } from "@/constants/constants";
  329. import { LEVEL_TYPE } from "../constants/constants";
  330. import { mapState } from "vuex";
  331. import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
  332. export default {
  333. components: { LinkTitlesCustom },
  334. data() {
  335. return {
  336. isClear: 0,
  337. courseLoading: false,
  338. formSearch: {
  339. courseNo: "",
  340. courseName: "",
  341. level: "",
  342. name: ""
  343. },
  344. tableData: [],
  345. currentPage: 1,
  346. pageSize: 10,
  347. total: 0,
  348. loading: false,
  349. courseList: [],
  350. levelList: LEVEL_TYPE,
  351. dialogVisible: false,
  352. selectedPaperIds: [],
  353. fileList: [],
  354. uploadAction: "",
  355. formUpload: {
  356. paperName: ""
  357. },
  358. uploadData: {},
  359. fileLoading: false,
  360. exportDialog: false,
  361. exportModel: {
  362. id: "",
  363. courseCode: "",
  364. courseName: "",
  365. exportContentList: []
  366. },
  367. isShow: true,
  368. examList: [],
  369. Org: {},
  370. dialogModel: false,
  371. rowId: "",
  372. isShowPrintExamPackage: false,
  373. isShowPrintExamPackagePassword: false,
  374. printExamPackagePassword: "",
  375. printFrom: {
  376. examId: ""
  377. },
  378. rules: {
  379. examId: [{ required: true, message: "请输入名称", trigger: "change" }]
  380. }
  381. };
  382. },
  383. methods: {
  384. resetForm() {
  385. this.formSearch = {
  386. courseNo: "",
  387. courseName: "",
  388. level: "",
  389. name: ""
  390. };
  391. },
  392. //查询
  393. searchFrom() {
  394. this.currentPage = 1;
  395. this.searchGenPaper();
  396. },
  397. searchGenPaper() {
  398. this.loading = true;
  399. var url =
  400. QUESTION_API + "/genPaper/" + this.currentPage + "/" + this.pageSize;
  401. this.$http.get(url, { params: this.formSearch }).then(response => {
  402. this.tableData = response.data.content;
  403. this.total = response.data.totalElements;
  404. });
  405. this.loading = false;
  406. },
  407. genPaperDetail() {
  408. var courseNo = this.formSearch.courseNo;
  409. this.getCourseName(courseNo);
  410. var level = this.formSearch.level;
  411. if (!courseNo) {
  412. this.$notify({
  413. message: "请选择课程",
  414. type: "error"
  415. });
  416. } else {
  417. sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
  418. sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
  419. this.$router.push({
  420. path: "/questions/gen_paper_detail/" + courseNo + "/" + level
  421. });
  422. }
  423. },
  424. handleCurrentChange(val) {
  425. this.currentPage = val;
  426. this.searchGenPaper();
  427. },
  428. getCourseName(courseNo) {
  429. for (let course of this.courseList) {
  430. if (course.code == courseNo) {
  431. this.formSearch.courseName = course.name;
  432. this.formSearch.level = course.level;
  433. }
  434. }
  435. },
  436. exportGenPaper(row) {
  437. window.open(
  438. QUESTION_API + "/paper/export/" + row.id + "/" + this.user.rootOrgName
  439. );
  440. },
  441. editGenPaper(row) {
  442. sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
  443. sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
  444. this.$router.push({
  445. path: "/edit_paper/" + row.id + "/gen_paper"
  446. });
  447. },
  448. deleteGenPaper(row) {
  449. this.$confirm("确认删除试卷吗?", "提示", {
  450. type: "warning"
  451. }).then(() => {
  452. this.loading = true;
  453. this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
  454. () => {
  455. this.$notify({
  456. message: "删除成功",
  457. type: "success"
  458. });
  459. this.searchGenPaper();
  460. },
  461. response => {
  462. this.$notify({
  463. message: response.data.msg,
  464. type: "error"
  465. });
  466. this.loading = false;
  467. }
  468. );
  469. });
  470. },
  471. selectChange(row) {
  472. this.selectedPaperIds = [];
  473. row.forEach(element => {
  474. this.selectedPaperIds.push(element.id);
  475. });
  476. },
  477. batchDeleteGenPaper() {
  478. var paperIds = this.paperIds;
  479. console.log("试卷id:", paperIds);
  480. if (this.selectedPaperIds.length != 0) {
  481. this.$confirm("确认删除试卷吗?", "提示", {
  482. type: "warning"
  483. }).then(() => {
  484. this.loading = true;
  485. this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
  486. () => {
  487. this.$notify({
  488. message: "删除成功",
  489. type: "success"
  490. });
  491. this.searchGenPaper();
  492. this.selectedPaperIds = [];
  493. },
  494. response => {
  495. this.$notify({
  496. message: response.data.msg,
  497. type: "error"
  498. });
  499. this.loading = false;
  500. }
  501. );
  502. });
  503. } else {
  504. this.$notify({
  505. message: "请勾选删除的数据",
  506. type: "warning"
  507. });
  508. }
  509. },
  510. //查询所有课程
  511. getCourses(query) {
  512. query = query.trim();
  513. if (query) {
  514. if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
  515. this.courseLoading = true;
  516. this.$http
  517. .get(CORE_API + "/course/query?name=" + query + "&enable=true")
  518. .then(response => {
  519. this.courseList = response.data;
  520. this.courseLoading = false;
  521. });
  522. }
  523. } else {
  524. this.courseList = [];
  525. }
  526. },
  527. //打开导出弹框
  528. openExportDialog(row) {
  529. this.isShow = true;
  530. this.isShow = true;
  531. this.exportDialog = true;
  532. this.exportModel.id = row.id;
  533. this.exportModel.courseCode = row.course.code;
  534. this.exportModel.courseName = row.course.name;
  535. this.exportModel.exportContentList = [];
  536. /* 分布式印刷数据包设置 */
  537. this.isShowPrintExamPackage = true;
  538. this.isShowPrintExamPackagePassword = false;
  539. this.printExamPackagePassword = "";
  540. },
  541. //打开批量弹出框
  542. openBatchExportPaperDialog() {
  543. if (this.selectedPaperIds.length != 0) {
  544. this.exportDialog = true;
  545. this.isShow = false;
  546. this.isShow = false;
  547. this.exportModel.exportContentList = [];
  548. } else {
  549. this.$notify({
  550. message: "请勾选导出的数据",
  551. type: "warning"
  552. });
  553. }
  554. /* 分布式印刷数据包设置 */
  555. this.isShowPrintExamPackage = false;
  556. this.isShowPrintExamPackagePassword = false;
  557. this.printExamPackagePassword = "";
  558. },
  559. //导出试卷,答案,机考数据包
  560. exportPaperInfo() {
  561. if (this.exportModel.exportContentList.length == 0) {
  562. this.$notify({
  563. message: "请选择导出内容",
  564. type: "error"
  565. });
  566. return false;
  567. }
  568. if (this.printExamPackagePassword.length > 0) {
  569. var reg = /^[0-9A-Za-z]{6,12}$/;
  570. if (!reg.test(this.printExamPackagePassword)) {
  571. this.$notify({
  572. message: "加密密码请输入6至12位的数字或字母!",
  573. type: "error"
  574. });
  575. return false;
  576. }
  577. }
  578. var key = this.user.key;
  579. var token = this.user.token;
  580. if (this.isShow) {
  581. console.log("单个导出");
  582. window.location.href =
  583. QUESTION_API +
  584. "/paper/export/" +
  585. this.exportModel.id +
  586. "/" +
  587. this.exportModel.exportContentList +
  588. "/" +
  589. this.user.rootOrgName +
  590. "/" +
  591. this.user.displayName +
  592. "/onLine" +
  593. "?psw=" +
  594. this.printExamPackagePassword +
  595. "&$key=" +
  596. key +
  597. "&$token=" +
  598. token;
  599. this.exportDialog = false;
  600. } else {
  601. console.log("批量导出");
  602. var paperIds = this.paperIds;
  603. console.log(paperIds);
  604. window.location.href =
  605. QUESTION_API +
  606. "/paper/batch_export/" +
  607. paperIds +
  608. "/" +
  609. this.exportModel.exportContentList +
  610. "/" +
  611. this.user.rootOrgName +
  612. "/" +
  613. this.user.displayName +
  614. "/onLine" +
  615. "?$key=" +
  616. key +
  617. "&$token=" +
  618. token;
  619. this.exportDialog = false;
  620. console.log(paperIds);
  621. }
  622. },
  623. removeItem() {
  624. sessionStorage.removeItem("gen_paper");
  625. sessionStorage.removeItem("gen_paper_currentPage");
  626. },
  627. previewPDF2(row) {
  628. window.open(QUESTION_API + "/paper/pdf/" + row.id);
  629. },
  630. openPrint(row) {
  631. this.dialogModel = true;
  632. this.printFrom.examId = "";
  633. this.rowId = row.id;
  634. console.log("this.examList:", this.examList);
  635. },
  636. cancel(formData) {
  637. this.resetForm2(formData);
  638. this.dialogModel = false;
  639. },
  640. resetForm2(formData) {
  641. this.printFrom.examId = "";
  642. this.$refs[formData].clearValidate();
  643. },
  644. //传至印刷模块
  645. sendPrint(formData) {
  646. this.$refs[formData].validate(valid => {
  647. if (valid) {
  648. var orgId = "";
  649. for (let exam of this.examList) {
  650. if ((exam.id = this.printFrom.examId)) {
  651. orgId = exam.rootOrgId;
  652. }
  653. }
  654. if (orgId != "") {
  655. this.$http.get(
  656. QUESTION_API +
  657. "/sendPrint/" +
  658. this.rowId +
  659. "/" +
  660. this.printFrom.examId +
  661. "/" +
  662. orgId
  663. );
  664. this.$notify({
  665. message: "已推送",
  666. type: "success"
  667. });
  668. this.dialogModel = false;
  669. }
  670. } else {
  671. return false;
  672. }
  673. });
  674. },
  675. //查询考试
  676. getExams(query) {
  677. query = query.trim();
  678. this.$http
  679. .get(
  680. EXAM_WORK_API + "/exam/queryByNameLike?name=" + query + "&enable=true"
  681. )
  682. .then(response => {
  683. this.examList = response.data;
  684. });
  685. },
  686. searchExamList() {
  687. //查询所有考试
  688. this.$http
  689. .get(EXAM_WORK_API + "/exam/queryByNameLike?name=&enable=true")
  690. .then(response => {
  691. var list = response.data;
  692. for (var i = 0; i < list.length; i++) {
  693. if (list[i].examType == "TRADITION") {
  694. this.examList.push(list[i]);
  695. }
  696. }
  697. });
  698. },
  699. //根据orgId查询学校名称
  700. searchOrgName() {
  701. this.$http
  702. .get(CORE_API + "/org/rootOrg/" + this.user.rootOrgId)
  703. .then(response => {
  704. this.Org = response.data;
  705. });
  706. },
  707. initVue() {
  708. this.isClear = this.$route.params.isClear;
  709. if (this.isClear == 0 || !this.isClear) {
  710. this.removeItem();
  711. this.formSearch = {
  712. courseNo: "",
  713. courseName: "",
  714. level: "",
  715. name: ""
  716. };
  717. } else {
  718. this.formSearch = JSON.parse(sessionStorage.getItem("gen_paper"));
  719. this.currentPage =
  720. sessionStorage.getItem("gen_paper_currentPage") == null
  721. ? 1
  722. : parseInt(sessionStorage.getItem("gen_paper_currentPage"));
  723. }
  724. this.getCourses(this.formSearch.courseNo);
  725. this.searchGenPaper();
  726. }
  727. },
  728. computed: {
  729. paperIds() {
  730. var paperIds = "";
  731. for (let paperId of this.selectedPaperIds) {
  732. if (!paperIds) {
  733. paperIds += paperId;
  734. } else {
  735. paperIds += "," + paperId;
  736. }
  737. }
  738. return paperIds;
  739. },
  740. courseInfoSelect() {
  741. var courseList = [];
  742. for (let course of this.courseList) {
  743. var courseInfo = course.name + "(" + course.code + ")";
  744. var courseNo = course.code;
  745. var courseName = course.name;
  746. courseList.push({
  747. courseNo: courseNo,
  748. courseInfo: courseInfo,
  749. courseName: courseName
  750. });
  751. }
  752. return courseList;
  753. },
  754. noBatchSelected() {
  755. return this.selectedPaperIds.length === 0;
  756. },
  757. ...mapState({ user: state => state.user })
  758. },
  759. watch: {
  760. $route: "initVue"
  761. },
  762. created() {
  763. this.initVue();
  764. this.searchExamList();
  765. this.searchOrgName();
  766. }
  767. };
  768. </script>
  769. <style scoped src="../styles/Common.css"></style>