Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website
| | |
| | | <template> |
| | | <el-config-provider :locale="zhCn"> <RouterView /></el-config-provider> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #app { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | font-size: 100%; |
| | | font: inherit; |
| | | vertical-align: baseline; |
| | | white-space: normal; |
| | | } |
| | | /* HTML5 display-role reset for older browsers */ |
| | | article, |
| | |
| | | --el-color-primary-light-7: #019e58 !important; |
| | | --el-color-primary-dark-2: #019e58 !important; |
| | | --el-color-primary-dark-3: #019e58 !important; |
| | | --el-button-border-color: #019e58 !important; |
| | | } |
| | | |
| | | /* 基础样式 */ |
| | | * { |
| | | outline: none; |
| | | } |
| | | |
| | | html, |
| | | body { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #app { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | /* 居中布局 */ |
| | |
| | | } |
| | | |
| | | .titleBox { |
| | | background: #d8f7e6; |
| | | padding: 8px 10px; |
| | | font-weight: 700; |
| | | color: #00873c; |
| | | color: #019e58; |
| | | font-size: 14px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | } |
| | | .wait, |
| | | .main { |
| | | color: #019e58; |
| | | color: #fc9b1e; |
| | | } |
| | | .grey { |
| | | color: #949494; |
| | | } |
| | | .el-dialog__header { |
| | | padding: 0; /* 或者自定义的值 */ |
| | | .mainbg{ |
| | | background:#00873c; |
| | | color:#fff; |
| | | } |
| | |
| | | <Header class="header"></Header> |
| | | <div class="layoutContentBox" id="layout"> |
| | | <RouterView /> |
| | | <Footer class="footer"></Footer> |
| | | </div> |
| | | <Footer class="footer"></Footer> |
| | | <login ref="loginRef"></login> |
| | | </div> |
| | | </template> |
| | |
| | | <style lang="less" scoped> |
| | | .layoutBox { |
| | | width: 100%; |
| | | height: 100vh; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #fff; |
| | | |
| | | .layoutContentBox { |
| | | flex: 1; |
| | | height: auto; |
| | | } |
| | | |
| | | .header { |
| | |
| | | @media screen and (min-width: 1200px) { |
| | | .layoutContentBox { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="infoBox"> |
| | | <div class="main">{{ currentClass?.bookName }}</div> |
| | | <div class="job">作者:{{ classInfo?.author ?? '-' }}</div> |
| | | <div class="job">ISBN:{{ classInfo?.isbn ?? '-' }}</div> |
| | | <div class="job">作者:{{ currentClass?.author ?? '-' }}</div> |
| | | <div class="job">ISBN:{{ currentClass?.isbn ?? '-' }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="line"></div> |
| | |
| | | .getCourseClass({ |
| | | ClassIdOrRefCode: String(classInfo.id), |
| | | }) |
| | | .then((res: any) => { |
| | | .then(async (res: any) => { |
| | | if (res) { |
| | | const detail = await getBookDetail(res.linkProductDto.product.id) |
| | | res.bookName = res.linkProductDto.product.name |
| | | res.bookIcon = getPublicImage(res.linkProductDto.product.icon, 100) |
| | | res.bookIcon = detail.icon ?? defaultImg |
| | | res.author = detail.author |
| | | res.isbn = detail.isbn |
| | | res.classTime = |
| | | moment(res.beginDate).format('YYYY.MM.DD') + |
| | | '--' + |
| | |
| | | console.log(e) |
| | | }) |
| | | } |
| | | // 获取教材详情 |
| | | const getBookDetail = async (id: string) => { |
| | | const query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: id, |
| | | coverSize: { |
| | | height: 300, |
| | | width: 210, |
| | | }, |
| | | fields: { |
| | | author: [], |
| | | isbn: [], |
| | | }, |
| | | } |
| | | const res = await MG.store.getProductDetail(query) |
| | | return res.datas ?? null |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .main { |
| | | color: #019e58; |
| | | } |
| | | .nullBox { |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | height: 190px; |
| | | margin-top: 30px; |
| | | border-radius: 10px; |
| | | border: 1px solid #019e58; |
| | | .title { |
| | | width: 80px; |
| | | text-align: center; |
| | |
| | | .titleBox { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 10px 0; |
| | | font-size: 16px; |
| | | .title { |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | .titleBox { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 10px 0; |
| | | .border { |
| | | width: 4px; |
| | | height: 23px; |
| | |
| | | } |
| | | .notBox { |
| | | width: 100%; |
| | | height: 100px; |
| | | height: 120px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | |
| | | width: 100%; |
| | | height: calc(100% - 63px); |
| | | padding: 5px 25px; |
| | | box-sizing: border-box; |
| | | overflow: auto; |
| | | .noticeItem { |
| | | display: flex; |
| | |
| | | <div v-html="item.userAnswer"></div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="shortAnswer" v-if="item.questionType == 'shortAnswer' && !isJudge"> |
| | | <div class="anSwer" v-if="!isPreview"> |
| | | <div class="anSwerText" v-if="item.questionAnswer" style="margin: 15px 0"> |
| | | <span style="min-width: 40px">答案:</span |
| | | ><span v-html="item.questionAnswer"></span> |
| | | </div> |
| | | <div :class="isPreview ? 'questionAnalysisCon' : ''" v-if="item.questionAnalysisCon"> |
| | | 分析:<span v-html="item.questionAnalysisCon"></span> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <div v-html="item.userAnswer"></div> |
| | | </div> |
| | | </div> --> |
| | | <div v-if="isJudge"> |
| | | <div class="shortAnswer anSwerText" v-if="item.answer" style="margin: 15px 0"> |
| | | <span v-html="item.answer"></span> |
| | |
| | | |
| | | const emit = defineEmits(['selectQuestion', 'deleteItem', 'judgeUpdate']) |
| | | |
| | | onMounted(() => {}) |
| | | // onMounted(() => { |
| | | // console.log(props.questionList) |
| | | // }) |
| | | |
| | | const checkItems = (e: Event, item: any) => { |
| | | emit('selectQuestion', item) |
| | |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | font-family: PingFang SC; |
| | | span { |
| | | white-space: pre-wrap !important; |
| | | } |
| | | .questionT { |
| | | // display: flex; |
| | | flex-wrap: wrap; |
| | |
| | | transform="translate(-63.9 -63.9)" /> |
| | | </svg>` |
| | | }, |
| | | { |
| | | label: '教学互动', |
| | | key: '9', |
| | | path: 'teachInteraction', |
| | | icon: `<svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="16.2" viewBox="0 0 1024 1024"> |
| | | <path |
| | | d="M447.766594 480.256747H252.078775C126.599562 480.256747 24.274252 377.931437 24.274252 252.452225S125.852662 24.647702 252.078775 24.647702 479.883297 126.973012 479.883297 252.452225V448.140044c0 17.925602-14.191101 32.116703-32.116703 32.116703zM252.078775 88.134209c-90.374909 0-164.318016 73.943107-164.318016 164.318016s73.943107 164.318016 164.318016 164.318016h164.318016v-164.318016c0-90.374909-73.943107-164.318016-164.318016-164.318016zM251.331875 999.352298C125.852662 999.352298 23.527352 897.026988 23.527352 771.547775s102.32531-227.804522 227.804523-227.804522H447.766594c17.178702 0 32.116703 14.191101 32.116703 32.116703v196.434719c-0.7469 124.732312-103.07221 227.057622-228.551422 227.057623z m0-392.122539c-90.374909 0-164.318016 73.943107-164.318017 164.318016s73.943107 164.318016 164.318017 164.318016 164.318016-73.943107 164.318016-164.318016v-164.318016h-164.318016zM773.415026 999.352298c-125.479212 0-227.804522-102.32531-227.804523-227.804523V575.113056c0-17.178702 14.191101-32.116703 32.116703-32.116703h196.43472c125.479212 0 227.804522 102.32531 227.804522 227.804522 0 36.598104-8.962801 72.449307-25.394603 104.56601-8.215901 15.684902-26.888403 21.660102-42.573304 13.444202-15.684902-8.215901-21.660102-26.888403-13.444201-42.573304 11.950401-23.153902 18.672502-49.295405 18.672502-75.436908 0-90.374909-73.943107-164.318016-164.318016-164.318016h-164.318016v164.318016c0 90.374909 73.943107 164.318016 164.318016 164.318016 17.178702 0 34.357403-2.9876 50.042305-8.2159 16.431802-5.228301 34.357403 3.7345 39.585703 20.166301 5.228301 16.431802-3.7345 34.357403-20.166302 39.585704-23.900802 8.962801-47.054705 12.697301-70.955506 12.697302zM773.415026 480.256747H577.727206c-17.178702 0-32.116703-14.191101-32.116703-32.116703V252.452225c0-125.479212 102.32531-227.804522 227.804523-227.804523s227.804522 102.32531 227.804522 227.804523-102.32531 227.804522-227.804522 227.804522z m-164.318017-63.486506h164.318017c90.374909 0 164.318016-73.943107 164.318016-164.318016s-73.943107-164.318016-164.318016-164.318016-164.318016 73.943107-164.318017 164.318016v164.318016z" /> |
| | | </svg>` |
| | | }, |
| | | // { |
| | | // label: '教学互动', |
| | | // key: '9', |
| | | // path: 'teachInteraction', |
| | | // icon: `<svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="16.2" viewBox="0 0 1024 1024"> |
| | | // <path |
| | | // d="M447.766594 480.256747H252.078775C126.599562 480.256747 24.274252 377.931437 24.274252 252.452225S125.852662 24.647702 252.078775 24.647702 479.883297 126.973012 479.883297 252.452225V448.140044c0 17.925602-14.191101 32.116703-32.116703 32.116703zM252.078775 88.134209c-90.374909 0-164.318016 73.943107-164.318016 164.318016s73.943107 164.318016 164.318016 164.318016h164.318016v-164.318016c0-90.374909-73.943107-164.318016-164.318016-164.318016zM251.331875 999.352298C125.852662 999.352298 23.527352 897.026988 23.527352 771.547775s102.32531-227.804522 227.804523-227.804522H447.766594c17.178702 0 32.116703 14.191101 32.116703 32.116703v196.434719c-0.7469 124.732312-103.07221 227.057622-228.551422 227.057623z m0-392.122539c-90.374909 0-164.318016 73.943107-164.318017 164.318016s73.943107 164.318016 164.318017 164.318016 164.318016-73.943107 164.318016-164.318016v-164.318016h-164.318016zM773.415026 999.352298c-125.479212 0-227.804522-102.32531-227.804523-227.804523V575.113056c0-17.178702 14.191101-32.116703 32.116703-32.116703h196.43472c125.479212 0 227.804522 102.32531 227.804522 227.804522 0 36.598104-8.962801 72.449307-25.394603 104.56601-8.215901 15.684902-26.888403 21.660102-42.573304 13.444202-15.684902-8.215901-21.660102-26.888403-13.444201-42.573304 11.950401-23.153902 18.672502-49.295405 18.672502-75.436908 0-90.374909-73.943107-164.318016-164.318016-164.318016h-164.318016v164.318016c0 90.374909 73.943107 164.318016 164.318016 164.318016 17.178702 0 34.357403-2.9876 50.042305-8.2159 16.431802-5.228301 34.357403 3.7345 39.585703 20.166301 5.228301 16.431802-3.7345 34.357403-20.166302 39.585704-23.900802 8.962801-47.054705 12.697301-70.955506 12.697302zM773.415026 480.256747H577.727206c-17.178702 0-32.116703-14.191101-32.116703-32.116703V252.452225c0-125.479212 102.32531-227.804522 227.804523-227.804523s227.804522 102.32531 227.804522 227.804523-102.32531 227.804522-227.804522 227.804522z m-164.318017-63.486506h164.318017c90.374909 0 164.318016-73.943107 164.318016-164.318016s-73.943107-164.318016-164.318016-164.318016-164.318016 73.943107-164.318017 164.318016v164.318016z" /> |
| | | // </svg>` |
| | | // }, |
| | | { |
| | | label: '话题', |
| | | key: '8', |
| | |
| | | import { ref, watch, provide, onMounted, inject } from 'vue' |
| | | import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router' |
| | | import { menu } from './config' |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool' |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | |
| | | const router: any = useRouter() |
| | |
| | | path.value = to.path |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | // 获取教材详情 |
| | | const getBookDetail = async (id: string) => { |
| | | const query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: id, |
| | | coverSize: { |
| | | height: 300, |
| | | width: 210, |
| | | }, |
| | | fields: { |
| | | author: [], |
| | | isbn: [], |
| | | }, |
| | | } |
| | | const res = await MG.store.getProductDetail(query) |
| | | return res.datas ?? null |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | classInfo.value = JSON.parse(route.query.classInfo) |
| | | classIcon.value = classInfo.value.icon ?? defaultImg |
| | | const detail = await getBookDetail(classInfo.value.bookId) |
| | | classIcon.value = detail.icon ?? defaultImg |
| | | menu.forEach((item) => { |
| | | if ('/' + item.path === path.value) { |
| | | label.value = item.label |
| | |
| | | flex: 1; |
| | | height: auto; |
| | | } |
| | | .main { |
| | | color: #019e58; |
| | | } |
| | | .classContentBox { |
| | | padding: 10px 40px; |
| | | display: flex; |
| | |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | .iconBox { |
| | | width: 90px; |
| | | width: 100px; |
| | | height: 120px; |
| | | img { |
| | | width: 100%; |
| | |
| | | .main { |
| | | font-size: 16px; |
| | | line-height: 20px; |
| | | color: #019e58; |
| | | } |
| | | .job { |
| | | // padding:10px; |
| | |
| | | z-index: 99; |
| | | background: #fff; |
| | | box-shadow: 0px 0px 20px 1px #eeeeee83; |
| | | box-sizing: border-box; |
| | | } |
| | | .contentBox { |
| | | width: 100%; |
| | |
| | | z-index: 99; |
| | | background: #fff; |
| | | box-shadow: 0px 0px 20px 1px #eeeeee83; |
| | | box-sizing: border-box; |
| | | } |
| | | .contentBox { |
| | | width: 100%; |
| | |
| | | const options = ref([ |
| | | { |
| | | label: '全部', |
| | | value: 'all' |
| | | value: 'all', |
| | | }, |
| | | { |
| | | label: '未批改', |
| | | value: 'WaitCheck' |
| | | value: 'WaitCheck', |
| | | }, |
| | | { |
| | | label: '已批改', |
| | | value: 'Normal' |
| | | value: 'Normal', |
| | | }, |
| | | { |
| | | label: '未提交', |
| | | value: 'WaitSubmit' |
| | | } |
| | | value: 'WaitSubmit', |
| | | }, |
| | | ]) |
| | | |
| | | let pages = reactive({ |
| | |
| | | page: 1, |
| | | pageSize: 15, |
| | | count: 0, |
| | | loading: true |
| | | loading: true, |
| | | }) |
| | | |
| | | const questionKey = [ |
| | |
| | | 'Embedded_QuestionBank_QuestionType', |
| | | 'Embedded_QuestionBank_Score', |
| | | 'Embedded_QuestionBank_Stem', |
| | | 'Embedded_QuestionBank_StemStyle' |
| | | 'Embedded_QuestionBank_StemStyle', |
| | | ] |
| | | |
| | | // 分页 |
| | |
| | | taskId: classInfo?.taskWorkId, |
| | | classId: classInfo?.id, |
| | | filterList, |
| | | searchList |
| | | searchList, |
| | | } |
| | | MG.edu |
| | | .getTaskSubmitList(data) |
| | |
| | | { name: '简答题', totalScore: 0, value: 'shortAnswer', data: [] }, |
| | | { name: '论述题', totalScore: 0, value: 'discuss', data: [] }, |
| | | { name: '连线题', totalScore: 0, value: 'matching', data: [] }, |
| | | { name: '分类题', totalScore: 0, value: 'classification', data: [] } |
| | | { name: '分类题', totalScore: 0, value: 'classification', data: [] }, |
| | | ] |
| | | try { |
| | | let list: any = [] |
| | |
| | | type: item.type, |
| | | state: item.state, |
| | | submit: item.submit, |
| | | updateTaskSubmitCmsItemRequests: [] |
| | | updateTaskSubmitCmsItemRequests: [], |
| | | } |
| | | item.singleChoiceName = '单选题' |
| | | item.singleChoiceArr = [] |
| | |
| | | const lenghtArr = [...res.datas] |
| | | singleChoiceLength.value = lenghtArr.reduce( |
| | | (max: any, obj: any) => Math.max(max, obj.singleChoiceArr.length), |
| | | 0 |
| | | 0, |
| | | ) |
| | | multipleChoiceLength.value = lenghtArr.reduce( |
| | | (max: any, obj: any) => Math.max(max, obj.multipleChoiceArr.length), |
| | | 0 |
| | | 0, |
| | | ) |
| | | judgeLength.value = lenghtArr.reduce( |
| | | (max: any, obj: any) => Math.max(max, obj.judgeArr.length), |
| | | 0 |
| | | 0, |
| | | ) |
| | | completionLength.value = lenghtArr.reduce( |
| | | (max: any, obj: any) => Math.max(max, obj.completionArr.length), |
| | | 0 |
| | | 0, |
| | | ) |
| | | otherLength.value = lenghtArr.reduce( |
| | | (max: any, obj: any) => Math.max(max, obj.otherArr.length), |
| | | 0 |
| | | 0, |
| | | ) |
| | | tableLoading.value = false |
| | | tableData.value = res.datas |
| | |
| | | taskId: classInfo?.taskWorkId, // taskData?.id |
| | | path: String(classInfo?.taskCmsId), //taskData?.rootCmsItemId |
| | | type: '*', |
| | | keys: questionKey |
| | | keys: questionKey, |
| | | } |
| | | MG.edu |
| | | .getTaskCmsItem(data) |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '列表获取失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | tableLoading.value = false |
| | | console.log(e) |
| | |
| | | questionType: item.Embedded_QuestionBank_QuestionType, |
| | | questionAnalysisCon: item.Embedded_QuestionBank_AnalysisCon, |
| | | questionAnswer: item.Embedded_QuestionBank_Answer, |
| | | customAnswer: null |
| | | customAnswer: null, |
| | | } |
| | | } catch (error) { |
| | | console.log(item) |
| | |
| | | taskId: classInfo?.taskWorkId, |
| | | classId: classInfo?.id, |
| | | filterList, |
| | | searchList |
| | | searchList, |
| | | } |
| | | MG.edu |
| | | .getUnSubmitList(data) |
| | |
| | | ...item, |
| | | index: index + 1, |
| | | createDate: moment(item.createDate).format('YYYY-MM-DD'), |
| | | appUserId: item.appUser.id |
| | | appUserId: item.appUser.id, |
| | | } |
| | | }) |
| | | pages.count = totalSize |
| | |
| | | if (item) { |
| | | const requestData = { |
| | | classId: classInfo?.id, |
| | | requests: [] |
| | | requests: [], |
| | | } |
| | | const data = JSON.parse(item) |
| | | listData.forEach((citem: any) => { |
| | |
| | | score: uitem.score, |
| | | answer: uitem.answer, |
| | | state: 'Normal', |
| | | comments: 'judge' |
| | | comments: 'judge', |
| | | } |
| | | }) |
| | | } |
| | |
| | | content, |
| | | type: 'Normal', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | newDataListRequest: [], |
| | | } |
| | | MG.ugc |
| | | .newTopicMessage(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '已催交' |
| | | message: '已催交', |
| | | }) |
| | | } |
| | | }) |
| | |
| | | { |
| | | compareType: 'Contains', |
| | | keywords: searchKey.value, |
| | | field: 'Name' |
| | | } |
| | | field: 'Name', |
| | | }, |
| | | ] |
| | | pages.page = 1 |
| | | if (workState.value != 'WaitSubmit') { |
| | |
| | | |
| | | .classManagePage-nav { |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | padding: 0 20px; |
| | | height: 40px; |
| | | border-bottom: 1px solid #e6e8ed; |
| | |
| | | z-index: 99; |
| | | background: #fff; |
| | | box-shadow: 0px 0px 20px 1px #eeeeee83; |
| | | box-sizing: border-box; |
| | | } |
| | | .contentBox { |
| | | width: 100%; |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 0; |
| | | .selectState { |
| | | display: flex; |
| | | align-items: center; |
| | | width: 200px; |
| | | span { |
| | | min-width: 50px; |
| | | } |
| | | } |
| | | .searchBox { |
| | | width: 300px; |
| | | float: left; |
| | |
| | | border-radius: 5px; |
| | | margin: 10px auto; |
| | | padding-bottom: 20px; |
| | | box-sizing: border-box; |
| | | .pubContent { |
| | | position: relative; |
| | | height: 80vh; |
| | |
| | | align-center |
| | | v-model="visibleView" |
| | | destroy-on-close |
| | | width="900" |
| | | width="1200" |
| | | > |
| | | <template #header> |
| | | <div class="viewTitle">已选题目</div> |
| | |
| | | align-center |
| | | v-model="visibleLook" |
| | | destroy-on-close |
| | | width="900" |
| | | width="1200" |
| | | > |
| | | <template #header> |
| | | <div class="viewTitle">预览作业</div> |
| | |
| | | if (questionKey != null) { |
| | | for (let fieldKey of questionKey) { |
| | | if (item.datas[fieldKey]) { |
| | | const values = JSON.parse(item.datas[fieldKey]) |
| | | if (values.length > 0) { |
| | | // 用字段名处理返回的字段值 |
| | | if (values[0].Value) { |
| | | item[fieldKey] = values[0].Value |
| | | } else if (values[0].Data) { |
| | | item[fieldKey] = values[0].Data.Value |
| | | } else if (!values[0].Value && values[0].FileList?.length > 0) { |
| | | item[fieldKey] = values[0].FileList |
| | | } else { |
| | | item[fieldKey] = '-' |
| | | try { |
| | | const values = JSON.parse(item.datas[fieldKey]) |
| | | if (values.length > 0) { |
| | | // 用字段名处理返回的字段值 |
| | | if (values[0].Value) { |
| | | item[fieldKey] = values[0].Value |
| | | } else if (values[0].Data) { |
| | | item[fieldKey] = values[0].Data.Value |
| | | } else if (!values[0].Value && values[0].FileList?.length > 0) { |
| | | item[fieldKey] = values[0].FileList |
| | | } else { |
| | | item[fieldKey] = '-' |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.log(error, item.datas[fieldKey], item) |
| | | } |
| | | } |
| | | } |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | padding: 20px 0; |
| | | span { |
| | | min-width: 80px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | value: config.taskType.homeWork, |
| | | field: 'Type', |
| | | subFilters: [] |
| | | } |
| | | subFilters: [], |
| | | }, |
| | | ]) |
| | | // task |
| | | const taskData = reactive({ |
| | |
| | | state: '', |
| | | groupId: '', |
| | | beginDate: '', |
| | | endDate: '' |
| | | endDate: '', |
| | | }) |
| | | |
| | | const visiblePub = ref(false) |
| | |
| | | 'Embedded_QuestionBank_QuestionType', |
| | | 'Embedded_QuestionBank_Score', |
| | | 'Embedded_QuestionBank_Stem', |
| | | 'Embedded_QuestionBank_StemStyle' |
| | | 'Embedded_QuestionBank_StemStyle', |
| | | ] |
| | | |
| | | let pages = reactive({ |
| | |
| | | page: 1, |
| | | pageSize: 15, |
| | | count: 0, |
| | | loading: false |
| | | loading: false, |
| | | }) |
| | | // 作业列表 |
| | | const tableData: any = ref([]) |
| | |
| | | size: pages.pageSize, |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | field: 'CreateDate', |
| | | }, |
| | | filterList, |
| | | searchList, |
| | | groupId: classInfo?.id |
| | | groupId: classInfo?.id, |
| | | } |
| | | MG.edu |
| | | .getTaskList(data) |
| | |
| | | ...item, |
| | | totalScore: item.judgeScore + item.otherScore, |
| | | beginDate: moment(item.beginDate).format('YYYY-MM-DD'), |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD') |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD'), |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | { |
| | | compareType: 'Contains', |
| | | keywords: searchKey.value, |
| | | field: 'Name' |
| | | } |
| | | field: 'Name', |
| | | }, |
| | | ] |
| | | pages.page = 1 |
| | | pages.currentPage = 1 |
| | |
| | | |
| | | // 答题 |
| | | const answer = (item: any) => { |
| | | router.push({ |
| | | path: '/bookService/details/answer', |
| | | query: { |
| | | answerTitle: item.name, |
| | | taskId: item.id, |
| | | groupId: classInfo?.id, |
| | | answerType: 'task' |
| | | } |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '正在建设中...', |
| | | }) |
| | | // router.push({ |
| | | // path: '/bookService/details/answer', |
| | | // query: { |
| | | // answerTitle: item.name, |
| | | // taskId: item.id, |
| | | // groupId: classInfo?.id, |
| | | // answerType: 'task', |
| | | // }, |
| | | // }) |
| | | } |
| | | |
| | | // 预览 |
| | | const preview = (item: any) => { |
| | | router.push({ |
| | | path: '/bookService/details/answer', |
| | | query: { |
| | | answerTitle: item.name, |
| | | taskId: item.id, |
| | | groupId: classInfo?.id, |
| | | answerType: 'task', |
| | | isPreview: 'true' |
| | | } |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '正在建设中...', |
| | | }) |
| | | // router.push({ |
| | | // path: '/bookService/details/answer', |
| | | // query: { |
| | | // answerTitle: item.name, |
| | | // taskId: item.id, |
| | | // groupId: classInfo?.id, |
| | | // answerType: 'task', |
| | | // isPreview: 'true', |
| | | // }, |
| | | // }) |
| | | } |
| | | </script> |
| | | |
| | |
| | | border-radius: 5px; |
| | | margin: 10px auto; |
| | | padding-bottom: 20px; |
| | | box-sizing: border-box; |
| | | .pubContent { |
| | | height: 800px; |
| | | } |
| | |
| | | publisher: userInfo?.name ?? '', |
| | | publishRole: userInfo?.role ?? '', |
| | | icon: userInfo.icon ?? '', |
| | | type: userInfo.type ?? '' |
| | | type: userInfo.type ?? '', |
| | | } |
| | | const data = { |
| | | description: '', |
| | |
| | | content: JSON.stringify(textObj), |
| | | type: 'Normal', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | newDataListRequest: [], |
| | | } |
| | | MG.ugc.newTopicMessage(data).then((res: any) => { |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '已回复', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | dialogVisible.value = false |
| | | textarea.value = '' |
| | |
| | | const getTopicInfo = () => { |
| | | const pramas = { |
| | | classId: classInfo.id, |
| | | refCodes: [config.refCode.talk] |
| | | refCodes: [config.refCode.talk], |
| | | } |
| | | MG.edu.getClassTopic(pramas).then((res: any) => { |
| | | const list = res |
| | |
| | | { |
| | | keywords: classInfo.MessageName, |
| | | field: 'Name', |
| | | compareType: 'Contains' |
| | | } |
| | | compareType: 'Contains', |
| | | }, |
| | | ], |
| | | appRefCode: config.appRefCode, |
| | | topicIdOrRefCode: String(talkTopicInfo.value.id) |
| | | topicIdOrRefCode: String(talkTopicInfo.value.id), |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res: any) => { |
| | | const list = res.datas |
| | |
| | | item.createDate = moment(item.createDate).format('YYYY-MM-DD HH:mm:ss') |
| | | item.updateDate = moment(item.updateDate).format('YYYY-MM-DD HH:mm:ss') |
| | | return { |
| | | ...item |
| | | ...item, |
| | | } |
| | | }) |
| | | ownData.value = list[0] |
| | |
| | | start: 0, |
| | | size: 999, |
| | | parentId: ownData?.value.id, |
| | | topicIdOrRefCode: String(talkTopicInfo.value.id) |
| | | topicIdOrRefCode: String(talkTopicInfo.value.id), |
| | | } |
| | | MG.ugc.getTopicMessageSubList(data).then((res: any) => { |
| | | const list = res.datas |
| | |
| | | item.createDate = moment(item.createDate).format('YYYY-MM-DD HH:mm:ss') |
| | | item.updateDate = moment(item.updateDate).format('YYYY-MM-DD HH:mm:ss') |
| | | return { |
| | | ...item |
| | | ...item, |
| | | } |
| | | }) |
| | | }) |
| | |
| | | // 删除回复话题 |
| | | const removeMessageItem = (item: any) => { |
| | | const data = { |
| | | messageIds: [item.id] |
| | | messageIds: [item.id], |
| | | } |
| | | MG.ugc.delTopicMessage(data).then((res: any) => { |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '已删除', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | } |
| | | getMessage() |
| | |
| | | state: 'Normal', |
| | | content: JSON.stringify(item.publicText), |
| | | newDataRequests: [], |
| | | updateDataRequests: [] |
| | | updateDataRequests: [], |
| | | } |
| | | MG.ugc |
| | | .updateTopicMessage(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '已发布' |
| | | message: '已发布', |
| | | }) |
| | | getMessage() |
| | | } |
| | |
| | | background: #fff; |
| | | |
| | | .classManagePage-nav { |
| | | width: 100%; |
| | | padding: 0 20px; |
| | | height: 40px; |
| | | border-bottom: 1px solid #e6e8ed; |
| | |
| | | background: #fff; |
| | | } |
| | | .classManagePage-content { |
| | | width: 100%; |
| | | position: relative; |
| | | .backBtn { |
| | | width: 100%; |
| | |
| | | z-index: 99; |
| | | background: #fff; |
| | | box-shadow: 0px 0px 20px 1px #eee; |
| | | box-sizing: border-box; |
| | | } |
| | | .talkBox { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: flex-start; |
| | | padding: 0 20px; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | .leftBox { |
| | | flex: 1; |
| | | min-width: 500px; |
| | |
| | | height: 60px; |
| | | border-bottom: 1px solid #e7eaec; |
| | | line-height: 60px; |
| | | box-sizing: border-box; |
| | | } |
| | | :deep(.inputBox) { |
| | | padding: 20px 30px; |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | |
| | | .el-textarea__inner { |
| | |
| | | padding: 0 30px; |
| | | box-sizing: border-box; |
| | | .MessageHeader { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | |
| | | } |
| | | .MessageContent { |
| | | padding: 0 60px; |
| | | box-sizing: border-box; |
| | | padding-bottom: 20px; |
| | | margin-bottom: 10px; |
| | | font-family: PingFang SC; |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1px solid #e7eaec; |
| | | box-sizing: border-box; |
| | | |
| | | .talkUser { |
| | | display: flex; |
| | |
| | | overflow: auto; |
| | | |
| | | padding: 20px 30px; |
| | | box-sizing: border-box; |
| | | .contentTilte { |
| | | font-family: PingFang SC; |
| | | font-weight: bold; |
| | |
| | | <div class="titleBox"> |
| | | <div class="titleOptions"> |
| | | <span>教学计划</span> |
| | | <el-button |
| | | v-if="userInfo?.role == 'Teacher'" |
| | | @click="openPlan()" |
| | | type="primary" |
| | | round |
| | | <el-button v-if="userInfo?.role == 'Teacher'" @click="openPlan()" type="primary" round |
| | | >新建 <el-icon style="margin-left: 3px"><Plus /></el-icon |
| | | ></el-button> |
| | | </div> |
| | |
| | | @keydown.enter="searchData()" |
| | | > |
| | | <template #append> |
| | | <el-button |
| | | type="primary" |
| | | @click="searchData()" |
| | | class="searchBtn" |
| | | :icon="Search" |
| | | /> |
| | | <el-button type="primary" @click="searchData()" class="searchBtn" :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </div> |
| | |
| | | v-for="(item, index) in scope.row.datas.uploadResources" |
| | | :key="index" |
| | | > |
| | | {{ item.FileName + "." + item.Extension }} |
| | | {{ item.FileName + '.' + item.Extension }} |
| | | </span> |
| | | </div> |
| | | </template> |
| | |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <div class="grid-content ep-bg-purple-light" /> |
| | | <el-input |
| | | v-model="taskItem.title" |
| | | placeholder="请填写名称" |
| | | size="large" |
| | | clearable |
| | | /> |
| | | <el-input v-model="taskItem.title" placeholder="请填写名称" size="large" clearable /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | |
| | | </el-cascader> |
| | | </div> |
| | | <div class="btngroup"> |
| | | <el-button |
| | | type="primary" |
| | | @click="addGroup" |
| | | style="height: 40px" |
| | | :icon="Plus" |
| | | /> |
| | | <el-button type="primary" @click="addGroup" style="height: 40px" :icon="Plus" /> |
| | | <el-button |
| | | type="warning" |
| | | :disabled="dynamicList.length == 1" |
| | |
| | | ></el-input> |
| | | </div> |
| | | <div class="btngroup"> |
| | | <el-button |
| | | type="primary" |
| | | @click="addGroup" |
| | | style="height: 40px" |
| | | :icon="Plus" |
| | | /> |
| | | <el-button type="primary" @click="addGroup" style="height: 40px" :icon="Plus" /> |
| | | <el-button |
| | | type="warning" |
| | | :disabled="dynamicList.length == 1" |
| | |
| | | >上传</el-button |
| | | > |
| | | </el-upload> --> |
| | | <el-upload |
| | | class="upload" |
| | | drag |
| | | action="#" |
| | | multiple |
| | | :http-request="fileUpload" |
| | | > |
| | | <el-upload class="upload" drag action="#" multiple :http-request="fileUpload"> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">拖拽或点击文件上传</div> |
| | | </el-upload> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { Search, ArrowRight, Plus, Minus } from "@element-plus/icons-vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { reactive, ref, onMounted, inject, watch } from "vue"; |
| | | import { useRoute } from "vue-router"; |
| | | import axios from "axios"; |
| | | import { Search, ArrowRight, Plus, Minus } from '@element-plus/icons-vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { reactive, ref, onMounted, inject, watch } from 'vue' |
| | | import { useRoute } from 'vue-router' |
| | | import axios from 'axios' |
| | | |
| | | const route: any = useRoute(); |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | const tool: any = inject("toolClass"); |
| | | const classInfo = JSON.parse(route.query.classInfo); |
| | | const userInfo = ref(); |
| | | const searchKey = ref(""); |
| | | const visible = ref(false); |
| | | const dynamicList: any = ref([]); |
| | | const tableData: any = ref([]); |
| | | const classItem = ref([]); |
| | | const fileList: any = ref([]); |
| | | const chapterList: any = ref([]); |
| | | const childrenList: any = ref([]); |
| | | const taskData: any = ref(); |
| | | const route: any = useRoute() |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | const tool: any = inject('toolClass') |
| | | const classInfo = JSON.parse(route.query.classInfo) |
| | | const userInfo = ref() |
| | | const searchKey = ref('') |
| | | const visible = ref(false) |
| | | const dynamicList: any = ref([]) |
| | | const tableData: any = ref([]) |
| | | const classItem = ref([]) |
| | | const fileList: any = ref([]) |
| | | const chapterList: any = ref([]) |
| | | const childrenList: any = ref([]) |
| | | const taskData: any = ref() |
| | | // 新建教学计划防抖 |
| | | const newLoading = ref(false); |
| | | const teachPlanvalue = ref(""); |
| | | const newLoading = ref(false) |
| | | const teachPlanvalue = ref('') |
| | | const taskItem = reactive({ |
| | | title: "", |
| | | selectChapter: "", |
| | | referenceMaterial: "", |
| | | explain: "", |
| | | uploadResources: "", |
| | | }); |
| | | title: '', |
| | | selectChapter: '', |
| | | referenceMaterial: '', |
| | | explain: '', |
| | | uploadResources: '', |
| | | }) |
| | | let pages = reactive({ |
| | | page: 1, |
| | | pageSize: 13, |
| | | count: 0, |
| | | loading: false, |
| | | }); |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | const list = [{ key: 1, parentVal: "", childVal: "" }]; |
| | | dynamicList.value = list; |
| | | const userCache: any = localStorage.getItem(config.userInfoKey); |
| | | const list = [{ key: 1, parentVal: '', childVal: '' }] |
| | | dynamicList.value = list |
| | | const userCache: any = localStorage.getItem(config.userInfoKey) |
| | | if (userCache) { |
| | | userInfo.value = JSON.parse(userCache); |
| | | userInfo.value = JSON.parse(userCache) |
| | | } |
| | | pages.loading = true; |
| | | getTaskList(); |
| | | }); |
| | | pages.loading = true |
| | | getTaskList() |
| | | }) |
| | | |
| | | const searchData = () => { |
| | | pages.page = 1; |
| | | getTaskCmsList(); |
| | | }; |
| | | pages.page = 1 |
| | | getTaskCmsList() |
| | | } |
| | | |
| | | const openPlan = () => { |
| | | visible.value = true; |
| | | taskItem.title = ""; |
| | | taskItem.selectChapter = ""; |
| | | taskItem.referenceMaterial = ""; |
| | | taskItem.explain = ""; |
| | | taskItem.uploadResources = ""; |
| | | dynamicList.value = [{ key: 1, parentVal: "", childVal: "" }]; |
| | | fileList.value = []; |
| | | }; |
| | | visible.value = true |
| | | taskItem.title = '' |
| | | taskItem.selectChapter = '' |
| | | taskItem.referenceMaterial = '' |
| | | taskItem.explain = '' |
| | | taskItem.uploadResources = '' |
| | | dynamicList.value = [{ key: 1, parentVal: '', childVal: '' }] |
| | | fileList.value = [] |
| | | } |
| | | |
| | | const reduceGroup = () => { |
| | | dynamicList.value.pop(); |
| | | }; |
| | | dynamicList.value.pop() |
| | | } |
| | | |
| | | const addGroup = () => { |
| | | const source = dynamicList.value[dynamicList.value.length - 1]; |
| | | const obj = { key: source.key++, parentVal: "", childVal: "" }; |
| | | dynamicList.value.push(obj); |
| | | }; |
| | | const source = dynamicList.value[dynamicList.value.length - 1] |
| | | const obj = { key: source.key++, parentVal: '', childVal: '' } |
| | | dynamicList.value.push(obj) |
| | | } |
| | | |
| | | const handleSizeChange = (val: number) => { |
| | | pages.pageSize = val; |
| | | getTaskCmsList(); |
| | | }; |
| | | pages.pageSize = val |
| | | getTaskCmsList() |
| | | } |
| | | |
| | | const handleCurrentChange = (val: number) => { |
| | | pages.page = val; |
| | | getTaskCmsList(); |
| | | }; |
| | | pages.page = val |
| | | getTaskCmsList() |
| | | } |
| | | |
| | | // 新建任务 |
| | | const newTask = () => { |
| | | const data = { |
| | | name: classInfo?.name + "教学计划", |
| | | description: "", |
| | | icon: "", |
| | | name: classInfo?.name + '教学计划', |
| | | description: '', |
| | | icon: '', |
| | | type: config.taskType.teachingPlan, |
| | | state: "Normal", |
| | | state: 'Normal', |
| | | groupId: classInfo?.id, |
| | | order: 0, |
| | | beginDate: "2024-09-09T03:38:07.167Z", |
| | | endDate: "2024-09-09T03:38:07.167Z", |
| | | beginDate: '2024-09-09T03:38:07.167Z', |
| | | endDate: '2024-09-09T03:38:07.167Z', |
| | | duration: 0, |
| | | }; |
| | | } |
| | | MG.edu |
| | | .newTask(data) |
| | | .then((res: any) => {}) |
| | | .catch((e: any) => { |
| | | console.log(e); |
| | | }); |
| | | }; |
| | | console.log(e) |
| | | }) |
| | | } |
| | | |
| | | // 获取任务列表 |
| | | const getTaskList = () => { |
| | |
| | | filterList: [ |
| | | { |
| | | value: config.taskType.teachingPlan, |
| | | field: "Type", |
| | | field: 'Type', |
| | | subFilters: [], |
| | | }, |
| | | ], |
| | | searchList: [], |
| | | groupId: classInfo?.id, |
| | | }; |
| | | } |
| | | MG.edu |
| | | .getTaskList(data) |
| | | .then((res: any) => { |
| | | if (res.datas.length == 0 && userInfo.value.role == "Teacher") { |
| | | newTask(); |
| | | if (res.datas.length == 0 && userInfo.value.role == 'Teacher') { |
| | | newTask() |
| | | } |
| | | if (res.datas.length > 0) { |
| | | taskData.value = res.datas[0]; |
| | | classInfo.taskId = taskData.value?.id; |
| | | classInfo.rootTaskCmsId = taskData.value?.rootCmsItemId; |
| | | taskData.value = res.datas[0] |
| | | classInfo.taskId = taskData.value?.id |
| | | classInfo.rootTaskCmsId = taskData.value?.rootCmsItemId |
| | | } |
| | | getTypeByCode(); |
| | | getTypeByCode() |
| | | if (classInfo.bookRefCode) { |
| | | getCatalogueList(); |
| | | getCatalogueList() |
| | | } |
| | | }) |
| | | .catch((e: any) => { |
| | | console.log(e); |
| | | }); |
| | | }; |
| | | console.log(e) |
| | | }) |
| | | } |
| | | |
| | | // 前往阅读器 |
| | | const toRead = (item: any) => { |
| | | // config.textReaderUrl |
| | | // 'http://192.168.3.132:8005/#/home' |
| | | return ElMessage.warning('正在建设中...') |
| | | if (classInfo.bookRefCode) { |
| | | const url = |
| | | config.textReaderUrl + |
| | | "?bookId=" + |
| | | '?bookId=' + |
| | | classInfo?.bookRefCode + |
| | | "&token=" + |
| | | '&token=' + |
| | | localStorage.getItem(config.tokenKey) + |
| | | "&chapter=" + |
| | | '&chapter=' + |
| | | item.parentVal + |
| | | "&startPage=" + |
| | | item.childVal; |
| | | window.open(url, "_blank"); |
| | | '&startPage=' + |
| | | item.childVal |
| | | window.open(url, '_blank') |
| | | } else { |
| | | ElMessage.warning("当前章节无法跳转"); |
| | | ElMessage.warning('当前章节无法跳转') |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // 下载上传资源 |
| | | const downloadRes = (item: any) => { |
| | | const url = config.requestCtx + "/file/api/ApiDownload?md5=" + item.Md5; |
| | | window.open(url, "_blank"); |
| | | }; |
| | | const url = config.requestCtx + '/file/api/ApiDownload?md5=' + item.Md5 |
| | | window.open(url, '_blank') |
| | | } |
| | | |
| | | // 选择器 |
| | | const parentSelect = (val: any, item: any) => { |
| | | if (val?.length) { |
| | | const str = val[2]; |
| | | const obj = findObj(chapterList.value, str); |
| | | item.parentVal = obj.chapter; |
| | | item.childVal = obj.start; |
| | | const str = val[2] |
| | | const obj = findObj(chapterList.value, str) |
| | | item.parentVal = obj.chapter |
| | | item.childVal = obj.start |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // 文件上传 |
| | | const fileUpload = (file: any) => { |
| | |
| | | // ElMessage.error('上传文件大小不能超过 300KB!') |
| | | // return reject() |
| | | // } |
| | | const FileName = file.file.name.split(".")[0]; |
| | | const Extension = file.file.name.split(".")[1]; |
| | | const FileType = file.file.type; |
| | | let size = 1024; |
| | | const FileName = file.file.name.split('.')[0] |
| | | const Extension = file.file.name.split('.')[1] |
| | | const FileType = file.file.type |
| | | let size = 1024 |
| | | tool |
| | | .getFileMd5(file.file, size * 1024) |
| | | .then((e: string) => { |
| | | if (!fileList.value.find((item: any) => item.md5 == e)) { |
| | | const imgData = new FormData(); |
| | | imgData.append("Md5", e); |
| | | imgData.append("FileName", FileName); |
| | | imgData.append("Extension", Extension); |
| | | imgData.append("FileType", FileType); |
| | | imgData.append("MetaData", null); |
| | | imgData.append("file", file.file); |
| | | const imgData = new FormData() |
| | | imgData.append('Md5', e) |
| | | imgData.append('FileName', FileName) |
| | | imgData.append('Extension', Extension) |
| | | imgData.append('FileType', FileType) |
| | | imgData.append('MetaData', null) |
| | | imgData.append('file', file.file) |
| | | MG.file.upload(imgData).then(() => { |
| | | fileList.value.push({ |
| | | md5: e, |
| | | linkType: "LinkFile", |
| | | linkProtectType: "Public", |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | fileName: FileName, |
| | | extension: Extension, |
| | | url: config.requestCtx + `/file/api/ApiDownload?md5=` + e, |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | } else { |
| | | ElMessage.warning("当前文件已上传,请勿重复操作!"); |
| | | ElMessage.warning('当前文件已上传,请勿重复操作!') |
| | | } |
| | | }) |
| | | .catch((e: any) => { |
| | | console.error(e); |
| | | }); |
| | | }); |
| | | }; |
| | | console.error(e) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | // 获取章节目录 |
| | | const getCatalogueList = () => { |
| | | const url = |
| | | config.requestCtx + "/books/resource/" + classInfo?.bookRefCode + "/information.json"; |
| | | const url = config.requestCtx + '/books/resource/' + classInfo?.bookRefCode + '/information.json' |
| | | axios |
| | | .get(url) |
| | | .then((res) => { |
| | | if (res.data?.data.length > 0) { |
| | | const datas = res.data.data; |
| | | const list = datas?.filter((item: any) => item.children?.length > 0); |
| | | chapterList.value = changeCascaderData(list); |
| | | const datas = res.data.data |
| | | const list = datas?.filter((item: any) => item.children?.length > 0) |
| | | chapterList.value = changeCascaderData(list) |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | | console.log(e); |
| | | }); |
| | | }; |
| | | console.log(e) |
| | | }) |
| | | } |
| | | |
| | | // 递归更数组 |
| | | const changeCascaderData = (data: any) => { |
| | | for (const item of data) { |
| | | item.value = item.start; |
| | | item.value = item.start |
| | | if (item.children?.length > 0) { |
| | | changeCascaderData(item.children); |
| | | changeCascaderData(item.children) |
| | | } |
| | | } |
| | | return data; |
| | | }; |
| | | return data |
| | | } |
| | | |
| | | // 递归查找 |
| | | const findObj = (arr: any, val: any) => { |
| | | for (let i = 0; i < arr.length; i++) { |
| | | const obj = arr[i]; |
| | | const obj = arr[i] |
| | | if (obj.start === val) { |
| | | return obj; // 找到目标对象,直接返回 |
| | | return obj // 找到目标对象,直接返回 |
| | | } |
| | | if (obj.children && obj.children.length > 0) { |
| | | // 如果当前对象有子对象,递归查找子对象 |
| | | const found: any = findObj(obj.children, val); |
| | | const found: any = findObj(obj.children, val) |
| | | if (found) { |
| | | return found; // 在子对象中找到目标对象,返回 |
| | | return found // 在子对象中找到目标对象,返回 |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | }; |
| | | return null |
| | | } |
| | | |
| | | // 获取类型字段 |
| | | const getTypeByCode = () => { |
| | |
| | | refCodes: [config.refCode.teachingPlan], |
| | | }) |
| | | .then((res: any) => { |
| | | const data = res[0]?.cmsTypeLinks[0]?.children; |
| | | const data = res[0]?.cmsTypeLinks[0]?.children |
| | | if (data?.length) { |
| | | classItem.value = data; |
| | | classItem.value = data |
| | | } |
| | | getTaskCmsList(); |
| | | getTaskCmsList() |
| | | }) |
| | | .catch((err: any) => { |
| | | console.log(err); |
| | | }); |
| | | }; |
| | | console.log(err) |
| | | }) |
| | | } |
| | | |
| | | // 获取任务下的资源列表 |
| | | const getTaskCmsList = () => { |
| | |
| | | ? [ |
| | | { |
| | | keywords: searchKey.value, |
| | | field: "Name", |
| | | compareType: "Contains", |
| | | field: 'Name', |
| | | compareType: 'Contains', |
| | | }, |
| | | ] |
| | | : [], |
| | | taskId: classInfo?.taskId, |
| | | path: String(classInfo?.rootTaskCmsId), |
| | | type: "*", |
| | | keys: ["referenceMaterial", "Name", "selectChapter", "uploadResources", "explain"], |
| | | }; |
| | | type: '*', |
| | | keys: ['referenceMaterial', 'Name', 'selectChapter', 'uploadResources', 'explain'], |
| | | } |
| | | MG.edu |
| | | .getTaskCmsItem(data) |
| | | .then((res: any) => { |
| | | pages.loading = false; |
| | | pages.count = res.totalSize; |
| | | pages.loading = false |
| | | pages.count = res.totalSize |
| | | for (let i = 0; i < res.datas.length; i++) { |
| | | const item = res.datas[i]; |
| | | const item = res.datas[i] |
| | | // 处理字段 |
| | | if (taskItem != null) { |
| | | for (let fieldKey in taskItem) { |
| | | if (item.datas[fieldKey]) { |
| | | const values = JSON.parse(item.datas[fieldKey]); |
| | | const values = JSON.parse(item.datas[fieldKey]) |
| | | if (values.length > 0) { |
| | | // 用字段名处理返回的字段值 |
| | | if (values[0].Value) { |
| | | item.datas[fieldKey] = values[0].Value; |
| | | item.datas[fieldKey] = values[0].Value |
| | | } else if (values[0].Data) { |
| | | item.datas[fieldKey] = values[0].Data.Value; |
| | | item.datas[fieldKey] = values[0].Data.Value |
| | | } else if (!values[0].Value && values[0].FileList?.length > 0) { |
| | | item.datas[fieldKey] = values[0].FileList; |
| | | item.datas[fieldKey] = values[0].FileList |
| | | } else { |
| | | item.datas[fieldKey] = "-"; |
| | | item.datas[fieldKey] = '-' |
| | | } |
| | | if (fieldKey == "selectChapter" && values[0].Value) { |
| | | const data = JSON.parse(values[0].Value); |
| | | item.datas["selectChapter"] = data.map((citem: any) => { |
| | | if (fieldKey == 'selectChapter' && values[0].Value) { |
| | | const data = JSON.parse(values[0].Value) |
| | | item.datas['selectChapter'] = data.map((citem: any) => { |
| | | if (classInfo.bookRefCode) { |
| | | const dataS = findObj(chapterList.value, citem.childVal); |
| | | const dataS = findObj(chapterList.value, citem.childVal) |
| | | return { |
| | | ...citem, |
| | | parentName: |
| | | chapterList.value.find( |
| | | (sitem: any) => sitem.chapter == citem.parentVal |
| | | )?.label + |
| | | "---" + |
| | | chapterList.value.find((sitem: any) => sitem.chapter == citem.parentVal) |
| | | ?.label + |
| | | '---' + |
| | | dataS?.label, |
| | | }; |
| | | } |
| | | } else { |
| | | return { |
| | | ...citem, |
| | | parentName: citem.parentVal + "---" + citem.childVal, |
| | | }; |
| | | parentName: citem.parentVal + '---' + citem.childVal, |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | if (fieldKey == "selectChapter" && !values[0].Value) { |
| | | item.datas["selectChapter"] = []; |
| | | if (fieldKey == 'selectChapter' && !values[0].Value) { |
| | | item.datas['selectChapter'] = [] |
| | | } |
| | | } |
| | | const index = i; |
| | | item.datas["index"] = index + 1; |
| | | const index = i |
| | | item.datas['index'] = index + 1 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | tableData.value = res.datas; |
| | | tableData.value = res.datas |
| | | }) |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: "列表获取失败", |
| | | type: "error", |
| | | }); |
| | | console.log(e); |
| | | }); |
| | | }; |
| | | message: '列表获取失败', |
| | | type: 'error', |
| | | }) |
| | | console.log(e) |
| | | }) |
| | | } |
| | | |
| | | // 删除资源 |
| | | const removeTaskItem = (item: any) => { |
| | |
| | | path: String(classInfo?.rootTaskCmsId), |
| | | }, |
| | | ], |
| | | }; |
| | | } |
| | | MG.edu |
| | | .removeTaskCmsItemList(data) |
| | | .then((res: any) => { |
| | | if (res) { |
| | | ElMessage({ |
| | | message: "删除成功", |
| | | type: "success", |
| | | }); |
| | | getTaskCmsList(); |
| | | message: '删除成功', |
| | | type: 'success', |
| | | }) |
| | | getTaskCmsList() |
| | | } |
| | | }) |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: "删除失败", |
| | | type: "error", |
| | | }); |
| | | }); |
| | | }; |
| | | message: '删除失败', |
| | | type: 'error', |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | // 为任务新建资源 |
| | | const newTaskCmsItems = () => { |
| | | newLoading.value = true; |
| | | taskItem.selectChapter = JSON.stringify(dynamicList.value); |
| | | newLoading.value = true |
| | | taskItem.selectChapter = JSON.stringify(dynamicList.value) |
| | | if (!taskItem.title) { |
| | | ElMessage({ |
| | | message: "请填写教学名称", |
| | | type: "warning", |
| | | }); |
| | | newLoading.value = false; |
| | | return false; |
| | | message: '请填写教学名称', |
| | | type: 'warning', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | | } |
| | | if (dynamicList.value[0]?.parentVal == "") { |
| | | if (dynamicList.value[0]?.parentVal == '') { |
| | | ElMessage({ |
| | | message: "请选择教学章节", |
| | | type: "warning", |
| | | }); |
| | | newLoading.value = false; |
| | | return false; |
| | | message: '请选择教学章节', |
| | | type: 'warning', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | | } |
| | | if (fileList.value.length == 0) { |
| | | ElMessage({ |
| | | message: "请上传教学文件", |
| | | type: "warning", |
| | | }); |
| | | newLoading.value = false; |
| | | return false; |
| | | message: '请上传教学文件', |
| | | type: 'warning', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | | } |
| | | const data = { |
| | | groupId: classInfo?.id, |
| | |
| | | newGroupCmsItemRequests: [ |
| | | { |
| | | name: taskItem.title, |
| | | description: "", |
| | | icon: "", |
| | | description: '', |
| | | icon: '', |
| | | type: config.refCode.teachingPlan, |
| | | state: "Normal", |
| | | state: 'Normal', |
| | | order: 0, |
| | | newDataListRequest: tool.worksDataBytool( |
| | | classItem.value, |
| | | taskItem, |
| | | fileList.value |
| | | ), |
| | | newDataListRequest: tool.worksDataBytool(classItem.value, taskItem, fileList.value), |
| | | newCmsItemAndFileLinkListRequest: [], |
| | | newChildrenListRequest: [], |
| | | }, |
| | | ], |
| | | }; |
| | | } |
| | | MG.edu.newTaskCmsItem(data).then((res: any) => { |
| | | newLoading.value = false; |
| | | newLoading.value = false |
| | | if (res) { |
| | | ElMessage({ |
| | | message: "新建成功", |
| | | type: "success", |
| | | }); |
| | | visible.value = false; |
| | | getTaskCmsList(); |
| | | message: '新建成功', |
| | | type: 'success', |
| | | }) |
| | | visible.value = false |
| | | getTaskCmsList() |
| | | } |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | |
| | | // // 编辑资源 |
| | | // const editOpen = (item: any) => { |
| | |
| | | </div> |
| | | <el-button type="primary" class="applyStartClasses" @click="applyClass">申请开班</el-button> |
| | | </div> |
| | | <div class="classListBox" v-loading="pages.loading"> |
| | | <div class="classListBox" v-if="classList.length > 0" v-loading="pages.loading"> |
| | | <div class="classItem" v-for="(item, index) in classList" :key="index"> |
| | | <div class="itemHeader"> |
| | | <div class="title">{{ item.name }}</div> |
| | |
| | | page: 1, |
| | | pageSize: 6, |
| | | count: 0, |
| | | loading: true |
| | | loading: true, |
| | | }) |
| | | |
| | | const searchData = () => { |
| | |
| | | size: pages.pageSize, |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | field: 'CreateDate', |
| | | }, |
| | | filterList: [], |
| | | searchList: searchKey.value |
| | |
| | | { |
| | | keywords: searchKey.value, |
| | | field: 'Name', |
| | | compareType: 'Contains' |
| | | } |
| | | compareType: 'Contains', |
| | | }, |
| | | ] |
| | | : [] |
| | | : [], |
| | | }) |
| | | .then((res: any) => { |
| | | pages.loading = false |
| | | pages.count = res.totalSize; |
| | | pages.count = res.totalSize |
| | | classList.value = res.datas.map((item: any) => { |
| | | return { |
| | | ...item, |
| | |
| | | id: item.id, |
| | | icon: item.icon ? getPublicImage(item.icon, 80) : '', |
| | | introduction: item.description, |
| | | reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '' |
| | | reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '', |
| | | } |
| | | }) |
| | | refreshParent() |
| | |
| | | formData.value = { |
| | | name: '', |
| | | num: '', |
| | | date: '' |
| | | date: '', |
| | | } |
| | | applyClassDialog.value = true |
| | | } |
| | |
| | | const formData = ref({ |
| | | name: '', |
| | | num: '', |
| | | date: '' |
| | | date: '', |
| | | }) |
| | | |
| | | const submit = () => { |
| | |
| | | endDate: moment(formData.value.date[1]).format('YYYY-MM-DD'), |
| | | config: '', |
| | | price: 0, |
| | | maxUserCount: formData.value.num |
| | | maxUserCount: formData.value.num, |
| | | }) |
| | | .then((res: any) => { |
| | | if (res) { |
| | |
| | | await toClipboard(text) |
| | | ElMessage({ |
| | | message: '复制成功', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | } catch (e) { |
| | | console.error(e) |
| | |
| | | // 删除班级 |
| | | const delClass = (item: any) => { |
| | | const data = { |
| | | ids: [item.id] |
| | | ids: [item.id], |
| | | } |
| | | MG.edu |
| | | .delCourseClass(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '已删除', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | getData() |
| | | } |
| | |
| | | .catch((err: any) => { |
| | | ElMessage({ |
| | | message: '删除失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | console.log(err) |
| | | }) |
| | |
| | | page: 1, |
| | | pageSize: 10, |
| | | count: 0, |
| | | loading: false |
| | | loading: false, |
| | | }) |
| | | const courseListData = ref([]) |
| | | |
| | |
| | | if (item.applyState == 'WaitAudit') { |
| | | ElMessage({ |
| | | message: '正在审核中....', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }) |
| | | return false |
| | | } |
| | | if (item.applyState == 'Reject') { |
| | | ElMessage({ |
| | | message: '审核未通过', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }) |
| | | return false |
| | | } |
| | |
| | | bookId: bookData.id, |
| | | author: bookData.author, |
| | | isbn: bookData.isbn, |
| | | bookRefCode: bookData.refCode |
| | | bookRefCode: bookData.refCode, |
| | | } |
| | | let page = uRouter.resolve({ |
| | | path: '/classManage', |
| | | query: { |
| | | classInfo: JSON.stringify(classinfo) |
| | | } |
| | | classInfo: JSON.stringify(classinfo), |
| | | }, |
| | | }) |
| | | window.open(page.href, '_blank') |
| | | } |
| | |
| | | margin-top: 10px; |
| | | font-size: 12px; |
| | | background-color: #fff; |
| | | color: #3b93fe; |
| | | color: #019e58; |
| | | padding: 0 6px; |
| | | border-radius: 50px; |
| | | overflow: hidden; |
| | |
| | | <el-input class="inputBox" v-model="activateCode" placeholder="请输入激活码"> |
| | | <template #append> |
| | | <el-button |
| | | style="background-color: #019e58; color: #fff" |
| | | style="background-color: #144941; color: #fff" |
| | | @click="userActiveCodeGet" |
| | | :loading="loading" |
| | | >激活</el-button |
| | |
| | | @click="goBookDetails(pItem.id, pItem.name, pItem.defaultSaleMethodId)" |
| | | > |
| | | <div class="cover"> |
| | | <img |
| | | :src="pItem.icon ? getPublicImage(pItem.icon, '', '') : bookCover" |
| | | alt="" |
| | | /> |
| | | <img :src="pItem.icon ? pItem.icon : bookCover" alt="" /> |
| | | </div> |
| | | <div class="info"> |
| | | <div class="bookType" style="margin-bottom: 10px" v-if="pItem.type"> |
| | | {{ pItem.type }} |
| | | </div> |
| | | <span :title="pItem.name">{{ pItem.name }}</span> |
| | | <span v-if="pItem.author">{{ pItem.author }}</span> |
| | | <span class="title" :title="pItem.name">{{ pItem.name }}</span> |
| | | <span class="author" v-if="pItem.author">{{ pItem.author }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | return citem.data.sequenceNum == '007EB8E7' && citem.data.value |
| | | })?.data?.value |
| | | const obj = { |
| | | icon: item.productList[index]?.icon, |
| | | icon: getPublicImage(item.productList[index]?.icon, '', '150'), |
| | | id: item.productList[index]?.id, |
| | | name: item.productList[index]?.name, |
| | | author, |
| | |
| | | } |
| | | // 跳转书本详情 |
| | | const goBookDetails = async (id: number, name: string, defaultSaleMethodId: number) => { |
| | | let parentData = await MG.store.getProductBySaleMethod({ |
| | | saleMethodId: defaultSaleMethodId, |
| | | router.push({ |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: id, |
| | | }, |
| | | }) |
| | | if (parentData.storeLinks[0].storeRefCode == 'jsek_digitalCourses') { |
| | | router.push({ |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: parentData.id, |
| | | }, |
| | | }) |
| | | } else if (parentData.storeLinks[0].storeRefCode == 'digitalTextbooks') { |
| | | router.push({ |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: parentData.id, |
| | | }, |
| | | }) |
| | | } else { |
| | | router.push({ |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: id, |
| | | }, |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | border: 1px solid #edecec; |
| | | background: #edf4f2; |
| | | .flex1 span { |
| | | color: #019e58; |
| | | color: #000; |
| | | } |
| | | } |
| | | |
| | |
| | | margin-bottom: 20px; |
| | | |
| | | .cover { |
| | | width: 106px; |
| | | width: 116px; |
| | | height: 150px; |
| | | border-radius: 0px 0px 0px 0px; |
| | | border: 1px solid #019e58; |
| | | position: relative; |
| | | margin: auto; |
| | | margin-bottom: 5px; |
| | | |
| | | img { |
| | | width: 100%; |
| | |
| | | } |
| | | |
| | | span { |
| | | font-weight: bold; |
| | | line-height: 25px; |
| | | display: -webkit-box; |
| | | margin-bottom: 5px; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; |
| | | overflow: hidden; |
| | |
| | | padding: 5px 0; |
| | | box-sizing: border-box; |
| | | text-align: center; |
| | | font-family: |
| | | Microsoft YaHei UI, |
| | | Microsoft YaHei UI; |
| | | font-size: 16px; |
| | | } |
| | | .title { |
| | | font-weight: bold; |
| | | color: #000000; |
| | | } |
| | | .author { |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false"> 取消 </el-button> |
| | | <el-button type="primary" @click="joinClass()"> 确认 </el-button> |
| | | <el-button type="primary" :disabled="!classDetail?.name" @click="joinClass()"> |
| | | 加入 |
| | | </el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | margin-top: 10px; |
| | | font-size: 12px; |
| | | background-color: #fff; |
| | | color: #3b93fe; |
| | | color: #019e58; |
| | | padding: 0 6px; |
| | | border-radius: 50px; |
| | | overflow: hidden; |
| | |
| | | </svg> |
| | | `, |
| | | }, |
| | | { |
| | | label: '购物车', |
| | | key: '2', |
| | | path: 'myCart', |
| | | icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> |
| | | <path |
| | | d="M1 2.68571C1 2.30701 1.32622 2 1.72862 2H2.27096C3.19434 2 3.74721 2.58422 4.06336 3.1273C4.27408 3.48932 4.42653 3.90919 4.54577 4.28933C4.57806 4.28694 4.61078 4.28571 4.64387 4.28571H16.7849C17.5914 4.28571 18.1738 5.01204 17.9527 5.74199L16.177 11.6017C15.8498 12.6818 14.8012 13.4266 13.6079 13.4266H7.82937C6.62618 13.4266 5.57145 12.6696 5.25303 11.5777L4.51422 9.04411L3.2915 5.15957L3.28952 5.15277C3.13825 4.63361 2.99629 4.14862 2.78534 3.78624C2.58048 3.43433 2.41718 3.37143 2.27096 3.37143H1.72862C1.32622 3.37143 1 3.06442 1 2.68571ZM5.92822 8.71113L6.6583 11.2147C6.80304 11.7111 7.28247 12.0551 7.82937 12.0551H13.6079C14.1503 12.0551 14.6269 11.7166 14.7758 11.2257L16.463 5.65714H4.96902L5.91484 8.66222C5.91997 8.67849 5.92442 8.69477 5.92822 8.71113ZM9.25768 16.1714C9.25768 17.1813 8.38781 18 7.3147 18C6.24162 18 5.37172 17.1813 5.37172 16.1714C5.37172 15.1615 6.24162 14.3429 7.3147 14.3429C8.38781 14.3429 9.25768 15.1615 9.25768 16.1714ZM7.80045 16.1714C7.80045 15.919 7.58297 15.7143 7.3147 15.7143C7.04643 15.7143 6.82895 15.919 6.82895 16.1714C6.82895 16.4239 7.04643 16.6286 7.3147 16.6286C7.58297 16.6286 7.80045 16.4239 7.80045 16.1714ZM16.0581 16.1714C16.0581 17.1813 15.1883 18 14.1151 18C13.042 18 12.1722 17.1813 12.1722 16.1714C12.1722 15.1615 13.042 14.3429 14.1151 14.3429C15.1883 14.3429 16.0581 15.1615 16.0581 16.1714ZM14.6009 16.1714C14.6009 15.919 14.3834 15.7143 14.1151 15.7143C13.8469 15.7143 13.6294 15.919 13.6294 16.1714C13.6294 16.4239 13.8469 16.6286 14.1151 16.6286C14.3834 16.6286 14.6009 16.4239 14.6009 16.1714Z" |
| | | /> |
| | | </svg>`, |
| | | }, |
| | | // { |
| | | // label: '购物车', |
| | | // key: '2', |
| | | // path: 'myCart', |
| | | // icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> |
| | | // <path |
| | | // d="M1 2.68571C1 2.30701 1.32622 2 1.72862 2H2.27096C3.19434 2 3.74721 2.58422 4.06336 3.1273C4.27408 3.48932 4.42653 3.90919 4.54577 4.28933C4.57806 4.28694 4.61078 4.28571 4.64387 4.28571H16.7849C17.5914 4.28571 18.1738 5.01204 17.9527 5.74199L16.177 11.6017C15.8498 12.6818 14.8012 13.4266 13.6079 13.4266H7.82937C6.62618 13.4266 5.57145 12.6696 5.25303 11.5777L4.51422 9.04411L3.2915 5.15957L3.28952 5.15277C3.13825 4.63361 2.99629 4.14862 2.78534 3.78624C2.58048 3.43433 2.41718 3.37143 2.27096 3.37143H1.72862C1.32622 3.37143 1 3.06442 1 2.68571ZM5.92822 8.71113L6.6583 11.2147C6.80304 11.7111 7.28247 12.0551 7.82937 12.0551H13.6079C14.1503 12.0551 14.6269 11.7166 14.7758 11.2257L16.463 5.65714H4.96902L5.91484 8.66222C5.91997 8.67849 5.92442 8.69477 5.92822 8.71113ZM9.25768 16.1714C9.25768 17.1813 8.38781 18 7.3147 18C6.24162 18 5.37172 17.1813 5.37172 16.1714C5.37172 15.1615 6.24162 14.3429 7.3147 14.3429C8.38781 14.3429 9.25768 15.1615 9.25768 16.1714ZM7.80045 16.1714C7.80045 15.919 7.58297 15.7143 7.3147 15.7143C7.04643 15.7143 6.82895 15.919 6.82895 16.1714C6.82895 16.4239 7.04643 16.6286 7.3147 16.6286C7.58297 16.6286 7.80045 16.4239 7.80045 16.1714ZM16.0581 16.1714C16.0581 17.1813 15.1883 18 14.1151 18C13.042 18 12.1722 17.1813 12.1722 16.1714C12.1722 15.1615 13.042 14.3429 14.1151 14.3429C15.1883 14.3429 16.0581 15.1615 16.0581 16.1714ZM14.6009 16.1714C14.6009 15.919 14.3834 15.7143 14.1151 15.7143C13.8469 15.7143 13.6294 15.919 13.6294 16.1714C13.6294 16.4239 13.8469 16.6286 14.1151 16.6286C14.3834 16.6286 14.6009 16.4239 14.6009 16.1714Z" |
| | | // /> |
| | | // </svg>`, |
| | | // }, |
| | | { |
| | | label: '我的书架', |
| | | key: '3', |
| | |
| | | </g> |
| | | </svg>`, |
| | | }, |
| | | { |
| | | label: '我的订单', |
| | | key: '8', |
| | | path: 'myOrder', |
| | | icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> |
| | | <g id="Group 201"> |
| | | <path id="Vector" |
| | | d="M17.4571 4C17.4571 3.80109 17.5384 3.61032 17.6831 3.46967C17.8278 3.32902 18.024 3.25 18.2286 3.25C18.4332 3.25 18.6294 3.32902 18.7741 3.46967C18.9187 3.61032 19 3.80109 19 4V17.25C19 18.7687 17.7336 20 16.1714 20H3.82857C2.26643 20 1 18.7687 1 17.25V2.75C1 1.23125 2.26643 2.34375e-08 3.82857 0H18.2286C18.4332 4.19176e-09 18.6294 0.0790176 18.7741 0.21967C18.9187 0.360322 19 0.551088 19 0.75C19 0.948912 18.9187 1.13968 18.7741 1.28033C18.6294 1.42098 18.4332 1.5 18.2286 1.5H3.82857C3.65973 1.5 3.49254 1.53233 3.33655 1.59515C3.18056 1.65797 3.03882 1.75004 2.91943 1.86612C2.80004 1.98219 2.70534 2.11999 2.64073 2.27165C2.57611 2.4233 2.54286 2.58585 2.54286 2.75V17.25C2.54286 17.4142 2.57611 17.5767 2.64073 17.7284C2.70534 17.88 2.80004 18.0178 2.91943 18.1339C3.03882 18.25 3.18056 18.342 3.33655 18.4048C3.49254 18.4677 3.65973 18.5 3.82857 18.5H16.1714C16.3403 18.5 16.5075 18.4677 16.6635 18.4048C16.8194 18.342 16.9612 18.25 17.0806 18.1339C17.2 18.0178 17.2947 17.88 17.3593 17.7284C17.4239 17.5767 17.4571 17.4142 17.4571 17.25V4ZM5.88571 8.25C5.68112 8.25 5.4849 8.17098 5.34023 8.03033C5.19556 7.88968 5.11429 7.69891 5.11429 7.5C5.11429 7.30109 5.19556 7.11032 5.34023 6.96967C5.4849 6.82902 5.68112 6.75 5.88571 6.75H14.1143C14.3189 6.75 14.5151 6.82902 14.6598 6.96967C14.8044 7.11032 14.8857 7.30109 14.8857 7.5C14.8857 7.69891 14.8044 7.88968 14.6598 8.03033C14.5151 8.17098 14.3189 8.25 14.1143 8.25H5.88571ZM5.88571 12.25C5.68112 12.25 5.4849 12.171 5.34023 12.0303C5.19556 11.8897 5.11429 11.6989 5.11429 11.5C5.11429 11.3011 5.19556 11.1103 5.34023 10.9697C5.4849 10.829 5.68112 10.75 5.88571 10.75H11.0286C11.2332 10.75 11.4294 10.829 11.5741 10.9697C11.7187 11.1103 11.8 11.3011 11.8 11.5C11.8 11.6989 11.7187 11.8897 11.5741 12.0303C11.4294 12.171 11.2332 12.25 11.0286 12.25H5.88571Z" |
| | | /> |
| | | </g> |
| | | </svg>`, |
| | | }, |
| | | // { |
| | | // label: '我的订单', |
| | | // key: '8', |
| | | // path: 'myOrder', |
| | | // icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> |
| | | // <g id="Group 201"> |
| | | // <path id="Vector" |
| | | // d="M17.4571 4C17.4571 3.80109 17.5384 3.61032 17.6831 3.46967C17.8278 3.32902 18.024 3.25 18.2286 3.25C18.4332 3.25 18.6294 3.32902 18.7741 3.46967C18.9187 3.61032 19 3.80109 19 4V17.25C19 18.7687 17.7336 20 16.1714 20H3.82857C2.26643 20 1 18.7687 1 17.25V2.75C1 1.23125 2.26643 2.34375e-08 3.82857 0H18.2286C18.4332 4.19176e-09 18.6294 0.0790176 18.7741 0.21967C18.9187 0.360322 19 0.551088 19 0.75C19 0.948912 18.9187 1.13968 18.7741 1.28033C18.6294 1.42098 18.4332 1.5 18.2286 1.5H3.82857C3.65973 1.5 3.49254 1.53233 3.33655 1.59515C3.18056 1.65797 3.03882 1.75004 2.91943 1.86612C2.80004 1.98219 2.70534 2.11999 2.64073 2.27165C2.57611 2.4233 2.54286 2.58585 2.54286 2.75V17.25C2.54286 17.4142 2.57611 17.5767 2.64073 17.7284C2.70534 17.88 2.80004 18.0178 2.91943 18.1339C3.03882 18.25 3.18056 18.342 3.33655 18.4048C3.49254 18.4677 3.65973 18.5 3.82857 18.5H16.1714C16.3403 18.5 16.5075 18.4677 16.6635 18.4048C16.8194 18.342 16.9612 18.25 17.0806 18.1339C17.2 18.0178 17.2947 17.88 17.3593 17.7284C17.4239 17.5767 17.4571 17.4142 17.4571 17.25V4ZM5.88571 8.25C5.68112 8.25 5.4849 8.17098 5.34023 8.03033C5.19556 7.88968 5.11429 7.69891 5.11429 7.5C5.11429 7.30109 5.19556 7.11032 5.34023 6.96967C5.4849 6.82902 5.68112 6.75 5.88571 6.75H14.1143C14.3189 6.75 14.5151 6.82902 14.6598 6.96967C14.8044 7.11032 14.8857 7.30109 14.8857 7.5C14.8857 7.69891 14.8044 7.88968 14.6598 8.03033C14.5151 8.17098 14.3189 8.25 14.1143 8.25H5.88571ZM5.88571 12.25C5.68112 12.25 5.4849 12.171 5.34023 12.0303C5.19556 11.8897 5.11429 11.6989 5.11429 11.5C5.11429 11.3011 5.19556 11.1103 5.34023 10.9697C5.4849 10.829 5.68112 10.75 5.88571 10.75H11.0286C11.2332 10.75 11.4294 10.829 11.5741 10.9697C11.7187 11.1103 11.8 11.3011 11.8 11.5C11.8 11.6989 11.7187 11.8897 11.5741 12.0303C11.4294 12.171 11.2332 12.25 11.0286 12.25H5.88571Z" |
| | | // /> |
| | | // </g> |
| | | // </svg>`, |
| | | // }, |
| | | { |
| | | label: '我的申请', |
| | | key: '9', |
| | |
| | | pages.count = res.totalSize |
| | | courseList.value = res.datas.map((item: any) => { |
| | | if (item.icon) { |
| | | item.icon = getPublicImage(item.icon, 80) |
| | | item.icon = getPublicImage(item.icon, '', 140) |
| | | } else if (item.linkProduct?.icon) { |
| | | item.icon = getPublicImage(item.linkProduct.icon, 80) |
| | | item.icon = getPublicImage(item.linkProduct.icon, '', 140) |
| | | } else { |
| | | item.icon = defaultImg |
| | | } |
| | |
| | | flex: 1; |
| | | display: flex; |
| | | .imgBox { |
| | | width: 90px; |
| | | height: 120px; |
| | | width: 110px; |
| | | height: 140px; |
| | | margin-right: 20px; |
| | | box-shadow: 0px 0px 20px 1px #ccc; |
| | | } |
| | |
| | | <template> |
| | | <page> |
| | | <div class="contentBox"> |
| | | <div class="breadcrumbBox"> |
| | | <span>位置:</span> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item>个人中心</el-breadcrumb-item> |
| | | <el-breadcrumb-item>{{ label }}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="personalPage clear"> |
| | | <div class="leftList fl"> |
| | | <ul class="menu"> |
| | | <li |
| | | v-for="item in listMenu" |
| | | :key="item.key" |
| | | @click="goRouter(item)" |
| | | :class="`/${item.path}` === path ? 'activeItem hover' : 'menuItem hover'" |
| | | <div class="contentBox"> |
| | | <div class="breadcrumbBox"> |
| | | <span>位置:</span> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item>个人中心</el-breadcrumb-item> |
| | | <el-breadcrumb-item>{{ label }}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | <el-divider style="margin: 5px 0;" /> |
| | | <div class="personalPage clear"> |
| | | <div class="leftList fl"> |
| | | <ul class="menu"> |
| | | <li |
| | | v-for="item in listMenu" |
| | | :key="item.key" |
| | | @click="goRouter(item)" |
| | | :class="`/${item.path}` === path ? 'activeItem hover' : 'menuItem hover'" |
| | | > |
| | | <span |
| | | :style="{ |
| | | fill: `/${item.path}` === path ? '#fff' : '#000', |
| | | }" |
| | | v-html="item.icon" |
| | | > |
| | | <span |
| | | :style="{ |
| | | fill: `/${item.path}` === path ? '#fff' : '#000', |
| | | }" |
| | | v-html="item.icon" |
| | | > |
| | | </span> |
| | | <span>{{ item.label }}</span> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div class="rightContent"> |
| | | <div> |
| | | <!-- 让主体做子路由的显示 --> |
| | | <router-view /> |
| | | </div> |
| | | </span> |
| | | <span>{{ item.label }}</span> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div class="rightContent"> |
| | | <div> |
| | | <!-- 让主体做子路由的显示 --> |
| | | <router-view /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </page> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .homePage { |
| | | min-width: 1220px; |
| | | min-height: calc(100vh - 61.8%); |
| | | background-color: #fff; |
| | | padding-bottom: 100px; |
| | | } |
| | | .breadcrumbBox { |
| | | display: flex; |
| | | padding: 20px; |
| | |
| | | 试用期限:<span>{{ item.updateDate }}</span> -- |
| | | <span>{{ item.feedBack.endDate }}</span> |
| | | </div> |
| | | <div style="color: orangered" v-if="item.isExpiry">阅读期限:<span>已过期</span></div> |
| | | <div class="no" style="color: orangered" v-if="item.isExpiry"> |
| | | 阅读期限:<span>已过期</span> |
| | | </div> |
| | | <div class="time">申请时间:{{ item.updateDate }}</div> |
| | | </div> |
| | | <div class="reasonForFailure" style="margin: 10px 0" v-if="item.state == 'Reject'"> |
| | |
| | | |
| | | <el-table-column label="全选" width="200"> |
| | | <template #default="scope"> |
| | | <div style="position: relative; width: 110px"> |
| | | <div style="position: relative;width: 120px;"> |
| | | <el-image :src="scope.row.imgUrl ? scope.row.imgUrl : defaultImg" class="bookImg"> |
| | | </el-image> |
| | | <div |
| | |
| | | 总价:<span v-if="sumUnitprice">¥{{ sumUnitprice.toFixed(2) }}</span> |
| | | <span v-else>¥0.00</span> |
| | | </p> |
| | | <el-button class="button" type="warning" @click="goPaymentPage">结算</el-button> |
| | | <el-button class="button" type="primary" @click="goPaymentPage">结算</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | import { ElTable, ElMessage } from 'element-plus' |
| | | import { reactive } from 'vue' |
| | | import { useRouter } from 'vue-router' |
| | | import { InfoFilled } from '@element-plus/icons-vue' |
| | | import { useUserStore } from '@/store' |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool.js' |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | const dialogVisible = ref(false) |
| | | const router = useRouter() |
| | | const userStore = useUserStore() |
| | | const MG = inject('MG') |
| | | const MG: any = inject('MG') |
| | | const total = ref() |
| | | const multipleTableRef = ref() |
| | | const loading = ref(true) |
| | |
| | | } |
| | | MG.store.getShoppingCartProductList(query).then((res) => { |
| | | const newData = res.datas.map((item) => { |
| | | console.log(item.saleMethod.type, 'item.saleMethod.type') |
| | | if (item.productMonWithLinkDto.links[0].storeRefCode == 'digitalTextbooks') { |
| | | item.typeTxt = '数字教材' |
| | | item.productType = '数字教材' |
| | | } else if (item.productMonWithLinkDto.links[0].storeRefCode == 'digitalCourses') { |
| | | item.typeTxt = '数字课程' |
| | | item.productType = '数字课程' |
| | | } else { |
| | | item.typeTxt = '电子书' |
| | | item.productType = '图书服务-电子书' |
| | | } |
| | | item.typeTxt = '数字教材' |
| | | item.productType = '数字教材' |
| | | |
| | | // console.log(item.saleMethod.id); |
| | | console.log(item.saleMethod.type, 'item.saleMethod.type') |
| | |
| | | router.push({ |
| | | name: 'paymentPage', |
| | | query: { |
| | | crumbsKey: key, |
| | | orderNumber: orderNumber.value, |
| | | // type: route.query.type, |
| | | type: 'shoppingCart', |
| | |
| | | .el-image__inner { |
| | | box-shadow: 0px 0px 20px 1px #ccc; |
| | | object-fit: contain !important; |
| | | width: 110px; |
| | | height: 140px; |
| | | width: 120px; |
| | | height: 160px; |
| | | } |
| | | |
| | | .el-icon { |
| | |
| | | right: 0; |
| | | margin: 0 !important; |
| | | border-radius: 0px 0px 0px 5px; |
| | | box-sizing: border-box; |
| | | |
| | | p { |
| | | display: flex; |
| | |
| | | currentCollect == 'book' || currentCollect == 'textBooks' |
| | | ? 'bookCartContent cartContent' |
| | | : currentCollect == 'course' |
| | | ? 'courseCartContent cartContent' |
| | | : 'cartContent' |
| | | ? 'courseCartContent cartContent' |
| | | : 'cartContent' |
| | | " |
| | | > |
| | | <div |
| | | class="collectList flex jc-sb clear" |
| | | v-if="collectList.length > 0 && !pages.loading" |
| | | > |
| | | <div |
| | | v-for="(item, index) in collectList" |
| | | :key="index" |
| | | class="collectList-item fl" |
| | | > |
| | | <div v-for="(item, index) in collectList" :key="index" class="collectList-item fl"> |
| | | <div class="cover" @click="goBookDetails(item.id, item.name)"> |
| | | <img :src="item.icon" alt="" /> |
| | | </div> |
| | |
| | | <span>{{ item.name }}</span> |
| | | </div> |
| | | <div class="currentBtn hover" @click="setCoolect(item)"> |
| | | <img |
| | | src="@/assets/images/personalCenter/collect-click.png" |
| | | alt="star" |
| | | /> |
| | | <img src="@/assets/images/personalCenter/collect-click.png" alt="star" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, onMounted, inject, watch } from "vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { useUserStore } from "@/store"; |
| | | import { useRouter } from "vue-router"; |
| | | const userStore = useUserStore(); |
| | | const router = useRouter(); |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | let currentCollect = ref("book"); |
| | | let collectList = ref([]); |
| | | const background = ref(false); |
| | | const disabled = ref(false); |
| | | import { reactive, ref, onMounted, inject, watch } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { useUserStore } from '@/store' |
| | | import { useRouter } from 'vue-router' |
| | | const userStore = useUserStore() |
| | | const router = useRouter() |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | let currentCollect = ref('textBooks') |
| | | let collectList = ref([]) |
| | | const background = ref(false) |
| | | const disabled = ref(false) |
| | | let pages = reactive({ |
| | | page: 1, |
| | | pageSize: 10, |
| | | count: 0, |
| | | loading: false, |
| | | }); |
| | | let linkType = ref("FavoriteBookCity"); |
| | | }) |
| | | let linkType = ref('FavoriteBookCity') |
| | | |
| | | const tabCart = (event: Event) => { |
| | | pages.page = 1; |
| | | pages.loading = true; |
| | | collectList.value = []; |
| | | currentCollect.value = event.props.name; |
| | | if (currentCollect.value == "textBooks") { |
| | | linkType.value = "FavoriteBookCity"; |
| | | pages.page = 1 |
| | | pages.loading = true |
| | | collectList.value = [] |
| | | currentCollect.value = event.props.name |
| | | if (currentCollect.value == 'textBooks') { |
| | | linkType.value = 'FavoriteBookCity' |
| | | } |
| | | getDataList(); |
| | | }; |
| | | getDataList() |
| | | } |
| | | |
| | | function getDataList() { |
| | | pages.loading = true; |
| | | pages.loading = true |
| | | MG.store |
| | | .getProductList({ |
| | | handelEBooK: true, |
| | | queryType: "AppUserProductLink", |
| | | queryType: 'AppUserProductLink', |
| | | linkType: linkType.value, |
| | | paging: { |
| | | start: pages.pageSize * pages.page - pages.pageSize, |
| | |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | collectList.value = res.datas; |
| | | pages.count = res.total; |
| | | pages.loading = false; |
| | | collectList.value = res.datas |
| | | pages.count = res.total |
| | | pages.loading = false |
| | | }) |
| | | .catch(() => { |
| | | pages.loading = false; |
| | | }); |
| | | pages.loading = false |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | getDataList(); |
| | | }); |
| | | getDataList() |
| | | }) |
| | | |
| | | // watch( |
| | | // () => userStore.token, |
| | |
| | | // ) |
| | | |
| | | const handleCurrentChange = (val: number) => { |
| | | pages.page = val; |
| | | getDataList(); |
| | | }; |
| | | pages.page = val |
| | | getDataList() |
| | | } |
| | | |
| | | const setCoolect = (item) => { |
| | | ElMessageBox.confirm("确定要取消收藏吗?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | ElMessageBox.confirm('确定要取消收藏吗?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | autofocus: false, |
| | | type: "warning", |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | MG.store |
| | |
| | | }) |
| | | .then(() => { |
| | | ElMessage({ |
| | | message: "收藏已取消!", |
| | | type: "success", |
| | | }); |
| | | pages.page = 1; |
| | | getDataList(); |
| | | }); |
| | | message: '收藏已取消!', |
| | | type: 'success', |
| | | }) |
| | | pages.page = 1 |
| | | getDataList() |
| | | }) |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | .catch(() => {}) |
| | | } |
| | | // 跳转书本详情 |
| | | const goBookDetails = (id: number, name: string) => { |
| | | router.push({ |
| | | path: "/bookdetail", |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: id, |
| | | }, |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .cartClass { |
| | |
| | | padding: 2px; |
| | | background-color: #fff; |
| | | position: absolute; |
| | | top: 10px; |
| | | right: 10px; |
| | | top: 5px; |
| | | right: 2px; |
| | | |
| | | img { |
| | | width: 16px; |
| | | height: 16px; |
| | | height: 20px; |
| | | } |
| | | } |
| | | |
| | |
| | | <span class="wait" v-else>待认证</span> |
| | | </el-form-item> |
| | | <el-form-item label="学校:" prop="schoolName"> |
| | | <span v-if="!editState">{{ teacherInfo.schoolName || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.schoolName || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.schoolName" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="真实姓名:" prop="fullName"> |
| | | <span v-if="!editState">{{ teacherInfo.fullName || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.fullName || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.fullName" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="职称:"> |
| | | <span v-if="!editState">{{ teacherInfo.positionalTitle || "-" }}</span> |
| | | <el-select |
| | | v-else |
| | | v-model="teacherInfo.positionalTitle" |
| | | placeholder="请选择职称" |
| | | > |
| | | <span v-if="!editState">{{ teacherInfo.positionalTitle || '-' }}</span> |
| | | <el-select v-else v-model="teacherInfo.positionalTitle" placeholder="请选择职称"> |
| | | <el-option |
| | | v-for="item in teachPosts" |
| | | :key="item.value" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="任教课程:" prop="courseName"> |
| | | <span v-if="!editState">{{ teacherInfo.courseName || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.courseName || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.courseName" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="手机号:" prop="phone"> |
| | | <span v-if="!editState">{{ teacherInfo.phone || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.phone || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.phone" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="座机:" prop="telphone"> |
| | | <span v-if="!editState">{{ teacherInfo.telphone || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.telphone || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.telphone" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱:" prop="email"> |
| | | <span v-if="!editState">{{ teacherInfo.email || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.email || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.email" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="详细地址:" prop="detailedAddress"> |
| | | <span v-if="!editState">{{ teacherInfo.detailedAddress || "-" }}</span> |
| | | <span v-if="!editState">{{ teacherInfo.detailedAddress || '-' }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="teacherInfo.detailedAddress" |
| | |
| | | <div class="footer-box"> |
| | | <span class="myDialog-footer" v-if="!loading && editState"> |
| | | <el-button @click="closeDialog(teacherFormRef)"> 取消</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitBtn(teacherFormRef)" |
| | | :loading="subLoading" |
| | | > |
| | | <el-button type="primary" @click="submitBtn(teacherFormRef)" :loading="subLoading"> |
| | | 提交</el-button |
| | | > |
| | | </span> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 查看原因 --> |
| | | <el-dialog |
| | | align-center |
| | | :close-on-click-modal="false" |
| | | v-model="dialogReason" |
| | | title="驳回原因" |
| | | > |
| | | <el-dialog align-center :close-on-click-modal="false" v-model="dialogReason" title="驳回原因"> |
| | | <div class="reason" v-if="reasonTxt"> |
| | | {{ reasonTxt }} |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, watch, defineEmits, inject, onMounted } from "vue"; |
| | | import type { FormInstance, FormRules } from "element-plus"; |
| | | import { ElMessage } from "element-plus"; |
| | | import tool from "@/assets/js/toolClass.js"; |
| | | import { getTopicMsgCmsItemFile } from "@/assets/js/middleGround/tool.js"; |
| | | import { useUserStore } from "@/store"; |
| | | const userStore = useUserStore(); |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | import { reactive, ref, watch, defineEmits, inject, onMounted } from 'vue' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { ElMessage } from 'element-plus' |
| | | import tool from '@/assets/js/toolClass.js' |
| | | import { getTopicMsgCmsItemFile } from '@/assets/js/middleGround/tool.js' |
| | | import { useUserStore } from '@/store' |
| | | const userStore = useUserStore() |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | // 证件验证 |
| | | const valiCertificate = (rule: any, value: any, callback: any) => { |
| | | if (fileList.value.length == 0) { |
| | | callback(new Error("请上传相关证件")); |
| | | callback(new Error('请上传相关证件')) |
| | | } else { |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // const validateTelphone = (rule: any, value: any, callback: any) => { |
| | | // if (value !== "" && !config.reg_telphone.test(value)) { |
| | |
| | | // }; |
| | | |
| | | const validatePhone = (rule: any, value: any, callback: any) => { |
| | | if (value === "") { |
| | | callback(new Error("请输入联系电话")); |
| | | if (value === '') { |
| | | callback(new Error('请输入联系电话')) |
| | | } else { |
| | | if (!config.reg_tel.test(value)) { |
| | | callback(new Error("请输入正确格式的电话")); |
| | | callback(new Error('请输入正确格式的电话')) |
| | | } |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | const validateEmail = (rule: any, value: any, callback: any) => { |
| | | let myreg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/; |
| | | if (value === "") { |
| | | callback(new Error("请输入电子邮箱")); |
| | | let myreg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/ |
| | | if (value === '') { |
| | | callback(new Error('请输入电子邮箱')) |
| | | } else { |
| | | if (!myreg.test(value)) { |
| | | callback(new Error("请输入正确格式的电子邮箱")); |
| | | callback(new Error('请输入正确格式的电子邮箱')) |
| | | } |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | |
| | | const props = defineProps({ |
| | | isShow: Boolean, |
| | | }); |
| | | }) |
| | | |
| | | let teacherDialog = ref(false); //弹窗 |
| | | let loading = ref(false); |
| | | let subLoading = ref(false); |
| | | const teachPosts = ref([]); |
| | | let teacherDialog = ref(false) //弹窗 |
| | | let loading = ref(false) |
| | | let subLoading = ref(false) |
| | | const teachPosts = ref([]) |
| | | const teacherInfo = reactive({ |
| | | schoolName: "", //学校名称 |
| | | fullName: "", //姓名 |
| | | positionalTitle: "", //职称 |
| | | courseName: "", //任课教程 |
| | | phone: "", //联系电话 |
| | | telphone: "", //座机 |
| | | email: "", //联系邮箱 |
| | | detailedAddress: "", //通讯地址 |
| | | schoolName: '', //学校名称 |
| | | fullName: '', //姓名 |
| | | positionalTitle: '', //职称 |
| | | courseName: '', //任课教程 |
| | | phone: '', //联系电话 |
| | | telphone: '', //座机 |
| | | email: '', //联系邮箱 |
| | | detailedAddress: '', //通讯地址 |
| | | relevantCertificates: [], //相关证件 |
| | | state: "", //审核状态默认待审核 |
| | | state: '', //审核状态默认待审核 |
| | | agree: false, |
| | | }); |
| | | const topicMessageList = ref([]); |
| | | const topicId = ref(); |
| | | const worksInfo = ref([]); |
| | | const userId = ref(); |
| | | const teacherFormRef = ref<FormInstance>(); |
| | | }) |
| | | const topicMessageList = ref([]) |
| | | const topicId = ref() |
| | | const worksInfo = ref([]) |
| | | const userId = ref() |
| | | const teacherFormRef = ref<FormInstance>() |
| | | |
| | | interface TeacherInfo { |
| | | schoolName: string; |
| | | fullName: string; |
| | | courseName: string; |
| | | telphone: string; |
| | | phone: string; |
| | | email: string; |
| | | detailedAddress: string; |
| | | relevantCertificates: string[]; |
| | | schoolName: string |
| | | fullName: string |
| | | courseName: string |
| | | telphone: string |
| | | phone: string |
| | | email: string |
| | | detailedAddress: string |
| | | relevantCertificates: string[] |
| | | } |
| | | const teacherRules = reactive<FormRules<TeacherInfo>>({ |
| | | schoolName: [{ required: true, message: "学校名称不能为空", trigger: "blur" }], |
| | | fullName: [{ required: true, message: "真实姓名不能为空", trigger: "blur" }], |
| | | courseName: [{ required: true, message: "任教课程不能为空", trigger: "blur" }], |
| | | schoolName: [{ required: true, message: '学校名称不能为空', trigger: 'blur' }], |
| | | fullName: [{ required: true, message: '真实姓名不能为空', trigger: 'blur' }], |
| | | courseName: [{ required: true, message: '任教课程不能为空', trigger: 'blur' }], |
| | | // telphone: [{ validator: validateTelphone, trigger: "blur" }], |
| | | phone: [{ required: true, validator: validatePhone, trigger: "blur" }], |
| | | email: [{ required: true, validator: validateEmail, trigger: "blur" }], |
| | | detailedAddress: [{ required: true, message: "详细地址不能为空", trigger: "blur" }], |
| | | relevantCertificates: [ |
| | | { required: true, validator: valiCertificate, trigger: "change" }, |
| | | ], |
| | | }); |
| | | const fileList = ref([]); |
| | | const editState = ref<boolean>(true); |
| | | phone: [{ required: true, validator: validatePhone, trigger: 'blur' }], |
| | | email: [{ required: true, validator: validateEmail, trigger: 'blur' }], |
| | | detailedAddress: [{ required: true, message: '详细地址不能为空', trigger: 'blur' }], |
| | | relevantCertificates: [{ required: true, validator: valiCertificate, trigger: 'change' }], |
| | | }) |
| | | const fileList = ref([]) |
| | | const editState = ref<boolean>(true) |
| | | watch(props, (newValue) => { |
| | | // 统监听props的值变化,动态修改isShow的值 |
| | | teacherDialog.value = newValue.isShow; |
| | | teacherDialog.value = newValue.isShow |
| | | if (teacherDialog.value) { |
| | | getpositionalTitle(); |
| | | getAgreement(); |
| | | getpositionalTitle() |
| | | getAgreement() |
| | | if (localStorage.getItem(config.tokenKey)) { |
| | | getUserRole(); |
| | | getUserRole() |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | // 获取职称 |
| | | function getpositionalTitle() { |
| | | const data = { |
| | | refCodes: ["positionalTitle"], |
| | | }; |
| | | refCodes: ['positionalTitle'], |
| | | } |
| | | MG.store.getProductTypeField(data).then((res) => { |
| | | try { |
| | | const list = res[0]; |
| | | const options = JSON.parse(list.config).option; |
| | | teachPosts.value = options; |
| | | const list = res[0] |
| | | const options = JSON.parse(list.config).option |
| | | teachPosts.value = options |
| | | } catch (error) { |
| | | teachPosts.value = []; |
| | | teachPosts.value = [] |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 获取登录用户身份 |
| | | function getUserRole() { |
| | | loading.value = true; |
| | | loading.value = true |
| | | MG.identity.getCurrentAppUser().then((res) => { |
| | | if (res) { |
| | | getType(); |
| | | userId.value = res.userId; |
| | | let userInfo = res.infoList.find((item: any) => item.type == "userInfo"); |
| | | let userTypeObj = res.infoList.find((item: any) => item.type == "userType"); |
| | | getType() |
| | | userId.value = res.userId |
| | | let userInfo = res.infoList.find((item: any) => item.type == 'userInfo') |
| | | let userTypeObj = res.infoList.find((item: any) => item.type == 'userType') |
| | | const userData = { |
| | | userName: userInfo && userInfo.data ? JSON.parse(userInfo.data).name : "", |
| | | school: userInfo && userInfo.data ? JSON.parse(userInfo.data).school : "", |
| | | address: userInfo && userInfo.data ? JSON.parse(userInfo.data).address : "", |
| | | userType: |
| | | userTypeObj && userTypeObj.data ? JSON.parse(userTypeObj.data).userType : "", |
| | | }; |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == "teacher"); |
| | | let teacherInfos = res.infoList.find((item) => item.type == "teacherInfo"); |
| | | let wechatInfo = res.infoList.find((item) => item.type == "WeChat"); |
| | | let studentInfo = res.infoList.find((item) => item.type == "Default"); |
| | | let phoneInfo = res.secretList.find((item) => item.type == "MobilePhone"); |
| | | let emailInfo = res.secretList.find((item) => item.type == "EMail"); |
| | | userName: userInfo && userInfo.data ? JSON.parse(userInfo.data).name : '', |
| | | school: userInfo && userInfo.data ? JSON.parse(userInfo.data).school : '', |
| | | address: userInfo && userInfo.data ? JSON.parse(userInfo.data).address : '', |
| | | userType: userTypeObj && userTypeObj.data ? JSON.parse(userTypeObj.data).userType : '', |
| | | } |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let wechatInfo = res.infoList.find((item) => item.type == 'WeChat') |
| | | let studentInfo = res.infoList.find((item) => item.type == 'Default') |
| | | let phoneInfo = res.secretList.find((item) => item.type == 'MobilePhone') |
| | | let emailInfo = res.secretList.find((item) => item.type == 'EMail') |
| | | if (teacherRole && teacherInfos) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo ? emailInfo.credential : JSON.parse(teacherInfos.data).email, |
| | | icon: wechatInfo?.icon, |
| | | role: "Teacher", |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (wechatInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | | ...wechatInfo, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (studentInfo) { |
| | | if (!studentInfo?.fullName) { |
| | | teacherInfo.fullName = userStore.userInfo!.userName; |
| | | teacherInfo.fullName = userStore.userInfo!.userName |
| | | } |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | icon: wechatInfo?.icon, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (phoneInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | name: phoneInfo?.credential, |
| | | icon: phoneInfo?.icon, |
| | | phoneNumber: phoneInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | teacherInfo.phone = userStore.userInfo!.phoneNumber; |
| | | teacherInfo.schoolName = userStore.userInfo!.school; |
| | | teacherInfo.detailedAddress = userStore.userInfo!.address; |
| | | teacherInfo.phone = userStore.userInfo!.phoneNumber |
| | | teacherInfo.schoolName = userStore.userInfo!.school |
| | | teacherInfo.detailedAddress = userStore.userInfo!.address |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | function getType() { |
| | | const data = { |
| | | refCodes: ["teacherCertification"], |
| | | }; |
| | | refCodes: ['teacherCertification'], |
| | | } |
| | | MG.resource.getCmsTypeByRefCode(data).then((res) => { |
| | | worksInfo.value = res[0].cmsTypeLinks[0].children; |
| | | newGetTeacherInfo(); |
| | | }); |
| | | worksInfo.value = res[0].cmsTypeLinks[0].children |
| | | newGetTeacherInfo() |
| | | }) |
| | | } |
| | | |
| | | // 文件上传 |
| | | function fileUpload(file) { |
| | | console.log(file, 2); |
| | | console.log(file, 2) |
| | | return new Promise((resolve, reject) => { |
| | | const isJPG = file.file.type === "image/jpeg" || file.file.type === "image/png"; |
| | | const isLt2M = (0.5 * file.file.size) / 1024 / 1024 < 0.5; |
| | | const isJPG = file.file.type === 'image/jpeg' || file.file.type === 'image/png' |
| | | const isLt2M = (0.5 * file.file.size) / 1024 / 1024 < 0.5 |
| | | if (!isJPG) { |
| | | ElMessage.error("上传文件只能是 jpg/png 格式!"); |
| | | return reject(); |
| | | ElMessage.error('上传文件只能是 jpg/png 格式!') |
| | | return reject() |
| | | } |
| | | if (!isLt2M) { |
| | | ElMessage.error("上传文件大小不能超过 500KB!"); |
| | | return reject(); |
| | | ElMessage.error('上传文件大小不能超过 500KB!') |
| | | return reject() |
| | | } |
| | | const FileName = file.file.name.split(".")[0]; |
| | | const Extension = file.file.name.split(".")[1]; |
| | | const FileType = file.file.type; |
| | | let size = 1024; |
| | | const FileName = file.file.name.split('.')[0] |
| | | const Extension = file.file.name.split('.')[1] |
| | | const FileType = file.file.type |
| | | let size = 1024 |
| | | tool |
| | | .getFileMd5(file.file, size * 1024) |
| | | .then((e) => { |
| | | console.log(e, 2); |
| | | console.log(e, 2) |
| | | if (!fileList.value.find((item) => item.md5 == e)) { |
| | | const imgData = new FormData(); |
| | | imgData.append("Md5", e); |
| | | imgData.append("FileName", FileName); |
| | | imgData.append("Extension", Extension); |
| | | imgData.append("FileType", FileType); |
| | | imgData.append("MetaData", null); |
| | | imgData.append("file", file.file); |
| | | const imgData = new FormData() |
| | | imgData.append('Md5', e) |
| | | imgData.append('FileName', FileName) |
| | | imgData.append('Extension', Extension) |
| | | imgData.append('FileType', FileType) |
| | | imgData.append('MetaData', null) |
| | | imgData.append('file', file.file) |
| | | MG.file.upload(imgData).then(() => { |
| | | fileList.value.push({ |
| | | md5: e, |
| | | linkType: "LinkFile", |
| | | linkProtectType: "Public", |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: config.requestCtx + `/file/GetPreViewImage?md5=` + e, |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | } else { |
| | | ElMessage.error("当前文件已上传,请勿重复操作!"); |
| | | ElMessage.error('当前文件已上传,请勿重复操作!') |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | | console.error(e); |
| | | }); |
| | | }); |
| | | console.error(e) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | // 证件删除 |
| | | function handleRemove(file) { |
| | | for (let i = 0; i < fileList.value.length; i++) { |
| | | if (fileList.value[i].md5 == file.md5) { |
| | | fileList.value.splice(i, 1); |
| | | fileList.value.splice(i, 1) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 监听文件列表变化,同步修改展示列表 |
| | | const showFileList = ref([]); |
| | | const showFileList = ref([]) |
| | | watch( |
| | | fileList, |
| | | (newValue) => { |
| | | showFileList.value = newValue.map( |
| | | (item) => config.requestCtx + `/file/GetPreViewImage?md5=` + item.md5 |
| | | ); |
| | | (item) => config.requestCtx + `/file/GetPreViewImage?md5=` + item.md5, |
| | | ) |
| | | }, |
| | | { immediate: true, deep: true } |
| | | ); |
| | | { immediate: true, deep: true }, |
| | | ) |
| | | |
| | | // 关闭弹框,回调父层方法 |
| | | const emit = defineEmits(["dialogChange"]); |
| | | const emit = defineEmits(['dialogChange']) |
| | | const closeDialog = (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | formEl.resetFields(); |
| | | teacherDialog.value = false; |
| | | emit("dialogChange", teacherDialog.value); |
| | | }; |
| | | if (!formEl) return |
| | | formEl.resetFields() |
| | | teacherDialog.value = false |
| | | emit('dialogChange', teacherDialog.value) |
| | | } |
| | | |
| | | // 教师协议 |
| | | const dialogVisibleTecher = ref(false); |
| | | const protocolTxt = ref(""); |
| | | const dialogVisibleTecher = ref(false) |
| | | const protocolTxt = ref('') |
| | | const getAgreement = () => { |
| | | let query = { |
| | | path: "protocol", |
| | | path: 'protocol', |
| | | fields: { |
| | | content: [], |
| | | }, |
| | | }; |
| | | } |
| | | MG.resource.getItem(query).then((res) => { |
| | | try { |
| | | const data = res.datas.find( |
| | | (e) => e.refCode == "teacherCertificationAgreement" |
| | | ); |
| | | protocolTxt.value = data ? data.content : "暂无协议"; |
| | | const data = res.datas.find((e) => e.refCode == 'teacherCertificationAgreement') |
| | | protocolTxt.value = data ? data.content : '暂无协议' |
| | | } catch (error) { |
| | | protocolTxt.value = "暂无协议"; |
| | | protocolTxt.value = '暂无协议' |
| | | } |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | |
| | | //教师信息 |
| | | function newGetTeacherInfo() { |
| | | const data = { |
| | | start: 0, |
| | | size: 10, |
| | | topicIdOrRefCode: "teacherRoleApproval", |
| | | topicIdOrRefCode: 'teacherRoleApproval', |
| | | appRefCode: config.appRefCode, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | }; |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res) => { |
| | | try { |
| | | fileList.value = []; |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId === userId.value); |
| | | fileList.value = [] |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId === userId.value) |
| | | if (resData) { |
| | | if (resData.state == "WaitAudit") { |
| | | editState.value = false; |
| | | if (resData.state == 'WaitAudit') { |
| | | editState.value = false |
| | | } else { |
| | | editState.value = true; |
| | | editState.value = true |
| | | } |
| | | let info = getTopicMsgCmsItemFile(worksInfo.value, resData.cmsItemDataList); |
| | | teacherInfo.fullName = info.fullName; |
| | | teacherInfo.schoolName = info.schoolName; |
| | | teacherInfo.positionalTitle = info.positionalTitle; |
| | | teacherInfo.courseName = info.courseName; |
| | | teacherInfo.phone = info.phone; |
| | | teacherInfo.telphone = info.telphone ? info.telphone : ""; |
| | | teacherInfo.email = info.email; |
| | | teacherInfo.detailedAddress = info.detailedAddress ? info.detailedAddress : ""; |
| | | teacherInfo.relevantCertificates = info.relevantCertificates; |
| | | teacherInfo.agree = true; |
| | | teacherInfo.state = resData.state; |
| | | topicId.value = resData.id; |
| | | topicMessageList.value = resData.cmsItemDataList; |
| | | let info = getTopicMsgCmsItemFile(worksInfo.value, resData.cmsItemDataList) |
| | | teacherInfo.fullName = info.fullName |
| | | teacherInfo.schoolName = info.schoolName |
| | | teacherInfo.positionalTitle = info.positionalTitle |
| | | teacherInfo.courseName = info.courseName |
| | | teacherInfo.phone = info.phone |
| | | teacherInfo.telphone = info.telphone ? info.telphone : '' |
| | | teacherInfo.email = info.email |
| | | teacherInfo.detailedAddress = info.detailedAddress ? info.detailedAddress : '' |
| | | teacherInfo.relevantCertificates = info.relevantCertificates |
| | | teacherInfo.agree = true |
| | | teacherInfo.state = resData.state |
| | | topicId.value = resData.id |
| | | topicMessageList.value = resData.cmsItemDataList |
| | | if (resData.feedBack != null) { |
| | | reasonTxt.value = JSON.parse(resData.feedBack).reason; |
| | | reasonTxt.value = JSON.parse(resData.feedBack).reason |
| | | } |
| | | if (teacherInfo.relevantCertificates.length > 0) { |
| | | if (typeof teacherInfo.relevantCertificates == "object") { |
| | | if (typeof teacherInfo.relevantCertificates == 'object') { |
| | | teacherInfo.relevantCertificates.forEach((ele) => { |
| | | let imgObj = { |
| | | md5: ele.file.md5, |
| | | linkType: "LinkFile", |
| | | linkProtectType: "Public", |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: config.requestCtx + `/file/GetPreViewImage?md5=` + ele.file.md5, |
| | | }; |
| | | fileList.value.push(imgObj); |
| | | }); |
| | | } |
| | | fileList.value.push(imgObj) |
| | | }) |
| | | } else { |
| | | let imgObj = { |
| | | md5: teacherInfo.relevantCertificates, |
| | | linkType: "LinkFile", |
| | | linkProtectType: "Public", |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: |
| | | config.requestCtx + |
| | | `/file/GetPreViewImage?md5=` + |
| | | teacherInfo.relevantCertificates, |
| | | }; |
| | | fileList.value.push(imgObj); |
| | | config.requestCtx + `/file/GetPreViewImage?md5=` + teacherInfo.relevantCertificates, |
| | | } |
| | | fileList.value.push(imgObj) |
| | | } |
| | | } |
| | | loading.value = false; |
| | | loading.value = false |
| | | } else { |
| | | loading.value = false; |
| | | loading.value = false |
| | | } |
| | | } catch (error) { |
| | | loading.value = false; |
| | | loading.value = false |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //教师认证提交 |
| | | const submitBtn = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if (teacherInfo.agree) { |
| | | subLoading.value = true; |
| | | subLoading.value = true |
| | | if (topicMessageList.value.length > 0) { |
| | | let dataRequests = tool.UpdateworksDataBytool( |
| | | worksInfo.value, |
| | | topicMessageList.value, |
| | | teacherInfo, |
| | | fileList.value |
| | | ); |
| | | fileList.value, |
| | | ) |
| | | const data = { |
| | | description: "", |
| | | icon: "", |
| | | description: '', |
| | | icon: '', |
| | | id: topicId.value, |
| | | topicIdOrRefCode: "teacherRoleApproval", |
| | | name: teacherInfo.fullName + "", |
| | | content: "", |
| | | state: "WaitAudit", |
| | | type: "teacherRegister", |
| | | topicIdOrRefCode: 'teacherRoleApproval', |
| | | name: teacherInfo.fullName + '', |
| | | content: '', |
| | | state: 'WaitAudit', |
| | | type: 'teacherRegister', |
| | | newDataRequests: dataRequests.newData, |
| | | updateDataRequests: dataRequests.updateData, |
| | | delDataRequest: { |
| | | ids: [], |
| | | }, |
| | | }; |
| | | let basicInfo = JSON.parse(JSON.stringify(teacherInfo)); |
| | | delete basicInfo.worksInfo; |
| | | delete basicInfo.state; |
| | | } |
| | | let basicInfo = JSON.parse(JSON.stringify(teacherInfo)) |
| | | delete basicInfo.worksInfo |
| | | delete basicInfo.state |
| | | const userInfo = { |
| | | requests: [ |
| | | { |
| | | data: JSON.stringify(basicInfo), |
| | | name: teacherInfo.fullName + "", |
| | | type: "newTeacherInfo", |
| | | name: teacherInfo.fullName + '', |
| | | type: 'newTeacherInfo', |
| | | }, |
| | | ], |
| | | }; |
| | | } |
| | | MG.identity.setAppUserInfo(userInfo).then((res) => { |
| | | if (res) { |
| | | MG.ugc.updateTopicMessage(data).then(() => { |
| | | if (res !== false) { |
| | | ElMessage({ |
| | | message: "提交成功!请等待审核...", |
| | | type: "success", |
| | | }); |
| | | teacherDialog.value = false; |
| | | subLoading.value = false; |
| | | newGetTeacherInfo(); |
| | | message: '提交成功!请等待审核...', |
| | | type: 'success', |
| | | }) |
| | | teacherDialog.value = false |
| | | subLoading.value = false |
| | | newGetTeacherInfo() |
| | | } else { |
| | | subLoading.value = false; |
| | | subLoading.value = false |
| | | } |
| | | }); |
| | | }) |
| | | } else { |
| | | subLoading.value = true; |
| | | subLoading.value = true |
| | | } |
| | | }); |
| | | }) |
| | | } else { |
| | | const data = { |
| | | topicIdOrRefCode: "teacherRoleApproval", |
| | | name: teacherInfo.fullName + "", |
| | | content: "", |
| | | state: "WaitAudit", |
| | | type: "teacherRegister", |
| | | cmsTypeRefCode: "teacherCertification", |
| | | newDataListRequest: tool.worksDataBytool( |
| | | worksInfo.value, |
| | | teacherInfo, |
| | | fileList.value |
| | | ), |
| | | }; |
| | | topicIdOrRefCode: 'teacherRoleApproval', |
| | | name: teacherInfo.fullName + '', |
| | | content: '', |
| | | state: 'WaitAudit', |
| | | type: 'teacherRegister', |
| | | cmsTypeRefCode: 'teacherCertification', |
| | | newDataListRequest: tool.worksDataBytool(worksInfo.value, teacherInfo, fileList.value), |
| | | } |
| | | |
| | | let basicInfo = JSON.parse(JSON.stringify(teacherInfo)); |
| | | delete basicInfo.worksInfo; |
| | | delete basicInfo.state; |
| | | let basicInfo = JSON.parse(JSON.stringify(teacherInfo)) |
| | | delete basicInfo.worksInfo |
| | | delete basicInfo.state |
| | | const userInfo = { |
| | | requests: [ |
| | | { |
| | | data: JSON.stringify(basicInfo), |
| | | name: teacherInfo.fullName + "", |
| | | type: "teacherInfo", |
| | | name: teacherInfo.fullName + '', |
| | | type: 'teacherInfo', |
| | | }, |
| | | ], |
| | | }; |
| | | } |
| | | MG.identity.setAppUserInfo(userInfo).then((res) => { |
| | | MG.ugc.newTopicMessage(data).then(() => { |
| | | if (res !== false) { |
| | | ElMessage({ |
| | | message: "提交成功!请等待审核...", |
| | | type: "success", |
| | | }); |
| | | teacherDialog.value = false; |
| | | newGetTeacherInfo(); |
| | | subLoading.value = false; |
| | | message: '提交成功!请等待审核...', |
| | | type: 'success', |
| | | }) |
| | | teacherDialog.value = false |
| | | newGetTeacherInfo() |
| | | subLoading.value = false |
| | | } else { |
| | | subLoading.value = false; |
| | | subLoading.value = false |
| | | } |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | message: "请同意《教师认证服务条款》!", |
| | | type: "warning", |
| | | }); |
| | | message: '请同意《教师认证服务条款》!', |
| | | type: 'warning', |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | |
| | | //原因查看 |
| | | const dialogReason = ref(false); |
| | | const reasonTxt = ref(""); |
| | | const dialogReason = ref(false) |
| | | const reasonTxt = ref('') |
| | | const lookReason = () => { |
| | | dialogReason.value = true; |
| | | }; |
| | | defineExpose({ getUserRole }); |
| | | dialogReason.value = true |
| | | } |
| | | defineExpose({ getUserRole }) |
| | | </script> |
| | | <style lang="less"> |
| | | .myDialog { |
| | |
| | | } |
| | | .body-box { |
| | | padding: 10px 20px 40px; |
| | | height: 80vh; |
| | | height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | |
| | | padding: 15px; |
| | | border-top: 1px solid #f4f4f4; |
| | | text-align: right; |
| | | height: 63px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .myDialog-footer { |
| | |
| | | .main { |
| | | font-weight: bold; |
| | | text-align: center; |
| | | color: #019e58; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .fileList .fileImgBox:hover { |
| | | border-color: #019E58; |
| | | border-color: #019e58; |
| | | } |
| | | |
| | | .agree-msg { |
| | |
| | | |
| | | .agree { |
| | | margin-left: 5px; |
| | | .main { |
| | | text-align: center; |
| | | color: #019e58; |
| | | } |
| | | } |
| | | |
| | | .term { |
| | | color: #019E58; |
| | | color: #019e58; |
| | | } |
| | | } |
| | | .reason { |
| | |
| | | <div class="info-box flex"> |
| | | <span class="label">用户名:</span> |
| | | <span class="text">{{ userStore?.userInfo.name }}</span> |
| | | <span class="change-info hover" @click="changeUserInfo('password')">修改密码</span> |
| | | <!-- <span class="change-info hover" @click="changeUserInfo('password')">修改密码</span> --> |
| | | </div> |
| | | <div class="info-box flex"> |
| | | <span class="label">微信认证:</span> |
| | |
| | | userStore?.userInfo?.phoneNumber ? '更换手机号' : '绑定' |
| | | }}</span> |
| | | </div> |
| | | <div class="info-box flex"> |
| | | <!-- <div class="info-box flex"> |
| | | <span class="label">邮箱:</span> |
| | | <span class="text">{{ |
| | | userStore?.userInfo?.Email ? userStore.userInfo?.Email : '--' |
| | |
| | | <span class="change-info hover" @click="changeUserInfo('email')">{{ |
| | | userStore?.userInfo?.Email ? '更换邮箱' : '绑定邮箱' |
| | | }}</span> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="content-item"> |
| | | <div class="item-title flex jc-sb"> |
| | | <span>用户类型</span> |
| | | <span class="change-info hover" @click="updateUserInfo()">修改</span> |
| | | </div> |
| | | <div class="item-box"> |
| | | <div class="info-box flex"> |
| | | <span class="label">用户类型:</span> |
| | | <span class="text">{{ userInfo.userType }}</span> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="content-item"> |
| | | <div class="item-title flex jc-sb"> |
| | | <span>教师认证</span> |
| | |
| | | <span class="text wait" v-if="teacherState == 'WaitAudit'">等待审核</span> |
| | | <span class="text yes" v-else-if="teacherState == 'Normal'">已认证</span> |
| | | <span class="text no" v-else-if="teacherState == 'Reject'">已驳回</span> |
| | | <span class="text wait" v-if="teacherState === ''">待认证</span> |
| | | <span class="text no" v-if="teacherState === ''">待认证</span> |
| | | </div> |
| | | <div v-if="teacherState == 'Reject'"> |
| | | <span class="title">驳回原因</span> : |
| | | <span @click="lookReason()" class="wait hover">查看原因</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="content-item"> |
| | | <div class="item-title flex jc-sb"> |
| | | <span>我的积分</span> |
| | | <span class="record hover" @click="recordDialog()">积分记录</span> |
| | | </div> |
| | | <div class="item-box"> |
| | | <div class="info-box flex"> |
| | | <span class="label">积分:</span> |
| | | <span class="text">{{ userInfo.integral }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | class="myDialogs" |
| | | @close="closeUserInfoDialog(userFormRef)" |
| | | > |
| | | <div> |
| | | <div class="dialog-content"> |
| | | <el-form |
| | | ref="userFormRef" |
| | | :model="userInfoForm" |
| | |
| | | </el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="新密码:" prop="password" v-if="changeType == 'password'"> |
| | | <el-input |
| | | type="password" |
| | | v-model="userInfoForm.password" |
| | | autocomplete="off" |
| | | placeholder="请输入8-16位新密码,且不能为纯数字" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="确认密码:" prop="confirmPassword" v-if="changeType == 'password'"> |
| | | <el-input |
| | | type="password" |
| | | v-model="userInfoForm.confirmPassword" |
| | | autocomplete="off" |
| | | placeholder="请输入确认密码" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 用户类型修改 --> |
| | | <login ref="loginRef"></login> |
| | | <!-- <login ref="loginRef"></login> --> |
| | | <!-- 查看原因 --> |
| | | <el-dialog |
| | | align-center |
| | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, inject, onMounted, watch } from 'vue' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import verify from '@/components/sliderImg/component/verify.vue' |
| | | import '@/components/sliderImg/sliderImg.js' |
| | | import '@/components/sliderImg/sliderImg.css' |
| | | import { ElMessage } from 'element-plus' |
| | | import { useUserStore } from '@/store' |
| | | // import wxlogin from 'vue-wxlogin' |
| | | import teacherCertification from './teacherCertification.vue' |
| | | import login from '@/layout/components/login.vue' |
| | | const userStore = useUserStore() |
| | | import moment from 'moment' |
| | | const MG: any = inject('MG') |
| | |
| | | .myDialogs { |
| | | width: 628px; |
| | | |
| | | .dialog-content { |
| | | padding: 20px 0; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .el-dialog__header { |
| | | padding: 15px; |
| | | margin-right: 0; |