|
@@ -35,6 +35,7 @@ import ColHeader from '@/components/col-header'
|
|
|
import ColSticky from '@/components/col-sticky'
|
|
|
import MessageTip from './message-tip'
|
|
|
import SelectTag from './select-tag'
|
|
|
+import ListenAudio from './listen-audio'
|
|
|
|
|
|
export type BackgroundMp3 = {
|
|
|
url?: string
|
|
@@ -88,6 +89,7 @@ export default defineComponent({
|
|
|
tagsNames: [] as Array<{ [id in string]: string }>,
|
|
|
formated: {} as FormatXMLInfo,
|
|
|
tagVisibility: false,
|
|
|
+ listenAudioShow: false,
|
|
|
// subjectListres: [] as any[],
|
|
|
// subjectListNames: {} as any,
|
|
|
// selectedSubjectList: null as any,
|
|
@@ -105,7 +107,11 @@ export default defineComponent({
|
|
|
messageTipType: 'upload' as 'upload' | 'error' | 'origin',
|
|
|
cbsInstrumentList: [] as any,
|
|
|
tagList: [] as any,
|
|
|
- musicSheetAuthRecordId: null as any
|
|
|
+ musicSheetAuthRecordId: null as any,
|
|
|
+ fileInfo: {
|
|
|
+ url: '',
|
|
|
+ name: '' as any
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -568,13 +574,20 @@ export default defineComponent({
|
|
|
loading={this.mp3Loading}
|
|
|
disabled={this.auditDisabled}
|
|
|
onClick={() => {
|
|
|
- if (this.mp3Url) return
|
|
|
+ if (this.mp3Url) {
|
|
|
+ this.listenAudioShow = true
|
|
|
+ this.fileInfo = {
|
|
|
+ url: this.mp3Url,
|
|
|
+ name: this.fileName(this.mp3Url)
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
this.naiveMp3File()
|
|
|
}}
|
|
|
>
|
|
|
{this.mp3Url
|
|
|
- ? this.fileName(this.mp3Url)
|
|
|
- : '上传伴奏文件'}
|
|
|
+ ? <span style='text-decoration-line: underline;color: #14BC9C;'>{this.fileName(this.mp3Url)}</span>
|
|
|
+ : <span style='text-decoration-line: underline;color: #14BC9C;'>上传伴奏文件</span>}
|
|
|
</Button>
|
|
|
|
|
|
{this.mp3Url && !this.auditDisabled && (
|
|
@@ -589,11 +602,22 @@ export default defineComponent({
|
|
|
) : (
|
|
|
<>
|
|
|
<Upload
|
|
|
- onUpdate:modelValue={val => (this.mp3Url = val)}
|
|
|
+ onUpdate:modelValue={val => {
|
|
|
+ this.mp3Url = val
|
|
|
+ }}
|
|
|
accept=".mp3"
|
|
|
disabled={this.auditDisabled}
|
|
|
/>
|
|
|
- <div style={{ marginLeft: '8px' }}>
|
|
|
+ <div
|
|
|
+ style={{ marginLeft: '8px' }}
|
|
|
+ onClick={() => {
|
|
|
+ this.listenAudioShow = true
|
|
|
+ this.fileInfo = {
|
|
|
+ url: this.mp3Url,
|
|
|
+ name: this.fileName(this.mp3Url)
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
{this.fileName(this.mp3Url)}
|
|
|
</div>
|
|
|
</>
|
|
@@ -633,7 +657,7 @@ export default defineComponent({
|
|
|
>
|
|
|
{this.midiFileUrl
|
|
|
? this.fileName(this.midiFileUrl)
|
|
|
- : '上传MIDI文件'}
|
|
|
+ : <span style='text-decoration-line: underline;color: #14BC9C;'>上传MIDI文件</span>}
|
|
|
</Button>
|
|
|
|
|
|
{this.midiFileUrl && !this.auditDisabled && (
|
|
@@ -692,7 +716,7 @@ export default defineComponent({
|
|
|
>
|
|
|
{this.xmlFileUrl
|
|
|
? this.fileName(this.xmlFileUrl)
|
|
|
- : '上传XML文件'}
|
|
|
+ : <span style='text-decoration-line: underline;color: #14BC9C;'>上传XML文件</span>}
|
|
|
</Button>
|
|
|
|
|
|
{this.xmlFileUrl && !this.auditDisabled && (
|
|
@@ -770,11 +794,18 @@ export default defineComponent({
|
|
|
loading={mp3.loading}
|
|
|
disabled={this.auditDisabled}
|
|
|
onClick={() => {
|
|
|
- if (mp3.url) return
|
|
|
+ if (mp3.url) {
|
|
|
+ this.listenAudioShow = true
|
|
|
+ this.fileInfo = {
|
|
|
+ url: mp3.url,
|
|
|
+ name: this.fileName(mp3.url)
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
this.naiveBGMp3File(index)
|
|
|
}}
|
|
|
>
|
|
|
- {mp3.url ? this.fileName(mp3.url) : '上传原声文件'}
|
|
|
+ {mp3.url ? <span style='text-decoration-line: underline;color: #14BC9C;'>{this.fileName(mp3.url)}</span> : <span style='text-decoration-line: underline;color: #14BC9C;'>上传原声文件</span>}
|
|
|
</Button>
|
|
|
|
|
|
{mp3.url && !this.auditDisabled && (
|
|
@@ -793,7 +824,14 @@ export default defineComponent({
|
|
|
accept=".mp3"
|
|
|
disabled={this.auditDisabled}
|
|
|
/>
|
|
|
- <div style={{ marginLeft: '8px' }}>
|
|
|
+ <div style={{ marginLeft: '8px' }}
|
|
|
+ onClick={() => {
|
|
|
+ this.listenAudioShow = true
|
|
|
+ this.fileInfo = {
|
|
|
+ url: mp3.url as any,
|
|
|
+ name: this.fileName(mp3.url)
|
|
|
+ }
|
|
|
+ }}>
|
|
|
{this.fileName(mp3.url)}
|
|
|
</div>
|
|
|
</>
|
|
@@ -1059,6 +1097,17 @@ export default defineComponent({
|
|
|
/>
|
|
|
</Popup>
|
|
|
|
|
|
+ <Popup
|
|
|
+ show={this.listenAudioShow}
|
|
|
+ round
|
|
|
+ closeable
|
|
|
+ teleport="body"
|
|
|
+ class={styles.listenAudioShow}
|
|
|
+ onUpdate:show={val => (this.listenAudioShow = val)}
|
|
|
+ >
|
|
|
+ {this.listenAudioShow && <ListenAudio fileInfo={this.fileInfo} />}
|
|
|
+ </Popup>
|
|
|
+
|
|
|
<MessageTip
|
|
|
title={this.messageTipTitle}
|
|
|
type={this.messageTipType}
|