|
@ -42,14 +42,23 @@ |
|
|
<img :src="src" :key="src" style="width: 150px; height: 150px; padding-right: 10px" |
|
|
<img :src="src" :key="src" style="width: 150px; height: 150px; padding-right: 10px" |
|
|
v-for="src in info.imageList" @click="watchImg(src)" /> |
|
|
v-for="src in info.imageList" @click="watchImg(src)" /> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="info.voiceList && info.voiceList.length > 0" :class="[ |
|
|
<!-- v-if="info.voiceList && info.voiceList.length > 0" --> |
|
|
|
|
|
<div :class="[ |
|
|
'm-info-prop', |
|
|
'm-info-prop', |
|
|
{ 'm-info-prop-vis': source === 'visiual' }, |
|
|
{ 'm-info-prop-vis': source === 'visiual' }, |
|
|
]"> |
|
|
]" v-show="fasle" > |
|
|
<span class="u-info-title-2">语音:</span> |
|
|
<span class="u-info-title-2">语音:</span> |
|
|
<audio controls> |
|
|
<!-- v-for="item in info.voiceList" --> |
|
|
<source :src="item.url" type="" :key="item.url" v-for="item in info.voiceList" /> |
|
|
<audio controls controlsList="download"> |
|
|
|
|
|
<source src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/prod/20241204/fee163b9aa7d48efad55860c774f122f.mp3" type=""/> |
|
|
</audio> |
|
|
</audio> |
|
|
|
|
|
|
|
|
|
|
|
<el-button type="text" icon="el-icon-download" |
|
|
|
|
|
@click="downloadFile('https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/prod/20241204/fee163b9aa7d48efad55860c774f122f.mp3')" |
|
|
|
|
|
> |
|
|
|
|
|
下载语音 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div :class="[ |
|
|
<div :class="[ |
|
|
'm-info-prop', |
|
|
'm-info-prop', |
|
@ -209,6 +218,7 @@ |
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
import foldText from "@/views/components/foldText"; |
|
|
import foldText from "@/views/components/foldText"; |
|
|
import projectInfo from "../../xiangmu/cpts/project-info"; |
|
|
import projectInfo from "../../xiangmu/cpts/project-info"; |
|
|
|
|
|
|
|
|
function iniData() { |
|
|
function iniData() { |
|
|
return { |
|
|
return { |
|
|
user: {}, |
|
|
user: {}, |
|
@ -312,6 +322,40 @@ export default { |
|
|
this.loadGrid(); |
|
|
this.loadGrid(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 下载录音 |
|
|
|
|
|
downloadFile(url) { |
|
|
|
|
|
const fileName = '录音.mp3' |
|
|
|
|
|
this.getOSSBlobResource(url).then(res => { |
|
|
|
|
|
this.saveFile(res, fileName) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getOSSBlobResource(url) { |
|
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
|
const xhr = new XMLHttpRequest() |
|
|
|
|
|
xhr.open('GET', url, true) |
|
|
|
|
|
xhr.responseType = 'blob' |
|
|
|
|
|
xhr.setRequestHeader('Cache-Control', 'no-cache') |
|
|
|
|
|
xhr.onload = () => { |
|
|
|
|
|
if (xhr.status === 200) { |
|
|
|
|
|
resolve(xhr.response) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
xhr.send() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 保存文件 |
|
|
|
|
|
saveFile(data, fileName) { |
|
|
|
|
|
const exportBlob = new Blob([data]) |
|
|
|
|
|
const saveLink = document.createElement('a') |
|
|
|
|
|
document.body.appendChild(saveLink) |
|
|
|
|
|
saveLink.style.display = 'none' |
|
|
|
|
|
var urlObject = window.URL.createObjectURL(exportBlob) |
|
|
|
|
|
saveLink.href = urlObject |
|
|
|
|
|
saveLink.download = fileName |
|
|
|
|
|
saveLink.click() |
|
|
|
|
|
document.body.removeChild(saveLink) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
watchImg(src) { |
|
|
watchImg(src) { |
|
|
window.open(src); |
|
|
window.open(src); |
|
|
}, |
|
|
}, |
|
|