dedsudiyu 1 일 전
부모
커밋
5507ff43d4

+ 44 - 7
src/views/safetyEducationExaminationNew/safetyEducation/learningTasks/index.vue

@@ -60,6 +60,7 @@
               :stroke-width="4"
               :width="60" :percentage="item.progress">
             </el-progress>
+            <p class="position-p-1">我是课程名称我</p>
           </div>
           <p class="null-text-p" v-if="!dataList[0]">暂无数据</p>
         </div>
@@ -142,13 +143,30 @@
       },
       //操作按钮
       tableButton(item) {
-        this.$router.push({
-          name: 'learningCourse',
-          params: {
-            courseId: item.courseId,
-            examId: item.examId,
-          }
-        })
+        let self = this;
+        if(item.conditionType == 1){
+          this.$confirm('还未达到学时要求,是否现在去学习?', "警告", {
+            confirmButtonText: "确认",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            //学时要求
+            self.$router.push({
+              name: 'knowledgeLearning',
+              params: {}
+            })
+          }).catch(() => {});
+        }else{
+          //学习课程
+          this.$router.push({
+            name: 'learningCourse',
+            params: {
+              courseId: item.courseId,
+              examId: item.examId,
+            }
+          })
+        }
       },
       examElKnowledgePointTreeList(){
         examElKnowledgePointTreeList({}).then(response => {
@@ -295,6 +313,25 @@
             margin-left:0!important;
             font-size:12px!important;
           }
+          .position-p-1{
+            position: absolute;
+            top:140px;
+            left:10px;
+            /*单行省略号*/
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+            line-height:20px;
+            border:1px solid #0183fa;
+            max-width:350px;
+            border-radius:4px;
+            padding:4px 10px;
+            font-size:14px;
+            /*background-color: rgba(1, 131, 250,0.2);*/
+            background-color: #0183fa;
+            color:#fff;
+          }
         }
       }
     }

+ 10 - 17
src/views/safetyEducationExaminationNew/workbench/TaskCard.vue

@@ -12,6 +12,7 @@
           <!--<p v-if="yearType">成绩报告</p>-->
         </div>
         <div class="bottom-content-box scrollbar-box">
+          <p class="null-p" v-if="!yearMinList[0]">暂无数据</p>
           <div class="bottom-big-box-1" v-for="(item,index) in yearMinList">
             <p>{{item.academicYear}}</p>
             <p>{{item.statusCode==0?'未开始':(item.statusCode==2?'通过丨'+item.score:(item.statusCode==1?'进行中':'未通过'))}}</p>
@@ -24,6 +25,7 @@
           <p>待完成的学习任务</p>
         </div>
         <div class="bottom-content-box scrollbar-box">
+          <p class="null-p" v-if="!studyMinList[0]">暂无数据</p>
           <div class="bottom-big-box-2" v-for="(item,index) in studyMinList" @click="studyTableButton(item)">
             <p>{{item.courseName}}</p>
             <p >{{item.deptName}}丨{{item.learnStatus==0?'待完成':(item.learnStatus==1?'进行中':(item.learnStatus==2?'已完成':''))}}</p>
@@ -36,6 +38,7 @@
           <p>待完成的考前模拟练习</p>
         </div>
         <div class="bottom-content-box scrollbar-box">
+          <p class="null-p" v-if="!examinationMinList[0]">暂无数据</p>
           <div class="bottom-big-box-3" v-for="(item,index) in examinationMinList" @click="mockTableButton(item)">
             <p>{{item.examName}}</p>
             <p >最高成绩 {{item.maxScore?item.maxScore:0}}</p>
@@ -89,23 +92,7 @@ export default {
     return {
       //学年数据
       yearType:true,
-      yearMinList:[
-        {
-          academicYear:'2025-2026',
-          statusCode:'1',
-          score:'99',
-        },
-        {
-          academicYear:'2025-2026',
-          statusCode:'2',
-          score:'99',
-        },
-        {
-          academicYear:'2025-2026',
-          statusCode:'3',
-          score:'99',
-        },
-      ],
+      yearMinList:[],
       studyMinList:[],
       examinationMinList:[],
       dataList:[],
@@ -403,6 +390,12 @@ export default {
         height:168px;
         margin-top:6px;
         padding:8px 14px 0 20px;
+        .null-p{
+          text-align: center;
+          font-size: 14px;
+          color:#999;
+          line-height: 100px;
+        }
         .bottom-big-box-1{
           display: flex;
           background-color: rgba(1, 131, 250, 0.1);