|
|
@@ -8,6 +8,14 @@
|
|
|
下载课件
|
|
|
</c-button>
|
|
|
</a>
|
|
|
+ <div class="sub-title">课件信息设置</div>
|
|
|
+ <div class="mb-8">
|
|
|
+ <b>修改课件名称</b>
|
|
|
+ </div>
|
|
|
+ <div class="mb-16 modify-slide-name">
|
|
|
+ <c-input placeholder="在此输入课件新名称" v-model="newSlideName"></c-input>
|
|
|
+ <c-button class="secondary" @click="handleModifySlideName">确认修改</c-button>
|
|
|
+ </div>
|
|
|
<c-button class="full-width secondary mb-16" @click="handleQuizSetting">习题设置 & 习题完成统计</c-button>
|
|
|
<c-button v-if="nextState" class="warning full-width mb-16" @click="handleToNextState">
|
|
|
将幻灯片状态设置为:{{slideStateTranslation[nextState]}}
|
|
|
@@ -21,18 +29,20 @@ import TabSideComponent from '@/components/TabSideComponent'
|
|
|
import CButton from '@/components/CButton'
|
|
|
import BackTitle from '@/components/BackTitle'
|
|
|
import { mapState } from 'vuex'
|
|
|
-import { getSlideUrl, modifySlideState, removeSlide } from '@/server/slide'
|
|
|
+import { getSlideUrl, modifySlide, modifySlideState, removeSlide } from '@/server/slide'
|
|
|
import { SET_SLIDE_INFO, SET_SRC } from '@/store/types/pdf-types'
|
|
|
import getSlideNextState from '@/utils/get-slide-next-state'
|
|
|
import SlideDetail from '@/components/SlideDetail'
|
|
|
import slideStateTranslation from '@/server/enums/slide-state-translation'
|
|
|
+import CInput from '@/components/CInput'
|
|
|
|
|
|
export default {
|
|
|
- components: { BackTitle, CButton, TabSideComponent, SlideDetail },
|
|
|
+ components: { CInput, BackTitle, CButton, TabSideComponent, SlideDetail },
|
|
|
data () {
|
|
|
return {
|
|
|
slideUrl: '',
|
|
|
- slideStateTranslation
|
|
|
+ slideStateTranslation,
|
|
|
+ newSlideName: ''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -76,6 +86,16 @@ export default {
|
|
|
this.$setErrorMessage(err.response.data.msg)
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ handleModifySlideName () {
|
|
|
+ modifySlide({ id: this.slide.id, name: this.newSlideName }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.$setSuccessMessage('修改成功')
|
|
|
+ this.$store.commit(SET_SLIDE_INFO, { slideInfo: res })
|
|
|
+ this.$router.push('')
|
|
|
+ }).catch(err => {
|
|
|
+ this.$setErrorMessage(err.response.data.msg)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -120,6 +140,15 @@ export default {
|
|
|
color: $theme-red
|
|
|
}
|
|
|
|
|
|
+.modify-slide-name {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .c-button {
|
|
|
+ margin-left: 12px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
@media (max-width: 600px) {
|
|
|
.file-uploader {
|
|
|
font-size: 14px;
|