|
@@ -2,48 +2,29 @@ import { defineComponent } from 'vue'
|
|
|
import {
|
|
|
Button,
|
|
|
Field,
|
|
|
- Sticky,
|
|
|
Form,
|
|
|
Tag,
|
|
|
Radio,
|
|
|
RadioGroup,
|
|
|
Popup,
|
|
|
- Icon,
|
|
|
Empty,
|
|
|
- Picker,
|
|
|
Toast,
|
|
|
- NoticeBar,
|
|
|
- CellGroup,
|
|
|
- Cell,
|
|
|
- Dialog
|
|
|
+ CellGroup
|
|
|
} from 'vant'
|
|
|
-import ColFieldGroup from '@/components/col-field-group'
|
|
|
-// import { MusicType } from 'src/teacher/music/list/item.d'
|
|
|
-import SubjectModel from './subjectModal'
|
|
|
-import InstrumentModal from './instrumentModal'
|
|
|
-import ColField from '@/components/col-field'
|
|
|
-
|
|
|
-import {
|
|
|
- teachercanEvaluateType,
|
|
|
- teacherChargeType,
|
|
|
- teachershowAudiType,
|
|
|
- teachershowFingeringType,
|
|
|
- teachershowHasBeatType,
|
|
|
- teacherNotationType,
|
|
|
- teacherStyleType,
|
|
|
- teacherExquisiteType,
|
|
|
- teacherPaymentType
|
|
|
-} from '@/constant/music'
|
|
|
+import { state as appState } from '@/state'
|
|
|
+import { teachershowAudiType, teacherPaymentType } from '@/constant/music'
|
|
|
import { getXmlInfo, FormatXMLInfo } from '@/helpers/music-xml'
|
|
|
import Upload from './upload'
|
|
|
import styles from './index.module.less'
|
|
|
-import SelectTag from '@/views/music/search/select-tag'
|
|
|
+
|
|
|
import { browser } from '@/helpers/utils'
|
|
|
import { postMessage } from '@/helpers/native-message'
|
|
|
import request from '@/helpers/request'
|
|
|
import requestOrigin from 'umi-request'
|
|
|
import UploadIcon from './images/music-icon.png'
|
|
|
import btnBg from './images/btn-bg.png'
|
|
|
+import iconTitleUpload from './images/icon-title-upload.png'
|
|
|
+import iconTitleUpdate from './images/icon-title-update.png'
|
|
|
import ColUpload from '@/components/col-upload'
|
|
|
import {
|
|
|
verifiyNumberInteger,
|
|
@@ -52,6 +33,7 @@ import {
|
|
|
import ColHeader from '@/components/col-header'
|
|
|
import ColSticky from '@/components/col-sticky'
|
|
|
import MessageTip from './message-tip'
|
|
|
+import SelectTag from './select-tag'
|
|
|
|
|
|
export type BackgroundMp3 = {
|
|
|
url?: string
|
|
@@ -87,7 +69,7 @@ export default defineComponent({
|
|
|
composer: '',
|
|
|
remark: '',
|
|
|
// repeatedBeats: 0,
|
|
|
- playSpeed: null as any,
|
|
|
+ playSpeed: '100' as any,
|
|
|
// hasBeat: 0,
|
|
|
musicCover: '',
|
|
|
paymentType: 'CHARGE',
|
|
@@ -101,7 +83,7 @@ export default defineComponent({
|
|
|
selectTagVisible: false,
|
|
|
subJectVisible: false,
|
|
|
instrumentVisible: false,
|
|
|
- tags: [] as string[],
|
|
|
+ tags: [] as any[],
|
|
|
tagsNames: [] as Array<{ [id in string]: string }>,
|
|
|
formated: {} as FormatXMLInfo,
|
|
|
tagVisibility: false,
|
|
@@ -119,7 +101,8 @@ export default defineComponent({
|
|
|
messageTipStatus: false,
|
|
|
messageTipTitle: '上传须知',
|
|
|
messageTipType: 'upload' as 'upload' | 'error' | 'origin',
|
|
|
- cbsInstrumentList: [] as any
|
|
|
+ cbsInstrumentList: [] as any,
|
|
|
+ tagList: [] as any
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -146,6 +129,18 @@ export default defineComponent({
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ const prefix =
|
|
|
+ appState.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
|
|
|
+
|
|
|
+ request(prefix + '/MusicTag/tree').then((res: any) => {
|
|
|
+ console.log(res, 'res')
|
|
|
+ this.tagList = res.data || []
|
|
|
+ })
|
|
|
+
|
|
|
+ if (this.$route.params.id) {
|
|
|
+ this.setDetail(this.$route.params.id as string)
|
|
|
+ }
|
|
|
+
|
|
|
request
|
|
|
.post('/api-teacher/musicalInstrument/list')
|
|
|
.then((response: any) => {
|
|
@@ -161,7 +156,56 @@ export default defineComponent({
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- onComfirm(tags: any, names: any) {
|
|
|
+ async setDetail(id: string) {
|
|
|
+ try {
|
|
|
+ const { data } = await request.get(
|
|
|
+ `/api-teacher/music/sheet/detail/${id}`
|
|
|
+ )
|
|
|
+
|
|
|
+ this.playMode = data.audioType || 'MP3'
|
|
|
+ this.xmlFileUrl = data.xmlFileUrl
|
|
|
+ this.name = data.musicSheetName
|
|
|
+ this.composer = data.composer
|
|
|
+ this.playSpeed = data.playSpeed
|
|
|
+ // this.tags = data.musicTag?.split(',')
|
|
|
+ const names = data.musicTagNames.split(',')
|
|
|
+ this.tags = data.musicTag.split(',')
|
|
|
+ this.tags = this.tags
|
|
|
+ .filter((el: any) => {
|
|
|
+ return el != ''
|
|
|
+ })
|
|
|
+ .map(e => Number(e))
|
|
|
+ for (let i = 0; i < names.length; i++) {
|
|
|
+ this.tagsNames[this.tags[i]] = names[i]
|
|
|
+ }
|
|
|
+
|
|
|
+ this.musicCover = data.titleImg
|
|
|
+ this.midiFileUrl = data.midiUrl
|
|
|
+ this.mp3Url = data.metronomeUrl
|
|
|
+ this.remark = data.remark
|
|
|
+ this.paymentType = data.paymentType
|
|
|
+ this.musicPrice = data.musicPrice || 0
|
|
|
+ // this.extConfigJson = data.extConfigJson
|
|
|
+ this.backgroundMp3s = data.background.map((item: any) => {
|
|
|
+ return {
|
|
|
+ url: item.audioFileUrl,
|
|
|
+ trackName: item.musicalInstrumentName,
|
|
|
+ id: item.musicalInstrumentId,
|
|
|
+ track: item.track,
|
|
|
+ loading: false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onComfirm(tags: any) {
|
|
|
+ const names: any = []
|
|
|
+ this.tagList.forEach(tag => {
|
|
|
+ if (tags.includes(tag.id)) {
|
|
|
+ names[tag.id] = tag.name
|
|
|
+ }
|
|
|
+ })
|
|
|
this.tagsNames = names
|
|
|
this.tagVisibility = false
|
|
|
const data = Object.values(tags).flat().filter(Boolean) as string[]
|
|
@@ -192,8 +236,10 @@ export default defineComponent({
|
|
|
console.log(currentItem, 'currentItem')
|
|
|
tempMp3s.push({
|
|
|
url: '',
|
|
|
+ id: currentItem.id,
|
|
|
trackName: currentItem.name,
|
|
|
- track: currentItem.code
|
|
|
+ track: currentItem.code,
|
|
|
+ loading: currentItem.loading
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -241,6 +287,8 @@ export default defineComponent({
|
|
|
|
|
|
let resultIndexStatus = false
|
|
|
const partNames = formated.partNames || []
|
|
|
+
|
|
|
+ const tempMp3s: BackgroundMp3[] = []
|
|
|
for (const i of partNames) {
|
|
|
const index = this.cbsInstrumentList.findIndex(
|
|
|
cbs => cbs.code?.indexOf(i) > -1
|
|
@@ -249,7 +297,20 @@ export default defineComponent({
|
|
|
resultIndexStatus = true
|
|
|
break
|
|
|
}
|
|
|
+
|
|
|
+ const currentItem = this.cbsInstrumentList[index]
|
|
|
+ if (currentItem) {
|
|
|
+ console.log(currentItem, 'currentItem')
|
|
|
+ tempMp3s.push({
|
|
|
+ url: '',
|
|
|
+ id: currentItem.id,
|
|
|
+ trackName: currentItem.name,
|
|
|
+ track: currentItem.code,
|
|
|
+ loading: currentItem.loading
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (partNames.length <= 0 || resultIndexStatus) {
|
|
|
this.messageTipStatus = true
|
|
|
this.messageTipTitle = '解析失败'
|
|
@@ -257,7 +318,9 @@ export default defineComponent({
|
|
|
this.xmlFileUrl = ''
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
this.formated = formated
|
|
|
+ this.backgroundMp3s = tempMp3s
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -293,7 +356,8 @@ export default defineComponent({
|
|
|
{ api: 'chooseFile', content: { type: 'mp3', bucket: 'cloud-coach' } },
|
|
|
evt => {
|
|
|
// @ts-ignore
|
|
|
- this.bgmp3Url = evt?.fileUrl || this.bgmp3Url || ''
|
|
|
+ this.backgroundMp3s[index].url =
|
|
|
+ evt?.fileUrl || this.backgroundMp3s[index].url || ''
|
|
|
this.backgroundMp3s[index].loading = false
|
|
|
}
|
|
|
)
|
|
@@ -316,33 +380,41 @@ export default defineComponent({
|
|
|
},
|
|
|
createSubmitData() {
|
|
|
return {
|
|
|
- playMode: this.playMode, // 播放模式
|
|
|
- xmlFileUrl: this.xmlFileUrl, // XML
|
|
|
- name: this.name, // 曲目名称
|
|
|
- composer: this.composer, // 音乐人
|
|
|
- playSpeed: this.playSpeed, // 曲目速度
|
|
|
- musicCover: this.musicCover, // 曲目封面
|
|
|
-
|
|
|
- multiTracksSelection: '1001', // 声轨名
|
|
|
- midiFileUrl: this.midiFileUrl, // MID文件
|
|
|
- musicSheetAccompanimentList: [
|
|
|
- {
|
|
|
- audioFileUrl: this.mp3Url,
|
|
|
- sortNumber: 1,
|
|
|
- audioPlayType: 'PLAY'
|
|
|
- }
|
|
|
- ], // 伴奏
|
|
|
- // audioType: 'HOMEMODE', // HOMEMODE 默认自制
|
|
|
- musicSheetSoundList: this.backgroundMp3s.map(item => ({
|
|
|
- // audioFileUrl: this.bgmp3Url,
|
|
|
- // track: item.track
|
|
|
- musicalInstrumentId: item.id,
|
|
|
- musicalInstrumentName: item.trackName,
|
|
|
- audioFileUrl: item.url,
|
|
|
- audioPlayType: 'PLAY' // SING
|
|
|
- })), // 原音
|
|
|
- musicalInstrumentIds: '1001', // 乐器编号
|
|
|
- extConfigJson: '{"repeatedBeats":0,"gradualTimes":{},"isEvxml":0}'
|
|
|
+ musicSheetJson: {
|
|
|
+ playMode: this.playMode, // 播放模式
|
|
|
+ xmlFileUrl: this.xmlFileUrl, // XML
|
|
|
+ name: this.name, // 曲目名称
|
|
|
+ composer: this.composer, // 音乐人
|
|
|
+ playSpeed: this.playSpeed, // 曲目速度
|
|
|
+ remark: this.remark,
|
|
|
+ musicTagIds: this.tags?.join(','),
|
|
|
+ musicCover: this.musicCover, // 曲目封面
|
|
|
+ multiTracksSelection: this.backgroundMp3s
|
|
|
+ .map(item => item.track)
|
|
|
+ ?.join(','), // 声轨名
|
|
|
+ midiFileUrl: this.midiFileUrl, // MID文件
|
|
|
+ musicSheetAccompanimentList: [
|
|
|
+ {
|
|
|
+ audioFileUrl: this.mp3Url,
|
|
|
+ sortNumber: 1,
|
|
|
+ audioPlayType: 'PLAY'
|
|
|
+ }
|
|
|
+ ], // 伴奏
|
|
|
+ musicPrice: this.musicPrice,
|
|
|
+ paymentType: this.paymentType,
|
|
|
+ // audioType: 'HOMEMODE', // HOMEMODE 默认自制
|
|
|
+ musicSheetSoundList: this.backgroundMp3s.map(item => ({
|
|
|
+ musicalInstrumentId: item.id,
|
|
|
+ musicalInstrumentName: item.trackName,
|
|
|
+ track: item.track,
|
|
|
+ audioFileUrl: item.url,
|
|
|
+ audioPlayType: 'PLAY' // SING
|
|
|
+ })), // 原音
|
|
|
+ musicalInstrumentIds: this.backgroundMp3s
|
|
|
+ .map(item => item.id)
|
|
|
+ ?.join(','), // 乐器编号
|
|
|
+ extConfigJson: '{"repeatedBeats":0,"gradualTimes":{},"isEvxml":0}'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async onSubmit(vals: any) {
|
|
@@ -350,46 +422,52 @@ export default defineComponent({
|
|
|
this.submitLoading = true
|
|
|
try {
|
|
|
if (this.$route.params.id) {
|
|
|
- await request.post('/api-teacher/music/sheet/update', {
|
|
|
+ await request.post('/api-teacher/musicSheetAuthRecord/update', {
|
|
|
data: {
|
|
|
...this.createSubmitData(),
|
|
|
id: this.$route.params.id
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- await request.post('/api-teacher/music/sheet/save', {
|
|
|
+ await request.post('/api-teacher/musicSheetAuthRecord/save', {
|
|
|
data: this.createSubmitData()
|
|
|
})
|
|
|
}
|
|
|
+ Toast('上传成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ postMessage({
|
|
|
+ api: 'back'
|
|
|
+ })
|
|
|
+ }, 800)
|
|
|
} catch (error) {
|
|
|
//
|
|
|
+ } finally {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.submitLoading = false
|
|
|
+ }, 800)
|
|
|
}
|
|
|
|
|
|
- Toast('上传成功')
|
|
|
- setTimeout(() => {
|
|
|
- postMessage({
|
|
|
- api: 'back'
|
|
|
- })
|
|
|
- this.submitLoading = false
|
|
|
- }, 800)
|
|
|
console.log(vals)
|
|
|
},
|
|
|
- failed() {
|
|
|
- console.log('failed', this.backgroundMp3s)
|
|
|
+ onFailed(e: any) {
|
|
|
+ console.log('failed', e)
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
|
- // console.log(this.formated)
|
|
|
- // const browserInfo = browser()
|
|
|
return (
|
|
|
<Form
|
|
|
class={styles.form}
|
|
|
onSubmit={this.onSubmit}
|
|
|
onFailed={this.onFailed}
|
|
|
>
|
|
|
- <ColHeader hideHeader={false} background="transparent" border={false} />
|
|
|
+ <ColHeader
|
|
|
+ title=" "
|
|
|
+ hideHeader={false}
|
|
|
+ background="transparent"
|
|
|
+ border={false}
|
|
|
+ />
|
|
|
|
|
|
- <CellGroup class={[styles.area, styles.topArea]}>
|
|
|
+ <CellGroup class={[styles.area, styles.topArea]} border={false}>
|
|
|
<div
|
|
|
class={styles.uploadMessage}
|
|
|
onClick={() => {
|
|
@@ -401,6 +479,11 @@ export default defineComponent({
|
|
|
上传须知
|
|
|
</div>
|
|
|
|
|
|
+ <img
|
|
|
+ class={styles.titleImg}
|
|
|
+ src={this.$route.params.id ? iconTitleUpdate : iconTitleUpload}
|
|
|
+ />
|
|
|
+
|
|
|
<div class={styles['section-title']}></div>
|
|
|
<Field required label="播放类型" center inputAlign="right">
|
|
|
{{
|
|
@@ -444,16 +527,30 @@ export default defineComponent({
|
|
|
),
|
|
|
input: () =>
|
|
|
browser().isApp ? (
|
|
|
- <Button
|
|
|
- icon={UploadIcon}
|
|
|
- class={styles.upbtn}
|
|
|
- loading={this.mp3Loading}
|
|
|
- onClick={this.naiveMp3File}
|
|
|
- >
|
|
|
- {this.mp3Url
|
|
|
- ? this.fileName(this.mp3Url)
|
|
|
- : '上传伴奏文件'}
|
|
|
- </Button>
|
|
|
+ <div class={styles.btnSection}>
|
|
|
+ <Button
|
|
|
+ icon={UploadIcon}
|
|
|
+ class={styles.upbtn}
|
|
|
+ loading={this.mp3Loading}
|
|
|
+ onClick={() => {
|
|
|
+ if (this.mp3Url) return
|
|
|
+ this.naiveMp3File()
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {this.mp3Url
|
|
|
+ ? this.fileName(this.mp3Url)
|
|
|
+ : '上传伴奏文件'}
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ {this.mp3Url && (
|
|
|
+ <i
|
|
|
+ class={styles.iconDelete}
|
|
|
+ onClick={() => {
|
|
|
+ this.mp3Url = ''
|
|
|
+ }}
|
|
|
+ ></i>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
) : (
|
|
|
<>
|
|
|
<Upload
|
|
@@ -487,16 +584,30 @@ export default defineComponent({
|
|
|
),
|
|
|
input: () =>
|
|
|
browser().isApp ? (
|
|
|
- <Button
|
|
|
- icon={UploadIcon}
|
|
|
- class={styles.upbtn}
|
|
|
- loading={this.mp3Loading}
|
|
|
- onClick={this.naiveMidFile}
|
|
|
- >
|
|
|
- {this.midiFileUrl
|
|
|
- ? this.fileName(this.midiFileUrl)
|
|
|
- : '上传MIDI文件'}
|
|
|
- </Button>
|
|
|
+ <div class={styles.btnSection}>
|
|
|
+ <Button
|
|
|
+ icon={UploadIcon}
|
|
|
+ class={styles.upbtn}
|
|
|
+ loading={this.mp3Loading}
|
|
|
+ onClick={() => {
|
|
|
+ if (this.midiFileUrl) return
|
|
|
+ this.naiveMidFile()
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {this.midiFileUrl
|
|
|
+ ? this.fileName(this.midiFileUrl)
|
|
|
+ : '上传MIDI文件'}
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ {this.midiFileUrl && (
|
|
|
+ <i
|
|
|
+ class={styles.iconDelete}
|
|
|
+ onClick={() => {
|
|
|
+ this.midiFileUrl = ''
|
|
|
+ }}
|
|
|
+ ></i>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
) : (
|
|
|
<>
|
|
|
<Upload
|
|
@@ -532,16 +643,31 @@ export default defineComponent({
|
|
|
),
|
|
|
input: () =>
|
|
|
browser().isApp ? (
|
|
|
- <Button
|
|
|
- icon={UploadIcon}
|
|
|
- class={styles.upbtn}
|
|
|
- loading={this.xmlFileLoading}
|
|
|
- onClick={this.naiveXMLFile}
|
|
|
- >
|
|
|
- {this.xmlFileUrl
|
|
|
- ? this.fileName(this.xmlFileUrl)
|
|
|
- : '上传XML文件'}
|
|
|
- </Button>
|
|
|
+ <div class={styles.btnSection}>
|
|
|
+ <Button
|
|
|
+ icon={UploadIcon}
|
|
|
+ class={styles.upbtn}
|
|
|
+ loading={this.xmlFileLoading}
|
|
|
+ onClick={() => {
|
|
|
+ if (this.xmlFileUrl) return
|
|
|
+ this.naiveXMLFile()
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {this.xmlFileUrl
|
|
|
+ ? this.fileName(this.xmlFileUrl)
|
|
|
+ : '上传XML文件'}
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ {this.xmlFileUrl && (
|
|
|
+ <i
|
|
|
+ class={styles.iconDelete}
|
|
|
+ onClick={() => {
|
|
|
+ this.xmlFileUrl = ''
|
|
|
+ this.backgroundMp3s = []
|
|
|
+ }}
|
|
|
+ ></i>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
) : (
|
|
|
<>
|
|
|
<Upload
|
|
@@ -599,14 +725,28 @@ export default defineComponent({
|
|
|
),
|
|
|
input: () =>
|
|
|
browser().isApp ? (
|
|
|
- <Button
|
|
|
- icon={UploadIcon}
|
|
|
- class={styles.upbtn}
|
|
|
- loading={mp3.loading}
|
|
|
- onClick={() => this.naiveBGMp3File(index)}
|
|
|
- >
|
|
|
- {mp3.url ? this.fileName(mp3.url) : '上传原声文件'}
|
|
|
- </Button>
|
|
|
+ <div class={styles.btnSection}>
|
|
|
+ <Button
|
|
|
+ icon={UploadIcon}
|
|
|
+ class={styles.upbtn}
|
|
|
+ loading={mp3.loading}
|
|
|
+ onClick={() => {
|
|
|
+ if (mp3.url) return
|
|
|
+ this.naiveBGMp3File(index)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {mp3.url ? this.fileName(mp3.url) : '上传原声文件'}
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ {mp3.url && (
|
|
|
+ <i
|
|
|
+ class={styles.iconDelete}
|
|
|
+ onClick={() => {
|
|
|
+ mp3.url = ''
|
|
|
+ }}
|
|
|
+ ></i>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
) : (
|
|
|
<>
|
|
|
<Upload
|
|
@@ -623,7 +763,7 @@ export default defineComponent({
|
|
|
))}
|
|
|
</CellGroup>
|
|
|
|
|
|
- <CellGroup class={[styles.area]}>
|
|
|
+ <CellGroup class={[styles.area]} border={false}>
|
|
|
<div
|
|
|
class={[styles['section-title'], styles['section-title2']]}
|
|
|
></div>
|
|
@@ -637,6 +777,8 @@ export default defineComponent({
|
|
|
errorMessageAlign="right"
|
|
|
placeholder="请输入曲目名称"
|
|
|
inputAlign="right"
|
|
|
+ autocomplete="off"
|
|
|
+ maxlength={20}
|
|
|
onUpdate:modelValue={val => (this.name = val)}
|
|
|
/>
|
|
|
|
|
@@ -649,6 +791,8 @@ export default defineComponent({
|
|
|
errorMessageAlign="right"
|
|
|
placeholder="请输入音乐人"
|
|
|
inputAlign="right"
|
|
|
+ autocomplete="off"
|
|
|
+ maxlength={14}
|
|
|
onUpdate:modelValue={val => (this.composer = val)}
|
|
|
/>
|
|
|
|
|
@@ -676,6 +820,7 @@ export default defineComponent({
|
|
|
<ColUpload
|
|
|
cropper
|
|
|
bucket="cloud-coach"
|
|
|
+ tips="上传封面"
|
|
|
options={{
|
|
|
autoCropWidth: 600,
|
|
|
autoCropHeight: 600
|
|
@@ -696,8 +841,9 @@ export default defineComponent({
|
|
|
rules={[{ required: true, message: '请输入曲目速度' }]}
|
|
|
errorMessageAlign="right"
|
|
|
v-model={this.playSpeed}
|
|
|
- class={styles.inputControl}
|
|
|
+ // class={styles.inputControl}
|
|
|
formatter={this.onFormatter2}
|
|
|
+ autocomplete="off"
|
|
|
></Field>
|
|
|
|
|
|
<Field
|
|
@@ -707,26 +853,30 @@ export default defineComponent({
|
|
|
isLink
|
|
|
required
|
|
|
readonly
|
|
|
+ border={this.tags.length > 0 ? false : true}
|
|
|
+ name="tags"
|
|
|
+ modelValue={this.tags?.join(',')}
|
|
|
+ class={this.tags.length > 0 ? styles.tagMore : ''}
|
|
|
+ rules={[{ required: true, message: '请选择曲目标签' }]}
|
|
|
+ errorMessageAlign="right"
|
|
|
onClick={() => {
|
|
|
this.tagVisibility = true
|
|
|
}}
|
|
|
></Field>
|
|
|
{this.tags.length > 0 && (
|
|
|
- <Field
|
|
|
- name="tags"
|
|
|
- class={styles.showField}
|
|
|
- modelValue={this.tags.length ? 1 : undefined}
|
|
|
- rules={[{ required: true, message: '请选择曲目标签' }]}
|
|
|
- // @ts-ignore
|
|
|
- vSlots={{
|
|
|
+ <Field class={styles.showField}>
|
|
|
+ {{
|
|
|
input: () =>
|
|
|
this.tags.length > 0 ? (
|
|
|
- this.tags.map((item: any) => (
|
|
|
+ this.tags.map((item: any, index: number) => (
|
|
|
<Tag
|
|
|
type="primary"
|
|
|
size="large"
|
|
|
class={styles.tags}
|
|
|
closeable
|
|
|
+ onClose={() => {
|
|
|
+ this.tags.splice(index, 1)
|
|
|
+ }}
|
|
|
>
|
|
|
{this.tagsNames[item]}
|
|
|
</Tag>
|
|
@@ -739,35 +889,9 @@ export default defineComponent({
|
|
|
/>
|
|
|
)
|
|
|
}}
|
|
|
- />
|
|
|
+ </Field>
|
|
|
)}
|
|
|
|
|
|
- {/* <Field required label="是否精品" center inputAlign="right">
|
|
|
- {{
|
|
|
- input: () => (
|
|
|
- <RadioGroup
|
|
|
- class={styles['radio-group']}
|
|
|
- modelValue={this.exquisiteFlag}
|
|
|
- onUpdate:modelValue={val => {
|
|
|
- this.exquisiteFlag = Number(val)
|
|
|
- }}
|
|
|
- >
|
|
|
- {Object.keys(teacherExquisiteType).map((item: string) => {
|
|
|
- const isActive = item === String(this.exquisiteFlag)
|
|
|
- const type = isActive ? 'primary' : 'default'
|
|
|
- return (
|
|
|
- <Radio class={styles.radio} name={item}>
|
|
|
- <Tag size="large" plain={isActive} type={type}>
|
|
|
- {teacherExquisiteType[item]}
|
|
|
- </Tag>
|
|
|
- </Radio>
|
|
|
- )
|
|
|
- })}
|
|
|
- </RadioGroup>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Field> */}
|
|
|
-
|
|
|
<Field required label="是否收费" center inputAlign="right">
|
|
|
{{
|
|
|
input: () => (
|
|
@@ -802,9 +926,11 @@ export default defineComponent({
|
|
|
class={styles.inputControl}
|
|
|
placeholder=" "
|
|
|
formatter={this.onFormatter}
|
|
|
+ autocomplete="off"
|
|
|
v-slots={{ button: () => '元' }}
|
|
|
modelValue={this.musicPrice}
|
|
|
maxlength={8}
|
|
|
+ center
|
|
|
rules={[
|
|
|
{ required: true, validator, message: '请输入收费价格' }
|
|
|
]}
|
|
@@ -842,7 +968,7 @@ export default defineComponent({
|
|
|
block
|
|
|
round
|
|
|
native-type="submit"
|
|
|
- loading={this.submitLoading}
|
|
|
+ disabled={this.submitLoading}
|
|
|
>
|
|
|
<img src={btnBg} />
|
|
|
</Button>
|
|
@@ -883,12 +1009,12 @@ export default defineComponent({
|
|
|
>
|
|
|
<SelectTag
|
|
|
onConfirm={this.onComfirm}
|
|
|
- onCancel={() => {
|
|
|
+ show={this.tagVisibility}
|
|
|
+ onClose={() => {
|
|
|
this.tagVisibility = false
|
|
|
}}
|
|
|
- rowSingle
|
|
|
- defaultValue={this.tags.join(',')}
|
|
|
- needAllButton={false}
|
|
|
+ tagList={this.tagList}
|
|
|
+ defaultValue={this.tags}
|
|
|
/>
|
|
|
</Popup>
|
|
|
|