开始重构云端录像继续

This commit is contained in:
648540858
2023-10-13 15:26:51 +08:00
parent 298a9f4280
commit e4d37864d1
12 changed files with 4677 additions and 15443 deletions

19813
web_src/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -39,11 +39,11 @@
<li v-for="(item,index) in detailFiles" :key="index" class="infinite-list-item record-list-item" >
<el-tag v-if="choosedFile !== item.filename" @click="chooseFile(item)">
<i class="el-icon-video-camera" ></i>
{{ getFileShowName(item.fileName) }}
{{ getFileShowName(item) }}
</el-tag>
<el-tag type="danger" v-if="choosedFile === item.filename">
<i class="el-icon-video-camera" ></i>
{{ getFileShowName(item.fileName) }}
{{ getFileShowName(item) }}
</el-tag>
<a class="el-icon-download" style="color: #409EFF;font-weight: 600;margin-left: 10px;"
:href="`${getFileBasePath(item)}/download.html?url=download/${app}/${stream}/${chooseDate}/${item.fileName}`"
@@ -319,7 +319,7 @@
this.choosedFile = "";
}else {
this.choosedFile = file.fileName;
this.videoUrl = `${this.getFileBasePath(file)}/download/${this.app}/${this.stream}/${this.chooseDate}/${this.choosedFile}`
this.videoUrl = `${this.getFileBasePath(file)}/download/${this.app}/${this.stream}/${this.chooseDate}/${file.fileName}`
console.log(this.videoUrl)
}
@@ -327,9 +327,8 @@
backToList() {
this.$router.back()
},
getFileShowName(name) {
return name.substring(0, 2) + ":" + name.substring(2, 4) + ":" + name.substring(4, 6) + "-" +
name.substring(7, 9) + ":" + name.substring(9, 11) + ":" + name.substring(11, 13)
getFileShowName(item) {
return moment.unix(item.startTime).format('HH:mm:ss') + "-" + moment.unix(item.endTime).format('HH:mm:ss')
},
chooseMediaChange() {
@@ -376,13 +375,8 @@
},
getTimeForFile(file){
console.log(file)
let timeStr = file.fileName.substring(0, 17);
if(timeStr.indexOf("~") > 0){
timeStr = timeStr.replaceAll("-",":")
}
let timeArr = timeStr.split("-");
let starTime = new Date(this.chooseDate + " " + timeArr[0]);
let endTime = new Date(this.chooseDate + " " + timeArr[1]);
let starTime = new Date(file.startTime * 1000);
let endTime = new Date(file.endTime * 1000);
if(this.checkIsOver24h(starTime,endTime)){
endTime = new Date(this.chooseDate + " " + "23:59:59");
}