Question.vue 23 KB

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