CreateTaskApply.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. <template>
  2. <el-dialog
  3. class="create-task-apply"
  4. :visible.sync="modalIsShow"
  5. title="新增命题申请"
  6. top="10px"
  7. width="1000px"
  8. :close-on-click-modal="false"
  9. :close-on-press-escape="false"
  10. append-to-body
  11. @open="visibleChange"
  12. >
  13. <div class="part-box part-box-pad part-box-border">
  14. <el-form
  15. ref="examTaskComp"
  16. :model="examTask"
  17. :rules="rules"
  18. label-width="120px"
  19. >
  20. <el-row>
  21. <el-col :span="12">
  22. <el-form-item prop="teachingRoomId" label="教研室:">
  23. <teaching-room-select
  24. v-model="examTask.teachingRoomId"
  25. @change="clearCard"
  26. ></teaching-room-select>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="12">
  30. <el-form-item prop="courseCode" label="课程(代码):">
  31. <course-select
  32. v-model="examTask.courseCode"
  33. @change="courseChange"
  34. ></course-select>
  35. </el-form-item>
  36. </el-col>
  37. </el-row>
  38. <el-row>
  39. <el-col :span="12">
  40. <el-form-item prop="cardRuleId" label="题卡规则:">
  41. <card-rule-select
  42. ref="CardRuleSelect"
  43. v-model.trim="examTask.cardRuleId"
  44. placeholder="请选择"
  45. clearable
  46. @change="clearCard"
  47. ></card-rule-select>
  48. <p class="tips-info">
  49. 说明:若选择全部通卡,则命题老师只能选择通卡,若选择题卡规则,则专卡和通卡均可选择
  50. </p>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="12">
  54. <el-form-item label="试卷编号:">
  55. <el-input
  56. v-model.trim="examTask.paperNumber"
  57. placeholder="请输入试卷编号"
  58. clearable
  59. ></el-input>
  60. </el-form-item>
  61. </el-col>
  62. </el-row>
  63. <el-row>
  64. <el-col :span="12">
  65. <el-form-item label="拟卷教师:">
  66. <el-input
  67. v-model.trim="examTask.teacherName"
  68. placeholder="请输入拟卷教师"
  69. clearable
  70. ></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="12">
  74. <el-form-item label="主讲教师:">
  75. <el-input
  76. v-model.trim="examTask.lecturerName"
  77. placeholder="请输入主讲教师"
  78. clearable
  79. ></el-input>
  80. </el-form-item>
  81. </el-col>
  82. </el-row>
  83. </el-form>
  84. </div>
  85. <div class="mb-4" v-if="flows.length">
  86. <el-steps align-center>
  87. <el-step
  88. v-for="flow in flows"
  89. :key="flow.taskKey"
  90. :title="flow.taskName"
  91. :status="flow.status"
  92. >
  93. <div slot="description">
  94. <p class="step-desc">{{ flow.desc }}</p>
  95. <div class="step-info" v-if="flow.firstUser">
  96. <span>{{ flow.firstUser }}</span>
  97. <el-popover
  98. v-if="flow.moreUser"
  99. placement="top-start"
  100. width="300"
  101. trigger="hover"
  102. :content="flow.moreUser"
  103. >
  104. <span class="color-primary ml-1" slot="reference">更多</span>
  105. </el-popover>
  106. </div>
  107. </div>
  108. </el-step>
  109. </el-steps>
  110. </div>
  111. <div class="apply-content task-detail" v-if="modalIsShow">
  112. <div class="task-body">
  113. <div class="mb-2 text-right">
  114. <el-button
  115. type="info"
  116. icon="el-icon-circle-plus-outline"
  117. @click="addAtachment"
  118. >增加卷型</el-button
  119. >
  120. </div>
  121. <table class="table mb-2">
  122. <tr>
  123. <th>试卷类型</th>
  124. <th>试卷文件</th>
  125. <th>答题卡创建方式</th>
  126. <th>答题卡</th>
  127. <th>操作</th>
  128. </tr>
  129. <tr v-for="(attachment, index) in paperAttachments" :key="index">
  130. <td>{{ attachment.name }}卷</td>
  131. <td>
  132. <el-button
  133. type="text"
  134. class="btn-primary"
  135. @click="toUpload(attachment)"
  136. >
  137. <i
  138. :class="[
  139. 'icon',
  140. attachment.attachmentId ? 'icon-files-act' : 'icon-files'
  141. ]"
  142. ></i
  143. >{{
  144. attachment.attachmentId
  145. ? attachment.filename
  146. : "点击上传试卷文件"
  147. }}
  148. </el-button>
  149. </td>
  150. <td :rowspan="paperAttachments.length" v-if="index === 0">
  151. {{ createCardTypeName }}
  152. </td>
  153. <td :rowspan="paperAttachments.length" v-if="index === 0">
  154. <el-button
  155. type="text"
  156. class="btn-primary"
  157. @click="toCreateOrViewCard"
  158. >{{ cardTodoName }}</el-button
  159. >
  160. <el-button
  161. v-if="examTaskDetail.makeMethod"
  162. size="mini"
  163. type="primary"
  164. @click="changeCreateCardType"
  165. >切换题卡创建方式</el-button
  166. >
  167. </td>
  168. <td>
  169. <el-button
  170. class="btn-danger"
  171. type="text"
  172. @click="deleteAttachment(index)"
  173. >删除</el-button
  174. >
  175. </td>
  176. </tr>
  177. <tr v-if="!paperAttachments.length">
  178. <td colspan="5">
  179. <p class="tips-info text-center">暂无数据</p>
  180. </td>
  181. </tr>
  182. </table>
  183. <p class="tips-info tips-dark mb-2">
  184. 提示:多卷型试卷由于会绑定一个答题卡模板,因此试卷结构必须相同。多卷型试卷之间客观题要求试题内容相同,可允许大题内的小题题序不同。
  185. </p>
  186. <el-form>
  187. <el-form-item label="单次抽卷卷型数量:" label-width="150">
  188. <el-input-number
  189. v-model="examTaskDetail.drawCount"
  190. :min="1"
  191. :max="maxFetchCount"
  192. :step="1"
  193. step-strictly
  194. :controls="false"
  195. ></el-input-number>
  196. </el-form-item>
  197. </el-form>
  198. <h4 class="mb-2">备注说明:</h4>
  199. <el-input
  200. class="mb-2"
  201. v-model="examTaskDetail.remark"
  202. type="textarea"
  203. resize="none"
  204. :rows="2"
  205. :maxlength="100"
  206. clearable
  207. show-word-limit
  208. placeholder="建议不超过100个字"
  209. ></el-input>
  210. <h4 class="mb-2">上传入库审核表(最多4张)</h4>
  211. <div class="image-list">
  212. <div
  213. class="image-item"
  214. v-for="(img, index) in paperConfirmAttachments"
  215. :key="index"
  216. >
  217. <img
  218. :src="img.url"
  219. :alt="img.filename"
  220. title="点击查看大图"
  221. @click="toPreview(index)"
  222. />
  223. <div class="image-delete">
  224. <i
  225. class="el-icon-delete-solid"
  226. @click="deletePaperConfirmAttachment(index)"
  227. ></i>
  228. </div>
  229. </div>
  230. <div
  231. v-if="paperConfirmAttachments.length < 4"
  232. class="image-item image-add"
  233. title="上传入库审核表"
  234. @click="toUploadPaperConfirm"
  235. >
  236. <i class="el-icon-plus"></i>
  237. </div>
  238. </div>
  239. </div>
  240. <div class="task-action">
  241. <el-button type="primary" :disabled="isSubmit" @click="submit"
  242. >确认提交</el-button
  243. >
  244. <el-button type="primary" :disabled="isSubmit" @click="toSave"
  245. >暂存</el-button
  246. >
  247. <el-button @click="cancel">取消</el-button>
  248. </div>
  249. </div>
  250. <div slot="footer"></div>
  251. <!-- upload-paper-dialog -->
  252. <upload-paper-dialog
  253. :paper-attachment="curAttachment"
  254. :upload-type="curUploadType"
  255. @confirm="uploadConfirm"
  256. ref="UploadPaperDialog"
  257. ></upload-paper-dialog>
  258. <!-- card-option-dialog -->
  259. <card-option-dialog
  260. ref="CardOptionDialog"
  261. :data="task"
  262. @upload-sample-over="initData"
  263. @confirm="cardConfirm"
  264. ></card-option-dialog>
  265. <!-- image-preview -->
  266. <simple-image-preview
  267. :cur-image="curImage"
  268. @on-prev="toPrevImage"
  269. @on-next="toNextImage"
  270. ref="SimpleImagePreview"
  271. ></simple-image-preview>
  272. </el-dialog>
  273. </template>
  274. <script>
  275. import { examRuleDetail } from "../../base/api";
  276. import {
  277. teacherCreateTaskApply,
  278. teacherCancelTaskApply,
  279. switchCardCreateMethod,
  280. taskAllApproverPeople
  281. } from "../api";
  282. import UploadPaperDialog from "./UploadPaperDialog";
  283. import CardOptionDialog from "./CardOptionDialog";
  284. import SimpleImagePreview from "@/components/SimpleImagePreview";
  285. import { CARD_SOURCE_TYPE } from "@/constants/enumerate";
  286. const initExamTask = {
  287. id: null,
  288. courseCode: "",
  289. courseName: "",
  290. paperNumber: "",
  291. cardRuleId: "",
  292. teachingRoomId: "",
  293. teacherName: "",
  294. lecturerName: ""
  295. };
  296. const initExamTaskDetail = {
  297. operateType: "STAGE",
  298. paperType: "A",
  299. cardId: "",
  300. paperAttachmentIds: [],
  301. paperConfirmAttachmentIds: [],
  302. drawCount: 2,
  303. remark: "",
  304. makeMethod: "",
  305. // 题卡状态
  306. status: "",
  307. // 考务规则
  308. review: false,
  309. includePaper: false,
  310. customCard: false
  311. };
  312. export default {
  313. name: "create-task-apply",
  314. components: { UploadPaperDialog, CardOptionDialog, SimpleImagePreview },
  315. data() {
  316. return {
  317. modalIsShow: false,
  318. isSubmit: false,
  319. examTask: {},
  320. needReview: false,
  321. task: {},
  322. examRule: {},
  323. flows: [
  324. {
  325. flowId: "160684605807001600",
  326. taskName: "提交试卷",
  327. taskKey: "usertask1",
  328. setup: 1,
  329. status: "process",
  330. desc: "进行中"
  331. },
  332. {
  333. flowId: "160684605807001600",
  334. taskName: "审核试卷",
  335. taskKey: "usertask2",
  336. setup: 2,
  337. status: "wait",
  338. desc: "待进行"
  339. },
  340. {
  341. flowId: "160684605807001600",
  342. taskName: "审核试卷",
  343. taskKey: "usertask3",
  344. setup: 3,
  345. status: "wait",
  346. desc: "待进行"
  347. }
  348. ],
  349. rules: {
  350. teachingRoomId: [
  351. {
  352. required: true,
  353. message: "请选择教研室",
  354. trigger: "change"
  355. }
  356. ],
  357. courseCode: [
  358. {
  359. required: true,
  360. message: "请选择课程",
  361. trigger: "change"
  362. }
  363. ],
  364. cardRuleId: [
  365. {
  366. required: true,
  367. message: "请选择题卡规则",
  368. trigger: "change"
  369. }
  370. ]
  371. },
  372. // exam-task-detail
  373. examTaskDetail: {},
  374. paperConfirmAttachmentId: { attachmentId: "", filename: "", url: "" },
  375. paperAttachments: [],
  376. paperConfirmAttachments: [],
  377. curAttachment: {},
  378. curUploadType: "paper",
  379. attachmentLimitCount: 26,
  380. abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
  381. // image-preview
  382. curImage: {},
  383. curImageIndex: 0
  384. };
  385. },
  386. computed: {
  387. cardTodoName() {
  388. let name = "创建答题卡";
  389. if (this.examTaskDetail.cardId) {
  390. if (this.examTaskDetail.makeMethod === "SELECT") {
  391. name = "选择题卡";
  392. } else if (this.examTaskDetail.makeMethod === "SELF") {
  393. name = "编辑题卡";
  394. } else {
  395. // 已经审核的题卡可以自行编辑,未审核的题卡只能查看
  396. name =
  397. this.examTaskDetail.status === "SUBMIT" ? "编辑题卡" : "查看题卡";
  398. }
  399. }
  400. return name;
  401. },
  402. createCardTypeName() {
  403. return CARD_SOURCE_TYPE[this.examTaskDetail.makeMethod] || "";
  404. },
  405. maxFetchCount() {
  406. return this.paperAttachments.length < 1
  407. ? 1
  408. : this.paperAttachments.length;
  409. }
  410. },
  411. created() {
  412. this.getExamRule();
  413. },
  414. methods: {
  415. async getExamRule() {
  416. const examRule = await examRuleDetail();
  417. this.examRule = examRule || {};
  418. this.needReview = examRule && examRule.review;
  419. },
  420. initData() {
  421. this.examTask = { ...initExamTask };
  422. this.examTaskDetail = { ...initExamTaskDetail };
  423. this.examTaskDetail.includePaper = this.examRule.includePaper;
  424. this.examTaskDetail.review = this.examRule.review;
  425. this.examTaskDetail.customCard = this.examRule.customCard;
  426. },
  427. visibleChange() {
  428. this.initData();
  429. },
  430. checkData() {
  431. return this.$refs.examTaskComp.validate().catch(() => {});
  432. },
  433. async cancel() {
  434. if (this.examTask.id) {
  435. await teacherCancelTaskApply(this.examTask.id);
  436. this.$message.success("取消命题申请成功!");
  437. }
  438. this.close();
  439. },
  440. close() {
  441. this.modalIsShow = false;
  442. },
  443. open() {
  444. this.modalIsShow = true;
  445. },
  446. // exam-task-detail edit
  447. addAtachment() {
  448. if (this.paperAttachments.length >= this.attachmentLimitCount) return;
  449. const newAttachment = {
  450. name: this.abc[this.paperAttachments.length],
  451. attachmentId: "",
  452. filename: "",
  453. pages: 0
  454. };
  455. this.paperAttachments.push(newAttachment);
  456. },
  457. deleteAttachment(index) {
  458. if (this.paperAttachments.length <= 1) {
  459. this.$message.error("试卷类型数量不得少于1");
  460. return;
  461. }
  462. this.paperAttachments.splice(index, 1);
  463. this.paperAttachments.forEach((item, itemIndex) => {
  464. item.name = this.abc[itemIndex];
  465. });
  466. },
  467. toUpload(attachment) {
  468. this.curUploadType = "paper";
  469. this.curAttachment = {
  470. ...attachment
  471. };
  472. this.$refs.UploadPaperDialog.open();
  473. },
  474. toUploadPaperConfirm() {
  475. if (this.paperConfirmAttachments.length >= 4) return;
  476. this.curUploadType = "paperConfirm";
  477. this.curAttachment = {
  478. ...this.paperConfirmAttachmentId
  479. };
  480. this.$refs.UploadPaperDialog.open();
  481. },
  482. uploadConfirm(attachment, uploadType) {
  483. if (uploadType === "paper") {
  484. const index = this.paperAttachments.findIndex(
  485. item => item.name === attachment.name
  486. );
  487. this.paperAttachments.splice(index, 1, { ...attachment });
  488. } else {
  489. this.paperConfirmAttachments.push(attachment);
  490. }
  491. },
  492. deletePaperConfirmAttachment(index) {
  493. this.paperConfirmAttachments.splice(index, 1);
  494. },
  495. toViewCard() {
  496. window.open(
  497. this.getRouterPath({
  498. name: "CardPreview",
  499. params: {
  500. cardId: this.examTaskDetail.cardId,
  501. viewType: "view"
  502. }
  503. })
  504. );
  505. },
  506. toEditCard() {
  507. this.cachePrepareTcpCard();
  508. this.$router.push({
  509. name: "CardDesign",
  510. params: {
  511. cardId: this.examTaskDetail.cardId
  512. }
  513. });
  514. },
  515. cachePrepareTcpCard() {
  516. this.$ls.set("prepareTcPCard", {
  517. examTaskId: this.examTask.id,
  518. courseCode: this.examTask.courseCode,
  519. courseName: this.examTask.courseName,
  520. makeMethod: this.examTaskDetail.makeMethod,
  521. cardRuleId: this.examTask.cardRuleId,
  522. paperType: this.paperAttachments.map(item => item.name).join(",")
  523. });
  524. },
  525. async toCreateOrViewCard() {
  526. const result = await this.toSave(1);
  527. if (!result) return;
  528. this.task = {
  529. ...this.examTask,
  530. ...this.examTaskDetail,
  531. examTaskId: this.examTask.id
  532. };
  533. if (!this.examTaskDetail.cardId) {
  534. this.$refs.CardOptionDialog.open();
  535. return;
  536. }
  537. if (this.examTaskDetail.makeMethod === "SELECT") {
  538. this.$refs.CardOptionDialog.open();
  539. } else if (this.examTaskDetail.makeMethod === "SELF") {
  540. this.toEditCard();
  541. } else {
  542. // 客服制卡:制作完毕则可以编辑,未制作完毕则可以查看
  543. if (this.examTaskDetail.status === "SUBMIT") {
  544. this.toEditCard();
  545. } else {
  546. this.toViewCard();
  547. }
  548. }
  549. },
  550. cardConfirm(data) {
  551. this.examTaskDetail = this.$objAssign(this.examTaskDetail, data);
  552. },
  553. async changeCreateCardType() {
  554. const h = this.$createElement;
  555. const result = await this.$msgbox({
  556. title: "切换题卡操作说明",
  557. message: h("div", null, [
  558. h("p", null, "1、切换题卡会将之前选择题卡数据删除。"),
  559. h(
  560. "p",
  561. null,
  562. "2、之前选择专卡进行绘制,切换题卡后再次选择专卡,需要重新开始绘制。"
  563. )
  564. ]),
  565. showCancelButton: true,
  566. type: "warning"
  567. }).catch(() => {});
  568. if (result !== "confirm") return;
  569. await this.clearMakeMethod();
  570. this.toCreateOrViewCard();
  571. },
  572. async clearMakeMethod() {
  573. // 清除后台记录的题卡
  574. if (this.examTask.id && this.examTaskDetail.cardId)
  575. await switchCardCreateMethod(this.examTask.id);
  576. this.examTaskDetail.makeMethod = "";
  577. this.examTaskDetail.cardId = "";
  578. },
  579. courseChange(val) {
  580. this.examTask.courseName = val.name;
  581. this.clearCard();
  582. this.updateApproverPeople();
  583. },
  584. clearCard() {
  585. this.clearMakeMethod();
  586. },
  587. async updateApproverPeople() {
  588. const data = await taskAllApproverPeople({
  589. courseCode: this.examTask.courseCode
  590. });
  591. let approvePeople = {};
  592. data.approveUserList.forEach(item => {
  593. item.users = item.approveUser.map(
  594. user => `${user.realName}(${user.orgName})`
  595. );
  596. item.firstUser = item.users[0];
  597. item.moreUser = item.users.length > 1 ? item.users.join(",") : null;
  598. approvePeople[item.setup] = item;
  599. });
  600. this.flows = this.flows.map(flow => {
  601. return {
  602. ...flow,
  603. ...approvePeople[flow.setup]
  604. };
  605. });
  606. },
  607. getTaskDetailData() {
  608. let data = { ...this.examTaskDetail };
  609. data.paperType = this.paperAttachments.map(item => item.name).join(",");
  610. data.paperAttachmentIds = JSON.stringify(this.paperAttachments, (k, v) =>
  611. k === "url" ? undefined : v
  612. );
  613. data.paperConfirmAttachmentIds = JSON.stringify(
  614. this.paperConfirmAttachments
  615. );
  616. this.examTaskDetail = data;
  617. },
  618. checkDataValid() {
  619. const attachmentValid = !this.paperAttachments.some(
  620. item => !item.attachmentId
  621. );
  622. // 设置了入库强制包含试卷时,校验试卷是否上传。
  623. if (this.examTaskDetail.includePaper && !attachmentValid) {
  624. this.$message.error("请完成试卷文件上传!");
  625. return;
  626. }
  627. // if (!this.paperConfirmAttachments.length) {
  628. // this.$message.error("请上传入库审核表!");
  629. // return;
  630. // }
  631. if (!this.examTaskDetail.cardId) {
  632. this.$message.error("请选择题卡创建方式!");
  633. return;
  634. }
  635. if (
  636. this.examTaskDetail.makeMethod !== "SELECT" &&
  637. this.examTaskDetail.status !== "SUBMIT"
  638. ) {
  639. this.$message.error("请先提交题卡!");
  640. return;
  641. }
  642. return true;
  643. },
  644. async toSave(silent) {
  645. const valid = await this.$refs.examTaskComp.validate().catch(() => {});
  646. if (!valid) return;
  647. if (this.isSubmit) return;
  648. this.isSubmit = true;
  649. this.getTaskDetailData();
  650. const datas = {
  651. examTaskDetail: this.examTaskDetail,
  652. examTask: this.examTask
  653. };
  654. const data = await teacherCreateTaskApply(datas).catch(() => {});
  655. this.isSubmit = false;
  656. if (!data) return;
  657. this.examTask = this.$objAssign(this.examTask, data);
  658. if (!silent) this.$message.success("保存成功!");
  659. return true;
  660. },
  661. async submit() {
  662. const valid = await this.$refs.examTaskComp.validate().catch(() => {});
  663. if (!valid) return;
  664. if (!this.checkDataValid()) return;
  665. this.$confirm(
  666. "任务确定提交后,则不可更改试卷及答题卡内容,确定提交该任务?",
  667. "提示",
  668. {
  669. type: "warning"
  670. }
  671. )
  672. .then(async () => {
  673. this.getTaskDetailData();
  674. this.examTaskDetail.operateType = "SUBMIT";
  675. const datas = {
  676. examTaskDetail: this.examTaskDetail,
  677. examTask: this.examTask
  678. };
  679. const data = await teacherCreateTaskApply(datas).catch(() => {});
  680. if (!data) return;
  681. this.$message.success("提交成功!");
  682. this.close();
  683. this.$emit("modified");
  684. })
  685. .catch(() => {});
  686. },
  687. // image-preview
  688. toPreview(index) {
  689. this.curImageIndex = index;
  690. this.selectImage(index);
  691. this.$refs.SimpleImagePreview.open();
  692. },
  693. selectImage(index) {
  694. this.curImage = this.paperConfirmAttachments[index];
  695. },
  696. toPrevImage() {
  697. if (this.curImageIndex === 0) {
  698. this.curImageIndex = this.paperConfirmAttachments.length - 1;
  699. } else {
  700. this.curImageIndex--;
  701. }
  702. this.selectImage(this.curImageIndex);
  703. },
  704. toNextImage() {
  705. if (this.curImageIndex === this.paperConfirmAttachments.length - 1) {
  706. this.curImageIndex = 0;
  707. } else {
  708. this.curImageIndex++;
  709. }
  710. this.selectImage(this.curImageIndex);
  711. }
  712. }
  713. };
  714. </script>