648540858
2023-10-13 e4d37864d1c9fa525807ceecf131a556549672b4
web_src/src/components/CloudRecordDetail.vue
@@ -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>
                  {{ item.fileName.substring(0, 17) }}
                  {{ getFileShowName(item) }}
                </el-tag>
                <el-tag type="danger" v-if="choosedFile === item.filename">
                  <i class="el-icon-video-camera"  ></i>
                  {{ item.fileName.substring(0, 17) }}
                  {{ 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,13 +319,16 @@
          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)
        }
      },
      backToList() {
        this.$router.back()
      },
      getFileShowName(item) {
          return  moment.unix(item.startTime).format('HH:mm:ss') + "-" + moment.unix(item.endTime).format('HH:mm:ss')
      },
      chooseMediaChange() {
@@ -372,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");
        }