dedsudiyu 2 天之前
父節點
當前提交
618f688091

+ 5 - 5
src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/addPage.vue

@@ -89,8 +89,8 @@
                   <!--                 <uploader-list></uploader-list> -->
                   <!--                <uploader-files> </uploader-files>-->
                 </uploader>
-                <video v-if="newData.attachments[0]" :src="newData.attachments[0].attachmentPath" controls
-                       style="width: 424px;height:240px;margin-left: 20px;"></video>
+                <video v-if="newData.attachments[0]" :src="newData.attachments[0].attachmentSourcePath?newData.attachments[0].attachmentSourcePath:newData.attachments[0].attachmentPath"
+                       controls style="width: 424px;height:240px;margin-left: 20px;"></video>
               </div>
             </el-form-item>
           </div>
@@ -476,13 +476,13 @@
         }
         if(this.newData.id){
           this.$set(this.newData,'attachments',[{
-            attachmentPath:res.data.url,
+            attachmentSourcePath:res.data.url,
             attachmentName:this.getLeftPart(res.data.name),
             attachmentSize:res.data.size+'',
           }]);
         }else{
           this.newData.attachments.push({
-            attachmentPath:res.data.url,
+            attachmentSourcePath:res.data.url,
             attachmentName:this.getLeftPart(res.data.name),
             attachmentSize:res.data.size+'',
           });
@@ -533,7 +533,7 @@
           }).then((res) => {
             if (res.data.code==200) {
               this.$set(this.newData,'attachments',[{
-                attachmentPath:res.data.data.url,
+                attachmentSourcePath:res.data.data.url,
                 attachmentName:this.getLeftPart(res.data.data.name),
                 attachmentSize:res.data.data.size+'',
               }]);

+ 3 - 3
src/views/safetyEducationExaminationNew/workbench/UserInfoCard.vue

@@ -41,7 +41,7 @@
           <p v-if="userInfo.typeName">{{userInfo.typeName}}</p>
         </div>
         <div class="center-data-box">
-          <div class="progress-max-box">
+          <div class="progress-max-box" v-if="userInfo.totalStudyHours>0">
             <el-progress
               :stroke-width="12" :format="format"
               :percentage="userInfo.studyHourRate">
@@ -53,8 +53,8 @@
           </div>
           <div class="center-bottom-box">
             <div class="center-bottom-min-box">
-              <p>{{userInfo.studyHourRate?'学时完成度':'学时要求'}}</p>
-              <p>{{userInfo.studyHourRate?userInfo.studyHourRate+'%':'无'}}</p>
+              <p>{{userInfo.totalStudyHours>0?'学时完成度':'学时要求'}}</p>
+              <p>{{userInfo.totalStudyHours>0?userInfo.studyHourRate+'%':'无'}}</p>
             </div>
             <div class="center-bottom-min-box">
               <p>目标考试</p>