123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806 |
- <template>
- <div id="courseData">
- <el-dialog title="切换科目" :visible.sync="dialogVisible" width="1100px">
- <div class="headerStyle" v-if="Object.keys(activeItem).length">
- <p class="title">当前科目</p>
- <div
- class="course-items"
- >
- <div class="course-items__header">
- <div
- class="time"
- v-if="activeItem.serviceStartTime && activeItem.serviceEndTime"
- >
- 学习服务期:{{
- $tools.timestampToTime(activeItem.serviceStartTime, false)
- }}
- 至
- {{ $tools.timestampToTime(activeItem.serviceEndTime, false) }}
- </div>
- <div class="state">
- <template
- v-if="
- activeItem.serviceStartTime &&
- (sysTime < activeItem.serviceStartTime ||
- sysTime > activeItem.serviceEndTime)
- "
- >
- <div class="red">不在学习服务期,不可以学习了哦</div>
- </template>
- <template v-else>
- <template
- v-if="
- !(activeItem.classEndTime && activeItem.classEndTime < sysTime) &&
- !(activeItem.classStartTime && activeItem.classStartTime > sysTime)
- "
- >
- <template
- v-if="activeItem.periodStatus == -1 || activeItem.periodStatus == 2"
- >
- <template
- v-if="
- activeItem.classStatus == 1 || activeItem.classStatus === null
- "
- >
- <template
- v-if="
- sysTime >= activeItem.serviceStartTime &&
- sysTime <= activeItem.serviceEndTime
- "
- >
- 学习状态:
- <div
- class="note"
- v-if="activeItem.stuAllNum + activeItem.recordNum == 0"
- >
- 未学习
- </div>
- <div
- class="note note--yellow"
- v-else-if="
- activeItem.stuAllNum + activeItem.recordNum > 0 &&
- activeItem.stuAllNum + activeItem.recordNum <
- activeItem.secAllNum + activeItem.examNum
- "
- >
- 学习中
- </div>
- <div
- class="note note--green"
- v-else-if="
- activeItem.stuAllNum + activeItem.recordNum >=
- activeItem.secAllNum + activeItem.examNum
- "
- >
- 已学完
- </div>
- </template>
- <template v-else>
- <span class="red" v-if="activeItem.serviceStartTime">
- 已过学习服务期,不可以学习了哦!</span
- >
- </template>
- </template>
- <!-- <template v-if="activeItem.profileTpStatus == 1">
- 资料审核状态:
- <div class="note" v-if="activeItem.profileStatus == null">
- 未提交资料
- </div>
- <div
- class="note note--green"
- v-else-if="activeItem.profileStatus == 1"
- >
- 已通过
- </div>
- <div
- class="note note--yellow"
- v-else-if="activeItem.profileStatus == 2"
- >
- 审核中
- </div>
- <div
- class="note note--yellow"
- v-else-if="activeItem.profileStatus == 3"
- >
- 待完善
- </div>
- </template> -->
- </template>
- <!-- 学时审核状态可以审核 -->
- <template v-if="activeItem.periodStatus != -1">
- <template v-if="activeItem.periodStatus == 0"
- >机构审核:
- <div class="note">学时审核不通过</div>
- </template>
- <!-- <template v-else-if="activeItem.periodStatus == 2"
- >机构审核:
- <div class="note note--yellow">学时待审核</div></template
- > -->
- <template v-else-if="activeItem.periodStatus == 1">
- <template v-if="activeItem.periodPlush > 0"
- ><div class="note note--green">
- 学时已上报注册中心
- </div></template
- >
- <template v-else
- >机构审核:
- <div class="note note--green">
- 学时审核通过
- </div></template
- >
- </template>
- <template
- v-if="
- activeItem.subscribeId != null && activeItem.periodStatus == 1
- "
- >
- <template v-if="activeItem.subExamStatus === null">
- 待预约考试
- </template>
- <template
- v-else-if="
- activeItem.subExamStatus === 0 &&
- sysTime <
- $tools.TimeTotimestamp(
- $tools.timestampToTime(
- activeItem.subApplySiteExamTime,
- true
- ) +
- ' ' +
- activeItem.subApplySiteStartTime
- )
- "
- >
- 待考试,考试时间:{{
- $tools.timestampToTime(
- activeItem.subApplySiteExamTime,
- true
- ) +
- " " +
- activeItem.subApplySiteStartTime
- }}
- -
- {{
- $tools.timestampToTime(
- activeItem.subApplySiteExamTime,
- true
- ) +
- " " +
- activeItem.subApplySiteEndTime
- }}
- </template>
- <template v-else-if="activeItem.subExamStatus === 0"
- >待出考试结果</template
- >
- <template v-else-if="activeItem.subExamStatus === 1">
- <span v-if="activeItem.subResult === null"
- >待出考试结果</span
- >
- <span v-if="activeItem.subResult === 0"
- >考试结果:不通过,需补考</span
- >
- <span v-else-if="activeItem.subResult === 1"
- >考试结果:通过,考试成绩为{{
- activeItem.subPerformance
- }}</span
- >
- </template>
- <template v-else-if="activeItem.subExamStatus === 2">
- 缺考,无成绩,需补考
- </template>
- <template v-else-if="activeItem.subExamStatus === 3">
- 作弊,无成绩,需补考
- </template>
- <template v-else-if="activeItem.subExamStatus === 4">
- 替考,无成绩,需补考
- </template>
- </template>
- </template>
- </template>
- </template>
- </div>
- </div>
- <div class="course-items__body clearfix">
- <div class="img">
- <img :src="$tools.splitImgHost(activeItem.coverUrl, true)" alt="" />
- </div>
- <div class="text">
- <div class="title">
- {{ activeItem.goodsName }}
- <div class="note">
- {{ activeItem.courseNum }}课程
- {{ activeItem.secAllNum + activeItem.examNum }}节
- {{ activeItem.classHours }}学时
- </div>
- </div>
- <div class="progress">
- 学习进度
- <el-progress
- class="progress-line"
- :stroke-width="16"
- :format="progressText(activeItem)"
- :percentage="
- ((activeItem.stuAllNum + activeItem.recordNum) /
- (activeItem.secAllNum + activeItem.examNum) || 0) * 100
- "
- ></el-progress>
- </div>
- </div>
- <div class="btns-wrap">
- <div class="btns">
- <el-button
- type="primary"
- class="btn btn--normal"
- :class="{
- disabled:
- (activeItem.serviceStartTime &&
- (sysTime <= activeItem.serviceStartTime ||
- sysTime >= activeItem.serviceEndTime)) ||
- (activeItem.classStartTime &&
- sysTime <= activeItem.classStartTime) ||
- (activeItem.classEndTime && sysTime >= activeItem.classEndTime) ||
- activeItem.learningStatus == 2 ||
- activeItem.classStatus == 0 ||
- (activeItem.learningStatus == 3 &&
- sysTime < activeItem.learningTimeStart),
- }"
- @click="goCourseDetail(activeItem)"
- >进入学习</el-button
- >
- <el-button
- type="primary"
- class="btn"
- @click="appointment(activeItem)"
- v-if="
- activeItem.applyStatus === 1 &&
- !(
- sysTime <= activeItem.serviceStartTime ||
- sysTime >= activeItem.serviceEndTime ||
- (activeItem.classStartTime &&
- sysTime <= activeItem.classStartTime) ||
- (activeItem.classEndTime && sysTime >= activeItem.classEndTime) ||
- activeItem.learningStatus == 2 ||
- activeItem.classStatus == 0 ||
- (activeItem.learningStatus == 3 &&
- sysTime < activeItem.learningTimeStart) || !activeItem.examApplyGoodsList.length
- )
- "
- >预约考试</el-button
- >
- <el-button
- type="danger"
- class="btn btn--warm"
- @click="selectClass(activeItem)"
- v-if="
- activeItem.gradeStatus == 1 &&
- activeItem.status == 1 &&
- activeItem.serviceEndTime > sysTime &&
- activeItem.serviceStartTime < sysTime &&
- activeItem.classEndTime &&
- activeItem.classEndTime < sysTime &&
- (activeItem.periodStatus == 0 || activeItem.periodStatus == -1) &&
- activeItem.studyCount > 0
- "
- >
- 选班重学
- </el-button>
- <el-button
- type="primary"
- class="btn"
- v-if="
- activeItem.beforeStatus === 1 &&
- !(
- sysTime <= activeItem.serviceStartTime ||
- sysTime >= activeItem.serviceEndTime ||
- (activeItem.classStartTime &&
- sysTime <= activeItem.classStartTime) ||
- (activeItem.classEndTime && sysTime >= activeItem.classEndTime) ||
- activeItem.learningStatus == 2 ||
- activeItem.classStatus == 0 ||
- (activeItem.learningStatus == 3 &&
- sysTime < activeItem.learningTimeStart)
- )
- "
- @click="appBeforeAddress(activeItem)"
- >进入刷题</el-button
- >
- </div>
- </div>
- </div>
- <template
- v-if="
- !(
- sysTime < activeItem.serviceStartTime ||
- sysTime > activeItem.serviceEndTime
- )
- "
- >
- <div
- class="course-items__footer"
- v-if="activeItem.classEndTime && activeItem.classEndTime < sysTime"
- >
- <span class="text"
- >班级有效期:{{
- $tools.timestampToTime(activeItem.classStartTime, true, true)
- }}
- -
- {{
- $tools.timestampToTime(activeItem.classEndTime, true, true)
- }}</span
- >
- <span class="text text--red"
- >班级状态:已过期,有疑问请联系020-87085982</span
- >
- </div>
- <div
- class="course-items__footer"
- v-else-if="
- activeItem.classStartTime && activeItem.classStartTime > sysTime
- "
- >
- <span class="text"
- >班级有效期:{{
- $tools.timestampToTime(activeItem.classStartTime, true, true)
- }}
- -
- {{
- $tools.timestampToTime(activeItem.classEndTime, true, true)
- }}</span
- >
- <span class="text"
- >班级状态:未到学习时间,有疑问请联系 020-87085982</span
- >
- </div>
- <template v-else>
- <div
- class="course-items__footer"
- v-if="
- activeItem.gradeId != 0 &&
- activeItem.gradeStatus == 1 &&
- activeItem.classStatus != null
- "
- >
- <span class="text"
- >班级状态:
- {{
- activeItem.classStatus == 1
- ? "已开班"
- : activeItem.classStatus == 0
- ? "未开班"
- : ""
- }}
- </span>
- <span class="text"
- >班级有效期:{{
- $tools.timestampToTime(activeItem.classStartTime, true, true)
- }}-{{
- $tools.timestampToTime(activeItem.classEndTime, true, true)
- }}</span
- >
- </div>
- <div class="course-items__footer" v-if="activeItem.classStatus == 0">
- <span class="text">教务处正在为您开通班级,请耐心等待</span>
- </div>
- </template>
- </template>
- </div>
-
- </div>
- <div class="my-course">
- <div class="my-course__header">
- <el-tabs :value="activeName" @tab-click="tabChange">
- <el-tab-pane
- v-for="(tab, tabIndex) in tabList"
- :key="tabIndex"
- :label="tab.educationName"
- :name="tab.id"
- ></el-tab-pane>
- </el-tabs>
- </div>
- <div class="my-course__body">
- <div class="list">
- <div
- class="course-item"
- v-for="(item, index) in courseList"
- :key="index"
- >
- <div class="course-item__header">
- <div
- class="time"
- v-if="item.serviceStartTime && item.serviceEndTime"
- >
- 学习服务期:{{
- $tools.timestampToTime(item.serviceStartTime, false)
- }}
- 至
- {{ $tools.timestampToTime(item.serviceEndTime, false) }}
- </div>
- <div class="state">
- <template
- v-if="
- item.serviceStartTime &&
- (sysTime < item.serviceStartTime ||
- sysTime > item.serviceEndTime)
- "
- >
- <div class="red">不在学习服务期,不可以学习了哦</div>
- </template>
- <template v-else>
- <template
- v-if="
- !(item.classEndTime && item.classEndTime < sysTime) &&
- !(item.classStartTime && item.classStartTime > sysTime)
- "
- >
- <template
- v-if="item.periodStatus == -1 || item.periodStatus == 2"
- >
- <template
- v-if="
- item.classStatus == 1 || item.classStatus === null
- "
- >
- <template
- v-if="
- sysTime >= item.serviceStartTime &&
- sysTime <= item.serviceEndTime
- "
- >
- 学习状态:
- <div
- class="note"
- v-if="item.stuAllNum + item.recordNum == 0"
- >
- 未学习
- </div>
- <div
- class="note note--yellow"
- v-else-if="
- item.stuAllNum + item.recordNum > 0 &&
- item.stuAllNum + item.recordNum <
- item.secAllNum + item.examNum
- "
- >
- 学习中
- </div>
- <div
- class="note note--green"
- v-else-if="
- item.stuAllNum + item.recordNum >=
- item.secAllNum + item.examNum
- "
- >
- 已学完
- </div>
- </template>
- <template v-else>
- <span class="red" v-if="item.serviceStartTime">
- 已过学习服务期,不可以学习了哦!</span
- >
- </template>
- </template>
- <!-- <template v-if="item.profileTpStatus == 1">
- 资料审核状态:
- <div class="note" v-if="item.profileStatus == null">
- 未提交资料
- </div>
- <div
- class="note note--green"
- v-else-if="item.profileStatus == 1"
- >
- 已通过
- </div>
- <div
- class="note note--yellow"
- v-else-if="item.profileStatus == 2"
- >
- 审核中
- </div>
- <div
- class="note note--yellow"
- v-else-if="item.profileStatus == 3"
- >
- 待完善
- </div>
- </template> -->
- </template>
- <!-- 学时审核状态可以审核 -->
- <template v-if="item.periodStatus != -1">
- <template v-if="item.periodStatus == 0"
- >机构审核:
- <div class="note">学时审核不通过</div>
- </template>
- <!-- <template v-else-if="item.periodStatus == 2"
- >机构审核:
- <div class="note note--yellow">学时待审核</div></template
- > -->
- <template v-else-if="item.periodStatus == 1">
- <template v-if="item.periodPlush > 0"
- ><div class="note note--green">
- 学时已上报注册中心
- </div></template
- >
- <template v-else
- >机构审核:
- <div class="note note--green">
- 学时审核通过
- </div></template
- >
- </template>
- <template
- v-if="
- item.subscribeId != null && item.periodStatus == 1
- "
- >
- <template v-if="item.subExamStatus === null">
- 待预约考试
- </template>
- <template
- v-else-if="
- item.subExamStatus === 0 &&
- sysTime <
- $tools.TimeTotimestamp(
- $tools.timestampToTime(
- item.subApplySiteExamTime,
- true
- ) +
- ' ' +
- item.subApplySiteStartTime
- )
- "
- >
- 待考试,考试时间:{{
- $tools.timestampToTime(
- item.subApplySiteExamTime,
- true
- ) +
- " " +
- item.subApplySiteStartTime
- }}
- -
- {{
- $tools.timestampToTime(
- item.subApplySiteExamTime,
- true
- ) +
- " " +
- item.subApplySiteEndTime
- }}
- </template>
- <template v-else-if="item.subExamStatus === 0"
- >待出考试结果</template
- >
- <template v-else-if="item.subExamStatus === 1">
- <span v-if="item.subResult === null"
- >待出考试结果</span
- >
- <span v-if="item.subResult === 0"
- >考试结果:不通过,需补考</span
- >
- <span v-else-if="item.subResult === 1"
- >考试结果:通过,考试成绩为{{
- item.subPerformance
- }}</span
- >
- </template>
- <template v-else-if="item.subExamStatus === 2">
- 缺考,无成绩,需补考
- </template>
- <template v-else-if="item.subExamStatus === 3">
- 作弊,无成绩,需补考
- </template>
- <template v-else-if="item.subExamStatus === 4">
- 替考,无成绩,需补考
- </template>
- </template>
- </template>
- </template>
- </template>
- </div>
- </div>
- <div class="course-item__body clearfix">
- <div class="img">
- <img :src="$tools.splitImgHost(item.coverUrl, true)" alt="" />
- </div>
- <div class="text">
- <div class="title">
- {{ item.goodsName }}
- <div class="note">
- {{ item.courseNum }}课程
- {{ item.secAllNum + item.examNum }}节
- {{ item.classHours }}学时
- </div>
- </div>
- <div class="progress">
- 学习进度
- <el-progress
- class="progress-line"
- :stroke-width="16"
- :format="progressText(item)"
- :percentage="
- ((item.stuAllNum + item.recordNum) /
- (item.secAllNum + item.examNum) || 0) * 100
- "
- ></el-progress>
- </div>
- </div>
- <div class="btns-wrap">
- <div class="btns">
- <el-button
- type="primary"
- class="btn btn--normal"
- :class="{
- disabled:
- (item.serviceStartTime &&
- (sysTime <= item.serviceStartTime ||
- sysTime >= item.serviceEndTime)) ||
- (item.classStartTime &&
- sysTime <= item.classStartTime) ||
- (item.classEndTime && sysTime >= item.classEndTime) ||
- item.learningStatus == 2 ||
- item.classStatus == 0 ||
- (item.learningStatus == 3 &&
- sysTime < item.learningTimeStart),
- }"
- @click="goCourseDetail(item)"
- >进入学习</el-button
- >
- <el-button
- type="primary"
- class="btn"
- @click="appointment(item)"
- v-if="
- item.applyStatus === 1 &&
- !(
- sysTime <= item.serviceStartTime ||
- sysTime >= item.serviceEndTime ||
- (item.classStartTime &&
- sysTime <= item.classStartTime) ||
- (item.classEndTime && sysTime >= item.classEndTime) ||
- item.learningStatus == 2 ||
- item.classStatus == 0 ||
- (item.learningStatus == 3 &&
- sysTime < item.learningTimeStart) || !item.examApplyGoodsList.length
- )
- "
- >预约考试</el-button
- >
- <el-button
- type="danger"
- class="btn btn--warm"
- @click="selectClass(item)"
- v-if="
- item.gradeStatus == 1 &&
- item.status == 1 &&
- item.serviceEndTime > sysTime &&
- item.serviceStartTime < sysTime &&
- item.classEndTime &&
- item.classEndTime < sysTime &&
- (item.periodStatus == 0 || item.periodStatus == -1) &&
- item.studyCount > 0
- "
- >
- 选班重学
- </el-button>
- <el-button
- type="primary"
- class="btn"
- v-if="
- item.beforeStatus === 1 &&
- !(
- sysTime <= item.serviceStartTime ||
- sysTime >= item.serviceEndTime ||
- (item.classStartTime &&
- sysTime <= item.classStartTime) ||
- (item.classEndTime && sysTime >= item.classEndTime) ||
- item.learningStatus == 2 ||
- item.classStatus == 0 ||
- (item.learningStatus == 3 &&
- sysTime < item.learningTimeStart)
- )
- "
- @click="appBeforeAddress(item)"
- >进入刷题</el-button
- >
- </div>
- </div>
- </div>
- <template
- v-if="
- !(
- sysTime < item.serviceStartTime ||
- sysTime > item.serviceEndTime
- )
- "
- >
- <div
- class="course-item__footer"
- v-if="item.classEndTime && item.classEndTime < sysTime"
- >
- <span class="text"
- >班级有效期:{{
- $tools.timestampToTime(item.classStartTime, true, true)
- }}
- -
- {{
- $tools.timestampToTime(item.classEndTime, true, true)
- }}</span
- >
- <span class="text text--red"
- >班级状态:已过期,有疑问请联系020-87085982</span
- >
- </div>
- <div
- class="course-item__footer"
- v-else-if="
- item.classStartTime && item.classStartTime > sysTime
- "
- >
- <span class="text"
- >班级有效期:{{
- $tools.timestampToTime(item.classStartTime, true, true)
- }}
- -
- {{
- $tools.timestampToTime(item.classEndTime, true, true)
- }}</span
- >
- <span class="text"
- >班级状态:未到学习时间,有疑问请联系 020-87085982</span
- >
- </div>
- <template v-else>
- <div
- class="course-item__footer"
- v-if="
- item.gradeId != 0 &&
- item.gradeStatus == 1 &&
- item.classStatus != null
- "
- >
- <span class="text"
- >班级状态:
- {{
- item.classStatus == 1
- ? "已开班"
- : item.classStatus == 0
- ? "未开班"
- : ""
- }}
- </span>
- <span class="text"
- >班级有效期:{{
- $tools.timestampToTime(item.classStartTime, true, true)
- }}-{{
- $tools.timestampToTime(item.classEndTime, true, true)
- }}</span
- >
- </div>
- <div class="course-item__footer" v-if="item.classStatus == 0">
- <span class="text">教务处正在为您开通班级,请耐心等待</span>
- </div>
- </template>
- </template>
- </div>
- </div>
- <div class="pagination" v-if="total > 0">
- <el-pagination
- @current-change="currentChange"
- background
- layout="prev, pager, next"
- :total="total"
- :pager-count="5"
- :page-size="param.pageSize"
- >
- </el-pagination>
- </div>
- </div>
- <!-- <SelectClassModal
- ref="selectClassModal"
- @selectClassOk="selectClassOk"
- ></SelectClassModal> -->
- <!-- <RebuildModal
- ref="rebuildModal"
- @rebuildSubmit="rebuildSubmit($event)"
- ></RebuildModal>
- <ExercisesModal ref="exercisesModal"></ExercisesModal> -->
- </div>
- </el-dialog>
- <!-- 预约考试弹窗 -->
- <appoint-test :appointModal.sync="appointModal" :appointItem='appointItem'></appoint-test>
- <!-- 选班重学弹窗 -->
- <SelectClassModal ref="selectClassModal" @selectClassOk="selectClassOk"></SelectClassModal>
- <RebuildModal ref="rebuildModal" @rebuildSubmit="rebuildSubmit($event)"></RebuildModal>
- <ExercisesModal ref="exercisesModal"></ExercisesModal>
- <!-- <el-dialog
- title="预约考试"
- :visible.sync="appointModal"
- width="600px"
- class="appoint-modal"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- >
- <div class="appoint-modal__content">
- <el-radio
- v-for="(
- appointChild, appointIndex
- ) in appointItem.examApplyGoodsList"
- v-model="applyId"
- :key="appointIndex"
- :label="appointChild.applyId"
- >{{ appointChild.applyName }}</el-radio
- >
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="appointModal = false">取 消</el-button>
- <el-button type="primary" @click="confirmAppoint"
- >立即预约</el-button
- >
- </span>
- </el-dialog> -->
- <el-dialog
- title="实名验证确认"
- :visible.sync="showConfirm"
- width="600px"
- class="showconfirm"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :show-close="false"
- >
- <div class="showconfirm__content">
- <div class="text">
- 为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
- </div>
- <el-descriptions :column="1">
- <el-descriptions-item label="姓名">{{
- userInfo && userInfo.realname
- }}</el-descriptions-item>
- <el-descriptions-item label="手机号">{{
- userInfo && userInfo.telphone
- }}</el-descriptions-item>
- <el-descriptions-item label="身份证号">{{
- userInfo && userInfo.idCard
- }}</el-descriptions-item>
- </el-descriptions>
- <div class="">
- <el-checkbox v-model="confirmChecked"
- >确认个人信息无误</el-checkbox
- >
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showConfirm = false">取 消</el-button>
- <el-button
- type="primary"
- @click="confirmUser()"
- :disabled="confirmCount > 0"
- :loading="confirmLoading"
- >{{
- confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
- }}</el-button
- >
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import { mapGetters, mapActions } from "vuex";
- import SelectClassModal from "@/components/selectClassModal";
- import RebuildModal from "@/components/rebuildModal";
- import ExercisesModal from "@/components/exercisesModal";
- import AppointTest from './components/AppointTest.vue'
- import * as baseUrls from "@/axios.js";
- export default {
- name: "MyCourse",
- components: {
- SelectClassModal,
- RebuildModal,
- ExercisesModal,
- AppointTest,
- },
- data() {
- return {
- dialogVisible: false,
- appointItem: {},
- applyId: "",
- appointModal: false,
- activeItem: {},
- confirmChecked: false,
- confirmTimer: null,
- confirmLoading: false,
- confirmCount: 10,
- showConfirm: false,
- tabList: [],
- sysTime: 0,
- activeName: "-1",
- param: {
- pageNum: 1,
- pageSize: 10,
- },
- total: 0,
- courseList: [],
- loading: null,
- showExercisesModal: false,
- };
- },
- computed: {
- ...mapGetters(["userInfo"]),
- },
- async mounted() {
- this.getUserInfo();
- this.sysTime = this.$tools.timest();
- // await this.orderUserEduList();
- this.courseGoodsList();
- },
- methods: {
- ...mapActions(["getUserInfo"]),
- openBoxs(data) {
- console.log(data);
- this.activeItem = data
- this.dialogVisible = true;
- },
- activeFunc() {},
- tabChange(e) {
- if (this.activeName == e.name) {
- return;
- }
- this.activeName = e.name;
- this.courseGoodsList();
- },
- confirmUser() {
- if (!this.confirmChecked) {
- this.$message.warning("请勾选确认个人信息无误");
- return;
- }
- this.confirmLoading = true;
- let infoJson = {
- realname: this.userInfo.realname,
- idCard: this.userInfo.idCard,
- telphone: this.userInfo.telphone,
- };
- this.$request
- .userConfirminfo({
- infoJson: JSON.stringify(infoJson),
- orderGoodsId: this.activeItem.orderGoodsId,
- })
- .then((res) => {
- if (res.data.pushInfo) {
- this.$message.success("提交成功");
- } else {
- this.$confirm(
- "开通信息推送不成功,无法进入学习,请联系020-87085982!",
- "提示",
- {
- confirmButtonText: "确定",
- closeOnClickModal: false,
- closeOnPressEscape: false,
- distinguishCancelAndClose: false,
- showClose: false,
- showCancelButton: false,
- }
- )
- .then((_) => {})
- .catch((_) => {});
- }
- this.showConfirm = false;
- this.confirmLoading = false;
- });
- },
- orderUserEduList() {
- return new Promise((resolve) => {
- this.$request
- .orderUserEduList({
- goodsType: 1,
- })
- .then((res) => {
- res.rows.forEach((row) => {
- row.id = row.id + "";
- });
- this.tabList.push(
- {
- educationName: "全部课程",
- id: "-1",
- },
- ...res.rows
- );
- resolve();
- });
- });
- },
- currentChange(e) {
- this.param.pageNum = e;
- this.courseGoodsList();
- },
- async goCourseDetail(item) {
- this.$emit("backData", item);
- this.dialogVisible = false;
- return;
- this.activeItem = item;
- if (item.interfaceAccountId > 0) {
- //学习账号已开通
- if (item.learnStatus == 1) {
- //跳转第三方h5
- this.$router.push({
- path: `/my-course-detail/${item.goodsId}`,
- query: {
- gradeId: item.gradeId,
- orderGoodsId: item.orderGoodsId,
- isOther: 1,
- },
- });
- return;
- } else {
- this.$message({
- type: "warning",
- message:
- "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
- });
- return;
- }
- }
- if (
- (item.serviceStartTime && this.sysTime <= item.serviceStartTime) ||
- (item.serviceEndTime && this.sysTime >= item.serviceEndTime)
- ) {
- this.$message({
- type: "warning",
- message: "不在学习服务期,不能进入学习",
- });
- return;
- }
- if (
- (item.classStartTime && this.sysTime <= item.classStartTime) ||
- (item.classEndTime && this.sysTime >= item.classEndTime)
- ) {
- this.$message({
- type: "warning",
- message: "不在班级有效期,不能进入学习",
- });
- return;
- }
- if (item.learningStatus == 2) {
- this.$message({
- type: "warning",
- message: "开放学习时间待定,不能进入学习",
- });
- return;
- }
- if (item.classStatus == 0) {
- this.$message({
- type: "warning",
- message: "尚未开班,不能进入学习",
- });
- return;
- }
- if (item.learningStatus == 3 && this.sysTime < item.learningTimeStart) {
- this.$message({
- type: "warning",
- message: "不在开放学习时间,不能进入学习",
- });
- return;
- }
- var confirmDetail = true;
- if (item.educationName == "继续教育") {
- if (
- item.officialName &&
- item.businessName == "二级" &&
- item.projectName == "建造师"
- ) {
- confirmDetail = await this.userConfirmInfoDetail();
- }
- }
- // //内部系统
- // if (item.interfacePushId > 0 && item.officialStatus != 1) {
- // this.$message({
- // type: "warning",
- // message: "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
- // });
- // return;
- // }
- if (!confirmDetail) {
- return;
- }
- let rebuildStatus = await this.courseGoodsRebuildStatus(
- item.goodsId,
- item.gradeId
- );
- if (rebuildStatus == 0) {
- this.$refs.rebuildModal.showModal(item);
- return;
- }
- // if (item.educationName == "继续教育") {
- this.$request
- .lockLockStatus({
- action: "jxjy",
- uuid: sessionStorage.getItem("uuid"),
- })
- .then((res) => {
- //有其他端在操作,不能学习
- this.$message({
- type: "warning",
- message: res.msg,
- });
- })
- .catch((err) => {
- //可以学习
- this.$request
- .courseCourseList({
- pageNum: 1,
- pageSize: 1,
- goodsId: item.goodsId,
- gradeId: item.gradeId,
- })
- .then((res) => {
- if (res.rows.length) {
- // if (
- // item.officialName &&
- // item.businessName == "二级" &&
- // item.projectName == "建造师"
- // ) {
- // this.userConfirmInfoDetail().then((res) => {
- // this.$router.push({
- // path: `/my-course-detail/${item.goodsId}`,
- // query: {
- // gradeId: item.gradeId,
- // orderGoodsId: item.orderGoodsId,
- // courseId: res.rows[0].courseId || "",
- // },
- // });
- // });
- // } else {
- this.$emit("backData", item);
- this.dialogVisible = false;
- return;
- this.$router.push({
- path: `/my-course-detail/${item.goodsId}`,
- query: {
- gradeId: item.gradeId,
- orderGoodsId: item.orderGoodsId,
- courseId: res.rows[0].courseId || "",
- },
- });
- // }
- } else {
- this.$message({
- type: "warning",
- message: "课程内暂无可以学习的科目",
- });
- }
- });
- });
- // } else {
- // this.$request
- // .courseCourseList({
- // pageNum: 1,
- // pageSize: 1,
- // goodsId: item.goodsId,
- // gradeId: item.gradeId,
- // })
- // .then((res) => {
- // if (res.rows.length) {
- // this.$router.push({
- // path: `/my-course-detail/${item.goodsId}`,
- // query: {
- // gradeId: item.gradeId,
- // orderGoodsId: item.orderGoodsId,
- // courseId: res.rows[0].courseId || "",
- // },
- // });
- // } else {
- // this.$message({
- // type: "warning",
- // message: "课程内暂无可以学习的科目",
- // });
- // }
- // });
- // }
- },
- userConfirmInfoDetail() {
- return new Promise((resolve) => {
- this.$request
- .userConfirmInfoDetail({
- orderGoodsId: this.activeItem.orderGoodsId,
- })
- .then((res) => {
- if (!res.data) {
- clearInterval(this.confirmTimer);
- this.confirmCount = 10;
- this.showConfirm = true;
- this.confirmTimer = setInterval(() => {
- if (this.confirmCount > 0) {
- this.confirmCount--;
- } else {
- clearInterval(this.confirmTimer);
- }
- }, 1000);
- } else {
- if (res.data.pushInfo) {
- resolve(true);
- } else {
- this.$confirm(
- "开通信息推送不成功,无法进入学习,请联系020-87085982!",
- "提示",
- {
- confirmButtonText: "确定",
- closeOnClickModal: false,
- closeOnPressEscape: false,
- distinguishCancelAndClose: false,
- showClose: false,
- showCancelButton: false,
- }
- )
- .then((_) => {})
- .catch((_) => {});
- resolve(false);
- }
- }
- });
- });
- },
- appBeforeAddress(item) {
- this.$refs.exercisesModal.showModal(item);
- },
- rebuildSubmit(item) {
- this.$router.push({
- path: `/my-course-detail/${item.goodsId}`,
- query: {
- gradeId: item.gradeId,
- orderGoodsId: item.orderGoodsId,
- rebuild: 1,
- },
- });
- },
- selectClass(item) {
- this.$refs.selectClassModal.showModal(item);
- },
- selectClassOk() {
- this.courseGoodsList();
- },
- /**
- * @param {Object} goodsId 商品id
- * 查询商品重修状态
- */
- courseGoodsRebuildStatus(goodsId, gradeId) {
- return new Promise((resolve) => {
- this.$request
- .courseGoodsRebuildStatus({
- goodsId: goodsId,
- gradeId: gradeId,
- })
- .then((res) => {
- resolve(res.data);
- });
- });
- },
- courseGoodsList() {
- let param = JSON.parse(JSON.stringify(this.param));
- if (this.activeName == "-1") {
- param.educationTypeId = "";
- } else {
- param.educationTypeId = this.activeName;
- }
- this.$request.courseGoodsList(param).then((res) => {
- this.courseList = res.rows;
- this.total = res.total;
- });
- },
- progressText(item) {
- return () => {
- return (
- item.stuAllNum +
- item.recordNum +
- "/" +
- (item.secAllNum + item.examNum)
- );
- };
- },
- appointment(item) {
- this.applyId = "";
- this.appointItem = item;
- this.appointModal = true;
- },
- confirmAppoint() {
- if (!this.applyId) {
- this.$message.warning("请选择要预约的考试");
- return;
- }
- var data = {
- goodsId: this.appointItem.goodsId,
- gradeId: this.appointItem.gradeId,
- applyId: this.applyId,
- orderGoodsId: this.appointItem.orderGoodsId,
- };
- this.$request
- .getApplysubscribe(data)
- .then((res) => {
- this.$router.push({
- path: "/person-center/my-classhour/appointment",
- query: {
- goodsId: this.appointItem.goodsId,
- gradeId: this.appointItem.gradeId,
- orderGoodsId: this.appointItem.orderGoodsId,
- applyId: this.applyId,
- },
- });
- })
- .catch((err) => {
- this.$message({
- type: "warning",
- message: err.msg,
- });
- });
- },
- },
- };
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped lang="scss">
- /deep/ .el-dialog {
- margin-top: 6vh !important;
- }
- .my-course {
- max-height: 50vh;
- overflow: auto;
- &__header {
- /deep/ .el-tabs__header {
- margin-bottom: 0;
- }
- }
- &__body {
- .list {
- .course-item {
- margin-top: 24px;
- background: #fafbfc;
- border-radius: 8px;
- overflow: hidden;
- &__header {
- height: 40px;
- border-bottom: 1px solid #eee;
- padding: 0 18px;
- .state {
- margin-top: 8px;
- float: left;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- .red {
- color: #ff3b30;
- }
- .note {
- vertical-align: middle;
- display: inline-block;
- padding: 0 10px;
- height: 24px;
- background: #ffeceb;
- border: 1px solid #ff3b30;
- border-radius: 12px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ff3b30;
- text-align: center;
- line-height: 24px;
- margin-right: 10px;
- &--yellow {
- border-color: #ffb001;
- color: #ffb001;
- background: #fff8e8;
- }
- &--green {
- border-color: #56dc68;
- color: #56dc68;
- background: #e6feea;
- }
- }
- }
- .time {
- float: right;
- line-height: 40px;
- text-align: right;
- font-size: 12px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- &--red {
- color: #ff3b30;
- }
- }
- }
- &__body {
- .img {
- float: left;
- width: 160px;
- height: 90px;
- img {
- max-width: 100%;
- max-height: 100%;
- }
- }
- .text {
- float: left;
- margin-left: 12px;
- .title {
- margin-top: 10px;
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #333333;
- .note {
- display: inline-block;
- vertical-align: middle;
- border: 1px solid #333333;
- border-radius: 4px;
- font-size: 12px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- padding: 2px 5px;
- margin-left: 12px;
- }
- }
- .progress {
- margin-top: 30px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- &-line {
- width: 220px;
- display: inline-block;
- }
- /deep/ .el-progress-bar {
- padding-right: 70px;
- margin-right: -70px;
- }
- }
- }
- .btns-wrap {
- display: table;
- float: right;
- height: 90px;
- width: 130px;
- .btns {
- display: table-cell;
- vertical-align: middle;
- text-align: center;
- .btn {
- cursor: pointer;
- margin: 2px 0;
- width: 122px;
- height: 32px;
- padding: 0;
- border-radius: 16px;
- display: inline-block;
- text-align: center;
- line-height: 32px;
- color: #fff;
- &--normal {
- &.disabled {
- background: rgb(101, 164, 253);
- border-color: rgb(101, 164, 253);
- }
- }
- &--warm {
- background: #ff3b30;
- &:hover {
- background: #f56c6c;
- }
- }
- }
- }
- }
- }
- &__footer {
- padding: 20px 18px;
- font-size: 14px;
- color: #333;
- .text {
- margin-right: 20px;
- &--red {
- color: #ff3b30;
- }
- }
- }
- }
- }
- .pagination {
- padding: 30px 0;
- text-align: center;
- }
- }
- .exercises-modal {
- &__content {
- > div {
- font-size: 16px;
- line-height: 30px;
- text-align: center;
- img {
- display: inline;
- }
- }
- }
- }
- .appoint-modal {
- &__content {
- .el-radio {
- display: block;
- margin: 10px 30px 10px 0;
- }
- }
- }
- }
- .headerStyle{
- .title{
- padding: 6px 12px;
- color: #3f8dfd;
- background-color: #F8F8F9;
- }
- }
- .course-items {
- margin-top: 10px;
- background: #fafbfc;
- border-radius: 8px;
- overflow: hidden;
- padding-bottom: 24px;
- margin-bottom: 24px;
- border-bottom: 2px solid #eee;
- &__header {
- height: 40px;
- border-bottom: 1px solid #eee;
- padding: 0 18px;
- .state {
- margin-top: 8px;
- float: left;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- .red {
- color: #ff3b30;
- }
- .note {
- vertical-align: middle;
- display: inline-block;
- padding: 0 10px;
- height: 24px;
- background: #ffeceb;
- border: 1px solid #ff3b30;
- border-radius: 12px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ff3b30;
- text-align: center;
- line-height: 24px;
- margin-right: 10px;
- &--yellow {
- border-color: #ffb001;
- color: #ffb001;
- background: #fff8e8;
- }
- &--green {
- border-color: #56dc68;
- color: #56dc68;
- background: #e6feea;
- }
- }
- }
- .time {
- float: right;
- line-height: 40px;
- text-align: right;
- font-size: 12px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- &--red {
- color: #ff3b30;
- }
- }
- }
- &__body {
- .img {
- float: left;
- width: 160px;
- height: 90px;
- img {
- max-width: 100%;
- max-height: 100%;
- }
- }
- .text {
- float: left;
- margin-left: 12px;
- .title {
- margin-top: 10px;
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #333333;
- .note {
- display: inline-block;
- vertical-align: middle;
- border: 1px solid #333333;
- border-radius: 4px;
- font-size: 12px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- padding: 2px 5px;
- margin-left: 12px;
- }
- }
- .progress {
- margin-top: 30px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- &-line {
- width: 220px;
- display: inline-block;
- }
- /deep/ .el-progress-bar {
- padding-right: 70px;
- margin-right: -70px;
- }
- }
- }
- .btns-wrap {
- display: table;
- float: right;
- height: 90px;
- width: 130px;
- .btns {
- display: table-cell;
- vertical-align: middle;
- text-align: center;
- .btn {
- cursor: pointer;
- margin: 2px 0;
- width: 122px;
- height: 32px;
- padding: 0;
- border-radius: 16px;
- display: inline-block;
- text-align: center;
- line-height: 32px;
- color: #fff;
- &--normal {
- &.disabled {
- background: rgb(101, 164, 253);
- border-color: rgb(101, 164, 253);
- }
- }
- &--warm {
- background: #ff3b30;
- &:hover {
- background: #f56c6c;
- }
- }
- }
- }
- }
- }
- &__footer {
- padding: 20px 18px;
- font-size: 14px;
- color: #333;
- .text {
- margin-right: 20px;
- &--red {
- color: #ff3b30;
- }
- }
- }
- }
- </style>
|