|
@@ -31,6 +31,7 @@ import { postMessage } from '@/helpers/native-message'
|
|
|
import classNames from 'classnames'
|
|
|
import { teacherState } from '@/teacher/teacher-cert/teacherState'
|
|
|
import request from '@/helpers/request'
|
|
|
+import requestOrigin from 'umi-request'
|
|
|
import UploadIcon from './upload.svg'
|
|
|
|
|
|
export default defineComponent({
|
|
@@ -123,13 +124,13 @@ export default defineComponent({
|
|
|
data: {
|
|
|
audioType: 'MIDI',
|
|
|
sourceType: 'TEACHER',
|
|
|
- showFingering: this.showFingering,
|
|
|
+ showFingering: Number(this.showFingering) || undefined,
|
|
|
musicTag: this.tags.join(','),
|
|
|
- musicSubject: this.selectedSubjectList?.label,
|
|
|
+ musicSubject: Number(this.selectedSubjectList?.label) || undefined,
|
|
|
musicSheetName: this.musicSheetName,
|
|
|
midiUrl: this.midiUrl,
|
|
|
xmlFileUrl: this.xmlFileUrl,
|
|
|
- canEvaluate: this.canEvaluate,
|
|
|
+ canEvaluate: Number(this.canEvaluate) || undefined,
|
|
|
chargeType: this.chargeType === 0 ? 'FREE' : 'CHARGE',
|
|
|
composer: this.composer,
|
|
|
musicPrice: this.musicPrice
|
|
@@ -198,6 +199,11 @@ export default defineComponent({
|
|
|
// @ts-ignore
|
|
|
this.xmlFileUrl = evt?.fileUrl || this.this.xmlFileUrl || ''
|
|
|
this.xmlFileLoading = false
|
|
|
+ if (this.xmlFileUrl) {
|
|
|
+ requestOrigin(this.xmlFileUrl).then(
|
|
|
+ res => (this.formated = getXmlInfo(res))
|
|
|
+ )
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
naiveMidFile() {
|
|
@@ -300,6 +306,17 @@ export default defineComponent({
|
|
|
onUpdate:modelValue={val => (this.composer = val)}
|
|
|
/>
|
|
|
</ColField>
|
|
|
+ <ColField required title="默认速度">
|
|
|
+ <Field
|
|
|
+ clearable
|
|
|
+ name="playSpeed"
|
|
|
+ modelValue={this.speed}
|
|
|
+ rules={[{ required: true, message: '请输入默认速度' }]}
|
|
|
+ onUpdate:modelValue={val => (this.speed = val)}
|
|
|
+ class={styles['clear-px']}
|
|
|
+ placeholder="请输入默认速度"
|
|
|
+ />
|
|
|
+ </ColField>
|
|
|
<ColField required title="曲目声部">
|
|
|
<Field
|
|
|
is-link
|
|
@@ -357,62 +374,8 @@ export default defineComponent({
|
|
|
/>
|
|
|
</ColField>
|
|
|
</ColFieldGroup>
|
|
|
- {/* <ColFieldGroup class={styles.area}>
|
|
|
- <ColField
|
|
|
- required
|
|
|
- border={false}
|
|
|
- title="曲目声部"
|
|
|
- v-slots={{
|
|
|
- right: () => (
|
|
|
- <Button
|
|
|
- class={styles.select}
|
|
|
- round
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- onClick={() => (this.subJectVisible = true)}
|
|
|
- >
|
|
|
- 选择
|
|
|
- </Button>
|
|
|
- )
|
|
|
- }}
|
|
|
- >
|
|
|
- <Field
|
|
|
- name="tags"
|
|
|
- modelValue={this.selectedSubjectList.length ? 1 : undefined}
|
|
|
- rules={[{ required: true, message: '请选择曲目声部' }]}
|
|
|
- // @ts-ignore
|
|
|
- vSlots={{
|
|
|
- input: () =>
|
|
|
- this.selectedSubjectList.length > 0 ? (
|
|
|
- this.selectedSubjectList.map((item: any) => (
|
|
|
- <Tag type="primary" size="large" class={styles.tags}>
|
|
|
- {this.subjectListNames[item]}
|
|
|
- </Tag>
|
|
|
- ))
|
|
|
- ) : (
|
|
|
- <Empty
|
|
|
- style={{ width: '100%' }}
|
|
|
- description="请选择曲目声部"
|
|
|
- imageSize={0}
|
|
|
- />
|
|
|
- )
|
|
|
- }}
|
|
|
- />
|
|
|
- </ColField>
|
|
|
- </ColFieldGroup> */}
|
|
|
<ColFieldGroup class={styles.area}>
|
|
|
- <ColField required title="默认速度">
|
|
|
- <Field
|
|
|
- clearable
|
|
|
- name="playSpeed"
|
|
|
- modelValue={this.speed}
|
|
|
- rules={[{ required: true, message: '请输入默认速度' }]}
|
|
|
- onUpdate:modelValue={val => (this.speed = val)}
|
|
|
- class={styles['clear-px']}
|
|
|
- placeholder="请输入默认速度"
|
|
|
- />
|
|
|
- </ColField>
|
|
|
- <ColField required title="是否评测">
|
|
|
+ <ColField required title="是否评测" border={false}>
|
|
|
<RadioGroup
|
|
|
class={styles['radio-group']}
|
|
|
modelValue={this.canEvaluate}
|
|
@@ -431,7 +394,7 @@ export default defineComponent({
|
|
|
})}
|
|
|
</RadioGroup>
|
|
|
</ColField>
|
|
|
- <ColField required title="指法展示">
|
|
|
+ <ColField required title="指法展示" border={false}>
|
|
|
<RadioGroup
|
|
|
class={styles['radio-group']}
|
|
|
modelValue={this.showFingering}
|
|
@@ -450,11 +413,13 @@ export default defineComponent({
|
|
|
})}
|
|
|
</RadioGroup>
|
|
|
</ColField>
|
|
|
- <ColField required title="是否收费">
|
|
|
+ <ColField required title="是否收费" border={false}>
|
|
|
<RadioGroup
|
|
|
class={styles['radio-group']}
|
|
|
modelValue={this.chargeType}
|
|
|
- onUpdate:modelValue={val => (this.chargeType = val)}
|
|
|
+ onUpdate:modelValue={val => {
|
|
|
+ this.chargeType = Number(val)
|
|
|
+ }}
|
|
|
>
|
|
|
{Object.keys(teacherChargeType).map((item: string) => {
|
|
|
const isActive = item === String(this.chargeType)
|