Browse Source

修改样式及build

zengyicheng 1 year ago
parent
commit
4014b3814b

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 1 - 1
dist/report.html


+ 0 - 1
dist/static/css/chunk-26c5c56a.fac16175.css

@@ -1 +0,0 @@
-h3[data-v-543593c5]{margin:1.06667rem 0 0}ul[data-v-543593c5]{list-style-type:none;padding:0}li[data-v-543593c5]{display:inline-block;margin:0 .26667rem}a[data-v-543593c5]{color:#42b983}.app-container[data-v-60ba57a3]{height:100vh}.app-container .layout-content[data-v-60ba57a3]{height:calc(100% - 1.33333rem)}.app-container .layout-footer[data-v-60ba57a3]{display:block;height:1.33333rem}

+ 0 - 1
dist/static/css/chunk-367ed930.db6ef7e2.css

@@ -1 +0,0 @@
-.navTitle[data-v-ffd4e832]{font-size:.42667rem;color:#fff}.home-container[data-v-ffd4e832]{height:100vh;overflow:hidden}.home-container .step_box[data-v-ffd4e832]{margin-top:1.5rem;width:100%;height:calc(100vh - 2.83333rem);overflow:auto;position:relative}.home-container .edit_top[data-v-ffd4e832]{width:100%;margin:0 auto}.home-container .edit_top[data-v-ffd4e832] .el-button{width:100%;height:1.33333rem;text-align:center;font-size:.42667rem}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-4b38abfc.efe0de2d.css


+ 1 - 0
dist/static/css/chunk-6907a5d2.3643aedd.css

@@ -0,0 +1 @@
+h3[data-v-543593c5]{margin:1.06667rem 0 0}ul[data-v-543593c5]{list-style-type:none;padding:0}li[data-v-543593c5]{display:inline-block;margin:0 .26667rem}a[data-v-543593c5]{color:#42b983}.app-container[data-v-39a42c94]{height:100vh}.app-container .layout-content[data-v-39a42c94]{height:calc(100% - 1.33333rem)}.app-container .layout-footer[data-v-39a42c94]{display:block;height:1.33333rem}

+ 0 - 1
dist/static/css/chunk-7116ffb8.4a8f096f.css

@@ -1 +0,0 @@
-.navTitle[data-v-4fa6e8b6]{font-size:.42667rem;color:#fff}.home-container[data-v-4fa6e8b6]{height:100vh;overflow:hidden}.home-container .step_box[data-v-4fa6e8b6]{margin-top:1.5rem;width:100%;height:calc(100vh - 2.83333rem);overflow:auto;position:relative}.home-container .edit_top[data-v-4fa6e8b6]{width:100%;margin:0 auto}.home-container .edit_top[data-v-4fa6e8b6] .el-button{width:100%;height:1.33333rem;text-align:center;font-size:.42667rem}

+ 1 - 0
dist/static/css/chunk-7fcd2f5e.f32f6fb4.css

@@ -0,0 +1 @@
+.navTitle[data-v-29193fd0]{font-size:.42667rem;color:#fff}.home-container[data-v-29193fd0]{height:100vh;overflow:hidden}.home-container .step_box[data-v-29193fd0]{margin-top:1.5rem;width:100%;height:calc(100vh - 2.83333rem);overflow:auto;position:relative}.home-container .edit_top[data-v-29193fd0]{width:100%;margin:0 auto}.home-container .edit_top[data-v-29193fd0] .el-button{width:100%;height:1.33333rem;text-align:center;font-size:.42667rem}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-ac710a44.73b974b4.css


+ 1 - 0
dist/static/css/chunk-d8de0868.a00fc236.css

@@ -0,0 +1 @@
+.navTitle[data-v-3d3f3422]{font-size:.42667rem;color:#fff}.home-container[data-v-3d3f3422]{height:100vh;overflow:hidden}.home-container .step_box[data-v-3d3f3422]{margin-top:1.5rem;width:100%;height:calc(100vh - 2.83333rem);overflow:auto;position:relative}.home-container .edit_top[data-v-3d3f3422]{width:100%;margin:0 auto}.home-container .edit_top[data-v-3d3f3422] .el-button{width:100%;height:1.33333rem;text-align:center;font-size:.42667rem}

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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-26c5c56a.a6199f54.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-319f4540.aaece67d.js


+ 0 - 1
dist/static/js/chunk-367ed930.7951dbed.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-367ed930"],{"730a":function(t,e,i){"use strict";i.r(e);i("b0c0");var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-container"},[e("head-bar",{on:{back:t.back},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"navTitle"},[t._v("查看问卷")])]},proxy:!0}])}),e("div",{staticClass:"step_box"},[e("topicVue",{attrs:{cJson:t.cJson,title:t.name,brief:t.brief,checktype:2,see:t.see}})],1),e("div",{staticClass:"edit_top"},[e("div",{staticClass:"op_btn"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.publish}},[t._v("提交")])],1)])],1)},c=[],n=i("5530"),o=(i("14d9"),i("e9c4"),i("98e5")),r=i("71ed"),a=i("2f62"),u=i("bf3a"),d={components:{headBar:r["a"],topicVue:u["a"]},data:function(){return{courseid:this.$route.query.courseid,tid:this.$route.query.tid,name:this.$route.query.name,title:"",brief:"",cJson:[],see:!1}},computed:Object(n["a"])({},Object(a["c"])(["userinfo"])),methods:{back:function(){this.$router.push({path:"/test"})},getData:function(){var t=this,e={cid:this.courseid,tid:this.tid};Object(o["d"])(e).then((function(e){e[1].length&&(t.cJson=JSON.parse(e[1][0].courseJson)),t.title=e[0][0].title,t.brief=e[0][0].brief,t.see=1==e[0][0].open,t.$forceUpdate()})).catch((function(t){console.error(t)}))},publish:function(){var t=this,e=this.$refs["topicVue"].checkArray,i=[{uid:this.userinfo.userid,cid:this.courseid,cjson:JSON.stringify(e),type:2}];Object(o["a"])(i).then((function(e){t.$message.success("提交成功"),t.back()})).catch((function(t){console.error(t)}))}},mounted:function(){this.getData()}},f=d,h=(i("d97f"),i("2877")),l=Object(h["a"])(f,s,c,!1,null,"ffd4e832",null);e["default"]=l.exports},d97f:function(t,e,i){"use strict";i("e423")},e423:function(t,e,i){}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-4b38abfc.711aa954.js


+ 1 - 1
dist/static/js/chunk-66fcd5c2.eb7ebcf9.js → dist/static/js/chunk-66fcd5c2.6af8581f.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-66fcd5c2"],{"5f09":function(t,e,i){"use strict";i("83ae")},"83ae":function(t,e,i){},eaa4:function(t,e,i){"use strict";i.r(e);var c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-container"},[e("head-bar",{on:{back:t.back},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"navTitle"},[t._v("填写问卷")])]},proxy:!0}])}),e("div",{staticClass:"step_box"},[e("topicVue",{ref:"topicVue",attrs:{cJson:t.cJson,title:t.title,brief:t.brief}})],1),e("div",{staticClass:"edit_top"},[e("div",{staticClass:"op_btn"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.publish}},[t._v("提交")])],1)])],1)},s=[],n=i("5530"),o=(i("14d9"),i("e9c4"),i("98e5")),a=i("71ed"),r=i("2f62"),u=i("bf3a"),f={components:{headBar:a["a"],topicVue:u["a"]},data:function(){return{courseid:this.$route.query.courseid,title:"",brief:"",cJson:[]}},computed:Object(n["a"])({},Object(r["c"])(["userinfo"])),methods:{back:function(){this.$router.push({path:"/test"})},getData:function(){var t=this,e={cid:this.courseid};Object(o["c"])(e).then((function(e){t.cJson=JSON.parse(e[0][0].chapters),t.title=e[0][0].title,t.brief=e[0][0].brief})).catch((function(t){console.error(t)}))},publish:function(){var t=this,e=this.$refs["topicVue"].checkArray,i=[{uid:this.userinfo.userid,cid:this.courseid,cjson:JSON.stringify(e),type:2}];Object(o["a"])(i).then((function(e){t.$message.success("提交成功"),t.back()})).catch((function(t){console.error(t)}))}},mounted:function(){this.getData()}},d=f,l=(i("5f09"),i("2877")),h=Object(l["a"])(d,c,s,!1,null,"fd607e66",null);e["default"]=h.exports}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-66fcd5c2"],{"5f09":function(t,e,i){"use strict";i("83ae")},"83ae":function(t,e,i){},eaa4:function(t,e,i){"use strict";i.r(e);var c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-container"},[e("head-bar",{on:{back:t.back},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"navTitle"},[t._v("填写问卷")])]},proxy:!0}])}),e("div",{staticClass:"step_box"},[e("topicVue",{ref:"topicVue",attrs:{cJson:t.cJson,title:t.title,brief:t.brief}})],1),e("div",{staticClass:"edit_top"},[e("div",{staticClass:"op_btn"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.publish}},[t._v("提交")])],1)])],1)},s=[],n=i("5530"),o=(i("14d9"),i("e9c4"),i("98e5")),a=i("71ed"),r=i("2f62"),u=i("bf3a"),f={components:{headBar:a["a"],topicVue:u["a"]},data:function(){return{courseid:this.$route.query.courseid,title:"",brief:"",cJson:[]}},computed:Object(n["a"])({},Object(r["c"])(["userinfo"])),methods:{back:function(){this.$router.push({path:"/test"})},getData:function(){var t=this,e={cid:this.courseid};Object(o["d"])(e).then((function(e){t.cJson=JSON.parse(e[0][0].chapters),t.title=e[0][0].title,t.brief=e[0][0].brief})).catch((function(t){console.error(t)}))},publish:function(){var t=this,e=this.$refs["topicVue"].checkArray,i=[{uid:this.userinfo.userid,cid:this.courseid,cjson:JSON.stringify(e),type:2}];Object(o["a"])(i).then((function(e){t.$message.success("提交成功"),t.back()})).catch((function(t){console.error(t)}))}},mounted:function(){this.getData()}},d=f,l=(i("5f09"),i("2877")),h=Object(l["a"])(d,c,s,!1,null,"fd607e66",null);e["default"]=h.exports}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6907a5d2.a9683f30.js


+ 0 - 1
dist/static/js/chunk-7116ffb8.3f4f2fa8.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7116ffb8"],{"3a2e":function(t,e,i){"use strict";i.r(e);i("b0c0");var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-container"},[e("head-bar",{on:{back:t.back},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"navTitle"},[t._v("修改问卷")])]},proxy:!0}])}),e("div",{staticClass:"step_box"},[e("topicVue",{ref:"topicVue",attrs:{cJson:t.cJson,title:t.name,brief:t.brief}})],1),e("div",{staticClass:"edit_top"},[e("div",{staticClass:"op_btn"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.publish}},[t._v("提交")])],1)])],1)},c=[],n=i("5530"),o=(i("14d9"),i("e9c4"),i("98e5")),a=i("71ed"),r=i("2f62"),u=i("bf3a"),d={components:{headBar:a["a"],topicVue:u["a"]},data:function(){return{courseid:this.$route.query.courseid,tid:this.$route.query.tid,name:this.$route.query.name,title:"",brief:"",cJson:[]}},computed:Object(n["a"])({},Object(r["c"])(["userinfo"])),methods:{back:function(){this.$router.push({path:"/test"})},getData:function(){var t=this,e={cid:this.courseid,tid:this.tid};Object(o["d"])(e).then((function(e){e[1].length&&(t.cJson=JSON.parse(e[1][0].courseJson)),t.title=e[0][0].title,t.brief=e[0][0].brief,t.$forceUpdate()})).catch((function(t){console.error(t)}))},publish:function(){var t=this,e=this.$refs["topicVue"].checkArray,i=[{uid:this.userinfo.userid,cid:this.courseid,cjson:JSON.stringify(e),type:2}];Object(o["a"])(i).then((function(e){t.$message.success("提交成功"),t.back()})).catch((function(t){console.error(t)}))}},mounted:function(){this.getData()}},f=d,h=(i("61a0"),i("2877")),l=Object(h["a"])(f,s,c,!1,null,"4fa6e8b6",null);e["default"]=l.exports},"61a0":function(t,e,i){"use strict";i("92d1")},"92d1":function(t,e,i){}}]);

+ 1 - 0
dist/static/js/chunk-7fcd2f5e.8cb2b502.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7fcd2f5e"],{"730a":function(t,e,i){"use strict";i.r(e);i("b0c0");var c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-container"},[e("head-bar",{on:{back:t.back},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"navTitle"},[t._v("查看问卷")])]},proxy:!0}])}),e("div",{staticClass:"step_box"},[e("topicVue",{attrs:{cJson:t.cJson,title:t.name,brief:t.brief,checktype:2,see:t.see}})],1)],1)},s=[],n=i("5530"),o=(i("14d9"),i("e9c4"),i("98e5")),r=i("71ed"),a=i("2f62"),u=i("bf3a"),f={components:{headBar:r["a"],topicVue:u["a"]},data:function(){return{courseid:this.$route.query.courseid,tid:this.$route.query.tid,name:this.$route.query.name,title:"",brief:"",cJson:[],see:!1}},computed:Object(n["a"])({},Object(a["c"])(["userinfo"])),methods:{back:function(){this.$router.push({path:"/test"})},getData:function(){var t=this,e={cid:this.courseid,tid:this.tid};Object(o["e"])(e).then((function(e){e[1].length&&(t.cJson=JSON.parse(e[1][0].courseJson)),t.title=e[0][0].title,t.brief=e[0][0].brief,t.see=1==e[0][0].open,t.$forceUpdate()})).catch((function(t){console.error(t)}))},publish:function(){var t=this,e=this.$refs["topicVue"].checkArray,i=[{uid:this.userinfo.userid,cid:this.courseid,cjson:JSON.stringify(e),type:2}];Object(o["a"])(i).then((function(e){t.$message.success("提交成功"),t.back()})).catch((function(t){console.error(t)}))}},mounted:function(){this.getData()}},d=f,h=(i("aa51"),i("2877")),b=Object(h["a"])(d,c,s,!1,null,"29193fd0",null);e["default"]=b.exports},aa51:function(t,e,i){"use strict";i("f86b")},f86b:function(t,e,i){}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ac710a44.d9bbd5d0.js


+ 1 - 0
dist/static/js/chunk-d8de0868.4eb542de.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d8de0868"],{"11d1":function(t,e,i){},"3a2e":function(t,e,i){"use strict";i.r(e);i("b0c0");var c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-container"},[e("head-bar",{on:{back:t.back},scopedSlots:t._u([{key:"title",fn:function(){return[e("div",{staticClass:"navTitle"},[t._v("修改问卷")])]},proxy:!0}])}),e("div",{staticClass:"step_box"},[e("topicVue",{ref:"topicVue",attrs:{cJson:t.cJson,title:t.name,brief:t.brief}})],1),e("div",{staticClass:"edit_top"},[e("div",{staticClass:"op_btn"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.publish}},[t._v("修改")])],1)])],1)},s=[],n=i("5530"),o=(i("14d9"),i("e9c4"),i("98e5")),r=i("71ed"),a=i("2f62"),u=i("bf3a"),d={components:{headBar:r["a"],topicVue:u["a"]},data:function(){return{courseid:this.$route.query.courseid,tid:this.$route.query.tid,name:this.$route.query.name,title:"",brief:"",cJson:[]}},computed:Object(n["a"])({},Object(a["c"])(["userinfo"])),methods:{back:function(){this.$router.push({path:"/test"})},getData:function(){var t=this,e={cid:this.courseid,tid:this.tid};Object(o["e"])(e).then((function(e){e[1].length&&(t.cJson=JSON.parse(e[1][0].courseJson)),t.title=e[0][0].title,t.brief=e[0][0].brief,t.$forceUpdate()})).catch((function(t){console.error(t)}))},publish:function(){var t=this,e=this.$refs["topicVue"].checkArray,i=[{uid:this.tid,cid:this.courseid,cjson:JSON.stringify(e),type:"2"}];Object(o["b"])(i).then((function(e){t.$message.success("修改成功"),t.back()})).catch((function(t){console.error(t)}))}},mounted:function(){this.getData()}},f=d,h=(i("ec7b"),i("2877")),b=Object(h["a"])(f,c,s,!1,null,"3d3f3422",null);e["default"]=b.exports},ec7b:function(t,e,i){"use strict";i("11d1")}}]);

+ 10 - 0
src/api/testDetail.js

@@ -20,6 +20,16 @@ export function addTestWorks(data) {
     })
 }
 
+// 保存评测
+export function addTestWorks2(data) {
+    return request({
+        url: '/addTestWorks2',
+        method: 'post',
+        data,
+        hideloading: false
+    })
+}
+
 // 删除评测问卷作业
 export function deleteTestCourseWorks(data) {
     return request({

+ 21 - 12
src/views/layouts/index.vue

@@ -14,7 +14,7 @@
 
 <script>
 import TabBar from '@/components/TabBar'
-
+import { mapGetters } from 'vuex'
 export default {
   name: 'AppLayout',
   data() {
@@ -26,7 +26,24 @@ export default {
             path: '/home'
           },
           icon: 'home-o'
-        },
+        }
+      ]
+    }
+  },
+  components: {
+    TabBar
+  },
+  computed: {
+    ...mapGetters(['userinfo'])
+  },
+  methods: {
+    handleChange(v) {
+      console.log('tab value:', v)
+    }
+  },
+  mounted() {
+    if (this.userinfo.type == 1) {
+      this.tabbars.push(
         {
           title: '学生评价',
           to: {
@@ -36,22 +53,14 @@ export default {
           normalIcon: require('../../assets/images/course/comment1.png')
         },
         {
-          title: '评测中心',
+          title: '教师中心',
           to: {
             path: '/test'
           },
           activeIcon: require('../../assets/images/course/commmt-active1.png'),
           normalIcon: require('../../assets/images/course/comment1.png')
         }
-      ]
-    }
-  },
-  components: {
-    TabBar
-  },
-  methods: {
-    handleChange(v) {
-      console.log('tab value:', v)
+      )
     }
   }
 }

+ 8 - 6
src/views/test/components/courseItem.vue

@@ -19,7 +19,8 @@
     <div class="cMiddle">
       <div class="cLeft">
         <div><span style="color: #aaadb1">题目数量:</span>{{ getNum(c.chapters) }}</div>
-        <div><span style="color: #aaadb1">创建时间:</span>{{ c.time.split(' ')[0] }}</div>
+        <div v-if="c.overtime"><span style="color: #aaadb1">截止时间:</span>{{ c.overtime.split(' ')[0] }}</div>
+        <div v-else><span style="color: #aaadb1">创建时间:</span>{{ c.time.split(' ')[0] }}</div>
       </div>
       <div class="cRight">
         <div class="ctmNumber">{{ getScore(c.array) }}分</div>
@@ -32,7 +33,7 @@
           已提交<span style="color: #3f86fc; padding: 0 5px">{{ c.array.length }}</span
           >份
         </div>
-        <div :class="c.isOpen ? 'all' : 'isAll'" @click="isClick">
+        <div :class="c.isOpen ? 'isAll' : 'all'" @click="isClick">
           <img src="../../../assets/images/testStudent/all.png" alt="" />
         </div>
       </div>
@@ -55,8 +56,8 @@
           <div>{{ item.createTime }}</div>
         </div>
         <div class="cWItemRight">
-          <div @click.stop="doTest(item.courseid, item.id, item.name)" v-if="c.userid == userinfo.userid">修改</div>
-          <div @click.stop="deleteTest(item.id)" v-if="c.userid == userinfo.userid">删除</div>
+          <div @click.stop="doTest(item.courseid, item.id, item.name)" v-if="item.userid == userinfo.userid">修改</div>
+          <div @click.stop="deleteTest(item.id)" v-if="item.userid == userinfo.userid">删除</div>
         </div>
       </div>
     </div>
@@ -133,7 +134,7 @@ export default {
           _score += el
         })
         console.log(scoreArray)
-        return _score ? _score / scoreArray.length : 0
+        return _score ? (_score / scoreArray.length).toFixed(1) : 0
       }
     }
   },
@@ -370,8 +371,9 @@ export default {
         flex-direction: row;
         flex-wrap: nowrap;
         align-items: center;
+        color: #00000099;
         > div:last-child {
-          color: #c0c0c0;
+          color: #00000066;
           padding-left: 15px;
         }
       }

+ 26 - 8
src/views/test/components/typeFilter.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="classBox">
     <div class="typeBox">
-      <div :class="type != 2 ? 'type' : 'istype'" @click="setType(2)">
+      <div :class="typeArray.length == 0 ? 'isNoArray' : type != 2 ? 'type' : 'istype'" @click="setType(2)">
         <div>完成情况</div>
         <div :class="type != 2 ? 'more' : 'isMore'"></div>
       </div>
@@ -30,6 +30,7 @@
         </div>
       </div>
     </div>
+    <div class="mask" @click="setType(0)" v-if="type == 1 || type == 2"></div>
   </div>
 </template>
 
@@ -55,23 +56,27 @@ export default {
   },
   methods: {
     setType(t) {
-      if ((t == 1 && this.type == 1) || (t == 2 && this.type == 2)) {
+      if (t == 0) {
         this.type = 0
       } else {
-        this.type = t
+        if ((t == 1 && this.type == 1) || (t == 2 && this.type == 2)) {
+          this.type = 0
+        } else {
+          this.type = t
+        }
+        this.getAll()
       }
-      this.getAll()
       this.$forceUpdate()
     },
     chooseGroupA(id) {
       this.groupA = id
-      this.type = 0;
+      this.type = 0
       this.getAll()
       this.$forceUpdate()
     },
     chooseTypeArray(id) {
-      this.typeCheck = id;
-      this.type = 0;
+      this.typeCheck = id
+      this.type = 0
       this.getAll()
       this.$forceUpdate()
     },
@@ -113,7 +118,8 @@ export default {
     z-index: 99;
     height: 40px;
     .type,
-    .istype {
+    .istype,
+    .isNoArray {
       width: calc(100% / 2);
       display: flex;
       flex-direction: row;
@@ -144,6 +150,9 @@ export default {
     .istype {
       color: #4f91fc;
     }
+    .isNoArray {
+      width: 30%;
+    }
   }
   .typeAllBox {
     position: relative;
@@ -179,4 +188,13 @@ export default {
     }
   }
 }
+.mask {
+  position: fixed;
+  width: 100vw;
+  height: 100vh;
+  top: 95px;
+  background: #000;
+  opacity: 0.5;
+  z-index: 1;
+}
 </style>

+ 36 - 18
src/views/test/index.vue

@@ -22,7 +22,13 @@
       <van-pull-refresh v-model="isLoading" @refresh="onRefresh" class="rheight">
         <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" class="vheight">
           <van-empty description="暂无问卷" v-if="!zoneClass.length" />
-          <course-item v-for="(c, cIndex) in zoneClass" :key="cIndex" class="courseItem" :c="c" @getCourse="onRefresh"></course-item>
+          <course-item
+            v-for="(c, cIndex) in zoneClass"
+            :key="cIndex"
+            class="courseItem"
+            :c="c"
+            @getCourse="onRefresh1"
+          ></course-item>
         </van-list>
       </van-pull-refresh>
     </div>
@@ -63,18 +69,22 @@ export default {
       this.page = 1
       this.groupA = g
       this.typeCheck = t
-      this.getCourse(true)
+      this.getCourse(true,false)
     },
     onRefresh() {
       this.page = 1
       this.finished = false
-      this.getCourse(true)
+      this.getCourse(true,false)
+    },
+    onRefresh1() {
+      this.page = 1
+      this.getCourse(true, true)
     },
     onLoad() {
       this.page++
       this.getCourse()
     },
-    async getCourse(isRefresh) {
+    async getCourse(isRefresh, isOpen) {
       var typeE = []
       const params = {
         type: this.groupA,
@@ -97,15 +107,19 @@ export default {
         this.isLoading = false
         // 下拉刷新
         res[0].forEach(el => {
-          el.array = [];
-          el.isOpen = "";
-          el.isOpen = false;
-          let count = 0;
-          res[1].forEach((el2) => {
+          el.array = []
+          el.isOpen = ''
+          if (isOpen) {
+            el.isOpen = isOpen
+          } else {
+            el.isOpen = false
+          }
+          let count = 0
+          res[1].forEach(el2 => {
             if (el.courseId == el2.courseid) {
               el2.name = ''
-              count++;
-              el2.name = el.title + "测评试卷" + count
+              count++
+              el2.name = el.title + '测评试卷' + count
               el.array.push(el2)
             }
           })
@@ -115,15 +129,19 @@ export default {
         this.loading = false
         // 上拉加载
         res[0].forEach(el => {
-          el.array = [];
-          el.isOpen = "";
-          el.isOpen = false;
-          let count = 0;
-          res[1].forEach((el2) => {
+          el.array = []
+          el.isOpen = ''
+          if (isOpen) {
+            el.isOpen = isOpen
+          } else {
+            el.isOpen = false
+          }
+          let count = 0
+          res[1].forEach(el2 => {
             if (el.courseId == el2.courseid) {
               el2.name = ''
-              count++;
-              el2.name = el.title + "测评试卷" + count
+              count++
+              el2.name = el.title + '测评试卷' + count
               el.array.push(el2)
             }
           })

+ 2 - 2
src/views/testDetail/check.vue

@@ -9,11 +9,11 @@
       <topicVue :cJson="cJson" :title="name" :brief="brief" :checktype="2" :see="see"></topicVue>
       <!-- <topicVue :cJson="cJson" :title="title" :brief="brief" ref="topicVue"></topicVue> -->
     </div>
-    <div class="edit_top">
+    <!-- <div class="edit_top">
       <div class="op_btn">
         <el-button type="primary" size="small" @click="publish">提交</el-button>
       </div>
-    </div>
+    </div> -->
   </div>
 </template>
 

+ 6 - 6
src/views/testDetail/preview.vue

@@ -10,7 +10,7 @@
     </div>
     <div class="edit_top">
       <div class="op_btn">
-        <el-button type="primary" size="small" @click="publish">提交</el-button>
+        <el-button type="primary" size="small" @click="publish">修改</el-button>
       </div>
     </div>
   </div>
@@ -18,7 +18,7 @@
 
 <script>
 import { selectTestCourseWorks } from '@/api/testDetail'
-import { addTestWorks } from '@/api/testDetail'
+import { addTestWorks2 } from '@/api/testDetail'
 import headBar from '@/components/headBar.vue'
 import { mapGetters } from 'vuex'
 import topicVue from './components/topic.vue'
@@ -66,15 +66,15 @@ export default {
       let cjson = this.$refs['topicVue'].checkArray
       const params = [
         {
-          uid: this.userinfo.userid,
+          uid: this.tid,
           cid: this.courseid,
           cjson: JSON.stringify(cjson),
-          type: 2
+          type: '2',
         }
       ]
-      addTestWorks(params)
+      addTestWorks2(params)
         .then(res => {
-          this.$message.success('提交成功')
+          this.$message.success('修改成功')
           this.back()
         })
         .catch(err => {

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