| | |
| | | { |
| | | value: config.taskType.homeWork, |
| | | field: 'Type', |
| | | subFilters: [] |
| | | } |
| | | subFilters: [], |
| | | }, |
| | | ]) |
| | | // task |
| | | const taskData = reactive({ |
| | |
| | | state: '', |
| | | groupId: '', |
| | | beginDate: '', |
| | | endDate: '' |
| | | endDate: '', |
| | | }) |
| | | // question Key |
| | | const questionKey = [ |
| | |
| | | 'Embedded_QuestionBank_QuestionType', |
| | | 'Embedded_QuestionBank_Score', |
| | | 'Embedded_QuestionBank_Stem', |
| | | 'Embedded_QuestionBank_StemStyle' |
| | | 'Embedded_QuestionBank_StemStyle', |
| | | ] |
| | | // dialognew |
| | | const visible = ref(false) |
| | |
| | | homeworkName: '', |
| | | homeworkStartingDate: '', |
| | | homeworkSubmissionDate: '', |
| | | explain: '' |
| | | explain: '', |
| | | }) |
| | | let pages = reactive({ |
| | | currentPage: 1, |
| | | page: 1, |
| | | pageSize: 15, |
| | | count: 0, |
| | | loading: false |
| | | loading: false, |
| | | }) |
| | | // dialogedit |
| | | const visibleEdit = ref(false) |
| | |
| | | if (!taskItem.homeworkName) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请填写作业名称 ' |
| | | message: '请填写作业名称 ', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | if (!taskItem.homeworkStartingDate) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请填写作业开始时间 ' |
| | | message: '请填写作业开始时间 ', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | if (!taskItem.homeworkSubmissionDate) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请填写作业结束时间' |
| | | message: '请填写作业结束时间', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | beginDate: taskItem.homeworkStartingDate, |
| | | endDate: taskItem.homeworkSubmissionDate, |
| | | duration: 0, |
| | | config: JSON.stringify({ scoreData: [] }) |
| | | config: JSON.stringify({ scoreData: [] }), |
| | | } |
| | | MG.edu |
| | | .newTask(data) |
| | |
| | | beginDate: moment(taskItem.homeworkStartingDate).format('YYYY-MM-DDTHH:mm:ss'), |
| | | endDate: moment(taskItem.homeworkSubmissionDate).format('YYYY-MM-DDTHH:mm:ss'), |
| | | duration: 0, |
| | | config: JSON.stringify({ scoreData: scoreData.value }) |
| | | config: JSON.stringify({ scoreData: scoreData.value }), |
| | | } |
| | | MG.edu |
| | | .updateTask(data) |
| | |
| | | size: pages.pageSize, |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | field: 'CreateDate', |
| | | }, |
| | | filterList, |
| | | searchList, |
| | | groupId: classInfo?.id |
| | | groupId: classInfo?.id, |
| | | } |
| | | MG.edu |
| | | .getTaskList(data) |
| | |
| | | return { |
| | | ...item, |
| | | beginDate: moment(item.beginDate).format('YYYY-MM-DD'), |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD') |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD'), |
| | | } |
| | | }) |
| | | if (taskData.id) { |
| | |
| | | { |
| | | compareType: 'Contains', |
| | | keywords: searchKey.value, |
| | | field: 'Name' |
| | | } |
| | | field: 'Name', |
| | | }, |
| | | ] |
| | | pages.page = 1 |
| | | pages.currentPage = 1 |
| | |
| | | // 删除资源 |
| | | const removeTaskItem = (item: any) => { |
| | | const data = { |
| | | ids: [item.id] |
| | | ids: [item.id], |
| | | } |
| | | MG.edu |
| | | .delTask(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | getTaskList() |
| | | } |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '删除失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | }) |
| | | } |
| | |
| | | requests: checkData.value?.map((item: any) => { |
| | | return { |
| | | path: String(taskData.rootCmsItemId), |
| | | cmsItemId: item.id |
| | | cmsItemId: item.id, |
| | | } |
| | | }) |
| | | }), |
| | | } |
| | | MG.edu |
| | | .addTaskCmsItemList(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '已加入', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | selectCache.value = [] |
| | | checkData.value = [] |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '加入失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | }) |
| | | } |
| | |
| | | taskId: taskData?.id, // taskData?.id |
| | | path: String(taskData?.rootCmsItemId), //taskData?.rootCmsItemId |
| | | type: '*', |
| | | keys: questionKey |
| | | keys: questionKey, |
| | | } |
| | | MG.edu |
| | | .getTaskCmsItem(data) |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '列表获取失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | console.log(e) |
| | | }) |
| | |
| | | ElMessageBox.confirm('是否确认删除?', '提示', { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }).then(() => { |
| | | const data = { |
| | | taskId: taskData.id, |
| | | requests: [ |
| | | { |
| | | cmsItemId: item.id, |
| | | path: String(taskData.rootCmsItemId) |
| | | } |
| | | ] |
| | | path: String(taskData.rootCmsItemId), |
| | | }, |
| | | ], |
| | | } |
| | | MG.edu |
| | | .removeTaskCmsItemList(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '已删除' |
| | | message: '已删除', |
| | | }) |
| | | selectedIndex.value = 0 |
| | | getTaskCmsList() |
| | |
| | | .catch((err: any) => { |
| | | ElMessage({ |
| | | type: 'error', |
| | | message: '删除失败,请稍后再试' |
| | | message: '删除失败,请稍后再试', |
| | | }) |
| | | }) |
| | | }) |
| | |
| | | content, |
| | | type: 'Normal', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | newDataListRequest: [], |
| | | } |
| | | MG.ugc |
| | | .newTopicMessage(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '已发布' |
| | | message: '已发布', |
| | | }) |
| | | } |
| | | }) |
| | |
| | | router.push({ |
| | | path: '/jobDetail', |
| | | query: { |
| | | classInfo: JSON.stringify(obj) |
| | | } |
| | | classInfo: JSON.stringify(obj), |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: classInfo?.rootCmsItemId |
| | | cmsPath: classInfo?.rootCmsItemId, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: obj.productLinkPath |
| | | cmsPath: obj.productLinkPath, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | Embedded_QuestionBank_QuestionType: [], |
| | | Embedded_QuestionBank_Score: [], |
| | | Embedded_QuestionBank_Stem: [], |
| | | Embedded_QuestionBank_StemStyle: [] |
| | | } |
| | | Embedded_QuestionBank_StemStyle: [], |
| | | }, |
| | | }) |
| | | if (item.type == 'questionBankFolder' && item.childrenFolderCount == 0) { |
| | | return data.datas.cmsDatas |
| | |
| | | Embedded_QuestionBank_QuestionType: [], |
| | | Embedded_QuestionBank_Score: [], |
| | | Embedded_QuestionBank_Stem: [], |
| | | Embedded_QuestionBank_StemStyle: [] |
| | | } |
| | | Embedded_QuestionBank_StemStyle: [], |
| | | }, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: item.productLinkPath |
| | | cmsPath: item.productLinkPath, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | { name: '论述题', totalScore: 0, value: 'discuss', data: [] }, |
| | | { name: '填空题', totalScore: 0, value: 'completion', data: [] }, |
| | | { name: '连线题', totalScore: 0, value: 'matching', data: [] }, |
| | | { name: '分类题', totalScore: 0, value: 'classification', data: [] } |
| | | { name: '分类题', totalScore: 0, value: 'classification', data: [] }, |
| | | ] |
| | | try { |
| | | let list = [] |
| | |
| | | questionType: item.Embedded_QuestionBank_QuestionType, |
| | | questionAnalysisCon: item.Embedded_QuestionBank_AnalysisCon, |
| | | questionAnswer: item.Embedded_QuestionBank_Answer, |
| | | customAnswer: null |
| | | customAnswer: null, |
| | | } |
| | | } catch (error) { |
| | | console.log(item) |