lsc 1 ano atrás
pai
commit
b6db9f15f4

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.27d2b7a64b26443ef989af10c63e78bd.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.2fe5e61d2254f6bb10f1.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.00165a57bc4450cc5fd587f109ffb9ec.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.f6ec2334fcb01c3940fa.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.00165a57bc4450cc5fd587f109ffb9ec.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.00165a57bc4450cc5fd587f109ffb9ec.css.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.27d2b7a64b26443ef989af10c63e78bd.css.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.2fe5e61d2254f6bb10f1.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.f6ec2334fcb01c3940fa.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.f6ec2334fcb01c3940fa.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 40 - 26
src/components/pages/dataBoardSies/school/index.vue

@@ -200,25 +200,39 @@ export default {
           {
             class: ['三(1)班', '三(2)班', '三(3)班', '三(4)班', '三(5)班', '三(6)班'],
             Array: [
-              [50, 50, 2, 15, 19, 6, 3, 5], [50, 50, 0, 16, 22, 5, 4, 3], [51, 50, 2, 26, 9, 6, 2, 5], [51, 50, 1, 21, 12, 7, 2, 7], [50, 49, 0, 19, 13, 10, 4, 3], [50, 49, 0, 17, 18, 9, 0, 5],
+              [ 2, 15, 19, 6, 3, 5], 
+              [ 0, 16, 22, 5, 4, 3], 
+              [ 2, 26, 9, 6, 2, 5], 
+              [ 1, 21, 12, 7, 2, 7], 
+              [0, 19, 13, 10, 4, 3], 
+              [ 0, 17, 18, 9, 0, 5],
             ]
           },
           {
             class: ['四(1)班', '四(2)班', '四(3)班', '四(4)班', '四(5)班', '四(6)班'],
             Array: [
-              [49, 49, 1, 20, 17, 3, 5, 3], [50, 50, 1, 11, 19, 9, 2, 8], [48, 48, 0, 9, 12, 9, 9, 9], [49, 49, 0, 12, 11, 8, 8, 10], [50, 50, 0, 9, 13, 10, 5, 13], [50, 49, 0, 13, 14, 10, 5, 7],
+              [ 1, 20, 17, 3, 5, 3], 
+              [ 1, 11, 19, 9, 2, 8], 
+              [ 0, 9, 12, 9, 9, 9], 
+              [ 0, 12, 11, 8, 8, 10], 
+              [ 0, 9, 13, 10, 5, 13], 
+              [ 0, 13, 14, 10, 5, 7],
             ]
           },
           {
             class: ['五(1)班', '五(2)班', '五(3)班', '五(4)班'],
             Array: [
-              [49, 49, 0, 13, 11, 11, 6, 8], [49, 49, 2, 17, 7, 12, 3, 8], [48, 48, 1, 19, 16, 15, 3, 4], [48, 48, 4, 18, 13, 8, 2, 3],
+              [0, 13, 11, 11, 6, 8], 
+              [ 2, 17, 7, 12, 3, 8], 
+              [ 1, 19, 16, 15, 3, 4], 
+              [ 4, 18, 13, 8, 2, 3],
             ]
           },
           {
             class: ['六(1)班', '六(2)班'],
             Array: [
-              [48, 48, 1, 30, 10, 4, 0, 3], [47, 47, 0, 23, 10, 4, 6, 4]
+              [ 1, 30, 10, 4, 0, 3], 
+              [ 0, 23, 10, 4, 6, 4]
             ]
           }
         ],
@@ -226,32 +240,32 @@ export default {
           {
             class: ['三(1)班', '三(2)班', '三(3)班', '三(4)班', '三(5)班', '三(6)班'],
             Array: [
-              [50, 50, 1, 22, 17, 6, 2, 2],
-              [50, 50, 1, 14, 18, 11, 2, 4],
-              [50, 49, 0, 12, 16, 12, 4, 5],
-              [50, 50, 0, 23, 15, 8, 3, 1],
-              [50, 50, 3, 12, 14, 7, 6, 8],
-              [50, 49, 2, 20, 16, 5, 1, 5],
+              [ 1, 22, 17, 6, 2, 2],
+              [ 1, 14, 18, 11, 2, 4],
+              [ 0, 12, 16, 12, 4, 5],
+              [ 0, 23, 15, 8, 3, 1],
+              [ 3, 12, 14, 7, 6, 8],
+              [ 2, 20, 16, 5, 1, 5],
             ]
           },
           {
             class: ['四(1)班', '四(2)班', '四(3)班'],
             Array: [
-              [50, 50, 0, 9, 20, 7, 7, 7],
-              [50, 49, 0, 11, 16, 15, 3, 4],
-              [49, 49, 0, 9, 21, 8, 10, 1],
+              [ 0, 9, 20, 7, 7, 7],
+              [ 0, 11, 16, 15, 3, 4],
+              [ 0, 9, 21, 8, 10, 1],
             ]
           },
           {
             class: ['五(1)班'],
             Array: [
-              [49, 49, 0, 15, 13, 11, 4, 6]
+              [ 0, 15, 13, 11, 4, 6]
             ]
           },
           {
             class: ['六(1)班'],
             Array: [
-              [0, 0, 0, 0, 0, 0, 0, 0]
+              [ 0, 0, 0, 0, 0, 0]
             ]
           }
         ],
@@ -259,32 +273,32 @@ export default {
           {
             class: ['三(1)班', '三(2)班', '三(3)班', '三(4)班', '三(5)班', '三(6)班'],
             Array: [
-              [50, 50, 4, 34, 8, 2, 1, 1],
-              [49, 49, 1, 35, 8, 4, 1, 0],
-              [50, 50, 2, 23, 16, 6, 2, 1],
-              [50, 50, 3, 31, 11, 3, 1, 1],
-              [50, 49, 1, 25, 12, 3, 5, 3],
-              [50, 49, 2, 27, 14, 4, 1, 1]
+              [4, 34, 8, 2, 1, 1],
+              [ 1, 35, 8, 4, 1, 0],
+              [ 2, 23, 16, 6, 2, 1],
+              [ 3, 31, 11, 3, 1, 1],
+              [ 1, 25, 12, 3, 5, 3],
+              [2, 27, 14, 4, 1, 1]
             ]
           },
           {
             class: ['四(1)班', '四(2)班', '四(3)班'],
             Array: [
-              [46, 46, 0, 17, 18, 6, 2, 3]
-              [50, 50, 0, 22, 16, 3, 4, 5]
-              [48, 48, 0, 16, 21, 6, 3, 2]
+              [ 0, 17, 18, 6, 2, 3],
+              [ 0, 22, 16, 3, 4, 5],
+              [ 0, 16, 21, 6, 3, 2]
             ]
           },
           {
             class: ['五(1)班'],
             Array: [
-              [48, 48, 0, 20, 15, 8, 2, 3]
+              [ 0, 20, 15, 8, 2, 3]
             ]
           },
           {
             class: ['六(1)班'],
             Array: [
-              [47, 47, 0, 19, 17, 8, 2, 1]
+              [ 0, 19, 17, 8, 2, 1]
             ]
           }
         ],

+ 62 - 25
src/components/pages/test/add/edit/check/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="c_box">
     <div class="c_box_title">{{ title }}</div>
+    <div class="c_box_score">总分:{{ score }}分</div>
     <div class="c_body">
       <div v-if="type == 3">
         <div v-for="(item, index) in checkArray[page].array" :key="index" class="check_box">
@@ -15,7 +16,8 @@
             <div v-if="item2.ttype == 1" class="answerBox">
               <choiceV :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
               <gapV :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
-              <span v-else>暂未设置题目</span></div>
+              <span v-else>暂未设置题目</span>
+            </div>
           </div>
         </div>
       </div>
@@ -88,6 +90,27 @@ export default {
           return `分页${index + 1}`;
         }
       };
+    },
+    score() {
+      let score = 0
+      this.cJson.forEach(el => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach(item => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach(item2 => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score ? parseFloat(item2.json.score) : 0
+                }
+              })
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score ? parseFloat(item.json.score) : 0
+            }
+          })
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score ? parseFloat(el.json.score) : 0
+        }
+      })
+      return score > 0 ? score : '未设置分数'
     }
   },
   watch: {
@@ -98,7 +121,8 @@ export default {
         this.checkArray = this.setJson(this.depthCopy(newVal))
       },
       deep: true
-    }
+    },
+    
   },
   methods: {
     depthCopy(s) {
@@ -115,13 +139,13 @@ export default {
                 item2.json.answer2 = []
               }
               if (item2.array) {
-                  item2.array = item2.array.filter(item3 => {
-                    if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
-                      item3.json.answer2 = []
-                    }
-                    return item3
-                  })
-                }
+                item2.array = item2.array.filter(item3 => {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
+                    item3.json.answer2 = []
+                  }
+                  return item3
+                })
+              }
               return (item2.ttype != 1 && item2.array.length > 0) || (item2.ttype == 1)
             })
           }
@@ -161,7 +185,16 @@ export default {
   font-size: 24px;
   font-weight: bold;
   word-break: break-all;
-  margin: 20px;
+  margin: 10px auto;
+}
+
+.c_box_score {
+  width: 90%;
+  text-align: center;
+  word-break: break-all;
+  margin: 0 auto 20px;
+  font-size: 16px;
+  color: #373737;
 }
 
 .c_body {
@@ -169,46 +202,50 @@ export default {
   margin: 0 auto;
 }
 
-.check_box{
+.check_box {}
 
-}
-.check_box + .check_box{
+.check_box+.check_box {
   margin-top: 10px;
 }
-.check_box > .title{
-  font-size:20px;
+
+.check_box>.title {
+  font-size: 20px;
   word-break: break-all;
   font-weight: bold;
 }
-.check_box > .answerBox{
+
+.check_box>.answerBox {
   margin-top: 10px;
 
 }
-.check_box > .noanswerBox{
+
+.check_box>.noanswerBox {
   margin-top: 10px;
 }
-.check_box_xia{
+
+.check_box_xia {
   margin-top: 10px;
 }
 
-.check_box_xia > .title{
+.check_box_xia>.title {
   font-size: 18px;
   font-weight: bold;
 }
-.check_box_xia > .answerBox{
+
+.check_box_xia>.answerBox {
   margin-top: 10px;
 }
-.check_box_xia > .noanswerBox{
+
+.check_box_xia>.noanswerBox {
   margin-top: 10px;
 }
 
-.page{
+.page {
   margin: 20px;
   display: flex;
   align-items: center;
 }
 
-.p_page{
+.p_page {
   margin: 0 10px;
-}
-</style>
+}</style>

+ 24 - 1
src/components/pages/test/add/edit/edit/index.vue

@@ -29,7 +29,7 @@
             </div>
         </div>
         <div class="e_order">
-            <div class="title">题目排序</div>
+            <div class="title">题目排序 <span style="font-size: 14px;color: #373737;">总分:{{ score }}分</span></div>
             <div class="e_order_box" style="margin-top: 20px;">
                 <checkOrder :checkC.sync="checkC" :checkJson="manualJson" @changeJson="changeJson"></checkOrder>
             </div>
@@ -67,6 +67,29 @@ export default {
             deep: true
         }
     },
+    computed: {
+        score() {
+            let score = 0
+            this.manualJson.forEach(el => {
+                if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                    el.array.forEach(item => {
+                      if(item.ttype == 2 && item.array.length > 0){
+                          item.array.forEach(item2 => {
+                            if(item2.ttype == 1 && item2.json){
+                                score += item2.json.score ? parseFloat(item2.json.score) : 0
+                            } 
+                          })
+                      } else if(item.ttype == 1 && item.json){
+                        score += item.json.score ? parseFloat(item.json.score) : 0
+                      } 
+                    })
+                } else if(el.ttype == 1 && el.json){ 
+                    score += el.json.score ? parseFloat(el.json.score) : 0
+                }
+            })
+            return  score > 0 ? score : '未设置分数'
+        }
+    },
     methods: {
         changeJson(json) {
             this.manualJson = json;

+ 4 - 4
src/components/pages/test/add/minxins/minxin.js

@@ -14,10 +14,10 @@ const minxin = {
           value: 3,
           label: "问答题"
         },
-        {
-          value: 4,
-          label: "添加文档"
-        }
+        // {
+        //   value: 4,
+        //   label: "添加文档"
+        // }
       ],
       options2: {
         1: "选择题",

+ 1 - 1
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" :see="see"></topicVue>
+          <topicVue :cJson="cJson" :title="title" :checktype="2" :see="see" :isTeacher="2" :name="name"></topicVue>
         </div>
       </div>
     </div>

+ 19 - 2
src/components/pages/testStudent/view/component/choice.vue

@@ -3,7 +3,10 @@
         <!-- <div class="mask"></div> -->
         <div v-if="!checkJson">暂未设置题目</div>
         <div v-else class="choice_box">
-            <div class="title">{{ `(${option[checkJson.type].name})` + checkJson.title }}</div>
+            <div class="c_title">
+                <div class="title">{{ `(${option[checkJson.type].name})` + checkJson.title }}<span style="color: #efa030;" v-if="checkJson.score">({{ '分值:'+checkJson.score+'分' }})</span></div>
+                <div class="p_box" v-if="isTeacher == 1">1</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"
@@ -33,6 +36,10 @@ export default {
         see: {
             type: Boolean,
             default: false
+        },
+        isTeacher: {
+            type: Number,
+            default: 2
         }
     },
     data() {
@@ -93,12 +100,22 @@ export default {
 
 .choice_box {}
 
-.choice_box>.title {
+.choice_box> .c_title .title {
     font-weight: bold;
     width: 100%;
     word-break: break-all;
 }
 
+.choice_box> .c_title {
+    display: flex;
+    justify-content: space-between;
+}
+
+.choice_box> .c_title .p_box{
+    margin-left: 5px;
+    width: fit-content;
+}
+
 .choice_box>.choices {
     margin-top: 10px;
     padding: 0 10px;

+ 22 - 4
src/components/pages/testStudent/view/component/gap.vue

@@ -4,9 +4,13 @@
         <div v-if="!checkJson">暂未设置题目</div>
         <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 v-if="see" style="color: #efa030;">({{ checkJson.answer ? '参考答案:'+checkJson.answer : '暂无参考答案' }})</span>
-                <!-- </div><div v-html="checkJson.title"></div> -->
+            <div class="c_title">
+                <div class="title">
+                    {{ `(${option[checkJson.type].name})` + checkJson.title }}<span v-if="see" style="color: #efa030;">({{ checkJson.answer ? '参考答案:'+checkJson.answer : '暂无参考答案' }} {{ cJson.score ? '分值:'+cJson.score+'分' : '' }})</span>
+                    <span style="color: #efa030;" v-if="checkJson.score && !see">({{ '分值:'+checkJson.score+'分' }})</span>
+                    <!-- </div><div v-html="checkJson.title"></div> -->
+                </div>
+                <div class="p_box" v-if="isTeacher == 1">1</div>
             </div>
             <div class="choices">
                 <textarea  :readonly="checktype == 2" rows="2" v-autoHeight="68" class="binfo_input binfo_textarea" cols v-model="checkJson.answer2"
@@ -29,6 +33,10 @@ export default {
         see:{
             type:Boolean,
             default:false
+        },
+        isTeacher: {
+            type: Number,
+            default: 2
         }
     },
     data() {
@@ -94,12 +102,22 @@ export default {
 
 .choice_box {}
 
-.choice_box>.title {
+.choice_box> .c_title .title {
     font-weight: bold;
     width: 100%;
     word-break: break-all;
 }
 
+.choice_box> .c_title {
+    display: flex;
+    justify-content: space-between;
+}
+
+.choice_box> .c_title .p_box{
+    margin-left: 5px;
+    width: fit-content;
+}
+
 .choice_box>.choices {
     margin-top: 10px;
 }

+ 48 - 9
src/components/pages/testStudent/view/component/topic.vue

@@ -1,20 +1,21 @@
 <template>
   <div class="c_box">
     <div class="c_box_title">{{ title }}</div>
+    <div class="c_box_score">总分:{{ score }}分<span v-if="name" style="margin-left: 10px;">答题人:{{ name }}</span></div>
     <div class="c_body">
       <div v-if="type == 3">
         <div v-for="(item, index) in checkArray[page].array" :key="index" class="check_box">
           <div class="title">{{ selectType(item, index) }}</div>
           <div v-if="item.ttype == 1" class="answerBox">
-            <choiceV :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see"></choiceV>
-            <gapV :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see"></gapV>
+            <choiceV :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
+            <gapV :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
             <span v-else>暂未设置题目</span>
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
             <div class="title">{{ selectType(item2, index2) }}</div>
             <div v-if="item2.ttype == 1" class="answerBox">
-              <choiceV :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see"></choiceV>
-              <gapV :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see"></gapV>
+              <choiceV :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
+              <gapV :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
               <span v-else>暂未设置题目</span>
             </div>
           </div>
@@ -24,15 +25,15 @@
         <div v-for="(item, index) in checkArray" :key="index" class="check_box">
           <div class="title">{{ selectType(item, index) }}</div>
           <div v-if="item.ttype == 1" class="answerBox">
-            <choiceV :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see"></choiceV>
-            <gapV :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see"></gapV>
+            <choiceV :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
+            <gapV :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
             <span v-else>暂未设置题目</span>
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
             <div class="title">{{ selectType(item2, index2) }}</div>
             <div v-if="item2.ttype == 1" class="answerBox">
-              <choiceV :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see"></choiceV>
-              <gapV :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see"></gapV>
+              <choiceV :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
+              <gapV :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
               <span v-else>暂未设置题目</span>
             </div>
           </div>
@@ -68,6 +69,14 @@ export default {
     see: {
       type: Boolean,
       default: false
+    },
+    isTeacher: {
+      type: Number,
+      default: 2
+    },
+    name: {
+      type: String,
+      default: ''
     }
   },
   components: {
@@ -99,6 +108,27 @@ export default {
         }
       };
     },
+    score() {
+      let score = 0
+      this.cJson.forEach(el => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach(item => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach(item2 => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score ? parseFloat(item2.json.score) : 0
+                }
+              })
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score ? parseFloat(item.json.score) : 0
+            }
+          })
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score ? parseFloat(el.json.score) : 0
+        }
+      })
+      return score > 0 ? score : '未设置分数'
+    }
   },
   watch: {
     cJson: {
@@ -171,7 +201,16 @@ export default {
   font-size: 24px;
   font-weight: bold;
   word-break: break-all;
-  margin: 20px;
+  margin: 10px auto;
+}
+
+.c_box_score {
+  width: 90%;
+  text-align: center;
+  word-break: break-all;
+  margin: 0 auto 20px;
+  font-size: 16px;
+  color: #373737;
 }
 
 .c_body {

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff