Prechádzať zdrojové kódy

Merge branches 'beta' and 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin 1 rok pred
rodič
commit
3a031c511f

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: 'Source Han Sans SC', sans-serif;
-    }</style><link href=./static/css/app.3eefa295cecfa41bd51b4b5bf2f3ef70.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.11d8a4dfbebdec332b5f.js></script><script type=text/javascript src=./static/js/app.72d06c552efc4b895e3a.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.aa9b1f650efe4558b246a7e0ad2e3ccb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.11d8a4dfbebdec332b5f.js></script><script type=text/javascript src=./static/js/app.2b4531e3e0728af27712.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.aa9b1f650efe4558b246a7e0ad2e3ccb.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.aa9b1f650efe4558b246a7e0ad2e3ccb.css.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.2b4531e3e0728af27712.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.2b4531e3e0728af27712.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 1 - 1
src/components/pages/test/add/edit/check/file.vue

@@ -23,7 +23,7 @@
                 style="color: #00000099;margin-top: 5px;">
             </div>
             <div class="choices">
-                <div class="uploadBtn">
+                <div class="uploadBtn" v-if="checktype == 1">
                     <div class="btn" @click.stop="addImg($event)">
                         <span>添加本地文件</span>
                         <input type="file" accept="*" style="display: none" multiple="multiple"

+ 32 - 17
src/components/pages/testStudent/view/component/choice.vue

@@ -6,26 +6,31 @@
             <div class="c_title">
                 <div class="title" style="display: flex;">
                     <!-- + `(${option[checkJson.type].name})` -->
-                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
-                <span>{{ checkJson.title }}</span>
-                <!-- {{ tindex + 1 + "、" + `(${option[checkJson.type].name})` + checkJson.title }} -->
-                <span style="min-width: fit-content;" v-if="checkJson.type == 2">{{ `(${option[checkJson.type].name})` }}</span>
-                <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' + checkJson.score + '分' }})</span></div>
+                    <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                    <span>{{ checkJson.title }}</span>
+                    <!-- {{ tindex + 1 + "、" + `(${option[checkJson.type].name})` + checkJson.title }} -->
+                    <span style="min-width: fit-content;" v-if="checkJson.type == 2">{{
+            `(${option[checkJson.type].name})` }}</span>
+                    <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' +
+            checkJson.score + '分' }})</span>
+                </div>
                 <div class="p_box" v-if="isTeacher == 1 && checkJson.score">
-                    <el-input v-model="score2" class="c_input" disabled></el-input><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+                    <el-input v-model="score2" class="c_input" disabled></el-input><span
+                        style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
                 </div>
                 <div class="p_box" v-if="isTeacher == 2 && checkJson.score2">
-                    <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+                    <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score
+                        }}分</span>
                 </div>
             </div>
             <div class="choices">
                 <div class="choice" v-for="(item, index) in checkJson.array" :key="index">
-                    <div class="choice_c" v-if="checkJson.type == 2"><el-checkbox v-model="checkJson.answer2" :label="index"
-                            :disabled="checktype == 2"></el-checkbox><span
+                    <div class="choice_c" v-if="checkJson.type == 2"><el-checkbox v-model="checkJson.answer2"
+                            :label="index" :disabled="checktype == 2" @change="changeJson"></el-checkbox><span
                             :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
                             @click="check(checkJson.type, index)">{{ item.option }}</span></div>
-                    <div class="choice_c" v-if="checkJson.type == 1"><el-radio v-model="checkJson.answer2[0]" :label="index"
-                            :disabled="checktype == 2"></el-radio><span
+                    <div class="choice_c" v-if="checkJson.type == 1"><el-radio v-model="checkJson.answer2[0]"
+                            :label="index" :disabled="checktype == 2" @change="changeJson"></el-radio><span
                             :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
                             @click="check(checkJson.type, index)">{{ item.option }}</span></div>
                 </div>
@@ -37,7 +42,7 @@
 <script>
 export default {
     props: {
-        tindex:{
+        tindex: {
             type: Number
         },
         cJson: {
@@ -77,13 +82,15 @@ export default {
     watch: {
         checkJson: {
             handler(newValue) {
+                console.log(1);
                 this.$emit('update:cJson', newValue)
+                this.$forceUpdate()
             },
             deep: true
         },
         cJson: {
             handler(newValue) {
-                if(JSON.stringify(newValue.answer2) !== JSON.stringify(this.checkJson.answer2)){
+                if (JSON.stringify(newValue.answer2) !== JSON.stringify(this.checkJson.answer2)) {
                     this.checkJson = this.depthCopy(newValue)
                     this.$forceUpdate()
                 }
@@ -92,6 +99,12 @@ export default {
         },
     },
     methods: {
+        changeJson() {
+            console.log(1);
+            this.$forceUpdate()
+            this.$emit('update:cJson', this.checkJson)
+            this.$forceUpdate()
+        },
         depthCopy(s) {
             return JSON.parse(JSON.stringify(s));
         },
@@ -108,6 +121,8 @@ export default {
             } else if (type == 1) {
                 this.checkJson.answer2[0] = index
             }
+            console.log(1);
+            this.$emit('update:cJson', this.checkJson)
             this.$forceUpdate()
         }
     },
@@ -134,18 +149,18 @@ export default {
     white-space: pre-line;
 }
 
-.choice_box> .c_title .title {
+.choice_box>.c_title .title {
     font-weight: bold;
     width: 100%;
     word-break: break-all;
 }
 
-.choice_box> .c_title {
+.choice_box>.c_title {
     display: flex;
     justify-content: space-between;
 }
 
-.choice_box> .c_title .p_box{
+.choice_box>.c_title .p_box {
     margin-left: 5px;
     min-width: fit-content;
     display: flex;
@@ -222,7 +237,7 @@ export default {
     width: 90px;
 }
 
-.c_input >>> .el-input__inner{
+.c_input>>>.el-input__inner {
     padding: 0 5px;
     text-align: right;
 }

+ 1 - 1
src/components/pages/testStudent/view/component/course.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="c_box">
-        <div class="choice_box" v-loading="isloading">
+        <div class="choice_box" v-loading="isloading" v-if="checkJson">
             <div class="title" style="display: flex;">
                 <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
                 <span>{{ checkJson.title }}</span>

+ 1 - 1
src/components/pages/testStudent/view/component/eva.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="c_box">
-        <div class="choice_box">
+        <div class="choice_box" v-if="checkJson">
             <div class="title" style="display: flex;">
                 <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
                 <span>{{ checkJson.title }}</span>

+ 5 - 2
src/components/pages/testStudent/view/component/file.vue

@@ -30,7 +30,7 @@
             <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail" style="color: #00000099;margin-top: 5px;">
             </div>
             <div class="choices">
-                <div class="uploadBtn">
+                <div class="uploadBtn" v-if="checktype == 1">
                     <div class="btn" @click.stop="addImg($event)">
                         <span>添加本地文件</span>
                         <input type="file" accept="*" style="display: none" multiple="multiple"
@@ -223,7 +223,7 @@ export default {
             deep: true
         },
         cJson: {
-            handler(newValue) {
+            handler(newValue,oldVal) {
                 if(newValue.file && this.checkJson.file && newValue.file.length !== this.checkJson.file.length){
                     this.checkJson = this.depthCopy(newValue)
                     this.$forceUpdate()
@@ -233,6 +233,9 @@ export default {
                 }else if(!newValue.file && this.checkJson.file){
                     this.checkJson = this.depthCopy(newValue)
                     this.$forceUpdate()
+                }else if (JSON.stringify(newValue) !== JSON.stringify(oldVal)) {
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
                 }
             },
             deep: true

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov