Browse Source

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

zengyicheng 1 year ago
parent
commit
6d9fe13666

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.ff1e52cebb72fca96ed23c782b980938.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b01159b52abeac4e6216.js></script><script type=text/javascript src=./static/js/app.bb235b86115dedcb520e.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.ddfa0feba68becc3a7b8046a5acdc75d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b01159b52abeac4e6216.js></script><script type=text/javascript src=./static/js/app.6384036709ff748cb3ed.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.ddfa0feba68becc3a7b8046a5acdc75d.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.ddfa0feba68becc3a7b8046a5acdc75d.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.ff1e52cebb72fca96ed23c782b980938.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.ff1e52cebb72fca96ed23c782b980938.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.6384036709ff748cb3ed.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.6384036709ff748cb3ed.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.bb235b86115dedcb520e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 50 - 32
src/components/pages/test/add/edit/check/choice.vue

@@ -6,8 +6,14 @@
             <div class="title">{{ `(${option[checkJson.type].name})` + checkJson.title }}</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 @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 @click="check(checkJson.type,index)">{{ item.option }}</span></div>
+                    <div class="choice_c" v-if="checkJson.type == 2"><el-checkbox v-model="checkJson.answer2" :label="index"
+                            :disabled="checktype == 2"></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
+                            :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
+                            @click="check(checkJson.type, index)">{{ item.option }}</span></div>
                 </div>
             </div>
         </div>
@@ -23,6 +29,10 @@ export default {
         checktype: {
             type: Number,
             default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
         }
     },
     data() {
@@ -31,12 +41,12 @@ export default {
                 1: { name: '单选题' },
                 2: { name: '多选题' }
             },
-            checkJson:undefined
+            checkJson: undefined
         }
     },
     watch: {
         checkJson: {
-            handler(newValue){
+            handler(newValue) {
                 this.$emit('update:cJson', newValue)
             },
             deep: true
@@ -46,23 +56,23 @@ export default {
         depthCopy(s) {
             return JSON.parse(JSON.stringify(s));
         },
-        check(type,index){
-            if(this.checktype == 2){
+        check(type, index) {
+            if (this.checktype == 2) {
                 return;
             }
-            if(type == 2){
-                if(this.checkJson.answer2.indexOf(index) == -1){
+            if (type == 2) {
+                if (this.checkJson.answer2.indexOf(index) == -1) {
                     this.checkJson.answer2.push(index)
-                }else{
-                    this.checkJson.answer2.splice(this.checkJson.answer2.indexOf(index),1)
+                } else {
+                    this.checkJson.answer2.splice(this.checkJson.answer2.indexOf(index), 1)
                 }
-            }else if(type == 1){
+            } else if (type == 1) {
                 this.checkJson.answer2[0] = index
             }
             this.$forceUpdate()
         }
     },
-    mounted(){
+    mounted() {
         this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
     }
 }
@@ -73,46 +83,54 @@ export default {
     width: 100%;
     position: relative;
 }
-.mask{
+
+.mask {
     position: absolute;
     height: 100%;
     width: 100%;
     z-index: 2;
 }
-.choice_box {
-    
-}
+
+.choice_box {}
 
 .choice_box>.title {
     font-weight: bold;
     width: 100%;
     word-break: break-all;
 }
+
 .choice_box>.choices {
-   margin-top:10px;
-   padding: 0 10px;
+    margin-top: 10px;
+    padding: 0 10px;
 }
-.choice_box>.choices >.choice{
+
+.choice_box>.choices>.choice {
     word-break: break-all;
 }
-.choice_box>.choices >.choice + .choice{
+
+.choice_box>.choices>.choice+.choice {
     margin-top: 5px;
 }
-.choice_box>.choices >.choice > .choice_c{
+
+.choice_box>.choices>.choice>.choice_c {
     display: flex;
 }
-.choice_box>.choices >.choice > .choice_c > span{
+
+.choice_box>.choices>.choice>.choice_c>span {
     /* margin-left: 10px; */
     cursor: pointer;
 }
-.choice_box>.choices >.choice > .choice_c > .el-checkbox{
+
+.choice_box>.choices>.choice>.choice_c>.el-checkbox {
     margin-top: 4px;
     margin-right: 10px;
 }
-.choice_box>.choices >.choice > .choice_c > .el-radio{
+
+.choice_box>.choices>.choice>.choice_c>.el-radio {
     margin-top: 4px;
     margin-right: 10px;
 }
+
 .choice_c>>>.el-checkbox__label {
     display: none;
 }
@@ -121,28 +139,28 @@ export default {
     display: none;
 }
 
-.choice_c .right{
+.choice_c .right {
     color: #efa030;
 }
-.choice_c .right::after{
+
+.choice_c .right::after {
     content: '(正确答案)';
 }
 
-.choice_box>.choices >.choice >>> .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after{
+.choice_box>.choices>.choice>>>.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
     border-color: #fff !important;
 }
 
-.choice_box>.choices >.choice >>> .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{
+.choice_box>.choices>.choice>>>.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
     background-color: #409EFF !important;
     border-color: #409EFF !important;
 }
 
-.choice_box>.choices >.choice >>> .el-radio__input.is-disabled.is-checked .el-radio__inner{
+.choice_box>.choices>.choice>>>.el-radio__input.is-disabled.is-checked .el-radio__inner {
     background-color: #409EFF !important;
     border-color: #409EFF !important;
 }
 
-.choice_box>.choices >.choice >>> .el-radio__input.is-disabled.is-checked .el-radio__inner::after{
+.choice_box>.choices>.choice>>>.el-radio__input.is-disabled.is-checked .el-radio__inner::after {
     background-color: #fff !important;
-}
-</style>
+}</style>

+ 5 - 2
src/components/pages/test/add/edit/check/gap.vue

@@ -5,8 +5,7 @@
         <div v-else class="choice_box">
             <!-- <div class="title"><div>{{ `(${option[checkJson.type].name})` }}</div><div v-html="checkJson.title"></div></div> -->
             <div class="title">
-                {{ `(${option[checkJson.type].name})` + checkJson.title }}
-                <!-- <span>({{ checkJson.answer ? '参考答案:'+checkJson.answer : '暂无参考答案' }})</span> -->
+                {{ `(${option[checkJson.type].name})` + checkJson.title }}<span v-if="see" style="color: #efa030;">({{ checkJson.answer ? '参考答案:'+checkJson.answer : '暂无参考答案' }})</span>
                 <!-- </div><div v-html="checkJson.title"></div> -->
             </div>
             <div class="choices">
@@ -26,6 +25,10 @@ export default {
         checktype: {
             type: Number,
             default: 1
+        },
+        see:{
+            type:Boolean,
+            default:false
         }
     },
     data() {

+ 2 - 2
src/components/pages/test/check/check.vue

@@ -47,7 +47,7 @@
           <div class="edit_top">
             <div class="op_btn"></div>
           </div>
-          <topicVue :cJson="cJson" :title="title" :checktype="2"></topicVue>
+          <topicVue :cJson="cJson" :title="title" :checktype="2" :see="see"></topicVue>
         </div>
       </div>
     </div>
@@ -71,7 +71,7 @@ export default {
       steps: 1,
       title: "",
       testType: [],
-      see: false,
+      see: true,
       cJson: [],
       loading: false,
       look: "",

Some files were not shown because too many files changed in this diff