|
@@ -207,21 +207,45 @@ export default defineComponent({
|
|
|
|
|
|
// 素材关联知识点
|
|
|
const handleSave = async () => {
|
|
|
- state.saveLoading = true
|
|
|
- const list = state.checkList.map((n: any) => {
|
|
|
- const item = state.selectCheckList.find((item: any) => item.tempIndex === n)
|
|
|
- return {
|
|
|
- materialId: item.materialId,
|
|
|
- knowledgePointId: item.knowledgePointId,
|
|
|
- lessonTrainingId: props.parentData.id
|
|
|
- }
|
|
|
+ // state.saveLoading = true
|
|
|
+ // const list = state.checkList.map((n: any) => {
|
|
|
+ // const item = state.selectCheckList.find((item: any) => item.tempIndex === n)
|
|
|
+ // return {
|
|
|
+ // materialId: item.materialId,
|
|
|
+ // knowledgePointId: item.knowledgePointId,
|
|
|
+ // lessonTrainingId: props.parentData.id
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // try {
|
|
|
+ // const res: any = await lessonTrainingDetailBatchInsert(list)
|
|
|
+ // message.success('保存成功')
|
|
|
+ // emit('handleSuccess')
|
|
|
+ // } catch (error) {}
|
|
|
+ // state.saveLoading = false
|
|
|
+ dialog.warning({
|
|
|
+ title: '提示',
|
|
|
+ content: '请确保作业曲目已添加到业务系统',
|
|
|
+ positiveText: '确定',
|
|
|
+ negativeText: '取消',
|
|
|
+ onPositiveClick: async () => {
|
|
|
+ state.saveLoading = true
|
|
|
+ const list = state.checkList.map((n: any) => {
|
|
|
+ const item = state.selectCheckList.find((item: any) => item.tempIndex === n)
|
|
|
+ return {
|
|
|
+ materialId: item.materialId,
|
|
|
+ knowledgePointId: item.knowledgePointId,
|
|
|
+ lessonTrainingId: props.parentData.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ try {
|
|
|
+ const res: any = await lessonTrainingDetailBatchInsert(list)
|
|
|
+ message.success('保存成功')
|
|
|
+ emit('handleSuccess')
|
|
|
+ } catch (error) {}
|
|
|
+ state.saveLoading = false
|
|
|
+ },
|
|
|
+ onNegativeClick: () => {}
|
|
|
})
|
|
|
- try {
|
|
|
- const res: any = await lessonTrainingDetailBatchInsert(list)
|
|
|
- message.success('保存成功')
|
|
|
- emit('handleSuccess')
|
|
|
- } catch (error) {}
|
|
|
- state.saveLoading = false
|
|
|
}
|
|
|
|
|
|
return () => (
|