lsc 1 rok pred
rodič
commit
eb973a3e10

+ 1 - 1
dist/index.html

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

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.194d827d71fec96aa87eef837f448580.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.194d827d71fec96aa87eef837f448580.css.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.d32a0b5745713d54d74bba6cbd15251a.css.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.12880dfe32fe2b13b171.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.12880dfe32fe2b13b171.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 109 - 20
src/components/pages/course/index.vue

@@ -1,15 +1,13 @@
 <template>
   <div class="pb_content">
     <div class="pb_content_body" style="width: 100%;margin: 0;">
-      <div class="student_head">
-        <!-- <img src="../../../assets/banner.png" alt="" /> -->
+      <!-- <div class="student_head">
         <el-carousel trigger="click" style="width: 100%; height: 100%">
           <el-carousel-item v-for="item in bannerList" :key="item.id">
-            <!-- <h3 class="small">{{ item }}</h3> -->
             <img class="imgS" :src="item.poster" alt="" />
           </el-carousel-item>
         </el-carousel>
-      </div>
+      </div> -->
       <div class="reBox">
         <div class="reTop">
           <div>课程</div>
@@ -36,7 +34,7 @@
             <span v-if="CourseTypeJson[item.id].length &&
                                 (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
                                   ? pTypeCheck.indexOf(item.id) != -1
-                                  : true)">{{ item.name }}:</span>
+                                  : true)"><span>{{ item.name }}</span></span>
             <div class="typeCss" v-if="CourseTypeJson[item.id].length  &&
                                 (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
                                   ? pTypeCheck.indexOf(item.id) != -1
@@ -57,12 +55,43 @@
               </div>
             </div>
           </div>
+          <div class="all_choose" v-if="role == '1'">
+            <span><span>所有者</span></span>
+            <div class="typeCss">
+              <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
+                全部
+              </div>
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                我的培训
+              </div>
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                协同培训
+              </div>
+              <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
+                他人培训
+              </div>
+            </div>
+          </div>
+          <div class="all_choose" v-else>
+            <span><span>所有者</span></span>
+            <div class="typeCss">
+              <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
+                全部
+              </div>
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                我的培训
+              </div>
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                协同培训
+              </div>
+            </div>
+          </div>
         </div>
       </div>
       <div class="body_student" v-loading="loading">
-        <div class="typeCheck">
+        <!-- <div class="typeCheck">
           <el-switch v-model="typeCheck"></el-switch><span>分类显示</span>
-        </div>
+        </div> -->
         <div>
           <div class="main_box">
             <div style="display:flex;flex-wrap:wrap" v-if="!typeCheck">
@@ -202,6 +231,7 @@ export default {
       classId: this.$route.query.cid,
       tType: this.$route.query.tType,
       org: this.$route.query.org,
+      role: this.$route.query.role,
       screenType: 4, //this.$route.query.screenType
       CourseType: [],
       CourseType2: [],
@@ -218,6 +248,7 @@ export default {
       CourseType3: [],
       pTypeCheck:[],
       pTypeCheckName: [],
+      groupA: "0",
     };
   },
   watch: {
@@ -560,6 +591,7 @@ export default {
       this.isListAjax = true;
 
       let params = {
+        type: this.groupA,
         uid: this.userid,
         oid: this.oid,
         typea: this.typea != undefined ? this.typea : "",
@@ -576,7 +608,7 @@ export default {
         pageSize:this.pageSize
       };
       this.ajax
-        .get(this.$store.state.api + "selectTypeCourse2", params)
+        .get(this.$store.state.api + "selectCourseNew2", params)
         .then((res) => {
           this.loading = false;
           this.isListAjax = false;
@@ -836,6 +868,9 @@ export default {
     this.timer = null;
   },
   created() {
+    if (this.role == "1") {
+      this.groupA = "4";
+    }
     let typea = this.$route.query.typea
     let typeb = this.$route.query.typeb
     let typed = this.$route.query.typed
@@ -858,12 +893,44 @@ export default {
 </script>
 
 <style scoped>
-@media screen and (max-width: 1024px) {
+/* @media screen and (max-width: 1024px) {
   .box_course {
     margin: 0px 5px 20px 5px !important;
   }
+} */
+@media screen and (max-width: 1380px) {
+  .box_course {
+    width: calc(100% / 4 - (15px * 3) / 4) !important;
+  }
+
+  .box_course:nth-child(5n) {
+    margin-right: 15px !important;
+  }
+
+  .box_course:nth-child(4n) {
+    margin-right: 0 !important;
+  }
 }
 
+@media screen and (max-width: 1080px) {
+  .box_course {
+    width: calc(100% / 3 - (15px * 2) / 3) !important;
+  }
+
+  .box_course:nth-child(5n) {
+    margin-right: 15px !important;
+  }
+
+  .box_course:nth-child(4n) {
+    margin-right: 15px !important;
+  }
+
+  .box_course:nth-child(3n) {
+    margin-right: 0 !important;
+  }
+}
+
+
 .student_head .imgS {
   width: 100%;
   height: 100%;
@@ -927,7 +994,7 @@ export default {
   flex-wrap: nowrap;
   /* margin: 0px 1% 20px; */
   margin: 0 15px 20px 0;
-  width: 300px;
+  width: calc(100% / 5 - (15px * 4) / 5);
   /* height: 260px; */
   /*border: 1px solid #cecece; */
   border-radius: 10px;
@@ -938,6 +1005,10 @@ export default {
   cursor: pointer;
 }
 
+.box_course:nth-child(5n) {
+  margin-right: 0;
+}
+
 .middle_white {
   font-size: 14px;
   margin: 5px 10px 10px;
@@ -969,6 +1040,8 @@ export default {
 }
 
 .main_box {
+  padding: 0 2px;
+  box-sizing: border-box;
   width: 100%;
   /* display: flex; */
   /* flex-direction: row; */
@@ -990,7 +1063,7 @@ export default {
 
 .body_student {
   margin: 0 auto;
-  width: 90%;
+  width: 100%;
   height: 100%;
 }
 
@@ -1038,13 +1111,20 @@ export default {
   /* margin: 2px 0; */
   width: 100%;
 }
-
 .all_choose>span {
-  min-width: 80px;
-  display: block;
-  letter-spacing: 14px;
+  display: flex;
+  margin-right: 5px;
 }
 
+.all_choose>span>span {
+  min-width: 65px;
+  max-width: 65px;
+  display: block;
+  text-align-last: justify;
+}
+.all_choose>span::after {
+    content: ':';
+}
 .all_choose>span:nth-child(1) {
   font-weight: bold;
 }
@@ -1091,19 +1171,20 @@ export default {
 }
 
 .reBox {
-  position: relative;
-  top: -25px;
-  z-index: 999;
+  /* position: relative; */
+  /* top: -25px; */
+  /* z-index: 999; */
   /* left: auto; */
   /* right: auto; */
   background: #fff;
-  width: 90%;
+  width: 100%;
   border-radius: 5px;
   padding-left: 20px;
-  margin: 0 auto;
+  margin: 0px auto 20px;
   box-sizing: border-box;
 }
 
+
 .reTop {
   padding: 20px 0 0 0;
   border-bottom: 1px solid #eee;
@@ -1138,6 +1219,7 @@ export default {
 .search {
   width: 20px;
   padding: 0 5px;
+  display: flex;
 }
 
 .search>img {
@@ -1227,4 +1309,11 @@ export default {
   box-shadow: none !important;
 }
 
+.pb_content {
+  height: calc(100% - 40px);
+    padding: 0 0 0;
+    box-sizing: border-box;
+    overflow: auto;
+    margin-top: 10px;
+}
 </style>

+ 1 - 1
src/components/pages/testPerson/index.vue

@@ -39,7 +39,7 @@ export default {
     .tp_body{
         width: 100%;
         height: 100%;
-        min-height: 745px;
+        min-height: 820px;
         display: flex;
         justify-content: center;
         align-items: center;

+ 32 - 3
src/components/pages/testPerson/panel/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="i_body">
-    <div class="i_body_title">测评总览</div>
-    <div class="i_body_panel">
+    <div class="i_body_title">个人总览</div>
+    <!-- <div class="i_body_panel">
       <div class="i_icon"><span></span></div>
       <div class="i_detail">
         <div><span>{{test.length}}</span><span>个</span></div>
@@ -21,6 +21,27 @@
         <div><span>{{test.length - work.length}}</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>{{count1}}</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>{{count2}}</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>{{count3}}</span><span>个</span></div>
+        <div>教学活动数</div>
+      </div>
     </div>
   </div>
 </template>
@@ -41,7 +62,10 @@ export default {
   data() {
     return {
       test:  [],
-      work: []
+      work: [],
+      count1: 0,
+      count2: 0,
+      count3: 0,
     }
   },
   methods: {
@@ -56,6 +80,11 @@ export default {
         .then((res) => {
           this.test = res.data[0]
           this.work = res.data[1]
+
+          this.count1 = res.data[2].length // 资料提交数
+          this.count2 = res.data[3].length //培训活动数
+          this.count3 = res.data[4].length //教学活动数
+
         })
         .catch((err) => {
           console.error(err);

+ 26 - 475
src/components/pages/testPerson/test/index.vue

@@ -1,100 +1,26 @@
 <template>
   <div class="i_body">
     <div class="i_body_title">
-      <span>测评项目</span>
+      <div class="title_box">
+        <span @click="checkType(1)" :class="{active:type == 1}">资料提交</span>
+        <span @click="checkType(2)" :class="{active:type == 2}">培训活动</span>
+        <span @click="checkType(3)" :class="{active:type == 3}">教学活动</span>
+        <!-- <span @click="checkType(4)" :class="{active:type == 4}">教研活动</span> -->
+      </div>
       <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.id == 'afc3f97f-2429-408d-8dcd-5e63a44d355a', md: item.id == '478bcccd-e3a1-472b-aa29-3ed7bc479469', jy: item.id == '178a377a-b4f1-4a75-b3c3-2787a7c98784', yy: item.id == 'dda9728e-5f11-469e-89ee-aca518daf223', bj: item.id == 'afc3f97f-2429-408d-8dcd-5e63a44d355c' }"
-          @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" v-loading="loading">
-        <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 :class="{ is: item.array.length > 0, no: !item.array.length }">{{ item.array.length > 0 ? "已完成" :
-                "未完成" }}</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" v-if="item.array.length === 0 || item.brief">
-              <span>{{ item.brief ? item.brief : '暂无描述' }}</span>
-            </div>
-            <div class="test_add_box" style="width: calc(100% - 350px - 20px);border: none;margin-right: 20px;padding: 0;" v-else>
-              <div class="test" v-for="(test) in item.array" :key="test.id">
-                <img
-                  :src="getImg(test.courseJson) ? getImg(test.courseJson) : require('../../../../assets/icon/test/teacher.jpg')" />
-                <div class="time">
-                  <span>提交时间</span>
-                  <span>{{ test.time }}</span>
-                  <span>修改时间</span>
-                  <span>{{ test.utime }}</span>
-                </div>
-                <img @click="deleteTest(test.id)" class="delete" src="../../../../assets/icon/test/delete.png" alt="">
-                <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 class="panel">
-              <div class="score">
-                <div><span>{{ getNum(item.chapters) }}</span><span>题</span></div>
-                <div>题目总数</div>
-              </div>
-              <div class="score">
-                <div><span>{{ getScore(item.array) }}</span><span>分</span></div>
-                <div>综合得分</div>
-              </div>
-              <div class="btn">
-                <!-- <div @click="doTest(item.courseid,item.id)"><span></span><span>编辑</span></div> -->
-                <div @click="doTest2(item.courseid)"><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 > 0 && item.brief">
-            <div class="test" v-for="(test) in item.array" :key="test.id">
-              <img
-                :src="getImg(test.courseJson) ? getImg(test.courseJson) : require('../../../../assets/icon/test/teacher.jpg')" />
-              <div class="time">
-                <span>提交时间</span>
-                <span>{{ test.time }}</span>
-                <span>修改时间</span>
-                <span>{{ test.utime }}</span>
-              </div>
-              <img @click="deleteTest(test.id)" class="delete" src="../../../../assets/icon/test/delete.png" alt="">
-              <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>
+    <Test :oid="oid" :userid="userid" v-if="type == 1"></Test>
+    <TrainCourse v-if="type == 2"></TrainCourse>
+    <Course v-if="type == 3"></Course>
   </div>
 </template>
 
 <script>
+import Test from './test.vue'
+import TrainCourse from '../../trainCourse/index.vue'
+import Course from '../../course/index.vue'
 export default {
   props: {
     userid: {
@@ -104,15 +30,12 @@ export default {
       type: String,
     },
   },
+  components: {
+    Test,TrainCourse,Course
+  },
   data() {
     return {
-      type: '',
-      typeArray: [],
-      typeArrayCheck: [],
-      worksArray: [],
-      org: this.$route.query.org,
-      role: this.$route.query.role,
-      loading: false
+      type:1
     }
   },
   computed: {
@@ -403,10 +326,11 @@ export default {
 .i_body {
   width: 100%;
   height: calc(100%);
-  background: #fff;
+  /* background: #fff; */
   border-radius: 5px;
   padding: 20px 10px;
   box-sizing: border-box;
+  background: #fbfbfb;
 }
 
 .i_body_title {
@@ -418,392 +342,19 @@ export default {
   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; */
+.i_body_title > .title_box span{
   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>.bj::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_nav>.bj::before {
-  background-image: url('../../../../assets/icon/test/bj_icon.png');
-}
-
-.check_nav>.active.bj::before {
-  background-image: url('../../../../assets/icon/test/bj_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;
+  border-bottom: 1px solid #40a0ff00;
   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) {
-  font-size: 12px;
-  padding: 3px 5px;
-  border-radius: 5px;
-  margin-right: 10px;
-}
-
-.test_panel_title>.title>.is:nth-child(1) {
-  color: rgb(100, 215, 155);
-  background: rgb(241, 255, 248);
-  border: 1px solid rgb(100, 215, 155);
-}
-
-.test_panel_title>.title>.no:nth-child(1) {
-  color: rgb(240, 66, 66);
-  background: rgb(255, 241, 241);
-  border: 1px solid rgb(240, 66, 66);
-}
-
-.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 {
+  padding: 0px 0 5px;
   margin-left: 10px;
 }
-
-.test_panel_box {
-  width: 100%;
-  display: flex;
-  align-items: center;
-  padding: 20px 20px;
-  box-sizing: border-box;
+.i_body_title > .title_box span + span{
+ margin-left: 20px;
 }
 
-.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:hover .delete {
-  display: block;
-}
-
-.test_add_box>.test>img {
-  width: 100%;
-  height: 100%;
-  object-fit: cover;
-  border-radius: 5px;
-}
-
-.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;
-  border-radius: 5px;
-}
-
-.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;
-  border-radius: 5px;
-}
-
-.test_add_box>.test>.delete {
-  position: absolute;
-  width: 20px;
-  height: 20px;
-  right: -5px;
-  top: -5px;
-  cursor: pointer;
-  z-index: 2;
-  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;
+.i_body_title > .title_box span.active{
+  border-bottom: 2px solid rgb(12 125 255);
+    color: rgb(12 125 255);
 }
 </style>

+ 843 - 0
src/components/pages/testPerson/test/test.vue

@@ -0,0 +1,843 @@
+<template>
+    <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.id == 'afc3f97f-2429-408d-8dcd-5e63a44d355a',
+                md: item.id == '478bcccd-e3a1-472b-aa29-3ed7bc479469',
+                jy: item.id == '178a377a-b4f1-4a75-b3c3-2787a7c98784',
+                yy: item.id == 'dda9728e-5f11-469e-89ee-aca518daf223',
+                bj: item.id == 'afc3f97f-2429-408d-8dcd-5e63a44d355c'
+            }" @click="checkType(item.id)" v-for="(item, index) in typeArray" :key="index">
+                {{ item.name }}
+            </div>
+            <div class="nav all" :class="{ active: type == '0' }" @click="checkType('0')">
+                其他
+            </div>
+        </div>
+        <div class="check_box" v-loading="loading">
+            <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 :class="{ is: item.array.length > 0, no: !item.array.length }">{{ item.array.length > 0 ?
+                            "已完成" : "未完成" }}</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" v-if="item.array.length === 0 || item.brief">
+                        <span>{{ item.brief ? item.brief : "暂无描述" }}</span>
+                    </div>
+                    <div class="test_add_box"
+                        style="width: calc(100% - 350px - 20px);border: none;margin-right: 20px;padding: 0;" v-else>
+                        <div class="test" v-for="test in item.array" :key="test.id">
+                            <img :src="getImg(test.courseJson)
+                                    ? getImg(test.courseJson)
+                                    : require('../../../../assets/icon/test/teacher.jpg')
+                                " />
+                            <div class="time">
+                                <span>提交时间</span>
+                                <span>{{ test.time }}</span>
+                                <span>修改时间</span>
+                                <span>{{ test.utime }}</span>
+                            </div>
+                            <img @click="deleteTest(test.id)" class="delete" src="../../../../assets/icon/test/delete.png"
+                                alt="" />
+                            <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 class="panel">
+                        <div class="score">
+                            <div>
+                                <span>{{ getNum(item.chapters) }}</span><span>题</span>
+                            </div>
+                            <div>题目总数</div>
+                        </div>
+                        <div class="score">
+                            <div>
+                                <span>{{ getScore(item.array) }}</span><span>分</span>
+                            </div>
+                            <div>综合得分</div>
+                        </div>
+                        <div class="btn">
+                            <!-- <div @click="doTest(item.courseid,item.id)"><span></span><span>编辑</span></div> -->
+                            <div @click="doTest2(item.courseid)">
+                                <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 > 0 && item.brief">
+                    <div class="test" v-for="test in item.array" :key="test.id">
+                        <img :src="getImg(test.courseJson)
+                                ? getImg(test.courseJson)
+                                : require('../../../../assets/icon/test/teacher.jpg')
+                            " />
+                        <div class="time">
+                            <span>提交时间</span>
+                            <span>{{ test.time }}</span>
+                            <span>修改时间</span>
+                            <span>{{ test.utime }}</span>
+                        </div>
+                        <img @click="deleteTest(test.id)" class="delete" src="../../../../assets/icon/test/delete.png"
+                            alt="" />
+                        <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>
+</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,
+            loading: false
+        };
+    },
+    computed: {
+        getNum() {
+            return function (array) {
+                let _array = JSON.parse(array);
+                let num = 0;
+                _array.forEach(el => {
+                    if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                        el.array.forEach(item => {
+                            if (item.ttype == 2 && item.array.length > 0) {
+                                item.array.forEach(item2 => {
+                                    if (item2.ttype == 1 && item2.json) {
+                                        num++;
+                                    }
+                                });
+                            } else if (item.ttype == 1 && item.json) {
+                                num++;
+                            }
+                        });
+                    } else if (el.ttype == 1 && el.json) {
+                        num++;
+                    }
+                });
+                return num;
+            };
+        },
+        getScore() {
+            return function (array) {
+                // let _array = JSON.parse(array)
+                let _score = 0;
+                let scoreArray = [];
+                for (var i = 0; i < array.length; i++) {
+                    let _array = JSON.parse(array[i].courseJson);
+                    let score = 0;
+                    for (var j = 0; j < _array.length; j++) {
+                        let el = _array[j];
+                        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                            for (var k = 0; k < el.array.length; k++) {
+                                let item = el.array[k];
+                                if (item.ttype == 2 && item.array.length > 0) {
+                                    for (var z = 0; z < item.array.length; z++) {
+                                        let item2 = item.array[k];
+                                        if (item2.ttype == 1 && item2.json && item2.json.score2) {
+                                            score += parseInt(item2.json.score2);
+                                        }
+                                    }
+                                } else if (item.ttype == 1 && item.json && item.json.score2) {
+                                    score += parseInt(item.json.score2);
+                                }
+                            }
+                        } else if (el.ttype == 1 && el.json && el.json.score2) {
+                            score += parseInt(el.json.score2);
+                        }
+                    }
+                    scoreArray.push(score);
+                }
+                scoreArray.forEach(el => {
+                    _score += el;
+                });
+                console.log(scoreArray);
+                return _score ? _score / scoreArray.length : 0;
+            };
+        },
+        getImg() {
+            return function (array) {
+                let _array = JSON.parse(array);
+                let _img = "";
+                s: for (var j = 0; j < _array.length; j++) {
+                    let el = _array[j];
+                    if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                        for (var k = 0; k < el.array.length; k++) {
+                            let item = el.array[k];
+                            if (item.ttype == 2 && item.array.length > 0) {
+                                for (var z = 0; z < item.array.length; z++) {
+                                    let item2 = item.array[k];
+                                    if (
+                                        item2.ttype == 1 &&
+                                        item2.type == 5 &&
+                                        item2.json &&
+                                        item2.json.file &&
+                                        item2.json.file.length > 0
+                                    ) {
+                                        for (var k = 0; k < item2.json.file.length; k++) {
+                                            let ik = item2.json.file[k];
+                                            if (ik.type == 3) {
+                                                _img = ik.url;
+                                                break s;
+                                            }
+                                        }
+                                    }
+                                }
+                            } else if (
+                                item.ttype == 1 &&
+                                item.type == 5 &&
+                                item.json &&
+                                item.json.file &&
+                                item.json.file.length > 0
+                            ) {
+                                for (var k = 0; k < item.json.file.length; k++) {
+                                    let ik = item.json.file[k];
+                                    if (ik.type == 3) {
+                                        _img = ik.url;
+                                        break s;
+                                    }
+                                }
+                            }
+                        }
+                    } else if (
+                        el.ttype == 1 &&
+                        el.type == 5 &&
+                        el.json &&
+                        el.json.file &&
+                        el.json.file.length > 0
+                    ) {
+                        for (var k = 0; k < el.json.file.length; k++) {
+                            let ik = el.json.file[k];
+                            if (ik.type == 3) {
+                                _img = ik.url;
+                                break s;
+                            }
+                        }
+                    }
+                }
+                return _img;
+            };
+        }
+    },
+    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];
+                    if(this.typeArray.length){
+                        this.type = this.typeArray[0].id;
+                    }else{
+                        this.type = '0';
+                    }
+                })
+                .catch(err => {
+                    console.error(err);
+                });
+        },
+        getWorks() {
+            this.loading = true;
+            let params = {
+                uid: this.userid,
+                typeid: this.type
+            };
+            this.ajax
+                .get(this.$store.state.api + "getTestWorksPerson", params)
+                .then(res => {
+                    this.loading = false;
+                    let array = res.data[0];
+                    let array2 = res.data[1];
+                    // 用于存储归类后的数据的对象
+                    let worksArray = {};
+
+                    // 遍历原始数据,根据 parentId 进行分组
+                    array2.forEach(item => {
+                        // console.log(item.chapters);
+                        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 = Object.values(worksArray);
+                    worksArray.forEach(el => {
+                        array.forEach(el2 => {
+                            if (el.courseid == el2.courseid) {
+                                el.array.push(el2);
+                            }
+                        });
+                    });
+                    // worksArray[item.courseid].array.push(item);
+
+                    this.worksArray = worksArray;
+                    this.$forceUpdate();
+                })
+                .catch(err => {
+                    this.loading = false;
+                    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
+            );
+        },
+        doTest2(cid) {
+            this.$router.push(
+                "/doTest?cid=" +
+                cid +
+                "&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);
+                });
+        },
+        deleteTest(tid) {
+            let _this = this;
+            _this
+                .$confirm("确定删除此提交的评测么?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                })
+                .then(() => {
+                    let params = [
+                        {
+                            tid: tid
+                        }
+                    ];
+                    _this.ajax
+                        .post(_this.$store.state.api + "deleteTestCourseWorks", params)
+                        .then(res => {
+                            _this.$message.success("删除成功");
+                            _this.getWorks();
+                        })
+                        .catch(err => {
+                            console.error(err);
+                        });
+                })
+                .catch(() => {
+                    return;
+                });
+        }
+    },
+    mounted() {
+        this.selectTestType();
+        this.getWorks();
+    }
+};
+</script>
+
+<style scoped>
+.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>.bj::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_nav>.bj::before {
+  background-image: url('../../../../assets/icon/test/bj_icon.png');
+}
+
+.check_nav>.active.bj::before {
+  background-image: url('../../../../assets/icon/test/bj_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) {
+  font-size: 12px;
+  padding: 3px 5px;
+  border-radius: 5px;
+  margin-right: 10px;
+}
+
+.test_panel_title>.title>.is:nth-child(1) {
+  color: rgb(100, 215, 155);
+  background: rgb(241, 255, 248);
+  border: 1px solid rgb(100, 215, 155);
+}
+
+.test_panel_title>.title>.no:nth-child(1) {
+  color: rgb(240, 66, 66);
+  background: rgb(255, 241, 241);
+  border: 1px solid rgb(240, 66, 66);
+}
+
+.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:hover .delete {
+  display: block;
+}
+
+.test_add_box>.test>img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  border-radius: 5px;
+}
+
+.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;
+  border-radius: 5px;
+}
+
+.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;
+  border-radius: 5px;
+}
+
+.test_add_box>.test>.delete {
+  position: absolute;
+  width: 20px;
+  height: 20px;
+  right: -5px;
+  top: -5px;
+  cursor: pointer;
+  z-index: 2;
+  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>

+ 110 - 23
src/components/pages/trainCourse/index.vue

@@ -1,18 +1,16 @@
 <template>
   <div class="pb_content">
     <div class="pb_content_body" style="width: 100%;margin: 0;">
-      <div class="student_head">
-        <!-- <img src="../../../assets/banner.png" alt="" /> -->
+      <!-- <div class="student_head">
         <el-carousel trigger="click" style="width: 100%; height: 100%">
           <el-carousel-item v-for="item in bannerList" :key="item.id">
-            <!-- <h3 class="small">{{ item }}</h3> -->
             <img class="imgS" :src="item.poster" alt="" />
           </el-carousel-item>
         </el-carousel>
-      </div>
+      </div> -->
       <div class="reBox">
         <div class="reTop">
-          <div>课程</div>
+          <div>培训</div>
           <div>
             <div class="search" @click="search">
               <img src="../../../assets/icon/search.png" alt="" />
@@ -36,7 +34,7 @@
             <span v-if="CourseTypeJson[item.id].length &&
                                 (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
                                   ? pTypeCheck.indexOf(item.id) != -1
-                                  : true)">{{ item.name }}:</span>
+                                  : true)"><span>{{ item.name }}</span></span>
             <div class="typeCss" v-if="CourseTypeJson[item.id].length  &&
                                 (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
                                   ? pTypeCheck.indexOf(item.id) != -1
@@ -57,12 +55,43 @@
               </div>
             </div>
           </div>
+          <div class="all_choose" v-if="role == '1'">
+            <span><span>所有者</span></span>
+            <div class="typeCss">
+              <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
+                全部
+              </div>
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                我的培训
+              </div>
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                协同培训
+              </div>
+              <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
+                他人培训
+              </div>
+            </div>
+          </div>
+          <div class="all_choose" v-else>
+            <span><span>所有者</span></span>
+            <div class="typeCss">
+              <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
+                全部
+              </div>
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                我的培训
+              </div>
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                协同培训
+              </div>
+            </div>
+          </div>
         </div>
       </div>
       <div class="body_student" v-loading="loading">
-        <div class="typeCheck">
+        <!-- <div class="typeCheck">
           <el-switch v-model="typeCheck"></el-switch><span>分类显示</span>
-        </div>
+        </div> -->
         <div>
           <div class="main_box">
             <div style="display:flex;flex-wrap:wrap" v-if="!typeCheck">
@@ -169,7 +198,7 @@
               </div>
             </div>
             <div class="course_empty" v-if="zoneClass.length == 0">
-              暂无课程
+              暂无培训
             </div>
           </div>
         </div>
@@ -200,6 +229,7 @@ export default {
       classId: this.$route.query.cid,
       tType: this.$route.query.tType,
       org: this.$route.query.org,
+      role: this.$route.query.role,
       screenType: 4, //this.$route.query.screenType
       CourseType: [],
       CourseType2: [],
@@ -216,6 +246,7 @@ export default {
       CourseType3: [],
       pTypeCheck:[],
       pTypeCheckName: [],
+      groupA: "0",
     };
   },
   watch: {
@@ -242,7 +273,7 @@ export default {
     goTo(path) {
       this.$router.push(path);
     },
-    //获取专区下的课程
+    //获取专区下的培训
     getZoneClass(zid) {
       this.isListAjax = true;
       // const loading = this.openLoading(document.querySelector(".main_box"));
@@ -558,6 +589,7 @@ export default {
       this.isListAjax = true;
 
       let params = {
+        type: this.groupA,
         uid: this.userid,
         oid: this.oid,
         typea: this.typea != undefined ? this.typea : "",
@@ -574,7 +606,7 @@ export default {
         pageSize:this.pageSize
       };
       this.ajax
-        .get(this.$store.state.api + "selectTypeTrainCourse2", params)
+        .get(this.$store.state.api + "selectTrainCourseNew2", params)
         .then((res) => {
           this.loading = false;
           this.isListAjax = false;
@@ -818,6 +850,9 @@ export default {
     this.timer = null;
   },
   created() {
+    if (this.role == "1") {
+      this.groupA = "4";
+    }
     let typea = this.$route.query.typea
     let typeb = this.$route.query.typeb
     let typed = this.$route.query.typed
@@ -840,10 +875,41 @@ export default {
 </script>
 
 <style scoped>
-@media screen and (max-width: 1024px) {
+/* @media screen and (max-width: 1024px) {
   .box_course {
     margin: 0px 5px 20px 5px !important;
   }
+} */
+@media screen and (max-width: 1380px) {
+  .box_course {
+    width: calc(100% / 4 - (15px * 3) / 4) !important;
+  }
+
+  .box_course:nth-child(5n) {
+    margin-right: 15px !important;
+  }
+
+  .box_course:nth-child(4n) {
+    margin-right: 0 !important;
+  }
+}
+
+@media screen and (max-width: 1080px) {
+  .box_course {
+    width: calc(100% / 3 - (15px * 2) / 3) !important;
+  }
+
+  .box_course:nth-child(5n) {
+    margin-right: 15px !important;
+  }
+
+  .box_course:nth-child(4n) {
+    margin-right: 15px !important;
+  }
+
+  .box_course:nth-child(3n) {
+    margin-right: 0 !important;
+  }
 }
 
 .student_head .imgS {
@@ -909,7 +975,7 @@ export default {
   flex-wrap: nowrap;
   /* margin: 0px 1% 20px; */
   margin: 0 15px 20px 0;
-  width: 300px;
+  width: calc(100% / 5 - (15px * 4) / 5);
   /* height: 260px; */
   /*border: 1px solid #cecece; */
   border-radius: 10px;
@@ -920,6 +986,10 @@ export default {
   cursor: pointer;
 }
 
+.box_course:nth-child(5n) {
+  margin-right: 0;
+}
+
 .middle_white {
   font-size: 14px;
   margin: 5px 10px 10px;
@@ -951,6 +1021,8 @@ export default {
 }
 
 .main_box {
+  padding: 0 2px;
+  box-sizing: border-box;
   width: 100%;
   /* display: flex; */
   /* flex-direction: row; */
@@ -972,7 +1044,7 @@ export default {
 
 .body_student {
   margin: 0 auto;
-  width: 90%;
+  width: 100%;
   height: 100%;
 }
 
@@ -1020,13 +1092,20 @@ export default {
   /* margin: 2px 0; */
   width: 100%;
 }
-
 .all_choose>span {
-  min-width: 80px;
-  display: block;
-  letter-spacing: 14px;
+  display: flex;
+  margin-right: 5px;
 }
 
+.all_choose>span>span {
+  min-width: 65px;
+  max-width: 65px;
+  display: block;
+  text-align-last: justify;
+}
+.all_choose>span::after {
+    content: ':';
+}
 .all_choose>span:nth-child(1) {
   font-weight: bold;
 }
@@ -1073,16 +1152,16 @@ export default {
 }
 
 .reBox {
-  position: relative;
-  top: -25px;
-  z-index: 999;
+  /* position: relative; */
+  /* top: -25px; */
+  /* z-index: 999; */
   /* left: auto; */
   /* right: auto; */
   background: #fff;
-  width: 90%;
+  width: 100%;
   border-radius: 5px;
   padding-left: 20px;
-  margin: 0 auto;
+  margin: 0px auto 20px;
   box-sizing: border-box;
 }
 
@@ -1120,6 +1199,7 @@ export default {
 .search {
   width: 20px;
   padding: 0 5px;
+  display: flex;
 }
 
 .search>img {
@@ -1209,4 +1289,11 @@ export default {
   box-shadow: none !important;
 }
 
+.pb_content {
+  height: calc(100% - 40px);
+    padding: 0 0 0;
+    box-sizing: border-box;
+    overflow: auto;
+    margin-top: 10px;
+}
 </style>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov