lsc vor 1 Jahr
Ursprung
Commit
1728720bfe

+ 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.9ff33caa089b27c5808b01886dc69b84.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.f4fd4f8240bb6055d8a3.js></script></body></html><script>function stopSafari() {
+    }</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() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/css/app.3eefa295cecfa41bd51b4b5bf2f3ef70.css


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/css/app.3eefa295cecfa41bd51b4b5bf2f3ef70.css.map


BIN
dist/static/img/data_title2.9f3a612.png


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.72d06c552efc4b895e3a.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.72d06c552efc4b895e3a.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


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

@@ -126,7 +126,7 @@ export default {
 }
 
 .choices > .score.active{
-    background: #adb4f5;
+    background: #65b1ff;
 }
 
 </style>

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

@@ -243,8 +243,8 @@ export default {
                             // }, 1000);
                             setTimeout(() => {
                                 if (
-                                    cfindex2 == event.target.files.length - 1 ||
-                                    cfindex2 > event.target.files.length - 1
+                                    cfindex2 == event.target.files.length ||
+                                    cfindex2 > event.target.files.length
                                 ) {
                                     _this.proVisible = false;
                                 }

+ 22 - 0
src/components/pages/test/add/edit/edit/index.vue

@@ -31,6 +31,28 @@
           </div>
         </div>
       </div>
+      <div class="e_add_box">
+        <div class="title">平台组件</div>
+        <div class="e_add_ci">
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in optionsPin"
+              :key="item.label"
+              @click="addCheck(item.value)"
+            >
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_course: item.value == 6,
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
       <div class="e_add_box">
         <div class="title">添加组件</div>
         <div class="e_add_ci">

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

@@ -22,15 +22,21 @@ const minxin = {
           value: 5,
           label: "附件"
         },
-        {
-          value: 6,
-          label: "课程"
-        },
+        // {
+        //   value: 6,
+        //   label: "课程"
+        // },
         {
           value: 7,
           label: "评分"
         },
       ],
+      optionsPin:[
+       {
+          value: 6,
+          label: "课程"
+        },
+      ],
       options2: {
         1: "选择题",
         // 2: "问答题",

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

@@ -80,7 +80,16 @@ export default {
                 this.$emit('update:cJson', newValue)
             },
             deep: true
-        }
+        },
+        cJson: {
+            handler(newValue) {
+                if(JSON.stringify(newValue.answer2) !== JSON.stringify(this.checkJson.answer2)){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
     },
     methods: {
         depthCopy(s) {

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

@@ -135,7 +135,7 @@ export default {
 }
 
 .choices > .score.active{
-    background: #adb4f5;
+    background: #65b1ff;
 }
 
 </style>

+ 19 - 4
src/components/pages/testStudent/view/component/file.vue

@@ -85,7 +85,7 @@
                             <div class="lbox">
                                 <img src="../../../../../assets/loading.gif" />上传中,请稍后
                             </div>
-                            <div style="margin-bottom: 10px">
+                            <!-- <div style="margin-bottom: 10px">
                                 <span>{{
                                     isFinishSize
                                 }}M</span>
@@ -97,7 +97,7 @@
                             <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
                                 ? progress
                                 : 0
-                                " style="width: 80%"></el-progress>
+                                " style="width: 80%"></el-progress> -->
                         </div>
                     </div>
                 </div>
@@ -222,6 +222,21 @@ export default {
             },
             deep: true
         },
+        cJson: {
+            handler(newValue) {
+                if(newValue.file && this.checkJson.file && newValue.file.length !== this.checkJson.file.length){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }else if(newValue.file && !this.checkJson.file){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }else if(!newValue.file && this.checkJson.file){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
     },
     methods: {
         depthCopy(s) {
@@ -307,8 +322,8 @@ export default {
                             // }, 1000);
                             setTimeout(() => {
                                 if (
-                                    cfindex2 == event.target.files.length - 1 ||
-                                    cfindex2 > event.target.files.length - 1
+                                    cfindex2 == event.target.files.length ||
+                                    cfindex2 > event.target.files.length
                                 ) {
                                     _this.proVisible = false;
                                 }

+ 9 - 0
src/components/pages/testStudent/view/component/gap.vue

@@ -74,6 +74,15 @@ export default {
             },
             deep: true
         },
+        cJson: {
+            handler(newValue) {
+                if(newValue.answer2 !== this.checkJson.answer2){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
     },
     directives: {
         autoHeight: {

+ 10 - 6
src/components/pages/testStudent/view/component/topic.vue

@@ -20,7 +20,7 @@
             <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see"
               :isTeacher="isTeacher"></fileV>
             <courseV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 6"
-              :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage"></courseV>
+              :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
             <evaV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 7" :see="see"
               :isTeacher="isTeacher"></evaV>
             <!-- <span v-else>暂未设置题目</span> -->
@@ -36,9 +36,9 @@
               <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5"
                 :see="see" :isTeacher="isTeacher"></fileV>
               <courseV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 6"
-                :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage"></courseV>
-              <evav :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
-                :see="see" :isTeacher="isTeacher"></evav>
+                :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
+                :see="see" :isTeacher="isTeacher"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -56,7 +56,7 @@
             <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see"
               :isTeacher="isTeacher"></fileV>
             <courseV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 6"
-              :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage"></courseV>
+              :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
             <evaV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 7" :see="see"
               :isTeacher="isTeacher"></evaV>
             <!-- <span v-else>暂未设置题目</span> -->
@@ -72,7 +72,7 @@
               <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5"
                 :see="see" :isTeacher="isTeacher"></fileV>
               <coursev :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 6"
-                :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage"></coursev>
+                :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></coursev>
               <evaV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
                 :see="see" :isTeacher="isTeacher"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
@@ -125,6 +125,10 @@ export default {
     name: {
       type: String,
       default: ''
+    },
+    tid: {
+      type: String,
+      default: ''
     }
   },
   components: {

+ 30 - 1
src/components/pages/testStudent/view/preview.vue

@@ -44,7 +44,7 @@
             </div>
           </div>
           <topicVue :cJson.sync="cJson" :title="title" :brief="brief" ref="topicVue" v-if="!loading"
-            @getTestWorkByCid="getTestWorkByCid" @publish2="publish2"></topicVue>
+            @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :tid="tid"></topicVue>
         </div>
       </div>
     </div>
@@ -279,6 +279,9 @@ export default {
             if (!this.tid) {
               this.cJson = this.setJSON(this.setCourseid(JSON.parse(JSON.stringify(this.cJson2))))
             }
+          }else{
+            this.tid = ''
+            this.cJson = this.setJSON(this.setCourseid(JSON.parse(JSON.stringify(this.cJson2))))
           }
           this.$forceUpdate()
           this.isloading = false
@@ -536,6 +539,14 @@ export default {
     publish2() {
       this.isloading = true
       let cjson = this.$refs['topicVue'].checkArray
+      let _cjson = this.JSONSetting(JSON.parse(JSON.stringify(cjson)));
+      let pan = this.panJSON(_cjson)
+      if(!pan){
+        setTimeout(() => {
+            this.isloading = false
+          }, 500);
+        return
+      }
       console.log(cjson);
       let params = [
         {
@@ -559,6 +570,24 @@ export default {
           console.error(err);
         });
     },
+    panJSON(array){
+      var pan = 0
+      for(var i = 0; i < array.length; i++){
+        if(array[i].type != 6){
+          let param = array[i].json
+          if(array[i].type == 5 && param.file && param.file.length > 0){
+            pan++
+          }else if(param.answer2.length || typeof(param.answer2) == 'number'){
+            pan++
+          }
+        }
+      }
+      if(pan > 0){
+        return true
+      }else {
+        return false
+      }
+    },
     deleteTest(tid) {
       let _this = this;
       let params = [

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.