| | |
| | | selectChapter: '', |
| | | referenceMaterial: '', |
| | | explain: '', |
| | | uploadResources: '' |
| | | uploadResources: '', |
| | | }) |
| | | let pages = reactive({ |
| | | page: 1, |
| | | pageSize: 13, |
| | | count: 0, |
| | | loading: false |
| | | loading: false, |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | const list = [{ key: 1, parentVal: '', childVal: '' }] |
| | | dynamicList.value = list |
| | | const userCache: any = localStorage.getItem('jesk-userInfo') |
| | | const userCache: any = localStorage.getItem(config.userInfoKey) |
| | | if (userCache) { |
| | | userInfo.value = JSON.parse(userCache) |
| | | } |
| | |
| | | order: 0, |
| | | beginDate: '2024-09-09T03:38:07.167Z', |
| | | endDate: '2024-09-09T03:38:07.167Z', |
| | | duration: 0 |
| | | duration: 0, |
| | | } |
| | | MG.edu |
| | | .newTask(data) |
| | |
| | | { |
| | | value: config.taskType.teachingPlan, |
| | | field: 'Type', |
| | | subFilters: [] |
| | | } |
| | | subFilters: [], |
| | | }, |
| | | ], |
| | | searchList: [], |
| | | groupId: classInfo?.id |
| | | groupId: classInfo?.id, |
| | | } |
| | | MG.edu |
| | | .getTaskList(data) |
| | |
| | | const toRead = (item: any) => { |
| | | // config.textReaderUrl |
| | | // 'http://192.168.3.132:8005/#/home' |
| | | return ElMessage.warning('正在建设中...') |
| | | if (classInfo.bookRefCode) { |
| | | const url = |
| | | config.textReaderUrl + |
| | | '?bookId=' + |
| | | classInfo?.bookRefCode + |
| | | '&token=' + |
| | | localStorage.getItem('jsek-token') + |
| | | localStorage.getItem(config.tokenKey) + |
| | | '&chapter=' + |
| | | item.parentVal + |
| | | '&startPage=' + |
| | |
| | | linkProtectType: 'Public', |
| | | fileName: FileName, |
| | | extension: Extension, |
| | | url: config.requestCtx + `/file/api/ApiDownload?md5=` + e |
| | | url: config.requestCtx + `/file/api/ApiDownload?md5=` + e, |
| | | }) |
| | | }) |
| | | } else { |
| | |
| | | const getTypeByCode = () => { |
| | | MG.resource |
| | | .getCmsTypeByRefCode({ |
| | | refCodes: [config.refCodes.teachingPlan] |
| | | refCodes: [config.refCode.teachingPlan], |
| | | }) |
| | | .then((res: any) => { |
| | | const data = res[0]?.cmsTypeLinks[0]?.children |
| | |
| | | { |
| | | keywords: searchKey.value, |
| | | field: 'Name', |
| | | compareType: 'Contains' |
| | | } |
| | | compareType: 'Contains', |
| | | }, |
| | | ] |
| | | : [], |
| | | taskId: classInfo?.taskId, |
| | | path: String(classInfo?.rootTaskCmsId), |
| | | type: '*', |
| | | keys: ['referenceMaterial', 'Name', 'selectChapter', 'uploadResources', 'explain'] |
| | | keys: ['referenceMaterial', 'Name', 'selectChapter', 'uploadResources', 'explain'], |
| | | } |
| | | MG.edu |
| | | .getTaskCmsItem(data) |
| | |
| | | chapterList.value.find((sitem: any) => sitem.chapter == citem.parentVal) |
| | | ?.label + |
| | | '---' + |
| | | dataS?.label |
| | | dataS?.label, |
| | | } |
| | | } else { |
| | | return { |
| | | ...citem, |
| | | parentName: citem.parentVal + '---' + citem.childVal |
| | | parentName: citem.parentVal + '---' + citem.childVal, |
| | | } |
| | | } |
| | | }) |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '列表获取失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | console.log(e) |
| | | }) |
| | |
| | | requests: [ |
| | | { |
| | | cmsItemId: item.id, |
| | | path: String(classInfo?.rootTaskCmsId) |
| | | } |
| | | ] |
| | | path: String(classInfo?.rootTaskCmsId), |
| | | }, |
| | | ], |
| | | } |
| | | MG.edu |
| | | .removeTaskCmsItemList(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | getTaskCmsList() |
| | | } |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '删除失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | }) |
| | | } |
| | |
| | | if (!taskItem.title) { |
| | | ElMessage({ |
| | | message: '请填写教学名称', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | if (dynamicList.value[0]?.parentVal == '') { |
| | | ElMessage({ |
| | | message: '请选择教学章节', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | if (fileList.value.length == 0) { |
| | | ElMessage({ |
| | | message: '请上传教学文件', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | name: taskItem.title, |
| | | description: '', |
| | | icon: '', |
| | | type: config.refCodes.teachingPlan, |
| | | type: config.refCode.teachingPlan, |
| | | state: 'Normal', |
| | | order: 0, |
| | | newDataListRequest: tool.worksDataBytool(classItem.value, taskItem, fileList.value), |
| | | newCmsItemAndFileLinkListRequest: [], |
| | | newChildrenListRequest: [] |
| | | } |
| | | ] |
| | | newChildrenListRequest: [], |
| | | }, |
| | | ], |
| | | } |
| | | MG.edu.newTaskCmsItem(data).then((res: any) => { |
| | | newLoading.value = false |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '新建成功', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | visible.value = false |
| | | getTaskCmsList() |
| | |
| | | } |
| | | } |
| | | .linkTitle { |
| | | color: #ff6c00; |
| | | color: #019e58; |
| | | cursor: pointer; |
| | | } |
| | | .linkTitle:hover { |