| | |
| | | :title="title" |
| | | width="550px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="busRef" :rules="state.formRules" label-width="100px" > |
| | | <el-form-item label="章名称:" prop="name"> |
| | |
| | | if(title.value === '新增'){ |
| | | if(state.chapter.chapterId){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.chapter)) |
| | | data.sort = state.form.sort |
| | | const res = await addChapterPeriod(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | |
| | | }else if(title.value === '编辑'){ |
| | | if(state.chapter.chapterId){ |
| | | const {...data} = JSON.parse(JSON.stringify(state.chapter)) |
| | | data.sort = state.form.sort |
| | | const res = await editChapterPeriod(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |