Commit cefb2d5c authored by songrui's avatar songrui

mp3播放修改

parent 12fd196c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<doc-icon type="close-circle" /> <doc-icon type="close-circle" />
</span> </span>
</div> </div>
<audio ref="audio" type="audio/mpeg" crossOrigin="anonymous" style="display: none"></audio> <audio ref="audio" type="audio/mpeg" crossOrigin="anonymous" preload="metadata" style="display: none"></audio>
</div> </div>
</template> </template>
...@@ -81,6 +81,7 @@ export default { ...@@ -81,6 +81,7 @@ export default {
this.activeAudio = item this.activeAudio = item
this.player.playing = true this.player.playing = true
this.$emit('play', item) this.$emit('play', item)
console.log('this.player.duration', this.player.audioEl.duration)
} }
console.log('this.player', this.player) console.log('this.player', this.player)
}, },
...@@ -89,7 +90,7 @@ export default { ...@@ -89,7 +90,7 @@ export default {
this.player.playing = false this.player.playing = false
}, },
timeFormat(value) { timeFormat(value) {
if (!value) { if (!value || value == Infinity) {
return '00:00' return '00:00'
} }
let date = Math.ceil(parseFloat(value)) let date = Math.ceil(parseFloat(value))
......
...@@ -87,6 +87,7 @@ export class musicPlayer { ...@@ -87,6 +87,7 @@ export class musicPlayer {
setSrc(src) { setSrc(src) {
this.progress = 0 this.progress = 0
this.audioEl.src = src this.audioEl.src = src
this.audioEl.load()
} }
// 调整进度 // 调整进度
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
<div v-for="item in diagnoseRecord" :key="item.id" <div v-for="item in diagnoseRecord" :key="item.id"
class="card-back-1 mb-3"> class="card-back-1 mb-3">
<div class="title px-4 py-1">诊断列表</div> <div class="title px-4 py-1">诊断列表</div>
<div class="flex flex-col gap-y-2.5 py-3 px-4 doc-list-card"> <div class="flex flex-col py-3 px-4 doc-list-card" style="row-gap: .04rem;line-height: 1.5;">
<div class="text-ellipsis"> <div class="flex">
<span class="label">诊断名称</span> <span class="label shrink-0">诊断名称</span>
<span>{{ item.diseaseName }}({{item.icdCode}})</span> <span class="grow text-wrap">{{ item.diseaseName }}({{item.icdCode}})</span>
</div> </div>
<div class="text-ellipsis"> <div class="flex">
<span class="label">诊断评估</span> <span class="label shrink-0">诊断评估</span>
<span>{{ item.diagnoseResultValue || '-' }}</span> <span class="grow" >{{ item.diagnoseResultValue || '-' }}</span>
</div> </div>
<div> <div>
<span class="label">诊断单位</span> <span class="label">诊断单位</span>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div v-for="item in treatmentRecord" :key="item.id" <div v-for="item in treatmentRecord" :key="item.id"
class="card-back-2 mb-3"> class="card-back-2 mb-3">
<div class="title px-4 py-1">治疗方案</div> <div class="title px-4 py-1">治疗方案</div>
<div class="flex flex-col gap-y-2.5 py-3 px-4 doc-list-card"> <div class="flex flex-col py-3 px-4 doc-list-card" style="row-gap: .04rem;line-height: 1.5;">
<div class="text-ellipsis"> <div class="text-ellipsis">
<span class="label">慢病标签</span> <span class="label">慢病标签</span>
<span>{{ item.diseaseTypeName }}</span> <span>{{ item.diseaseTypeName }}</span>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<div v-for="item in followUpRecord" :key="item.id" <div v-for="item in followUpRecord" :key="item.id"
class="card-back-3 mb-3"> class="card-back-3 mb-3">
<div class="title px-4 py-1">随访方案</div> <div class="title px-4 py-1">随访方案</div>
<div class="flex flex-col gap-y-2.5 py-3 px-4 doc-list-card"> <div class="flex flex-col py-3 px-4 doc-list-card" style="row-gap: .04rem;line-height: 1.5;">
<div class="text-ellipsis"> <div class="text-ellipsis">
<span class="label">随访方案</span> <span class="label">随访方案</span>
<span> <span>
......
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
> >
<div class="flex flex-col"> <div class="flex flex-col">
<div v-for='item in list' :key="item.id" @click="toDetail(item)" <div v-for='item in list' :key="item.id" @click="toDetail(item)"
class="flex flex-col gap-y-2.5 py-3 px-4 mb-3 doc-list-card"> class="flex flex-col py-3 px-4 mb-3 doc-list-card" style="row-gap: .04rem;line-height: 1.5;">
<div> <div>
<span class="label">随访日期</span> <span class="label">随访日期</span>
<span>{{ item.visitDate }}</span> <span>{{ item.visitDate }}</span>
</div> </div>
<div class="text-ellipsis"> <div class="flex">
<span class="label">服务人群</span> <span class="label shrink-0">服务人群</span>
<span>{{ item.groupsArraysName || '-' }}</span> <span class="grow text-wrap">{{ item.groupsArraysName || '-' }}</span>
</div> </div>
<div> <div>
<span class="label">随访方式</span> <span class="label">随访方式</span>
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div v-for="item in firstScreenList" :key="item.id" <div v-for="item in firstScreenList" :key="item.id"
class="first-card mb-3"> class="first-card mb-3">
<div class="title px-4 py-1">主要慢病筛查记录</div> <div class="title px-4 py-1">主要慢病筛查记录</div>
<div class=" py-3 px-4 doc-list-card"> <div class="py-3 px-4 doc-list-card">
<div class="flex flex-col gap-y-2.5"> <div class="flex flex-col" style="row-gap: .04rem;line-height: 1.5;">
<div> <div class="flex">
<span class="label">高危评估</span> <span class="label shrink-0">高危评估</span>
<span>{{ item.screenResultName }}</span> <span class="grow">{{ item.screenResultName }}</span>
</div> </div>
<div> <div>
<span class="label">筛查日期</span> <span class="label">筛查日期</span>
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
class="second-card mb-3"> class="second-card mb-3">
<div class="title px-4 py-1">专病筛查记录</div> <div class="title px-4 py-1">专病筛查记录</div>
<div class=" py-3 px-4 doc-list-card"> <div class=" py-3 px-4 doc-list-card">
<div class="flex flex-col gap-y-2.5"> <div class="flex flex-col" style="row-gap: .04rem;line-height: 1.5;">
<div class="text-ellipsis"> <div class="flex">
<span class="label">高危评估</span> <span class="label shrink-0">高危评估</span>
<span>{{ item.specialScreenResultName }}</span> <span class="grow" >{{ item.specialScreenResultName }}</span>
</div> </div>
<div> <div>
<span class="label">筛查日期</span> <span class="label">筛查日期</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment