|
@@ -12,9 +12,16 @@
|
|
<van-field rows="8" v-model="content" type="textarea" placeholder="请输入(1-600字)" />
|
|
<van-field rows="8" v-model="content" type="textarea" placeholder="请输入(1-600字)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <van-cell class="endTime" title="作业提交截止时间" @click="onEndTime" readonly placeholder="请选择截止时间" >
|
|
|
|
|
|
+ <van-cell class="endTime" title="作业提交截止时间" @click="onEndTime" is-link readonly placeholder="请选择截止时间" >
|
|
<template #default>
|
|
<template #default>
|
|
- {{ dateSection.showStartDate }} <span class="arrowDown"></span>
|
|
|
|
|
|
+ {{ dateSection.showStartDate }}
|
|
|
|
+ <!-- <span class="arrowDown"></span> -->
|
|
|
|
+ </template>
|
|
|
|
+ </van-cell>
|
|
|
|
+ <van-cell class="endTime" v-if="memberNum" title="作业曲目" @click="accompanimentStatus = true" readonly is-link placeholder="请选择作业曲目" >
|
|
|
|
+ <template #default>
|
|
|
|
+ {{ dateSection.musicScoreName }}
|
|
|
|
+ <!-- <span class="arrowDown"></span> -->
|
|
</template>
|
|
</template>
|
|
</van-cell>
|
|
</van-cell>
|
|
<div class="button-group">
|
|
<div class="button-group">
|
|
@@ -33,6 +40,13 @@
|
|
@cancel="dateSection.status = false"
|
|
@cancel="dateSection.status = false"
|
|
/>
|
|
/>
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
+
|
|
|
|
+ <van-popup position="bottom" v-model="accompanimentStatus" :style="{ height: '100%' }" style=" border-radius: 0; overflow: inherit;">
|
|
|
|
+ <van-sticky>
|
|
|
|
+ <m-header name="作业曲目" :backUrl="backUrl" />
|
|
|
|
+ </van-sticky>
|
|
|
|
+ <accompaniment-modal isHead @onSelectMusic="onSelectMusic" />
|
|
|
|
+ </van-popup>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -40,24 +54,37 @@ import MHeader from "@/components/MHeader"
|
|
import { browser, _throttle } from '@/common/common'
|
|
import { browser, _throttle } from '@/common/common'
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
import { addHomeWork } from '@/api/audition'
|
|
import { addHomeWork } from '@/api/audition'
|
|
|
|
+import AccompanimentModal from './modal/accompanimentModal'
|
|
|
|
+import cleanDeep from 'clean-deep'
|
|
export default {
|
|
export default {
|
|
name: "teacherList",
|
|
name: "teacherList",
|
|
- components: { MHeader },
|
|
|
|
|
|
+ components: { MHeader, AccompanimentModal },
|
|
data() {
|
|
data() {
|
|
let tempDate = new Date() // 默认显示T+3
|
|
let tempDate = new Date() // 默认显示T+3
|
|
tempDate.setDate(tempDate.getDate() + 3)
|
|
tempDate.setDate(tempDate.getDate() + 3)
|
|
|
|
+ let query = this.$route.query
|
|
return {
|
|
return {
|
|
that: this,
|
|
that: this,
|
|
|
|
+ memberNum: query.memberNum,
|
|
headerStatus: true,
|
|
headerStatus: true,
|
|
|
|
+ backUrl: {
|
|
|
|
+ status: true,
|
|
|
|
+ callBack: () => {
|
|
|
|
+ this.accompanimentStatus = false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
dateSection: {
|
|
dateSection: {
|
|
status: false,
|
|
status: false,
|
|
minDate: new Date(),
|
|
minDate: new Date(),
|
|
maxDate: new Date(2025, 10, 1),
|
|
maxDate: new Date(2025, 10, 1),
|
|
currentDate: tempDate,
|
|
currentDate: tempDate,
|
|
- showStartDate: dayjs(tempDate).format("YYYY年MM月DD日")
|
|
|
|
|
|
+ showStartDate: dayjs(tempDate).format("YYYY年MM月DD日"),
|
|
|
|
+ musicScoreId: null,
|
|
|
|
+ musicScoreName: null,
|
|
},
|
|
},
|
|
content: null, // 课程编号
|
|
content: null, // 课程编号
|
|
expiryDate: null, // 作业截止日期
|
|
expiryDate: null, // 作业截止日期
|
|
|
|
+ accompanimentStatus: false, // 伴奏弹窗
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -83,6 +110,11 @@ export default {
|
|
}
|
|
}
|
|
return val
|
|
return val
|
|
},
|
|
},
|
|
|
|
+ onSelectMusic(value) {
|
|
|
|
+ this.dateSection.musicScoreName = value.examSongName
|
|
|
|
+ this.dateSection.musicScoreId = value.musicScoreId
|
|
|
|
+ this.accompanimentStatus = false
|
|
|
|
+ },
|
|
confirmStartTime() {
|
|
confirmStartTime() {
|
|
this.dateSection.showStartDate = dayjs(this.dateSection.currentDate).format("YYYY年MM月DD日")
|
|
this.dateSection.showStartDate = dayjs(this.dateSection.currentDate).format("YYYY年MM月DD日")
|
|
this.dateSection.status = false
|
|
this.dateSection.status = false
|
|
@@ -105,9 +137,10 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
content: this.content,
|
|
content: this.content,
|
|
courseId: query.courseId,
|
|
courseId: query.courseId,
|
|
- expiryDate: dayjs(this.dateSection.currentDate).format('YYYY-MM-DD')
|
|
|
|
|
|
+ expiryDate: dayjs(this.dateSection.currentDate).format('YYYY-MM-DD'),
|
|
|
|
+ musicScoreId: this.dateSection.musicScoreId
|
|
}
|
|
}
|
|
- addHomeWork({...params}).then(res => {
|
|
|
|
|
|
+ addHomeWork(cleanDeep({...params})).then(res => {
|
|
let result = res.data
|
|
let result = res.data
|
|
this.$toast.clear()
|
|
this.$toast.clear()
|
|
if(result.code == 200) {
|
|
if(result.code == 200) {
|