From 73f4d2508d600d434558edfb95e3fc74a6d7d010 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 13 Jun 2024 16:15:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=95=E5=8D=B7=E5=8F=AF=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E6=8E=92=E5=BA=8F=E5=8F=8A=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/package.json | 4 +- client/src/views/exam/questionupdate.vue | 17 ++++++-- client/src/views/exam/testPaperCreate.vue | 25 +++++++++-- client/src/views/exam/testPaperUpdate.vue | 52 ++++++++++++++++------- 4 files changed, 75 insertions(+), 23 deletions(-) diff --git a/client/package.json b/client/package.json index 37ee37a..e60eabc 100644 --- a/client/package.json +++ b/client/package.json @@ -27,10 +27,12 @@ "nprogress": "0.2.0", "path-to-regexp": "2.4.0", "pdfobject": "^2.3.0", + "sortablejs": "^1.15.2", "vod-js-sdk-v6": "^1.4.12", - "vue": "2.6.10", + "vue": "2.7", "vue-pdf": "^4.2.0", "vue-router": "3.0.6", + "vuedraggable": "^2.24.3", "vuex": "3.1.0", "xlsx": "^0.15.5" }, diff --git a/client/src/views/exam/questionupdate.vue b/client/src/views/exam/questionupdate.vue index 65049ca..70c694f 100644 --- a/client/src/views/exam/questionupdate.vue +++ b/client/src/views/exam/questionupdate.vue @@ -86,7 +86,7 @@ 保存 - 返回 + 返回 @@ -97,6 +97,7 @@ import { upUrl } from "@/api/file"; import { getToken } from "@/utils/auth"; export default { components:{ }, + props:["qid"], data() { return { upHeaders: { Authorization: "JWT " + getToken() }, @@ -135,7 +136,12 @@ export default { watch:{ }, created() { - this.Form.id = this.$route.query.id //接收参数 + if(this.qid) { + this.Form.id = this.qid + }else{ + this.Form.id = this.$route.query.id //接收参数 + } + this.getQuestion(); this.getQuestioncatAll() }, @@ -169,7 +175,12 @@ export default { type: "success", message: "修改成功!" }); - this.goBack() + if (this.qid){ + this.$emit("updateQuestion", this.Form) + }else{ + this.goBack() + } + } }); } else { diff --git a/client/src/views/exam/testPaperCreate.vue b/client/src/views/exam/testPaperCreate.vue index f401d0c..878055b 100644 --- a/client/src/views/exam/testPaperCreate.vue +++ b/client/src/views/exam/testPaperCreate.vue @@ -87,10 +87,11 @@ +
第{{ index+1 }}题 - +
@@ -100,21 +101,30 @@
{{ name }}: {{ value }}
+
+ + + +