lsc 1 năm trước cách đây
mục cha
commit
9b40a4622f
47 tập tin đã thay đổi với 1307 bổ sung100 xóa
  1. 1 1
      dist/index.html
  2. 0 0
      dist/static/css/app.00165a60bfb135e8cc880a8c98438bde.css
  3. 0 0
      dist/static/css/app.00165a60bfb135e8cc880a8c98438bde.css.map
  4. 0 0
      dist/static/css/app.858ab99d180883df91741dbad60fc7be.css.map
  5. BIN
      dist/static/img/all_icon.0948957.png
  6. BIN
      dist/static/img/all_icon_active.cbb6ba1.png
  7. BIN
      dist/static/img/gr_icon_active.4880043.png
  8. BIN
      dist/static/img/jy_icon_active.e1a377f.png
  9. BIN
      dist/static/img/md_icon.78a1668.png
  10. BIN
      dist/static/img/teacher.1b451c4.jpg
  11. BIN
      dist/static/img/yy_icon_active.f456dc5.png
  12. 0 0
      dist/static/js/app.0636562cc50d51b3d89c.js
  13. 0 0
      dist/static/js/app.3f3740c7f5a6a97877e4.js
  14. 0 0
      dist/static/js/app.3f3740c7f5a6a97877e4.js.map
  15. 0 0
      dist/static/js/manifest.3512a67a6213c2df4180.js.map
  16. BIN
      src/assets/icon/test/all_icon.png
  17. BIN
      src/assets/icon/test/all_icon_active.png
  18. BIN
      src/assets/icon/test/check_icon.png
  19. BIN
      src/assets/icon/test/edit-icon.png
  20. BIN
      src/assets/icon/test/edit_icon.png
  21. BIN
      src/assets/icon/test/gr_icon.png
  22. BIN
      src/assets/icon/test/gr_icon_active.png
  23. BIN
      src/assets/icon/test/jy_icon.png
  24. BIN
      src/assets/icon/test/jy_icon_active.png
  25. BIN
      src/assets/icon/test/md_icon.png
  26. BIN
      src/assets/icon/test/md_icon_active.png
  27. BIN
      src/assets/icon/test/paste_icon.png
  28. BIN
      src/assets/icon/test/teacher.jpg
  29. BIN
      src/assets/icon/test/yy_icon.png
  30. BIN
      src/assets/icon/test/yy_icon_active.png
  31. BIN
      src/assets/icon/test/zong_1.png
  32. BIN
      src/assets/icon/test/zong_2.png
  33. BIN
      src/assets/icon/test/zong_3.png
  34. 11 6
      src/components/pages/test/add/addTest.vue
  35. 103 21
      src/components/pages/test/add/setInfo/index.vue
  36. 3 2
      src/components/pages/test/check/check.vue
  37. 2 0
      src/components/pages/test/check/index.vue
  38. 40 10
      src/components/pages/test/index.vue
  39. 59 0
      src/components/pages/testPerson/index.vue
  40. 173 0
      src/components/pages/testPerson/info/index.vue
  41. 119 0
      src/components/pages/testPerson/panel/index.vue
  42. 588 0
      src/components/pages/testPerson/test/index.vue
  43. 59 20
      src/components/pages/testStudent/index.vue
  44. 39 13
      src/components/pages/testStudent/view/check.vue
  45. 1 1
      src/components/pages/testStudent/view/component/topic.vue
  46. 101 26
      src/components/pages/testStudent/view/preview.vue
  47. 8 0
      src/router/index.js

+ 1 - 1
dist/index.html

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

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.00165a60bfb135e8cc880a8c98438bde.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.00165a60bfb135e8cc880a8c98438bde.css.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.858ab99d180883df91741dbad60fc7be.css.map


BIN
dist/static/img/all_icon.0948957.png


BIN
dist/static/img/all_icon_active.cbb6ba1.png


BIN
dist/static/img/gr_icon_active.4880043.png


BIN
dist/static/img/jy_icon_active.e1a377f.png


BIN
dist/static/img/md_icon.78a1668.png


BIN
dist/static/img/teacher.1b451c4.jpg


BIN
dist/static/img/yy_icon_active.f456dc5.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.0636562cc50d51b3d89c.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.3f3740c7f5a6a97877e4.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.3f3740c7f5a6a97877e4.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


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


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


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


BIN
src/assets/icon/test/edit-icon.png


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


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


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


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


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


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


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


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


BIN
src/assets/icon/test/teacher.jpg


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


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


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


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


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


+ 11 - 6
src/components/pages/test/add/addTest.vue

@@ -25,7 +25,7 @@
                 </div>
                 <div class="step_box" :style="{ width: steps == 2 && '100%' }">
                     <setInfo v-if="steps == 1 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
-                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson"></setInfo>
+                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid" :brief.sync="brief"></setInfo>
                     <editInfo v-if="steps == 2 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
                         :cJson.sync="cJson" @save="save" @publish="publish"></editInfo>
                 </div>
@@ -55,6 +55,8 @@ export default {
             cJson: [],
             loading:false,
             look:"",
+            typeid:"",
+            brief:"",
         }
     },
     watch: {
@@ -121,7 +123,7 @@ export default {
                 {
                     uid: this.userid,
                     title: this.title.replace(/%/g, "%25"),
-                    brief: "",
+                    brief: this.brief.replace(/%/g, "%25"),
                     cover: "",
                     evaId: "",
                     astudent: "",
@@ -131,10 +133,11 @@ export default {
                     courseType: JSON.stringify(this.testType),
                     ateacher: "",
                     inviteCode: "",
+                    typeid: this.typeid ? this.typeid : '',
                 },
             ];
             this.ajax
-                .post(this.$store.state.api + "addTestCourse", params)
+                .post(this.$store.state.api + "addTestCourse2", params)
                 .then((res) => {
                     this.cid = res.data.courseId;
                     if(look == 5){
@@ -162,7 +165,7 @@ export default {
                 {
                     cid: this.cid,
                     title: this.title.replace(/%/g, "%25"),
-                    brief: "",
+                    brief: this.brief.replace(/%/g, "%25"),
                     cover: "",
                     evaId: "",
                     astudent: "",
@@ -173,10 +176,11 @@ export default {
                     ateacher: "",
                     inviteCode: "",
                     look: look == 3 ? 2 : look == 4 ? this.look : look == 5 ? this.look : look,
+                    typeid: this.typeid ? this.typeid : '',
                 },
             ];
             this.ajax
-                .post(this.$store.state.api + "updateTestCourse", params)
+                .post(this.$store.state.api + "updateTestCourse2", params)
                 .then((res) => {
                     if(look == 3){
                         this.$message.success("发布成功")
@@ -231,7 +235,8 @@ export default {
 
                         this.see = res.data[0][0].open == 1 ? true : false;
 
-              
+                        this.typeid = res.data[0][0].typeid;
+                        this.brief = res.data[0][0].brief;
                         this.testType = [];
                         for (var i = 0; i < res.data[1].length; i++) {
                             this.testType.push(res.data[1][i].typeid);

+ 103 - 21
src/components/pages/test/add/setInfo/index.vue

@@ -11,16 +11,26 @@
                                     <div class="course_input_box">
                                         <div class="bb_courseIcon"><img src="../../../../../assets/icon/new/course.png" />
                                         </div>
-                                        <input @input="titleChange" type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName"
+                                        <input @input="titleChange" type="text" placeholder="请输入课程名称" class="binfo_input"
+                                            v-model="courseName"
                                             style="border: 1.5px solid rgb(202, 209, 220);margin: 0px 10px 0px 0px;border-radius: 5px;font-weight: 600;padding: 12px 14px 12px 71px;" />
-                                        <el-switch v-model="isTeacherSee" active-text="允许学生回答后查看正确答案"
+                                        <el-switch v-model="isTeacherSee" active-text="允许回答后查看正确答案"
                                             style="justify-content: center;" @change="seeChange"></el-switch>
                                     </div>
                                 </div>
                             </div>
+                            <div class="typeBox" v-if="typeArray.length">
+                                <span>类型:</span>
+                                <el-select v-model="typeCheck" placeholder="选择类型" clearable @change="typeChange2">
+                                    <el-option v-for="(item, index) in typeArray" :key="index" :label="item.name"
+                                        :value="item.id"></el-option>
+                                </el-select>
+
+                            </div>
                             <div class="both">
                                 <div class="choose">
-                                    <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index" @change="typeChange">
+                                    <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+                                        @change="typeChange">
                                         <span v-if="CourseTypeJson[item.id].length > 0">{{ item.name }}:</span>
                                         <el-checkbox-group v-model="courseTypeId" v-if="CourseTypeJson[item.id].length > 0">
                                             <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
@@ -30,6 +40,14 @@
                                     </div>
                                 </div>
                             </div>
+                            <div class="whiteBg" style="border-radius: 0; margin-top: 0px">
+                                <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">测评描述</div>
+                                <div style="width: 100%;box-sizing: border-box;">
+                                <div style="width: calc((100%))">
+                                    <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText" placeholder="测评描述" @change="briefChange"></textarea>
+                                </div>
+                                </div>
+                            </div>
                         </div>
                     </div>
                 </div>
@@ -47,7 +65,7 @@
                             <el-button type="primary" size="mini" @click="openAiCreate">智能创建</el-button>
                             <el-button type="primary" size="mini" @click="nextSteps">跳过</el-button>
                         </div>
-                        
+
                     </div>
                     <div class="c_info_tab_box">
                         <manualCreate v-if="type == 2" :manualJson.sync="manualJson" @nextSteps="nextSteps"></manualCreate>
@@ -68,20 +86,26 @@ export default {
         aiCreate
     },
     props: {
-        title:{
+        title: {
             type: String
         },
-        testType:{
+        testType: {
             type: Array
         },
-        see:{
+        see: {
             type: Boolean
         },
-        steps:{
+        steps: {
             type: Number
         },
-        cJson:{
-            type:Array
+        cJson: {
+            type: Array
+        },
+        typeid:{
+            type: String
+        },
+        brief:{
+            type: String
         }
     },
     data() {
@@ -92,10 +116,28 @@ export default {
             courseName: "",
             isTeacherSee: false,
             type: 2,
-            manualJson:[],
-            aiDialogVisible:false
+            manualJson: [],
+            aiDialogVisible: false,
+            typeArray: [],
+            typeCheck: '',
+            courseText: ''
         }
     },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                el.style.height = `${value}px`
+                } else {
+                el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
     methods: {
         selectAllType() {
             let params = {
@@ -169,28 +211,47 @@ export default {
                     console.error(err);
                 });
         },
-        titleChange(){
+        titleChange() {
             this.$emit("update:title", this.courseName)
         },
-        typeChange(){
+        typeChange() {
             this.$emit("update:testType", this.courseTypeId)
         },
-        seeChange(){
+        seeChange() {
             this.$emit("update:see", this.isTeacherSee)
         },
-        depthCopy(s){
+        typeChange2(){
+            this.$emit("update:typeid", this.typeCheck)
+        },
+        briefChange(){
+            this.$emit("update:brief", this.courseText)
+        },
+        depthCopy(s) {
             return JSON.parse(JSON.stringify(s))
         },
-        openAiCreate(){
+        openAiCreate() {
             this.aiDialogVisible = true
         },
-        nextSteps(){
-            if(this.type == 2){
+        nextSteps() {
+            if (this.type == 2) {
                 this.$emit("update:cJson", this.manualJson)
             }
-            this.$emit('update:steps',this.steps+1)
+            this.$emit('update:steps', this.steps + 1)
             console.log(this.cJson);
             console.log(this.manualJson);
+        },
+        selectType() {
+            let params = {
+                oid: this.oid,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTestType", params)
+                .then((res) => {
+                    this.typeArray = res.data[0];
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
         }
     },
     mounted() {
@@ -198,8 +259,11 @@ export default {
         this.courseName = this.depthCopy(this.title)
         this.isTeacherSee = this.depthCopy(this.see)
         this.manualJson = this.depthCopy(this.cJson)
+        this.typeCheck = this.depthCopy(this.typeid)
+        this.courseText = this.depthCopy(this.brief)
         this.$forceUpdate()
         this.selectAllType();
+        this.selectType();
     }
 }
 </script>
@@ -422,8 +486,26 @@ export default {
     overflow: hidden;
 }
 
-.skip_btn{
+.skip_btn {
     position: absolute;
     right: 20px;
 }
+
+.typeBox{
+    margin-top: 20px;
+}
+
+.typeBox > span{
+    font-weight: bold;
+    font-size: 14px;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #CAD1DC;
+  font-size: 16px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: 'Microsoft YaHei';
+}
+
 </style>

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

@@ -66,6 +66,7 @@ export default {
     return {
       userid: this.$route.query.userid,
       userid2: this.$route.query.userid2,
+      tid: this.$route.query.tid,
       oid: this.$route.query.oid,
       org: this.$route.query.org,
       role: this.$route.query.role,
@@ -104,10 +105,10 @@ export default {
       this.loading = true;
       let params = {
         cid: this.cid,
-        uid: this.userid2,
+        tid: this.tid,
       };
       this.ajax
-        .get(this.$store.state.api + "getTestWorks", params)
+        .get(this.$store.state.api + "getTestWorks2", params)
         .then((res) => {
           // this.cJson = JSON.parse(res.data[0][0].chapters);
           this.$forceUpdate();

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

@@ -168,6 +168,8 @@ export default {
           this.userid +
           "&userid2=" +
           row.userid +
+          "&tid=" +
+          row.id +
           "&oid=" +
           this.oid +
           "&org=" +

+ 40 - 10
src/components/pages/test/index.vue

@@ -21,6 +21,12 @@
                             </el-option>
                         </el-select>
                     </div>
+                    <div class="student_search" v-if="typeArray.length">
+                        <span>类型</span>
+                        <el-select v-model="typeCheck" placeholder="请选择" clearable @change="search">
+                                <el-option v-for="(item, index) in typeArray" :key="index" :label="item.name" :value="item.id"></el-option>
+                        </el-select>
+                    </div>
                     <div class="student_search">
                         <span>所有者</span>
                         <el-select v-model="groupA" @change="search">
@@ -206,6 +212,8 @@ export default {
             isChoose: 0,
             problemCourse: null, //查看提问的项目
             courseTeam: [],
+            typeArray:[],
+            typeCheck:"",
         };
     },
     methods: {
@@ -397,6 +405,8 @@ export default {
                     this.courseTypeId[this.CourseType[0][i].id] = "";
                 }
             }
+            this.typeCheck = ''
+            this.page = 1
             this.getCourse();
         },
         getCourse() {
@@ -422,7 +432,7 @@ export default {
                         } else if (this.CourseType[0][i].name == "项目类型") {
                             typed = this.courseTypeId[this.CourseType[0][i].id];
                         } else if (this.CourseType[0][i].name == "主题") {
-                            typef = this.courseTypeId[this.CourseType[0][i].id];
+                            // typef = this.courseTypeId[this.CourseType[0][i].id];
                         }
                         this.courseTypeSon.push(
                             this.courseTypeId[this.CourseType[0][i].id]
@@ -440,7 +450,7 @@ export default {
                 typeb: typeb != undefined ? typeb : "",
                 typec: typec != undefined ? typec : "",
                 typed: typed != undefined ? typed : "",
-                typef: typef != undefined ? typef : "",
+                typef: this.typeCheck,
                 typeE: typeE.join(","),
                 cu: "",
                 cn: this.courseName,
@@ -573,6 +583,19 @@ export default {
                     console.error(err);
                 });
         },
+        selectTestType() {
+            let params = {
+                oid: this.oid,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTestType", params)
+                .then((res) => {
+                    this.typeArray = res.data[0];
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
         selectType() {
             this.ajax
                 .get(this.$store.state.api + "selectStudentType")
@@ -704,6 +727,7 @@ export default {
         this.page = 1;
         this.selectAllType();
         this.getCourse();
+        this.selectTestType();
     },
 };
 </script>
@@ -767,13 +791,14 @@ export default {
 
 .student_search span {
     margin: 0 10px 0 0;
-    min-width: 65px;
+    min-width: 50px;
+    text-align-last: justify;
 }
 
 .student_button {
     display: flex;
     overflow: hidden;
-    height: 40px;
+    height: 50px;
 }
 
 .upload-demo {
@@ -1052,11 +1077,11 @@ export default {
     display: flex;
     flex-direction: row;
     align-items: center;
-    max-width: calc(100% / 3 - 50px);
+    max-width: calc(100% / 4 - 50px);
 }
 
 .all_choose>span {
-    min-width: 75px;
+    min-width: 50px;
     display: block;
     margin-right: 10px;
     text-align-last: justify;
@@ -1075,13 +1100,18 @@ export default {
 }
 
 .choose>div:nth-child(2) {
-    margin-left: 1%;
-    width: 32.33333%;
+    margin-left: 10px;
+    width: calc(100% / 4 - 50px)
 }
 
 .choose>div:nth-child(3) {
-    margin-left: 1%;
-    width: 32.33333%;
+    margin-left: 10px;
+    width: calc(100% / 4 - 50px)
+}
+
+.choose>div:nth-child(4) {
+    margin-left: 10px;
+    width: calc(100% / 4 - 50px)
 }
 
 .choose>div:nth-child(5) {

+ 59 - 0
src/components/pages/testPerson/index.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="tp_body">
+    <div class="tp_left">
+        <infoA></infoA>
+        <panelA></panelA>
+    </div>
+    <div class="tp_right">
+        <testA :userid="userid" :oid="oid"></testA>
+    </div>
+  </div>
+</template>
+
+<script>
+import infoA from './info/index.vue'
+import panelA from './panel/index.vue'
+import testA from './test/index.vue'
+
+export default {
+    components: {
+        infoA,
+        panelA,
+        testA
+    },
+    data() {
+        return {
+            userid: this.$route.query.userid,
+            oid: this.$route.query.oid,
+            org: this.$route.query.org,
+            role: this.$route.query.role,
+        }
+    },
+    methods: {
+
+    },
+}
+</script>
+
+<style scoped>
+    .tp_body{
+        width: 100%;
+        height: 100%;
+        min-height: 745px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        padding:20px;
+        box-sizing: border-box;
+    }
+
+    .tp_left{
+        width: 230px;
+        height: 100%;
+    }
+    .tp_right{
+        width: calc(100% - 230px - 10px);
+        margin: 0 0 0 10px;
+        height: 100%;
+    }
+</style>

+ 173 - 0
src/components/pages/testPerson/info/index.vue

@@ -0,0 +1,173 @@
+<template>
+  <div class="i_body">
+    <div class="i_top">
+      <div class="img">
+        <img :src="avator" alt="">
+      </div>
+      <div class="name">
+        <span>王晓芳</span>
+      </div>
+      <div class="detail">
+        <span>用心教,用爱导,为每一个学生的成长负责,为每一个学生的未来负责</span>
+      </div>
+    </div>
+    <div class="i_bottom">
+        <div class="i_bottom_span">
+          <span>教研室</span>
+          <span>三年级</span>
+        </div>
+        <div class="i_bottom_span">
+          <span>学科</span>
+          <span>信息技术与应用</span>
+        </div>
+        <div class="i_bottom_span">
+          <span>职务</span>
+          <span>班主任</span>
+        </div>
+        <div class="i_bottom_btn">
+          <span class="edit"></span>
+          <span>编辑个人信息</span>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import avator from '../../../../assets/icon/test/teacher.jpg'
+export default {
+  data() {
+    return {
+      avator: avator
+    }
+  },
+}
+</script>
+
+<style scoped>
+    .i_body{
+        width: 100%;
+        height: calc(55% - 10px);
+        min-height: 420px;
+        background: #fff;
+        border-radius: 5px;
+        margin-bottom: 10px;
+        overflow: hidden;
+    }
+    .i_top{
+      height: 55%;
+      width: calc(100% - 20px);
+      margin: 0 auto;
+      display: flex;
+      flex-direction: column;
+      padding: 10px 0px 0px;
+      justify-content: center;
+      align-items: center;
+      box-sizing: border-box;
+      border-bottom: 1px solid #efefef;
+    }
+
+    .i_top > .img{
+      width: 80px;
+      height: 80px;
+      overflow: hidden;
+      border-radius: 50%;
+    }
+    .i_top > .img > img{
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
+    }
+    .i_top > .name{
+      width: 100%;
+      margin: 10px;
+      text-align: center;
+    }
+    .i_top > .name > span{
+      display: block;
+      max-width: 100%;
+      font-size: 22px;
+      font-weight: 700;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+    .i_top > .detail{
+      width: 100%;
+      text-align: center;
+    }
+
+    .i_top > .detail > span{
+      /* display: block; */
+      max-width: 90%;
+      font-size: 12px;
+      margin: 0 auto;
+      display: -webkit-box;
+      -webkit-line-clamp: 2;
+      -webkit-box-orient: vertical;
+      color: #a1a1a1;
+      line-height: 20px;
+      overflow: hidden;
+      word-break: break-all;
+    }
+
+    .i_bottom{
+      height: 45%;
+      width: calc(100% - 20px);
+      margin: 0 auto;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+    }
+
+    .i_bottom > .i_bottom_span{
+      width: 90%;
+      margin: 0 auto;
+      display: flex;
+      align-items: center;
+      font-size: 15px;
+    }
+
+    .i_bottom > .i_bottom_span + .i_bottom_span{
+      margin-top: 10px;
+    }
+
+    .i_bottom > .i_bottom_span > span:nth-child(1){
+      width: 50px;
+      min-width: 50px;
+      text-align: right;
+      color: #a1a1a1;
+    }
+    .i_bottom > .i_bottom_span > span:nth-child(2){
+      width: calc(100% - 30px);
+      overflow: hidden;
+      margin-left: 20px;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+    }
+
+    .i_bottom > .i_bottom_btn{
+      cursor: pointer;
+      border-radius: 5px;
+      border: 1px solid #dbdbdb;
+      box-sizing: border-box;
+      width: 90%;
+      background: rgb(252, 252, 252);
+      margin: 30px auto 0;
+      height: 35px;
+      font-weight: 600;
+      font-size: 12px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+
+    .i_bottom > .i_bottom_btn > .edit{ 
+      display: block;
+      width: 15px;
+      height: 15px;
+      background-size:100% 100%;
+      background-image: url('../../../../assets/icon/test/edit-icon.png');
+      margin-right: 10px;
+    }
+</style>

+ 119 - 0
src/components/pages/testPerson/panel/index.vue

@@ -0,0 +1,119 @@
+<template>
+  <div class="i_body">
+    <div class="i_body_title">测评总览</div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div><span>25</span><span>个</span></div>
+        <div>测评项目总数</div>
+      </div>
+    </div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div><span>15</span><span>个</span></div>
+        <div>已完成</div>
+      </div>
+    </div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div><span>10</span><span>个</span></div>
+        <div>待完成</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style scoped>
+    .i_body{
+        width: 100%;
+        height: 45%;
+        min-height: 315px;
+        background: #fff;
+        border-radius: 5px;
+        overflow: hidden;
+    }
+    .i_body_title{
+      margin: 25px auto 15px;
+      font-size: 20px;
+      text-align: center;
+    }
+    .i_body_panel{
+      width: 90%;
+      display: flex;
+      align-items: center;
+      padding: 10px 15px;
+      box-sizing: border-box;
+      border-radius: 5px;
+      margin: 0 auto;
+      border: 1px solid #dbdbdb;
+      background: rgb(252, 252, 252);
+    }
+    .i_body_panel + .i_body_panel{
+      margin-top: 15px;
+    }
+    .i_body_panel > .i_icon{
+      width: 40px;
+      height: 40px;
+      border-radius: 8px;
+      display: flex;
+      align-items: center;
+      align-items: center;
+      justify-content: center;
+      margin-right: 10px;
+    }
+    .i_body_panel:nth-child(2) > .i_icon{
+      background: rgb(54, 129, 252);
+    }
+    .i_body_panel:nth-child(2) > .i_icon > span{
+      display: block;
+      width: 20px;
+      height: 20px;
+      background-size:100% 100%;
+      background-image: url('../../../../assets/icon/test/zong_1.png');
+    }
+    .i_body_panel:nth-child(3) > .i_icon{
+      background: rgb(23, 196, 105);
+    }
+    .i_body_panel:nth-child(3) > .i_icon > span{
+      display: block;
+      width: 20px;
+      height: 20px;
+      background-size:100% 100%;
+      background-image: url('../../../../assets/icon/test/zong_2.png');
+    }
+    .i_body_panel:nth-child(4) > .i_icon{
+      background: rgb(230, 127, 54);
+    }
+    .i_body_panel:nth-child(4) > .i_icon > span{
+      display: block;
+      width: 20px;
+      height: 20px;
+      background-size:100% 100%;
+      background-image: url('../../../../assets/icon/test/zong_3.png');
+    }
+    .i_body_panel > .i_detail{
+      width: clac(100% - 50px);
+    }
+    .i_body_panel > .i_detail > div:nth-child(1){
+      font-size: 12px;
+    }
+
+    .i_body_panel > .i_detail > div:nth-child(1) > span:nth-child(1){
+      font-size: 18px;
+      font-weight: bold;
+      margin-right:5px;
+    }
+    .i_body_panel > .i_detail > div:nth-child(2){
+      color: #a1a1a1;
+      font-size: 12px;
+      margin-top: 0px;
+    }
+</style>

+ 588 - 0
src/components/pages/testPerson/test/index.vue

@@ -0,0 +1,588 @@
+<template>
+  <div class="i_body">
+    <div class="i_body_title">
+      <span>测评项目</span>
+      <div>
+        <el-button type="primary" class="bgColor" @click="returnA()">返回</el-button>
+      </div>
+    </div>
+    <div class="i_body_box">
+      <div class="check_nav">
+        <div class="nav all" :class="{ active: type == '' }" @click="checkType('')">所有评测</div>
+        <div class="nav"
+          :class="{ active: type == item.id, gr: item.name == '个人写真', md: item.name == '明灯导航', jy: item.name == '教师耕耘', yy: item.name == '煜煜星光' }"
+          @click="checkType(item.id)" v-for="(item, index) in typeArray" :key="index">{{ item.name }}</div>
+        <!-- <div class="nav gr" :class="{ active: type == 2 }" @click="checkType(2)">个人写真</div>
+        <div class="nav md" :class="{ active: type == 3 }" @click="checkType(3)">明灯导航</div>
+        <div class="nav jy" :class="{ active: type == 4 }" @click="checkType(4)">教研耕耘</div>
+        <div class="nav yy" :class="{ active: type == 5 }" @click="checkType(5)">煜煜星光</div> -->
+      </div>
+      <div class="check_box">
+        <div class="noneData" v-if="!worksArray.length" style="text-align: center;">暂无数据</div>
+        <div class="test_panel" v-for="(item, index) in worksArray" :key="index">
+          <div class="test_panel_title">
+            <div class="title">
+              <span>已完成</span>
+              <span>{{ item.title }}</span>
+            </div>
+            <div class="time">
+              <span>提交时间: {{ item.time }}</span>
+              <span>修改时间: {{ item.utime }}</span>
+            </div>
+          </div>
+          <div class="test_panel_box">
+            <div class="detail">
+              {{ item.brief ? item.brief : '暂无描述' }}
+            </div>
+            <div class="panel">
+              <div class="score">
+                <div><span>25</span><span>题</span></div>
+                <div>题目总数</div>
+              </div>
+              <div class="score">
+                <div><span>98</span><span>分</span></div>
+                <div>综合得分</div>
+              </div>
+              <div class="btn">
+                <div @click="doTest(item.courseid,item.id)"><span></span><span>编辑</span></div>
+                <div @click="checkTest(item.courseid,item.id)"><span></span><span>查看</span></div>
+                <div @click="copyTest(item.id)"><span></span><span>复制</span></div>
+              </div>
+            </div>
+          </div>
+          <div class="test_add_box" v-if="item.array.length > 1">
+            <div class="test" v-for="(test) in item.array" :key="test.id">
+              <img src="../../../../assets/icon/test/teacher.jpg" />
+              <div class="time">
+                <span>提交时间</span>
+                <span>{{ test.time }}</span>
+                <span>修改时间</span>
+                <span>{{ test.utime }}</span>
+              </div>
+              <div class="mask">
+                <div @click="doTest(test.courseid,test.id)"><span></span><span>编辑</span></div>
+                <div @click="checkTest(test.courseid,test.id)"><span></span><span>查看</span></div>
+                <div @click="copyTest(test.id)"><span></span><span>复制</span></div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    userid: {
+      type: String,
+    },
+    oid: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      type: '',
+      typeArray: [],
+      typeArrayCheck: [],
+      worksArray: [],
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+    }
+  },
+  methods: {
+    checkType(type) {
+      this.type = type
+      this.getWorks()
+    },
+    selectTestType() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTestType", params)
+        .then((res) => {
+          this.typeArray = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    getWorks() {
+      let params = {
+        uid: this.userid,
+        typeid: this.type,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorksPerson", params)
+        .then((res) => {
+          let array = res.data[0]
+          // 用于存储归类后的数据的对象
+          const worksArray = {};
+
+          // 遍历原始数据,根据 parentId 进行分组
+          array.forEach(item => {
+            if (!worksArray[item.courseid]) {
+              worksArray[item.courseid] = {
+                id: item.id,
+                courseid: item.courseid,
+                title: item.title,
+                time: item.time,
+                utime: item.utime,
+                chapters: item.chapters,
+                brief: item.brief,
+                array: []
+              };
+            }
+            worksArray[item.courseid].array.push(item);
+          });
+
+          this.worksArray = Object.values(worksArray);
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    returnA() {
+      this.$router.push(
+        "/testStudent?userid=" +
+        this.userid +
+        "&oid=" +
+        this.oid +
+        "&org=" +
+        this.org +
+        "&role=" +
+        this.role
+      );
+    },
+    checkTest(cid, tid) {
+      this.$router.push(
+        "/checkTest?cid=" +
+        cid +
+        "&tid=" +
+        tid +
+        "&userid=" +
+        this.userid +
+        "&oid=" +
+        this.oid +
+        "&org=" +
+        this.org +
+        "&type=3" +
+        "&role=" +
+        this.role
+      );
+    },
+    doTest(cid,tid){
+      this.$router.push(
+        "/doTest?cid=" +
+        cid +
+        "&tid=" +
+        tid +
+        "&userid=" +
+        this.userid +
+        "&oid=" +
+        this.oid +
+        "&org=" +
+        this.org +
+        "&type=3" +
+        "&role=" +
+        this.role
+      );
+    },
+    copyTest(tid){
+      let params = [{
+        tid: tid,
+        uid: this.userid,
+      }];
+      this.ajax
+        .post(this.$store.state.api + "copyTestWorks", params)
+        .then((res) => {
+          this.$message.success("复制成功");
+          this.getWorks();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    }
+  },
+  mounted() {
+    this.selectTestType();
+    this.getWorks()
+  },
+}
+</script>
+
+<style scoped>
+.i_body {
+  width: 100%;
+  height: calc(100%);
+  background: #fff;
+  border-radius: 5px;
+  padding: 20px 10px;
+  box-sizing: border-box;
+}
+
+.i_body_title {
+  font-size: 20px;
+  height: 30px;
+  line-height: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.i_body_box {
+  height: calc(100% - 30px);
+  padding: 30px 0 0;
+  box-sizing: border-box;
+}
+
+.check_nav {
+  display: flex;
+  height: 50px;
+  align-items: center;
+  padding: 0;
+  box-sizing: border-box;
+  width: 100%;
+}
+
+.check_nav>.nav {
+  width: 120px;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: rgb(167, 167, 167);
+  /* background: #000000; */
+  cursor: pointer;
+}
+
+.check_nav>.active {
+  color: #3681fc;
+  background: rgb(248, 250, 254);
+  border-radius: 10px 10px 0 0;
+}
+
+.check_nav>.all::before,
+.check_nav>.gr::before,
+.check_nav>.md::before,
+.check_nav>.jy::before,
+.check_nav>.yy::before {
+  content: "";
+  display: block;
+  width: 18px;
+  height: 18px;
+  background-size: 100% 100%;
+  margin-right: 5px;
+}
+
+.check_nav>.all::before {
+
+  background-image: url('../../../../assets/icon/test/all_icon.png');
+}
+
+.check_nav>.active.all::before {
+  background-image: url('../../../../assets/icon/test/all_icon_active.png');
+}
+
+.check_nav>.gr::before {
+  background-image: url('../../../../assets/icon/test/gr_icon.png');
+}
+
+.check_nav>.active.gr::before {
+  background-image: url('../../../../assets/icon/test/gr_icon_active.png');
+}
+
+.check_nav>.md::before {
+  background-image: url('../../../../assets/icon/test/md_icon.png');
+}
+
+.check_nav>.active.md::before {
+  background-image: url('../../../../assets/icon/test/md_icon_active.png');
+}
+
+.check_nav>.jy::before {
+  background-image: url('../../../../assets/icon/test/jy_icon.png');
+}
+
+.check_nav>.active.jy::before {
+  background-image: url('../../../../assets/icon/test/jy_icon_active.png');
+}
+
+.check_nav>.yy::before {
+  background-image: url('../../../../assets/icon/test/yy_icon.png');
+}
+
+.check_nav>.active.yy::before {
+  background-image: url('../../../../assets/icon/test/yy_icon_active.png');
+}
+
+.check_box {
+  height: calc(100% - 50px);
+  overflow: auto;
+  padding: 20px 0;
+  box-sizing: border-box;
+  background: rgb(248, 250, 254);
+}
+
+.test_panel {
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  background: #fff;
+  border-radius: 10px;
+  /* height: 300px; */
+  overflow: hidden;
+}
+
+.test_panel+.test_panel {
+  margin-top: 20px;
+}
+
+.test_panel_title {
+  height: 60px;
+  display: flex;
+  align-items: center;
+  width: 100%;
+  justify-content: space-between;
+  padding: 0 20px;
+  box-sizing: border-box;
+  border-bottom: 2px solid #f0f0f0;
+}
+
+.test_panel_title>.title {
+  display: flex;
+  align-items: center;
+}
+
+.test_panel_title>.title>span:nth-child(1) {
+  color: rgb(100, 215, 155);
+  background: rgb(241, 255, 248);
+  font-size: 12px;
+  border: 1px solid rgb(100, 215, 155);
+  padding: 3px 5px;
+  border-radius: 5px;
+  margin-right: 10px;
+}
+
+.test_panel_title>.title>span:nth-child(2) {
+  font-size: 18px;
+  font-weight: 600;
+}
+
+.test_panel_title>.time {
+  font-size: 14px;
+  color: #a1a1a1;
+}
+
+.test_panel_title>.time  > span + span{
+  margin-left: 10px;
+}
+
+.test_panel_box {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  padding: 20px 20px;
+  box-sizing: border-box;
+}
+
+.test_panel_box>.detail {
+  width: calc(100% - 350px - 20px);
+  margin-right: 20px;
+  color: #a1a1a1;
+  font-size: 14px;
+  line-height: 24px;
+  word-break: break-all;
+  display: -webkit-box;
+  -webkit-line-clamp: 4;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+}
+
+.test_panel_box>.panel {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 350px;
+  min-width: 350px;
+}
+
+.test_panel_box>.panel>.score {
+  height: 110px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  border: 1px solid #dbdbdb;
+  background: rgb(252, 252, 252);
+  width: 120px;
+  border-radius: 5px;
+}
+
+.test_panel_box>.panel>.score:nth-child(1) {
+  display: flex;
+}
+
+.test_panel_box>.panel>.score>div:nth-child(1)>span:nth-child(1) {
+  font-size: 30px;
+  font-weight: 700;
+}
+
+.test_panel_box>.panel>.score>div:nth-child(1)>span:nth-child(2) {
+  margin-left: 5px;
+}
+
+.test_panel_box>.panel>.score>div:nth-child(2) {
+  font-size: 14px;
+  margin-top: 10px;
+  color: #a1a1a1;
+}
+
+.test_panel_box>.panel>.btn {
+  height: 100px;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+
+.test_panel_box>.panel>.btn>div {
+  display: flex;
+  color: rgb(69, 141, 255);
+  align-items: center;
+  cursor: pointer;
+  font-size: 14px;
+}
+
+/* .test_panel_box > .panel >.btn > div + div{
+      margin: 15px 0 0 0;
+    } */
+.test_panel_box>.panel>.btn>div>span:nth-child(1) {
+  display: block;
+  width: 13px;
+  height: 13px;
+  background-size: 100% 100%;
+  margin-right: 7px;
+}
+
+.test_panel_box>.panel>.btn>div:nth-child(1)>span:nth-child(1) {
+  background-image: url('../../../../assets/icon/test/edit_icon.png');
+}
+
+.test_panel_box>.panel>.btn>div:nth-child(2)>span:nth-child(1) {
+  background-image: url('../../../../assets/icon/test/check_icon.png');
+}
+
+.test_panel_box>.panel>.btn>div:nth-child(3)>span:nth-child(1) {
+  background-image: url('../../../../assets/icon/test/paste_icon.png');
+}
+
+.test_add_box {
+  height: 160px;
+  width: 100%;
+  padding: 0 20px;
+  border-top: 2px solid #f0f0f0;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  overflow: auto;
+}
+
+
+.test_add_box>.test {
+  width: 120px;
+  min-width: 120px;
+  height: 120px;
+  border-radius: 5px;
+  overflow: hidden;
+  position: relative;
+}
+
+.test_add_box>.test:hover .mask {
+  display: flex;
+}
+
+.test_add_box>.test>img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+.test_add_box>.test+.test {
+  margin-left: 10px;
+}
+
+.test_add_box>.test>.time {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  flex-direction: column;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  top: 0;
+  left: 0;
+  color: #fff;
+  background: rgba(0, 0, 0, 0.5);
+  font-size: 14px;
+  text-align: center;
+}
+
+.test_add_box>.test>.time>span {
+  margin-top: 5px;
+}
+
+.test_add_box>.test>.mask {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.5);
+  /* display: flex; */
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  top: 0;
+  left: 0;
+  color: rgb(69, 141, 255);
+  display: none;
+}
+
+.test_add_box>.test>.mask>div {
+  display: flex;
+  color: #fff;
+  align-items: center;
+  cursor: pointer;
+  font-size: 14px;
+}
+
+.test_add_box>.test>.mask>div+div {
+  margin: 10px 0 0 0;
+}
+
+/* 
+.test_add_box>.test>.mask>div>span:nth-child(1) {
+  display: block;
+  width: 13px;
+  height: 13px;
+  background-size: 100% 100%;
+  margin-right: 7px;
+}
+
+.test_add_box>.test>.mask>div:nth-child(1)>span:nth-child(1) {
+  background-image: url('../../../../assets/icon/test/edit_icon.png');
+}
+
+.test_add_box>.test>.mask>div:nth-child(2)>span:nth-child(1) {
+  background-image: url('../../../../assets/icon/test/check_icon.png');
+}
+
+.test_add_box>.test>.mask>div:nth-child(3)>span:nth-child(1) {
+  background-image: url('../../../../assets/icon/test/paste_icon.png');
+} */
+
+.bgColor {
+  background: #466b99;
+}
+</style>

+ 59 - 20
src/components/pages/testStudent/index.vue

@@ -4,9 +4,9 @@
       <div>
         <span>评测中心</span>
       </div>
-      <!-- <div class="student_button">
-                <el-button type="primary" class="bgColor" @click="goToCourse()">新建评测</el-button>
-            </div> -->
+      <div class="student_button">
+          <el-button type="primary" class="bgColor" @click="open()">个人中心</el-button>
+      </div>
     </div>
     <div class="pb_content_body" style="height: 100%">
       <div class="student_head">
@@ -20,6 +20,12 @@
               </el-option>
             </el-select>
           </div>
+          <div class="student_search" v-if="typeArray.length">
+            <span>类型</span>
+            <el-select v-model="typeCheck" placeholder="请选择" clearable @change="search">
+              <el-option v-for="(item, index) in typeArray" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </div>
           <div class="student_search">
             <span>状态</span>
             <el-select v-model="groupA" @change="search">
@@ -50,8 +56,9 @@
                 <el-tooltip :content="item.title" placement="top" effect="dark">
                   <span>{{ item.title }}</span>
                 </el-tooltip>
-                <span :class="{ is: item.testCount > 0 && item.type == 2, no: item.testCount == 0, isR: item.type == 3, isS: item.type == 1 }">{{
-                  item.testCount > 0 ? item.type == 3 ? "已批改" : item.type == 1 ? "已保存" : "已完成" : "未完成" }}</span>
+                <span
+                  :class="{ is: (item.type == 1 && item.testCount > 1) || (item.type != 1  && item.testCount > 0), no: item.testCount == 0, isR: item.type == 3, isS: item.type == 1 && item.testCount == 1 }">{{
+                    item.testCount > 0 ? item.type == 3 ? "已批改" : (item.type == 1 && item.testCount == 1) ? "已保存" : "已完成" : "未完成" }}</span>
               </div>
               <div class="kc_t">创建人:{{ item.uname }}</div>
               <div class="kc_time">
@@ -62,8 +69,9 @@
               </div>
             </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>
+              <!-- <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>
             </div>
           </div>
           <div class="course_empty" v-if="course.length == 0">暂无数据</div>
@@ -94,10 +102,10 @@
         <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
           <div class="tup">
             <img :src="item.cover != null && item.cover != ''
-                ? JSON.parse(item.cover).length > 0
-                  ? JSON.parse(item.cover)[0].url
-                  : mr
+              ? JSON.parse(item.cover).length > 0
+                ? JSON.parse(item.cover)[0].url
                 : mr
+              : mr
               " alt />
           </div>
           <div class="bottom_box">
@@ -183,6 +191,8 @@ export default {
       isChoose: 0,
       problemCourse: null, //查看提问的项目
       courseTeam: [],
+      typeCheck: "",
+      typeArray: [],
     };
   },
   methods: {
@@ -378,6 +388,8 @@ export default {
           this.courseTypeId[this.CourseType[0][i].id] = "";
         }
       }
+      this.typeCheck = ''
+      this.page = 1
       this.getCourse();
     },
     getCourse() {
@@ -403,7 +415,7 @@ export default {
             } else if (this.CourseType[0][i].name == "项目类型") {
               typed = this.courseTypeId[this.CourseType[0][i].id];
             } else if (this.CourseType[0][i].name == "主题") {
-              typef = this.courseTypeId[this.CourseType[0][i].id];
+              // typef = this.courseTypeId[this.CourseType[0][i].id];
             }
             this.courseTypeSon.push(
               this.courseTypeId[this.CourseType[0][i].id]
@@ -421,7 +433,7 @@ export default {
         typeb: typeb != undefined ? typeb : "",
         typec: typec != undefined ? typec : "",
         typed: typed != undefined ? typed : "",
-        typef: typef != undefined ? typef : "",
+        typef: this.typeCheck,
         typeE: typeE.join(","),
         cu: "",
         cn: this.courseName,
@@ -556,6 +568,19 @@ export default {
           console.error(err);
         });
     },
+    selectTestType() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTestType", params)
+        .then((res) => {
+          this.typeArray = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     selectType() {
       this.ajax
         .get(this.$store.state.api + "selectStudentType")
@@ -632,6 +657,18 @@ export default {
           console.error(err);
         });
     },
+    open(){
+      this.$router.push(
+        "/testPerson?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+    },
     openCourse() {
       this.dialogVisibleCourse = true;
       this.getTeamCourse();
@@ -686,6 +723,7 @@ export default {
     this.page = 1;
     this.selectAllType();
     this.getCourse();
+    this.selectTestType();
   },
 };
 </script>
@@ -744,12 +782,12 @@ export default {
   display: flex;
   align-items: center;
   /* width: calc(100% / 3); */
-  width: 190px;
+  min-width: 95px;
 }
 
 .student_search span {
   margin: 0 10px 0 0;
-  min-width: 65px;
+  min-width: 50px;
   text-align-last: justify;
 }
 
@@ -1055,11 +1093,11 @@ export default {
   display: flex;
   flex-direction: row;
   align-items: center;
-  max-width: calc(100% / 3 - 50px);
+  max-width: calc(100% / 4 - 50px);
 }
 
 .all_choose>span {
-  min-width: 75px;
+  min-width: 50px;
   display: block;
   margin-right: 10px;
   text-align-last: justify;
@@ -1077,11 +1115,12 @@ export default {
   align-items: center;
 }
 
-.choose>div:nth-child(2) {
-  margin-left: 1%;
-  width: 32.33333%;
+.choose>div {
+  margin-left: 10px;
+  width: calc(100% / 4 - 50px)
 }
 
+/* 
 .choose>div:nth-child(3) {
   margin-left: 1%;
   width: 32.33333%;
@@ -1089,7 +1128,7 @@ export default {
 
 .choose>div:nth-child(5) {
   margin: 5px 0 0 1%;
-}
+} */
 
 .choose>div:nth-child(4)>span {
   /* width: 74px !important;

+ 39 - 13
src/components/pages/testStudent/view/check.vue

@@ -5,7 +5,18 @@
         <div class="courseTop">
           <div class="stepsNav">
             <el-breadcrumb separator-class="el-icon-arrow-right">
-              <el-breadcrumb-item :to="{
+              <el-breadcrumb-item v-if="type==3" :to="{
+                path:
+                  '/testPerson?userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org +
+                  '&role=' +
+                  role,
+              }">个人中心</el-breadcrumb-item>
+              <el-breadcrumb-item v-else :to="{
                 path:
                   '/testStudent?userid=' +
                   userid +
@@ -48,6 +59,8 @@ export default {
       org: this.$route.query.org,
       role: this.$route.query.role,
       cid: this.$route.query.cid,
+      tid: this.$route.query.tid,
+      type: this.$route.query.type,
       steps: 1,
       title: "",
       testType: [],
@@ -59,16 +72,29 @@ export default {
   },
   methods: {
     retrunCourse() {
-      this.goTo(
-        "/testStudent?userid=" +
-          this.userid +
-          "&oid=" +
-          this.oid +
-          "&org=" +
-          this.org +
-          "&role=" +
-          this.role
-      );
+      if(this.type == 3){
+          this.goTo(
+          "/testPerson?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+        );
+      }else{
+        this.goTo(
+          "/testStudent?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+        );
+      }
     },
     goTo(path) {
       this.$router.push(path);
@@ -78,10 +104,10 @@ export default {
       this.loading = true
       let params = {
         cid: this.cid,
-        uid: this.userid,
+        tid: this.tid,
       };
       this.ajax
-        .get(this.$store.state.api + "getTestWorks", params)
+        .get(this.$store.state.api + "getTestWorks2", params)
         .then((res) => {
           // this.cJson = JSON.parse(res.data[0][0].chapters);
           this.$forceUpdate();

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

@@ -224,7 +224,7 @@ export default {
   width: 95%;
   margin: 0 auto;
   background: #fff;
-  height: calc(100% - 50px);
+  height: calc(100% - 55px);
   overflow: auto;
 }
 

+ 101 - 26
src/components/pages/testStudent/view/preview.vue

@@ -5,6 +5,17 @@
         <div class="courseTop">
           <div class="stepsNav">
             <el-breadcrumb separator-class="el-icon-arrow-right">
+              <el-breadcrumb-item :to="{
+                path:
+                  '/testPerson?userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org +
+                  '&role=' +
+                  role,
+              }"  v-if="type == 3">个人中心</el-breadcrumb-item>
               <el-breadcrumb-item :to="{
                 path:
                   '/testStudent?userid=' +
@@ -15,7 +26,7 @@
                   org +
                   '&role=' +
                   role,
-              }">评测中心</el-breadcrumb-item>
+              }"  v-else>评测中心</el-breadcrumb-item>
               <el-breadcrumb-item>
                 <span style="color: rgb(15, 126, 255)">{{ title }}</span>
               </el-breadcrumb-item>
@@ -28,7 +39,7 @@
             <div class="op_btn">
               <el-button type="primary" size="small" @click="refresh" v-if="isReset">刷新</el-button>
               <el-button type="primary" size="small" @click="reset" >重置</el-button>
-              <el-button type="primary" size="small" @click="save">保存</el-button>
+              <el-button type="primary" size="small" @click="save" v-if="type != 3">保存</el-button>
               <el-button type="primary" size="small" @click="publish">提交</el-button>
             </div>
           </div>
@@ -52,6 +63,8 @@ export default {
       org: this.$route.query.org,
       role: this.$route.query.role,
       cid: this.$route.query.cid,
+      tid: this.$route.query.tid,
+      type: this.$route.query.type,
       steps: 1,
       title: "",
       testType: [],
@@ -73,16 +86,29 @@ export default {
           type: "warning",
         })
         .then(() => {
-          this.goTo(
-            "/testStudent?userid=" +
-            this.userid +
-            "&oid=" +
-            this.oid +
-            "&org=" +
-            this.org +
-            "&role=" +
-            this.role
-          );
+          if(this.type == 3){
+            this.goTo(
+              "/testPerson?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role
+            );
+          }else{
+            this.goTo(
+              "/testStudent?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role
+            );
+          }
         })
         .catch((v) => {
 
@@ -163,6 +189,38 @@ export default {
           console.error(err);
         });
     },
+    getTestWorks2() {
+      let params = {
+        cid: this.cid,
+        tid: this.tid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorks2", params)
+        .then((res) => {
+          // this.cJson = JSON.parse(res.data[0][0].chapters);
+          if (res.data[2].length) {
+            this.cJson = JSON.parse(res.data[2][0].courseJson)
+
+            let cJson = this.setJSON(JSON.parse(JSON.stringify(this.cJson)))
+            let cJson2 = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(this.cJson2))))
+
+            if (JSON.stringify(cJson) != JSON.stringify(cJson2)) {
+              this.isReset = true
+            }
+
+
+          }
+
+          this.$forceUpdate()
+
+          this.loading = false
+
+        })
+        .catch((err) => {
+          this.loading = false
+          console.error(err);
+        });
+    },
     setJSON(json) {
       return json.filter((item) => {
         if (item.array) {
@@ -192,7 +250,7 @@ export default {
     },
     setJson2(json) {
       let _json = json;
-      this.type = _json[0].ttype;
+      // this.type = _json[0].ttype;
       let checkArray = _json.filter((item) => {
         if (item.array) {
           item.array = item.array.filter((item2) => {
@@ -243,7 +301,11 @@ export default {
           }
           console.log(this.testType);
           this.look = res.data[0][0].look
-          this.getTestWorks()
+          if(this.type == 3){
+            this.getTestWorks2()
+          }else{
+            this.getTestWorks()
+          }
           this.$forceUpdate();
 
         })
@@ -288,26 +350,39 @@ export default {
       console.log(cjson);
       let params = [
         {
-          uid: this.userid,
+          uid: this.type == 3 ? this.tid : this.userid,
           cid: this.cid,
           cjson: JSON.stringify(cjson),
           type: '2',
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "addTestWorks", params)
+        .post(this.$store.state.api + (this.type == 3 ? "addTestWorks2" : "addTestWorks"), params)
         .then((res) => {
           this.$message.success('提交成功')
-          this.goTo(
-            "/testStudent?userid=" +
-            this.userid +
-            "&oid=" +
-            this.oid +
-            "&org=" +
-            this.org +
-            "&role=" +
-            this.role
-          );
+          if(this.type == 3){
+            this.goTo(
+              "/testPerson?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role
+            );
+          }else{
+            this.goTo(
+              "/testStudent?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role
+            );
+          }
         })
         .catch((err) => {
           this.$message.error("网络不佳");

+ 8 - 0
src/router/index.js

@@ -102,6 +102,7 @@ import synergyCourse from '@/components/pages/synergyCourse/course'
 import test from '@/components/pages/test/index'
 import addTest from '@/components/pages/test/add/addTest'
 import testStudent from '@/components/pages/testStudent/index'
+import testPerson from '@/components/pages/testPerson/index'
 import doTest from '@/components/pages/testStudent/view/preview'
 import checkTest from '@/components/pages/testStudent/view/check'
 import checkToTest from '@/components/pages/test/check'
@@ -871,6 +872,13 @@ export default new Router({
                 requireAuth: '' // 是否需要判断是否登录,这里是需要判断
             }
         },
+        {
+            path: '/testPerson',
+            component: testPerson,
+            meta: {
+                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+            }
+        },
         {
             path: '/doTest',
             component: doTest,

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác