ImportPaper.vue 23 KB

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