lsc vor 1 Jahr
Ursprung
Commit
93ea477719
31 geänderte Dateien mit 318 neuen und 130 gelöschten Zeilen
  1. 1 1
      dist/index.html
  2. 0 0
      dist/static/css/app.688d051224fbc839c601ed88c7fdadb6.css.map
  3. 0 0
      dist/static/css/app.d9d87c40a4665c9d71600f6fab41430b.css
  4. 0 0
      dist/static/css/app.d9d87c40a4665c9d71600f6fab41430b.css.map
  5. 0 0
      dist/static/js/app.0a147c1dd65b9883e0e7.js
  6. 0 0
      dist/static/js/app.8b6ef6ae46262fcfa90e.js
  7. 0 0
      dist/static/js/app.8b6ef6ae46262fcfa90e.js.map
  8. 0 0
      dist/static/js/manifest.3512a67a6213c2df4180.js.map
  9. BIN
      src/assets/icon/test/add_check_icon.png
  10. BIN
      src/assets/icon/test/add_check_icon_active.png
  11. BIN
      src/assets/icon/test/add_edit_icon.png
  12. BIN
      src/assets/icon/test/add_edit_icon_active.png
  13. BIN
      src/assets/icon/test/drag_icon.png
  14. BIN
      src/assets/icon/test/drag_icon_active.png
  15. BIN
      src/assets/icon/test/text_icon.png
  16. BIN
      src/assets/icon/test/type_check_icon.png
  17. BIN
      src/assets/icon/test/type_file_icon.png
  18. 9 7
      src/components/pages/test/add/addTest.vue
  19. 4 1
      src/components/pages/test/add/components/GapFilling/gap.vue
  20. 8 8
      src/components/pages/test/add/components/GapFilling/index.vue
  21. 30 14
      src/components/pages/test/add/components/checkOrder.vue
  22. 4 1
      src/components/pages/test/add/components/choice/choice.vue
  23. 5 5
      src/components/pages/test/add/components/choice/index.vue
  24. 4 1
      src/components/pages/test/add/components/file/file.vue
  25. 8 8
      src/components/pages/test/add/components/file/index.vue
  26. 3 1
      src/components/pages/test/check/check.vue
  27. 134 64
      src/components/pages/test/index.vue
  28. 88 16
      src/components/pages/testStudent/index.vue
  29. 4 2
      src/components/pages/testStudent/view/check.vue
  30. 13 0
      src/components/pages/testStudent/view/component/topic.vue
  31. 3 1
      src/components/pages/testStudent/view/preview.vue

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.688d051224fbc839c601ed88c7fdadb6.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.0a147c1dd65b9883e0e7.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.d9d87c40a4665c9d71600f6fab41430b.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.8b6ef6ae46262fcfa90e.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.688d051224fbc839c601ed88c7fdadb6.css.map


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


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


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


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


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


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


BIN
src/assets/icon/test/add_check_icon.png


BIN
src/assets/icon/test/add_check_icon_active.png


BIN
src/assets/icon/test/add_edit_icon.png


BIN
src/assets/icon/test/add_edit_icon_active.png


BIN
src/assets/icon/test/drag_icon.png


BIN
src/assets/icon/test/drag_icon_active.png


BIN
src/assets/icon/test/text_icon.png


BIN
src/assets/icon/test/type_check_icon.png


BIN
src/assets/icon/test/type_file_icon.png


+ 9 - 7
src/components/pages/test/add/addTest.vue

@@ -154,7 +154,7 @@ export default {
                         );
                     }
                     setTimeout(() => {
-                        this.getData();
+                        this.getData(2);
                     }, 1000);
                 })
                 .catch((err) => {
@@ -214,7 +214,7 @@ export default {
                         );
                     }
                     setTimeout(() => {
-                        this.getData();
+                        this.getData(2);
                     }, 1000);
                 })
                 .catch((err) => {
@@ -222,11 +222,13 @@ export default {
                     console.error(err);
                 });
         },
-        getData() {
+        getData(type) {
             if (this.cid == "" || this.cid == undefined) {
                 console.log("这是新增课程");
             } else {
-                this.loading = true
+                if(type != 2){
+                    this.loading = true
+                }
                 let params = {
                     cid: this.cid,
                 };
@@ -234,7 +236,6 @@ export default {
                     .get(this.$store.state.api + "getTestCourseDetail", params)
                     .then((res) => {
                         this.cJson = JSON.parse(res.data[0][0].chapters);
-                        this.$forceUpdate();
                         this.title = res.data[0][0].title;
 
                         this.see = res.data[0][0].open == 1 ? true : false;
@@ -248,8 +249,9 @@ export default {
                         console.log(this.testType);
                         this.look = res.data[0][0].look
                         this.$forceUpdate()
-                        this.loading = false
-
+                        if(type != 2){
+                            this.loading = false
+                        }
                     })
                     .catch((err) => {
                         console.error(err);

+ 4 - 1
src/components/pages/test/add/components/GapFilling/gap.vue

@@ -36,8 +36,11 @@ export default {
 
 <style scoped>
 .c_box {
-    width: 100%;
+    width: calc(100% - 20px);
     position: relative;
+    margin: 0 auto;
+    padding-left: 26px;
+    box-sizing: border-box;
 }
 .mask{
     position: absolute;

+ 8 - 8
src/components/pages/test/add/components/GapFilling/index.vue

@@ -117,10 +117,10 @@ export default {
 
 <style scoped>
 .choice_box {
-    margin-top: 20px;
+    margin-top: 10px;
     width: 100%;
-    background: #f6f6f6;
-    padding: 10px;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
     box-sizing: border-box;
     position: relative;
 }
@@ -178,11 +178,11 @@ export default {
     font-family: 'Microsoft YaHei';
     min-height: 48px;
     /* border: 1px solid #3682fc00; */
-    border: 1.5px solid #CAD1DC;
+    border: 1px solid #CAD1DC;
 }
 
 .binfo_textarea {
-    border: 1.5px solid #CAD1DC;
+    border: 1px solid #CAD1DC;
     font-size: 16px;
     resize: none;
     /* background: #f6f6f6; */
@@ -190,10 +190,10 @@ export default {
 }
 
 .binfo_input:focus-visible {
-    border: 1.5px solid #3681FC !important;
+    border: 1px solid #3681FC !important;
 }
 
-.jiao::before{
+/* .jiao::before{
     content: '';
     position: absolute;
     width: 0px;
@@ -204,5 +204,5 @@ export default {
     border-right: 12px solid transparent;
     border-bottom: 10px solid #f6f6f6;
     border-top: 10px solid transparent;
-}
+} */
 </style>

+ 30 - 14
src/components/pages/test/add/components/checkOrder.vue

@@ -267,10 +267,11 @@ export default {
 .mc_ti_1 {
     width: 100%;
     min-height: 40px;
-    border: 1px solid #bcbcbc;
-    padding: 10px;
+    /* border: 1px solid #bcbcbc00; */
+    padding: 10px 0 0;
     box-sizing: border-box;
     margin-bottom: 10px;
+    overflow: hidden;
 }
 
 
@@ -280,10 +281,12 @@ export default {
 }
 
 .mc_ti_1>.title {
-    font-size: 20px;
+    font-size: 16px;
     cursor: pointer;
     display: flex;
     align-items: center;
+    width: calc(100% - 20px);
+    margin: 0 auto 10px;
 }
 
 .mc_ti_1_xia,
@@ -296,8 +299,9 @@ export default {
 .mc_ti_2 {
     width: 100%;
     box-sizing: border-box;
-    padding: 10px;
-    border: 1px solid #bcbcbc;
+    padding: 10px 0 0;
+    /* border: 1px solid #bcbcbc00; */
+    overflow: hidden;
 }
 
 .mc_ti_2+.mc_ti_2 {
@@ -306,18 +310,20 @@ export default {
 
 .mc_ti_2>.title {
     cursor: pointer;
-    font-size: 18px;
+    font-size: 16px;
     display: flex;
     align-items: center;
     word-break: break-all;
+    width: calc(100% - 20px);
+    margin: 0 auto 10px;
 }
 
-
 .mc_ti_3 {
-    padding: 10px;
+    padding: 10px 0 0;
     width: 100%;
     box-sizing: border-box;
-    border: 1px solid #bcbcbc;
+    /* border: 1px solid #bcbcbc00; */
+    overflow: hidden;
 }
 
 .mc_ti_3+.mc_ti_3 {
@@ -328,16 +334,19 @@ export default {
     cursor: pointer;
     display: flex;
     align-items: center;
+    width: calc(100% - 20px);
+    margin: 0 auto 10px;
 }
 
 .mc_ti_1>.title>.drag,
 .mc_ti_2>.title>.drag,
 .mc_ti_3>.title>.drag {
     display: block;
-    background-image: url('../../../../../assets/icon/new/icon_course_drag.png');
+    background-image: url('../../../../../assets/icon/test/drag_icon.png');
     background-size: 100% 100%;
-    min-width: 20px;
-    min-height: 20px;
+    min-width: 16px;
+    min-height: 16px;
+    margin-right: 10px;
     cursor: pointer;
 }
 
@@ -392,11 +401,18 @@ export default {
 .mc_ti_1.active,
 .mc_ti_2.active,
 .mc_ti_3.active {
-    border: 1px solid #0062ff;
+    /* border: 1px solid #0062ff; */
+    background: rgb(239, 240, 241);
+}
+
+.mc_ti_1.active>.title>.drag,
+.mc_ti_2.active>.title>.drag,
+.mc_ti_3.active>.title>.drag{
+    background-image: url('../../../../../assets/icon/test/drag_icon_active.png');
 }
 
 .edit_box {
     width: 100%;
     box-sizing: border-box;
-    padding: 10px;
+    padding: 10px 0 0;
 }</style>

+ 4 - 1
src/components/pages/test/add/components/choice/choice.vue

@@ -34,8 +34,11 @@ export default {
 
 <style scoped>
 .c_box {
-    width: 100%;
+    width: calc(100% - 20px);
     position: relative;
+    margin: 0 auto;
+    padding-left: 26px;
+    box-sizing: border-box;
 }
 .mask{
     position: absolute;

+ 5 - 5
src/components/pages/test/add/components/choice/index.vue

@@ -126,10 +126,10 @@ export default {
 
 <style scoped>
 .choice_box {
-    margin-top: 20px;
+    margin-top: 10px;
     width: 100%;
-    background: #f6f6f6;
-    padding: 10px;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
     box-sizing: border-box;
     position: relative;
 }
@@ -224,7 +224,7 @@ export default {
     margin-top: 10px;
 }
 
-.jiao::before{
+/* .jiao::before{
     content: '';
     position: absolute;
     width: 0px;
@@ -235,5 +235,5 @@ export default {
     border-right: 12px solid transparent;
     border-bottom: 10px solid #f6f6f6;
     border-top: 10px solid transparent;
-}
+} */
 </style>

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

@@ -42,8 +42,11 @@ export default {
 
 <style scoped>
 .c_box {
-    width: 100%;
+    width: calc(100% - 20px);
     position: relative;
+    margin: 0 auto;
+    padding-left: 26px;
+    box-sizing: border-box;
 }
 .mask{
     position: absolute;

+ 8 - 8
src/components/pages/test/add/components/file/index.vue

@@ -117,10 +117,10 @@ export default {
 
 <style scoped>
 .choice_box {
-    margin-top: 20px;
+    margin-top: 10px;
     width: 100%;
-    background: #f6f6f6;
-    padding: 10px;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
     box-sizing: border-box;
     position: relative;
 }
@@ -178,11 +178,11 @@ export default {
     font-family: 'Microsoft YaHei';
     min-height: 48px;
     /* border: 1px solid #3682fc00; */
-    border: 1.5px solid #CAD1DC;
+    border: 1px solid #CAD1DC;
 }
 
 .binfo_textarea {
-    border: 1.5px solid #CAD1DC;
+    border: 1px solid #CAD1DC;
     font-size: 16px;
     resize: none;
     /* background: #f6f6f6; */
@@ -190,10 +190,10 @@ export default {
 }
 
 .binfo_input:focus-visible {
-    border: 1.5px solid #3681FC !important;
+    border: 1px solid #3681FC !important;
 }
 
-.jiao::before{
+/* .jiao::before{
     content: '';
     position: absolute;
     width: 0px;
@@ -204,5 +204,5 @@ export default {
     border-right: 12px solid transparent;
     border-bottom: 10px solid #f6f6f6;
     border-top: 10px solid transparent;
-}
+} */
 </style>

+ 3 - 1
src/components/pages/test/check/check.vue

@@ -49,7 +49,7 @@
               <el-button type="primary" size="small" @click="publish">确定批改</el-button>
             </div>
           </div>
-          <topicVue :cJson="cJson" :title="title" :checktype="2" :see="see" :isTeacher="1" :name="name" ref="topicVue"></topicVue>
+          <topicVue :cJson="cJson" :title="title" :brief="brief" :checktype="2" :see="see" :isTeacher="1" :name="name" ref="topicVue"></topicVue>
         </div>
       </div>
     </div>
@@ -73,6 +73,7 @@ export default {
       cid: this.$route.query.cid,
       steps: 1,
       title: "",
+      brief: "",
       id:"",
       testType: [],
       see: true,
@@ -113,6 +114,7 @@ export default {
           // this.cJson = JSON.parse(res.data[0][0].chapters);
           this.$forceUpdate();
           this.title = res.data[0][0].title;
+          this.brief = res.data[0][0].brief;
 
           this.testType = [];
           for (var i = 0; i < res.data[1].length; i++) {

+ 134 - 64
src/components/pages/test/index.vue

@@ -88,17 +88,30 @@
                     </div> -->
                     <div class="test_box" v-for="(item, index) in course" :key="index">
                         <div class="test_top">
-                            <div class="test_top_img" :class="{ gr: item.typeid == 'afc3f97f-2429-408d-8dcd-5e63a44d355a', md: item.typeid == '478bcccd-e3a1-472b-aa29-3ed7bc479469', jy: item.typeid == '178a377a-b4f1-4a75-b3c3-2787a7c98784', yy: item.typeid == 'dda9728e-5f11-469e-89ee-aca518daf223'}"></div>
+                            <div class="test_top_img" v-if="!item.typeN"></div>
+                            <el-tooltip :content="item.typeN" placement="top" effect="dark" v-else>
+                                <div class="test_top_img"
+                                    :class="{ gr: item.typeid == 'afc3f97f-2429-408d-8dcd-5e63a44d355a', md: item.typeid == '478bcccd-e3a1-472b-aa29-3ed7bc479469', jy: item.typeid == '178a377a-b4f1-4a75-b3c3-2787a7c98784', yy: item.typeid == 'dda9728e-5f11-469e-89ee-aca518daf223' }">
+                                </div>
+                            </el-tooltip>
                             <div class="test_top_title">
                                 <span>{{ item.title }}</span>
                                 <span>创建人:{{ item.uname }}</span>
                             </div>
                         </div>
                         <div class="test_time">
-                            <span>创建日期:</span>{{ item.time }}
+                            <span>创建日期:</span><span>{{ item.time }}</span>
                         </div>
                         <div class="test_time">
-                            <span>修改日期:</span>{{ item.utime }}
+                            <span>修改日期:</span><span>{{ item.utime }}</span>
+                        </div>
+                        <div class="test_time">
+                            <span>分类:</span>
+                            <span v-if="!item.typename">未设置分类</span>
+                            <el-tooltip :content="item.typename" placement="top" effect="dark" v-else>
+                                <!-- content to trigger tooltip here -->
+                                <span>{{ item.typename }}</span>
+                            </el-tooltip>
                         </div>
                         <div class="test_btn">
                             <div class="test_o_btn">
@@ -114,7 +127,7 @@
                                     <span @click="deleteCourse(item.courseId)"></span>
                                 </el-tooltip>
                             </div>
-                            <div class="test_type" :class="{no:item.look == '1',is:item.look == '2'}">
+                            <div class="test_type" :class="{ no: item.look == '1', is: item.look == '2' }">
                                 <span>{{ item.look == '1' ? '未发布' : '已发布' }}</span>
                             </div>
                         </div>
@@ -759,6 +772,38 @@ export default {
 </script>
   
 <style scoped>
+@media screen and (max-width: 1380px) {
+    .test_box {
+        width: calc(100% / 4 - (15px * 3) / 4) !important;
+    }
+
+    .test_box:nth-child(5n) {
+        margin-right: 15px !important;
+    }
+
+    .test_box:nth-child(4n) {
+        margin-right: 0 !important;
+    }
+}
+
+@media screen and (max-width: 1080px) {
+    .test_box {
+        width: calc(100% / 3 - (15px * 2) / 3) !important;
+    }
+
+    .test_box:nth-child(5n) {
+        margin-right: 15px !important;
+    }
+
+    .test_box:nth-child(4n) {
+        margin-right: 15px !important;
+    }
+
+    .test_box:nth-child(3n) {
+        margin-right: 0 !important;
+    }
+}
+
 .dialog_diy>>>.el-dialog__header {
     background: #3d67bc !important;
     padding: 15px 20px;
@@ -797,6 +842,7 @@ export default {
     align-items: baseline;
     flex-direction: row;
     flex-wrap: wrap;
+    padding: 0 0 15px;
 }
 
 .top {
@@ -1085,6 +1131,7 @@ export default {
 
 .head_left {
     display: flex;
+    margin-top: 15px;
 }
 
 .student_input>>>.el-input__inner {
@@ -1105,12 +1152,13 @@ export default {
 }
 
 .all_choose {
-    margin: 15px 0 10px;
-    height: 20%;
+    /* margin: 15px 0 10px; */
+    /* height: 20%; */
     display: flex;
     flex-direction: row;
     align-items: center;
-    max-width: calc(100% / 4 - 50px);
+    max-width: 180px;
+    width: 180px;
 }
 
 .all_choose>span {
@@ -1127,38 +1175,19 @@ export default {
     align-content: space-between;
     height: 100%;
     justify-content: flex-start;
-    width: 60%;
-    min-width: 868px;
+    /* width: 60%; */
+    /* min-width: 868px; */
     align-items: center;
 }
 
-.choose>div:nth-child(2) {
-    margin-left: 10px;
-    width: calc(100% / 4 - 50px)
-}
-
-.choose>div:nth-child(3) {
-    margin-left: 10px;
-    width: calc(100% / 4 - 50px)
-}
-
-.choose>div:nth-child(4) {
+.choose>div {
     margin-left: 10px;
-    width: calc(100% / 4 - 50px)
-}
-
-.choose>div:nth-child(5) {
-    margin: 5px 0 0 1%;
+    width: 180px;
+    margin-top: 15px;
 }
 
-.choose>div:nth-child(4)>span {
-    /* width: 74px !important;
-    min-width: 74px; */
-}
-
-.choose>div:nth-child(4)>>>.el-select {
-    /* width: 217.5px;
-    min-width: 215.06px; */
+.choose>.clear {
+    width: 70px
 }
 
 .clear {
@@ -1254,42 +1283,53 @@ export default {
 }
 
 .test_box {
-    width: 250px;
+    width: calc(100% / 5 - (15px * 4) / 5);
+    /* width: 250px; */
     background: #fff;
-    margin-right: 25px;
     border-radius: 5px;
     padding: 20px;
     margin: 5px 15px 10px 0;
+    box-sizing: border-box;
+}
+
+.test_box:nth-child(5n) {
+    margin-right: 0;
 }
 
-.test_top{
+.test_top {
     width: 100%;
     display: flex;
     align-items: center;
 }
-.test_top > .test_top_img{
+
+.test_top>.test_top_img {
     height: 40px;
     width: 40px;
     background: rgb(108 150 217);
     margin-right: 10px;
     border-radius: 5px;
-    display:flex;
+    display: flex;
     align-items: center;
     justify-content: center;
 }
-.test_top > .gr{
+
+.test_top>.gr {
     background: rgb(142, 189, 176);
 }
-.test_top > .md{
+
+.test_top>.md {
     background: rgb(139, 174, 227);
 }
-.test_top > .js{
+
+.test_top>.js {
     background: rgb(64, 149, 174);
 }
-.test_top > .yy{
+
+.test_top>.yy {
     background: rgb(98, 102, 188);
 }
-.test_top > .test_top_img:after{
+
+.test_top>.test_top_img:after {
     content: '';
     display: block;
     width: 23px;
@@ -1297,26 +1337,32 @@ export default {
     background-size: 100% 100%;
     background-image: url('../../../assets/icon/test/all_icon_b.png');
 }
-.test_top > .gr:after{
+
+.test_top>.gr:after {
     background-image: url('../../../assets/icon/test/gr_icon_b.png');
 }
-.test_top > .md:after{
+
+.test_top>.md:after {
     background-image: url('../../../assets/icon/test/md_icon_b.png');
 }
-.test_top > .js:after{
+
+.test_top>.js:after {
     background-image: url('../../../assets/icon/test/js_icon_b.png');
 }
-.test_top > .yy:after{
+
+.test_top>.yy:after {
     background-image: url('../../../assets/icon/test/yy_icon_b.png');
 }
-.test_top > .test_top_title{
+
+.test_top>.test_top_title {
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     height: 40px;
     width: calc(100% - 40px - 10px)
 }
-.test_top > .test_top_title > span{
+
+.test_top>.test_top_title>span {
     width: 100;
     display: block;
     word-break: break-all;
@@ -1324,63 +1370,87 @@ export default {
     text-overflow: ellipsis;
     white-space: nowrap;
 }
-.test_top > .test_top_title > span:nth-child(1){
+
+.test_top>.test_top_title>span:nth-child(1) {
     font-size: 15px;
 }
-.test_top > .test_top_title > span:nth-child(2){
+
+.test_top>.test_top_title>span:nth-child(2) {
     font-size: 14px;
     color: rgb(58, 131, 252);
 }
 
-.test_box > .test_time{
+.test_box>.test_time {
     margin-top: 10px;
     font-size: 14px;
     color: #a7a7a7;
+    display: flex;
+}
+
+.test_box>.test_time>span:nth-child(1) {
+    width: 70px;
+    text-align: right;
+    display: block;
+}
+
+.test_box>.test_time>span:nth-child(2) {
+    width: calc(100% - 70px);
+    overflow: hidden;
+    display: block;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    word-break: break-all;
 }
 
-.test_box > .test_btn{
+.test_box>.test_btn {
     margin-top: 10px;
-    display:flex;
+    display: flex;
     align-items: center;
     justify-content: space-between;
 }
 
-.test_box > .test_btn > .test_o_btn{
+.test_box>.test_btn>.test_o_btn {
     display: flex;
     align-items: center;
 }
-.test_box > .test_btn > .test_o_btn > span{
+
+.test_box>.test_btn>.test_o_btn>span {
     display: block;
     width: 14px;
     height: 14px;
     background-size: 100% 100%;
     cursor: pointer;
 }
-.test_box > .test_btn > .test_o_btn > .edit{
+
+.test_box>.test_btn>.test_o_btn>.edit {
     background-image: url('../../../assets/icon/test/edit_test_icon.png');
     margin-right: 20px;
 }
-.test_box > .test_btn > .test_o_btn > .check{
+
+.test_box>.test_btn>.test_o_btn>.check {
     background-image: url('../../../assets/icon/test/check_test_icon.png');
     margin-right: 20px;
 }
-.test_box > .test_btn > .test_o_btn > .delete{
+
+.test_box>.test_btn>.test_o_btn>.delete {
     background-image: url('../../../assets/icon/test/delete_test_icon.png');
 }
 
-.test_box > .test_btn > .test_type{
+.test_box>.test_btn>.test_type {
     font-size: 12px;
     border-radius: 5px;
     border: 1.5px solid;
     padding: 3px 8px;
 }
-.test_box > .test_btn > .is{
+
+.test_box>.test_btn>.is {
     color: rgb(57, 204, 127);
-    background-color: rgba(57, 204, 127,.1);
+    background-color: rgba(57, 204, 127, .1);
 }
-.test_box > .test_btn > .no{
+
+.test_box>.test_btn>.no {
     color: rgb(235, 154, 96);
-    background-color: rgba(235, 154, 96,.1);
+    background-color: rgba(235, 154, 96, .1);
 }
 </style>
   

+ 88 - 16
src/components/pages/testStudent/index.vue

@@ -32,7 +32,7 @@
               <el-option value="0" label="全部"></el-option>
               <el-option value="1" label="已完成"></el-option>
               <el-option value="2" label="未完成"></el-option>
-              <el-option value="3" label="已批改"></el-option>
+              <!-- <el-option value="3" label="已批改"></el-option> -->
             </el-select>
             <!-- <el-select v-model="groupA" @change="search" v-else>
                 <el-option value="4" label="全部"></el-option>
@@ -79,19 +79,30 @@
           </div> -->
           <div class="test_box" v-for="(item, index) in course" :key="index">
             <div class="test_top">
-              <div class="test_top_img"
-                :class="{ gr: item.typeid == 'afc3f97f-2429-408d-8dcd-5e63a44d355a', md: item.typeid == '478bcccd-e3a1-472b-aa29-3ed7bc479469', jy: item.typeid == '178a377a-b4f1-4a75-b3c3-2787a7c98784', yy: item.typeid == 'dda9728e-5f11-469e-89ee-aca518daf223' }">
-              </div>
+              <div class="test_top_img" v-if="!item.typeN"></div>
+              <el-tooltip :content="item.typeN" placement="top" effect="dark" v-else>
+                <div class="test_top_img"
+                  :class="{ gr: item.typeid == 'afc3f97f-2429-408d-8dcd-5e63a44d355a', md: item.typeid == '478bcccd-e3a1-472b-aa29-3ed7bc479469', jy: item.typeid == '178a377a-b4f1-4a75-b3c3-2787a7c98784', yy: item.typeid == 'dda9728e-5f11-469e-89ee-aca518daf223' }">
+                </div>
+              </el-tooltip>
               <div class="test_top_title">
                 <span>{{ item.title }}</span>
                 <span>创建人:{{ item.uname }}</span>
               </div>
             </div>
             <div class="test_time">
-              <span>创建日期:</span>{{ item.time }}
+              <span>创建日期:</span><span>{{ item.time }}</span>
             </div>
             <div class="test_time">
-              <span>修改日期:</span>{{ item.utime }}
+              <span>修改日期:</span><span>{{ item.utime }}</span>
+            </div>
+            <div class="test_time tset_type">
+              <span>分类:</span>
+              <span v-if="!item.typename">未设置分类</span>
+              <el-tooltip :content="item.typename" placement="top" effect="dark" v-else>
+                <!-- content to trigger tooltip here -->
+                <span>{{ item.typename }}</span>
+              </el-tooltip>
             </div>
             <div class="test_btn">
               <div class="test_o_btn">
@@ -105,7 +116,7 @@
             </div>
             <div class="three_bottom">
               <!-- <div @click="checkTest(item.courseId)" v-if="item.type == 3 || item.type == 2">查看答题</div> -->
-              <div @click="goToCourse2(item.courseId)">{{ item.testCount > 0 ? item.type == 1 ? '继续答题' : '继续答题' : '进入答题'
+              <div @click="goToCourse2(item.courseId)">{{ item.testCount > 0 ? item.type == 1 ? '再次答题' : '再次答题' : '开始答题'
               }}</div>
             </div>
           </div>
@@ -764,6 +775,38 @@ export default {
 </script>
   
 <style scoped>
+@media screen and (max-width: 1380px) {
+  .test_box {
+    width: calc(100% / 4 - (15px * 3) / 4) !important;
+  }
+
+  .test_box:nth-child(5n) {
+    margin-right: 15px !important;
+  }
+
+  .test_box:nth-child(4n) {
+    margin-right: 0 !important;
+  }
+}
+
+@media screen and (max-width: 1080px) {
+  .test_box {
+    width: calc(100% / 3 - (15px * 2) / 3) !important;
+  }
+
+  .test_box:nth-child(5n) {
+    margin-right: 15px !important;
+  }
+
+  .test_box:nth-child(4n) {
+    margin-right: 15px !important;
+  }
+
+  .test_box:nth-child(3n) {
+    margin-right: 0 !important;
+  }
+}
+
 .dialog_diy>>>.el-dialog__header {
   background: #3d67bc !important;
   padding: 15px 20px;
@@ -802,6 +845,7 @@ export default {
   align-items: baseline;
   flex-direction: row;
   flex-wrap: wrap;
+  padding: 0 0 15px;
 }
 
 .top {
@@ -1108,6 +1152,7 @@ export default {
 
 .head_left {
   display: flex;
+  margin-top: 15px;
 }
 
 .student_input>>>.el-input__inner {
@@ -1128,12 +1173,12 @@ export default {
 }
 
 .all_choose {
-  margin: 15px 0 10px;
-  height: 20%;
+  /* margin: 15px 0 10px;
+  height: 20%; */
   display: flex;
   flex-direction: row;
   align-items: center;
-  max-width: calc(100% / 4 - 50px);
+  /* max-width: calc(100% / 4 - 50px); */
 }
 
 .all_choose>span {
@@ -1150,14 +1195,20 @@ export default {
   align-content: space-between;
   height: 100%;
   justify-content: flex-start;
-  width: 60%;
-  min-width: 868px;
+  /* width: 60%;
+  min-width: 868px; */
   align-items: center;
 }
 
 .choose>div {
   margin-right: 10px;
-  width: calc(100% / 4 - 50px)
+  /* width: calc(100% / 4 - 50px) */
+  width: 180px;
+  margin-top: 15px;
+}
+
+.choose>.clear {
+  width: 70px;
 }
 
 /* 
@@ -1272,12 +1323,18 @@ export default {
 }
 
 .test_box {
-  width: 250px;
+  width: calc(100% / 5 - (15px * 4) / 5);
+  /* width: 250px; */
   background: #fff;
   margin-right: 25px;
   border-radius: 5px;
   padding: 20px;
   margin: 5px 15px 10px 0;
+  box-sizing: border-box;
+}
+
+.test_box:nth-child(5n) {
+  margin-right: 0;
 }
 
 .test_top {
@@ -1368,6 +1425,22 @@ export default {
   margin-top: 10px;
   font-size: 14px;
   color: #a7a7a7;
+  display: flex;
+}
+
+.test_box>.test_time > span:nth-child(1){
+  width: 70px;
+  text-align: right;
+  display: block;
+}
+
+.test_box>.test_time > span:nth-child(2){
+  width: calc(100% - 70px);
+  overflow: hidden;
+  display: block;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  word-break: break-all;
 }
 
 .test_box>.test_btn {
@@ -1412,9 +1485,8 @@ export default {
   background-color: rgba(255, 173, 31, .1);
 }
 
-.test_box .three_bottom{
+.test_box .three_bottom {
   margin-top: 10px;
 }
-
 </style>
   

+ 4 - 2
src/components/pages/testStudent/view/check.vue

@@ -39,7 +39,7 @@
             <div class="op_btn">
             </div>
           </div>
-          <topicVue :cJson="cJson" :title="title" :checktype='2' :see="see"></topicVue>
+          <topicVue :cJson="cJson" :title="title" :brief="brief" :checktype='2' :see="see"></topicVue>
         </div>
       </div>
     </div>
@@ -63,6 +63,7 @@ export default {
       type: this.$route.query.type,
       steps: 1,
       title: "",
+      brief: "",
       testType: [],
       see: false,
       cJson: [],
@@ -110,8 +111,8 @@ export default {
         .get(this.$store.state.api + "getTestWorks2", params)
         .then((res) => {
           // this.cJson = JSON.parse(res.data[0][0].chapters);
-          this.$forceUpdate();
           this.title = res.data[0][0].title;
+          this.brief = res.data[0][0].brief;
           this.see = res.data[0][0].open == 1 ? true : false;
           this.testType = [];
           for (var i = 0; i < res.data[1].length; i++) {
@@ -123,6 +124,7 @@ export default {
           
           this.cJson = JSON.parse(res.data[2][0].courseJson)
           this.loading = false
+          this.$forceUpdate();
 
         })
         .catch((err) => {

+ 13 - 0
src/components/pages/testStudent/view/component/topic.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="c_box">
     <div class="c_box_title">{{ title }}</div>
+    <div class="c_box_brief" v-if="brief">{{ brief }}</div>
     <div class="c_box_score">
       <span>总分:{{ score }}</span>
       <span v-if="name" style="margin-left: 10px;">答题人:{{ name }}</span>
@@ -71,6 +72,9 @@ export default {
     title: {
       type: String,
     },
+    brief:{
+      type: String
+    },
     checktype: {
       type: Number,
       default: 1,
@@ -237,6 +241,15 @@ export default {
   margin: 10px auto;
 }
 
+.c_box_brief{
+  width: 50%;
+  text-align: center;
+  font-size: 14px;
+  word-break: break-all;
+  margin: 10px auto;
+  color: #373737;
+}
+
 .c_box_score {
   width: 90%;
   text-align: center;

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

@@ -43,7 +43,7 @@
               <el-button type="primary" size="small" @click="publish">提交</el-button>
             </div>
           </div>
-          <topicVue :cJson="cJson" :title="title" ref="topicVue" v-if="!loading"></topicVue>
+          <topicVue :cJson="cJson" :title="title" :brief="brief" ref="topicVue" v-if="!loading"></topicVue>
         </div>
       </div>
     </div>
@@ -67,6 +67,7 @@ export default {
       type: this.$route.query.type,
       steps: 1,
       title: "",
+      brief: "",
       testType: [],
       see: false,
       cJson: [],
@@ -291,6 +292,7 @@ export default {
           this.cJson = JSON.parse(res.data[0][0].chapters);
           this.cJson2 = JSON.parse(res.data[0][0].chapters);
           this.title = res.data[0][0].title;
+          this.brief = res.data[0][0].brief;
 
           this.see = res.data[0][0].open == 1 ? true : false;
 

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