Question.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. <template>
  2. <section class="content">
  3. <!-- 正文信息 -->
  4. <div class="box-body">
  5. <el-form
  6. :inline="true"
  7. :model="formSearch"
  8. label-position="right"
  9. label-width="70px"
  10. >
  11. <el-row>
  12. <el-col :span="6">
  13. <el-form-item label="课程名称">
  14. <el-select
  15. v-model="formSearch.courseNo"
  16. class="search_width"
  17. filterable
  18. :remote-method="getCourses"
  19. remote
  20. clearable
  21. placeholder="请选择"
  22. size="small"
  23. @change="initCourseProperty"
  24. @focus="(e) => getCourses(e.target.value)"
  25. >
  26. <el-option
  27. v-for="item in courseInfoSelect"
  28. :key="item.courseNo"
  29. :label="item.courseInfo"
  30. :value="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-select
  39. v-model="formSearch.courseLevel"
  40. class="search_width"
  41. filterable
  42. clearable
  43. placeholder="请选择"
  44. size="small"
  45. >
  46. <el-option
  47. v-for="item in levelList"
  48. :key="item.value"
  49. :label="item.label"
  50. :value="item.value"
  51. >
  52. </el-option>
  53. </el-select>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="6">
  57. <el-form-item label="题型">
  58. <el-select
  59. v-model="formSearch.questionType"
  60. class="search_width"
  61. filterable
  62. clearable
  63. placeholder="请选择"
  64. size="small"
  65. >
  66. <el-option
  67. v-for="item in questionTypes"
  68. :key="item.value"
  69. :label="item.label"
  70. :value="item.value"
  71. >
  72. </el-option>
  73. </el-select>
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="6">
  77. <el-form-item label="属性名">
  78. <el-select
  79. v-model="formSearch.coursePropertyName"
  80. class="search_width"
  81. filterable
  82. clearable
  83. :disabled="updatePorperty"
  84. placeholder="请选择"
  85. size="small"
  86. @change="searchFirst"
  87. >
  88. <el-option
  89. v-for="item in coursePropertyList"
  90. :key="item.name"
  91. :label="item.name"
  92. :value="item.name"
  93. ></el-option>
  94. </el-select>
  95. </el-form-item>
  96. </el-col>
  97. </el-row>
  98. <!-- created by wwh -->
  99. <el-row>
  100. <el-col :span="6">
  101. <el-form-item label="一级属性">
  102. <el-select
  103. v-model="formSearch.firstPropertyId"
  104. class="search_width"
  105. filterable
  106. clearable
  107. :disabled="updateFirst"
  108. placeholder="请选择"
  109. size="small"
  110. @change="searchSecond"
  111. >
  112. <el-option
  113. v-for="item in firstPropertyList"
  114. :key="item.id"
  115. :label="item.name"
  116. :value="item.id"
  117. ></el-option>
  118. </el-select>
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="6">
  122. <el-form-item label="二级属性">
  123. <el-select
  124. v-model="formSearch.secondPropertyId"
  125. class="search_width"
  126. filterable
  127. clearable
  128. :disabled="updateSecond"
  129. placeholder="请选择"
  130. size="small"
  131. >
  132. <el-option
  133. v-for="item in secondPropertyList"
  134. :key="item.id"
  135. :label="item.name"
  136. :value="item.id"
  137. ></el-option>
  138. </el-select>
  139. </el-form-item>
  140. </el-col>
  141. <el-col :span="6">
  142. <el-form-item label="公开度">
  143. <el-select
  144. v-model="formSearch.publicity"
  145. class="search_width"
  146. filterable
  147. clearable
  148. placeholder="请选择"
  149. size="small"
  150. >
  151. <el-option
  152. v-for="item in publicityList"
  153. :key="item.value"
  154. :label="item.label"
  155. :value="item.value"
  156. >
  157. </el-option>
  158. </el-select>
  159. </el-form-item>
  160. </el-col>
  161. <el-col :span="6">
  162. <div class="search_down">
  163. <el-button size="small" type="primary" @click="searchFrom"
  164. ><i class="el-icon-search"></i> 查询</el-button
  165. >
  166. <el-button size="small" @click="resetForm"
  167. ><i class="el-icon-refresh"></i> 重 置</el-button
  168. >
  169. </div>
  170. </el-col>
  171. </el-row>
  172. </el-form>
  173. <div
  174. style="width: 100%; border-bottom: 1px solid #ddd; margin: 10px 0"
  175. ></div>
  176. <!-- 页面列表 -->
  177. <el-table v-loading="loading" :data="tableData" border>
  178. <el-table-column label="课程" width="180">
  179. <template slot-scope="scope">
  180. <span>{{ scope.row.course.name }}</span>
  181. </template>
  182. </el-table-column>
  183. <el-table-column label="层次" width="100">
  184. <template slot-scope="scope">
  185. <span>{{ getLevel(scope.row.course.level) }}</span>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="题型" width="100">
  189. <template slot-scope="scope">
  190. <span>{{ scope.row.questionType | questionType }}</span>
  191. </template>
  192. </el-table-column>
  193. <el-table-column label="题干">
  194. <template slot-scope="scope">
  195. <span
  196. class="row_quesBody"
  197. @click="prevViewQues(scope.row)"
  198. v-html="scope.row.quesBody"
  199. >
  200. </span>
  201. </template>
  202. </el-table-column>
  203. <el-table-column label="操作" width="175">
  204. <template slot-scope="scope">
  205. <div class="operate_left">
  206. <el-button
  207. v-if="scope.row.questionType !== 'NESTED_ANSWER_QUESTION'"
  208. size="mini"
  209. type="primary"
  210. plain
  211. @click="updateRow(scope.row)"
  212. >
  213. <i class="el-icon-edit"></i>编辑
  214. </el-button>
  215. <el-button
  216. size="mini"
  217. type="danger"
  218. @click="deleteRow(scope.row)"
  219. >
  220. <i class="el-icon-delete"></i> 删除
  221. </el-button>
  222. </div>
  223. </template>
  224. </el-table-column>
  225. </el-table>
  226. <!-- 分页栏 -->
  227. <div class="page pull-right">
  228. <el-pagination
  229. :current-page="currentPage"
  230. :page-size="pageSize"
  231. :page-sizes="[10, 20, 50, 100, 200, 300]"
  232. layout="total, sizes, prev, pager, next, jumper"
  233. :total="total"
  234. @current-change="handleCurrentChange"
  235. @size-change="handleSizeChange"
  236. >
  237. </el-pagination>
  238. </div>
  239. </div>
  240. <div class="text-left">
  241. <el-dialog
  242. title="试题预览"
  243. :visible.sync="quesDialog"
  244. @close="closeQuesDialog"
  245. >
  246. <el-form :model="quesModel" label-position="right" label-width="80px">
  247. <el-row :gutter="10">
  248. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  249. <el-form-item label="题型">
  250. <el-select
  251. v-model="quesModel.questionType"
  252. :disabled="true"
  253. placeholder="题型"
  254. >
  255. <el-option
  256. v-for="item in questionTypes"
  257. :key="item.value"
  258. :label="item.label"
  259. :value="item.value"
  260. >
  261. </el-option>
  262. </el-select>
  263. </el-form-item>
  264. </el-col>
  265. </el-row>
  266. <el-row :gutter="10">
  267. <el-col :xs="30" :sm="30" :md="30" :lg="30">
  268. <el-form-item label="题干">
  269. <span class="ques-body" v-html="quesModel.quesBody"></span>
  270. </el-form-item>
  271. </el-col>
  272. </el-row>
  273. <!-- 非套题 -->
  274. <div v-if="quesModel.questionType !== 'NESTED_ANSWER_QUESTION'">
  275. <el-row
  276. v-for="(quesOption, index) in quesModel.quesOptions"
  277. :key="index"
  278. :gutter="10"
  279. >
  280. <el-col :xs="30" :sm="30" :md="30" :lg="30">
  281. <el-form-item :label="index | optionOrderWordFilter">
  282. <span class="ques-body" v-html="quesOption.optionBody"></span>
  283. </el-form-item>
  284. </el-col>
  285. </el-row>
  286. </div>
  287. <!-- 套题 -->
  288. <div v-if="quesModel.questionType === 'NESTED_ANSWER_QUESTION'">
  289. <el-row
  290. v-for="subQuestionModel in quesModel.subQuestions"
  291. :key="subQuestionModel"
  292. :gutter="10"
  293. >
  294. <el-col :xs="30" :sm="30" :md="30" :lg="30">
  295. <el-row>
  296. <el-form-item label="题目">
  297. <span v-html="subQuestionModel.quesBody"></span>
  298. </el-form-item>
  299. </el-row>
  300. <el-row
  301. v-for="(
  302. subQuesOption, subIndex
  303. ) in subQuestionModel.quesOptions"
  304. :key="subIndex"
  305. :gutter="10"
  306. >
  307. <el-col :xs="30" :sm="30" :md="30" :lg="30">
  308. <el-form-item :label="subIndex | optionOrderWordFilter">
  309. <span v-html="subQuesOption.optionBody"></span>
  310. </el-form-item>
  311. </el-col>
  312. </el-row>
  313. <el-row>
  314. <el-form-item label="答案">
  315. <span v-html="subQuestionModel.quesAnswer"></span>
  316. </el-form-item>
  317. </el-row>
  318. </el-col>
  319. </el-row>
  320. </div>
  321. <!-- 非套题答案 -->
  322. <div v-if="quesModel.questionType !== 'NESTED_ANSWER_QUESTION'">
  323. <el-form-item label="答案">
  324. <span v-html="answer"></span>
  325. </el-form-item>
  326. </div>
  327. </el-form>
  328. </el-dialog>
  329. </div>
  330. <el-dialog title="提示" :visible.sync="deleteDialogVisible">
  331. <span>{{ deleteInfo }}</span>
  332. <span slot="footer" class="dialog-footer">
  333. <el-button type="primary" @click="deleteDialogVisible = false"
  334. >确 定</el-button
  335. >
  336. </span>
  337. </el-dialog>
  338. </section>
  339. </template>
  340. <script>
  341. import { CORE_API, QUESTION_API } from "@/constants/constants";
  342. import { QUESTION_TYPES, LEVEL_TYPE } from "../constants/constants";
  343. export default {
  344. data() {
  345. return {
  346. formSearch: {
  347. questionType: "",
  348. courseNo: "",
  349. courseLevel: "",
  350. courseName: "",
  351. publicity: "",
  352. coursePropertyName: "",
  353. firstPropertyId: "",
  354. secondPropertyId: "",
  355. },
  356. courseList: [], //课程list
  357. levelList: LEVEL_TYPE, //层次list
  358. questionTypeList: [], //题型
  359. tableData: [],
  360. currentPage: 1,
  361. pageSize: 10,
  362. total: 10,
  363. quesModel: {},
  364. questionTypes: QUESTION_TYPES,
  365. quesDialog: false,
  366. loading: false,
  367. deleteDialogVisible: false,
  368. deleteInfo: "",
  369. singleRightAnswer: "", //接收单选答案
  370. multipleRightAnswer: [], //接收多选答案
  371. publicityList: [
  372. { label: "公开", value: true },
  373. { label: "非公开", value: false },
  374. ],
  375. coursePropertyList: [], //课程属性集合
  376. firstPropertyList: [], //一级属性集合
  377. secondPropertyList: [], //二级属性集合
  378. isClear: 0,
  379. };
  380. },
  381. computed: {
  382. courseInfoSelect() {
  383. var courseList = [];
  384. for (let course of this.courseList) {
  385. var courseInfo = course.name + "(" + course.code + ")";
  386. var courseNo = course.code;
  387. courseList.push({ courseNo: courseNo, courseInfo: courseInfo });
  388. }
  389. return courseList;
  390. },
  391. answer() {
  392. if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
  393. return this.singleRightAnswer;
  394. } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
  395. var obj = this.multipleRightAnswer;
  396. return obj.sort().toString();
  397. } else {
  398. return this.quesModel.quesAnswer;
  399. }
  400. },
  401. updateFirst() {
  402. if (this.formSearch.coursePropertyName) {
  403. return false;
  404. }
  405. return true;
  406. },
  407. updateSecond() {
  408. if (this.formSearch.firstPropertyId) {
  409. return false;
  410. }
  411. return true;
  412. },
  413. updatePorperty() {
  414. if (this.formSearch.courseNo) {
  415. return false;
  416. }
  417. return true;
  418. },
  419. },
  420. watch: {
  421. $route: "initVue",
  422. },
  423. //钩子函数
  424. created() {
  425. this.initVue();
  426. },
  427. methods: {
  428. resetForm() {
  429. this.formSearch = {
  430. questionType: "",
  431. courseNo: "",
  432. courseLevel: "",
  433. courseName: "",
  434. publicity: "",
  435. coursePropertyName: "",
  436. firstPropertyId: "",
  437. secondPropertyId: "",
  438. };
  439. },
  440. getLevel(level) {
  441. if (level == "ZSB") {
  442. return "专升本";
  443. } else if (level == "GQZ") {
  444. return "高起专";
  445. } else if (level == "GQB") {
  446. return "高起本";
  447. } else if (level == "ALL") {
  448. return "不限";
  449. } else {
  450. return "";
  451. }
  452. },
  453. //查询列表
  454. searchFrom() {
  455. this.currentPage = 1;
  456. this.searchQues();
  457. },
  458. searchQues() {
  459. this.tableData = [];
  460. var url =
  461. QUESTION_API + "/question/" + this.currentPage + "/" + this.pageSize;
  462. this.loading = true;
  463. this.$http.get(url, { params: this.formSearch }).then((response) => {
  464. this.tableData = response.data.content;
  465. this.total = response.data.totalElements;
  466. this.loading = false;
  467. });
  468. },
  469. //分页
  470. handleCurrentChange(val) {
  471. this.currentPage = val;
  472. this.searchQues();
  473. },
  474. handleSizeChange(val) {
  475. this.pageSize = val;
  476. this.currentPage = 1;
  477. this.searchQues();
  478. },
  479. getCourseName(courseNo) {
  480. for (let course of this.courseList) {
  481. if (course.code == courseNo) {
  482. this.formSearch.courseName = course.name;
  483. }
  484. }
  485. },
  486. //修改
  487. updateRow(row) {
  488. this.getCourseName(this.formSearch.courseNo);
  489. //选择题:单选、多选
  490. if (
  491. row.questionType === "SINGLE_ANSWER_QUESTION" ||
  492. row.questionType === "MULTIPLE_ANSWER_QUESTION"
  493. ) {
  494. this.$router.push({
  495. path: "/questions/edit_select_question/" + row.id,
  496. });
  497. }
  498. //判断、填空、问答
  499. if (
  500. row.questionType === "BOOL_ANSWER_QUESTION" ||
  501. row.questionType === "FILL_BLANK_QUESTION" ||
  502. row.questionType === "TEXT_ANSWER_QUESTION"
  503. ) {
  504. this.$router.push({
  505. path: "/questions/edit_other_question/" + row.id,
  506. });
  507. }
  508. sessionStorage.setItem("question", JSON.stringify(this.formSearch));
  509. sessionStorage.setItem("question_currentPage", this.currentPage);
  510. },
  511. //删除
  512. deleteRow(row) {
  513. this.$confirm("确认删除试题吗?", "提示", {
  514. type: "warning",
  515. }).then(() => {
  516. this.loading = true;
  517. this.$http
  518. .delete(QUESTION_API + "/paper/deleteQuestion/" + row.id)
  519. .then(
  520. (response) => {
  521. if (response.data.length > 0) {
  522. this.loading = false;
  523. this.deleteInfo =
  524. "该试题被试卷:" +
  525. response.data.join(" , ") +
  526. "使用,不能删除";
  527. this.deleteDialogVisible = true;
  528. } else {
  529. this.$notify({
  530. message: "删除成功",
  531. type: "success",
  532. });
  533. this.searchQues();
  534. }
  535. },
  536. () => {
  537. this.$notify({
  538. message: "删除失败",
  539. type: "error",
  540. });
  541. this.loading = false;
  542. }
  543. );
  544. });
  545. },
  546. //打开弹窗
  547. openQuesDialog() {
  548. this.quesDialog = true;
  549. },
  550. //关闭弹窗
  551. closeQuesDialog() {
  552. this.quesDialog = false;
  553. this.quesModel = {};
  554. },
  555. //预览
  556. prevViewQues(row) {
  557. this.quesModel = row;
  558. this.disposeSelectAnswer();
  559. this.openQuesDialog();
  560. },
  561. //查询所有课程
  562. getCourses(query) {
  563. this.$http
  564. .get(CORE_API + "/course/query?name=" + query + "&enable=true")
  565. .then((response) => {
  566. this.courseList = response.data;
  567. if (this.formSearch.courseNo) {
  568. this.$http
  569. .get(
  570. QUESTION_API +
  571. "/courseProperty/enable/" +
  572. this.formSearch.courseNo
  573. )
  574. .then((response) => {
  575. this.coursePropertyList = response.data;
  576. //查询一级属性
  577. this.getFirst();
  578. });
  579. } else {
  580. this.coursePropertyList = [];
  581. }
  582. });
  583. },
  584. //重置查询表单
  585. resetSearchForm() {
  586. this.formSearch = {
  587. questionType: "",
  588. courseNo: "",
  589. };
  590. },
  591. /*处理选择题答案显示,处理套题下选择题答案显示*/
  592. disposeSelectAnswer() {
  593. this.singleRightAnswer = "";
  594. this.multipleRightAnswer = [];
  595. //处理选择题答案显示
  596. if (
  597. this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" ||
  598. this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION"
  599. ) {
  600. for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
  601. var option = this.quesModel.quesOptions[i];
  602. var orderNum = String.fromCharCode(65 + i);
  603. if (
  604. this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" &&
  605. option.isCorrect == 1
  606. ) {
  607. this.singleRightAnswer = orderNum;
  608. }
  609. if (
  610. this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION" &&
  611. option.isCorrect == 1
  612. ) {
  613. this.multipleRightAnswer.push(orderNum);
  614. }
  615. }
  616. }
  617. //处理套题下选择题答案显示
  618. if (this.quesModel.questionType == "NESTED_ANSWER_QUESTION") {
  619. var subQuestions = this.quesModel.subQuestions;
  620. for (var ii = 0; ii < subQuestions.length; ii++) {
  621. var subQuestion = subQuestions[ii];
  622. if (subQuestion.questionType == "SINGLE_ANSWER_QUESTION") {
  623. for (var j = 0; j < subQuestion.quesOptions.length; j++) {
  624. var option_j = subQuestion.quesOptions[j];
  625. var orderNum_j = String.fromCharCode(65 + j);
  626. if (option_j.isCorrect == 1) {
  627. subQuestion["quesAnswer"] = orderNum_j;
  628. }
  629. }
  630. }
  631. if (subQuestion.questionType == "MULTIPLE_ANSWER_QUESTION") {
  632. var subQuestionMultipleRightAnswer = [];
  633. for (var k = 0; k < subQuestion.quesOptions.length; k++) {
  634. var option2 = subQuestion.quesOptions[k];
  635. var orderNum2 = String.fromCharCode(65 + k);
  636. if (option2.isCorrect == 1) {
  637. subQuestionMultipleRightAnswer.push(orderNum2);
  638. }
  639. }
  640. subQuestion[
  641. "quesAnswer"
  642. ] = subQuestionMultipleRightAnswer.sort().toString();
  643. }
  644. }
  645. }
  646. },
  647. //查询所有课程属性名
  648. initCourseProperty() {
  649. this.formSearch.coursePropertyName = "";
  650. this.formSearch.firstPropertyId = "";
  651. this.formSearch.secondPropertyId = "";
  652. if (this.formSearch.courseNo) {
  653. this.$http
  654. .get(
  655. QUESTION_API + "/courseProperty/enable/" + this.formSearch.courseNo
  656. )
  657. .then((response) => {
  658. this.coursePropertyList = response.data;
  659. });
  660. } else {
  661. this.coursePropertyList = [];
  662. }
  663. },
  664. //查询一级属性
  665. searchFirst() {
  666. if (this.formSearch.coursePropertyName) {
  667. this.formSearch.firstPropertyId = "";
  668. this.formSearch.secondPropertyId = "";
  669. for (let courseProperty of this.coursePropertyList) {
  670. if (courseProperty.name == this.formSearch.coursePropertyName) {
  671. this.$http
  672. .get(QUESTION_API + "/property/first/" + courseProperty.id)
  673. .then((response) => {
  674. this.firstPropertyList = response.data;
  675. });
  676. }
  677. }
  678. }
  679. },
  680. //查询二级属性
  681. searchSecond() {
  682. if (this.formSearch.firstPropertyId) {
  683. this.formSearch.secondPropertyId = "";
  684. this.$http
  685. .get(
  686. QUESTION_API + "/property/second/" + this.formSearch.firstPropertyId
  687. )
  688. .then((response) => {
  689. this.secondPropertyList = response.data;
  690. });
  691. }
  692. },
  693. getFirst() {
  694. if (this.formSearch.coursePropertyName) {
  695. for (let courseProperty of this.coursePropertyList) {
  696. if (courseProperty.name == this.formSearch.coursePropertyName) {
  697. this.$http
  698. .get(QUESTION_API + "/property/first/" + courseProperty.id)
  699. .then((response) => {
  700. this.firstPropertyList = response.data;
  701. //查询二级
  702. this.getSecond();
  703. });
  704. }
  705. }
  706. }
  707. },
  708. getSecond() {
  709. if (this.formSearch.firstPropertyId) {
  710. this.$http
  711. .get(
  712. QUESTION_API + "/property/second/" + this.formSearch.firstPropertyId
  713. )
  714. .then((response) => {
  715. this.secondPropertyList = response.data;
  716. });
  717. }
  718. },
  719. initVue() {
  720. this.isClear = this.$route.params.isClear;
  721. if (this.isClear == 0 || !this.isClear) {
  722. sessionStorage.removeItem("question");
  723. sessionStorage.removeItem("question_currentPage");
  724. this.formSearch = {
  725. questionType: "",
  726. courseNo: "",
  727. courseLevel: "",
  728. courseName: "",
  729. publicity: "",
  730. coursePropertyName: "",
  731. firstPropertyId: "",
  732. secondPropertyId: "",
  733. };
  734. this.currentPage = 1;
  735. } else {
  736. this.formSearch = JSON.parse(sessionStorage.getItem("question"));
  737. this.currentPage = parseInt(
  738. sessionStorage.getItem("question_currentPage")
  739. );
  740. }
  741. if (this.formSearch && this.formSearch.courseName) {
  742. this.getCourses(this.formSearch.courseName);
  743. } else {
  744. this.formSearch = {
  745. questionType: "",
  746. courseNo: "",
  747. courseLevel: "",
  748. courseName: "",
  749. publicity: "",
  750. coursePropertyName: "",
  751. firstPropertyId: "",
  752. secondPropertyId: "",
  753. };
  754. }
  755. this.searchQues();
  756. },
  757. },
  758. };
  759. </script>
  760. <style scoped>
  761. .select_width {
  762. width: 150px;
  763. }
  764. .row_quesBody >>> p {
  765. text-overflow: ellipsis;
  766. overflow: hidden;
  767. }
  768. </style>
  769. <style scoped src="../styles/Common.css"></style>