mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 03:16:42 +08:00
笔记时间不一样
This commit is contained in:
@@ -440,3 +440,10 @@ export function formatSecondToHour(second) {
|
|||||||
h = h.toFixed(n);
|
h = h.toFixed(n);
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
// 秒换成时分秒
|
||||||
|
export function getHMS(time) {
|
||||||
|
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
|
||||||
|
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
|
||||||
|
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
|
||||||
|
return hour + ':' + min + ':' + sec
|
||||||
|
}
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ import interactBar from '@/components/Portal/interactBar.vue';
|
|||||||
import FileUpload from '@/components/NoteUpload/index.vue';
|
import FileUpload from '@/components/NoteUpload/index.vue';
|
||||||
import AuthorImg from '@/components/Portal/authorImg.vue';
|
import AuthorImg from '@/components/Portal/authorImg.vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import {formatDate,formatDateShort} from '@/utils/tools.js';
|
import {formatDate,formatDateShort,getHMS} from '@/utils/tools.js';
|
||||||
import apiUser from "@/api/system/user.js";
|
import apiUser from "@/api/system/user.js";
|
||||||
export default {
|
export default {
|
||||||
components:{interactBar,FileUpload,AuthorImg},
|
components:{interactBar,FileUpload,AuthorImg},
|
||||||
@@ -193,6 +193,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
getHMS,
|
||||||
dialogVisibleBigImage:false, // 显示图片放大框 true-显示弹框;false-隐藏弹框
|
dialogVisibleBigImage:false, // 显示图片放大框 true-显示弹框;false-隐藏弹框
|
||||||
currentImagePath:'',
|
currentImagePath:'',
|
||||||
userData:{},
|
userData:{},
|
||||||
@@ -540,14 +541,6 @@ export default {
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据秒数转换成对应的时分秒
|
|
||||||
getHMS(time) {
|
|
||||||
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
|
|
||||||
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
|
|
||||||
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
|
|
||||||
return hour + ':' + min + ':' + sec
|
|
||||||
},
|
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.paegSize = val;
|
this.paegSize = val;
|
||||||
this.pageIndex = 1;
|
this.pageIndex = 1;
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="edit-content">
|
<div class="edit-content">
|
||||||
<div class="note-tit">
|
<div class="note-tit">
|
||||||
<h3 @click="toCoursePage()" :style="{cursor:editdata.type==1? 'pointer':''}"> {{ editdata.courseName }} </h3>
|
<div @click="toCoursePage()" v-if="editdata.playTime != ''" :style="{cursor:editdata.type==1? 'pointer':''}"><img :src="`${webBaseUrl}/images/coteplay.png`" alt="">{{getHMS(editdata.playTime)}}</div>
|
||||||
<div @click="toCoursePage()" v-if="editdata.playTime != ''" :style="{cursor:editdata.type==1? 'pointer':''}"><img :src="`${webBaseUrl}/images/coteplay.png`" alt="">8:40</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="note-text" v-if="editdata.contentType != 3">
|
<div class="note-text" v-if="editdata.contentType != 3">
|
||||||
<!-- <input style="vertical-align:top;outline:none;" type="textarea" :rows="4" v-model="editdata.content"> -->
|
<!-- <input style="vertical-align:top;outline:none;" type="textarea" :rows="4" v-model="editdata.content"> -->
|
||||||
@@ -60,9 +59,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import apiNote from '@/api/phase2/note.js'
|
import apiNote from '@/api/phase2/note.js'
|
||||||
|
import {getHMS} from '@/utils/tools.js';
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
getHMS,
|
||||||
imgContent:[],
|
imgContent:[],
|
||||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||||
isShowList:false,
|
isShowList:false,
|
||||||
|
|||||||
Reference in New Issue
Block a user