courseDetail.vue 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602
  1. <template>
  2. <div class="pb_content">
  3. <div class="pb_content_body" style="height: 100%">
  4. <div class="body_student">
  5. <div class="student_head">
  6. <div
  7. v-if="screenType != 2 && screenType != 5"
  8. class="return"
  9. @click.stop="
  10. goTo(
  11. '/index?userid=' +
  12. userid +
  13. '&oid=' +
  14. oid +
  15. '&org=' +
  16. org +
  17. '&cid=' +
  18. classId +
  19. '&tType=' +
  20. tType +
  21. '&screenType=' +
  22. screenType
  23. )
  24. "
  25. >
  26. <div class="returnIndexImg">
  27. <img src="../assets/icon/newIcon/returnIndex.png" alt="" />
  28. </div>
  29. <div>返回</div>
  30. <!-- <img src="../assets/icon/return.png" alt="" /> -->
  31. </div>
  32. <div class="box_course">
  33. <div class="wheel">
  34. <img
  35. style="object-fit: cover"
  36. :src="
  37. this.courseDetail.cover != null &&
  38. this.courseDetail.cover != ''
  39. ? JSON.parse(this.courseDetail.cover).length > 0
  40. ? JSON.parse(this.courseDetail.cover)[0].url
  41. : mr
  42. : mr
  43. "
  44. alt
  45. />
  46. </div>
  47. <div class="right_box">
  48. <div class="rightT">
  49. <div class="right_box_title">{{ courseDetail.title }}</div>
  50. <div class="jd" v-if="courseDetail.state!=7">{{ chapInfo.length }}阶段</div>
  51. <div class="jd" v-if="courseDetail.state!=7">{{ rw }}任务</div>
  52. </div>
  53. <div class="cType" v-if="courseType.length">
  54. <div
  55. class="all_choose"
  56. v-for="(item, index) in courseType"
  57. :key="index"
  58. >
  59. <span style="color: #717c8d; font-weight: 400">{{
  60. "分类" + ":"
  61. }}</span>
  62. <span
  63. class="type_children"
  64. v-for="(item2, index2) in courseTypeJson[item]"
  65. :key="index2"
  66. >{{ item2 }}</span
  67. >
  68. </div>
  69. </div>
  70. <div class="cType" style="align-items: flex-start">
  71. <div
  72. style="
  73. min-width: fit-content;
  74. color: #717c8d;
  75. font-weight: 400;
  76. "
  77. >
  78. 创建者:<span style="font-weight: bold; color: #0e1e33">{{
  79. courseDetail.username
  80. }}</span>
  81. </div>
  82. <div
  83. style="display: flex; align-items: center; margin-left: 32px"
  84. >
  85. <div style="color: #717c8d; font-weight: 400">参与人数:</div>
  86. <!-- <div class="man">
  87. <img src="../assets/people.png" alt />
  88. </div> -->
  89. <div class="person" style="font-weight: bold; color: #0e1e33">
  90. {{
  91. courseDetail.vcount != null ? courseDetail.vcount : 0
  92. }}人
  93. </div>
  94. </div>
  95. </div>
  96. <div class="cType" style="color: #6c6c6c">
  97. <div
  98. class="Tname"
  99. v-if="Tname.length > 0"
  100. @click="TnameCheck = !TnameCheck"
  101. style="color: #717c8d; font-weight: 400"
  102. >
  103. 协同成员:<span
  104. v-for="(tname, tIndex) in TnameCheck
  105. ? Tname
  106. : Tname.slice(0, 6)"
  107. :key="tIndex"
  108. style="margin: 0 5px; font-weight: 400; color: #0e1e33"
  109. >{{ tname }}</span
  110. ><span
  111. style="margin: 0 5px; font-weight: 400; color: #b2b2b2"
  112. v-if="!TnameCheck && Tname.length > 6"
  113. >展开</span
  114. ><span style="margin: 0 5px; font-weight: 400; color: #b2b2b2" v-else-if="TnameCheck && Tname.length > 6">收起</span>
  115. </div>
  116. </div>
  117. <!-- <div
  118. class="cType"
  119. style="font-size: 18px; color: #6c6c6c"
  120. v-if="classList.length && tType != 2"
  121. >
  122. <div class="teaClass">
  123. <div>授课班级:</div>
  124. <div>
  125. <el-button
  126. @click="gotoCourse('')"
  127. style="background: #4a9eed; color: #fff; margin: 0 5px"
  128. v-if="classList.length != 1"
  129. >全部</el-button
  130. ><el-button
  131. @click="gotoCourse(item.id)"
  132. v-for="(item, index) in classList"
  133. :key="index"
  134. style="background: #4a9eed; color: #fff; margin: 0 5px"
  135. >{{ item.name }}</el-button
  136. >
  137. </div>
  138. </div>
  139. </div> -->
  140. <div class="btnBox" v-if="screenType != 5">
  141. <!-- <div class="now_study" @click="dialogVisible = true">
  142. 立即学习
  143. </div> -->
  144. <div
  145. class="now_study"
  146. @click="setQr(courseDetail.courseId)"
  147. v-if="tType != 2"
  148. >
  149. <div class="returnIndexImg">
  150. <img src="../assets/icon/newIcon/codeIcon.png" alt="" />
  151. </div>
  152. <div>生成二维码</div>
  153. </div>
  154. <div
  155. class="now_study"
  156. @click="dialogVisibleGroup = true"
  157. v-if="courseDetail.state == 1"
  158. >
  159. <div class="returnIndexImg">
  160. <img src="../assets/icon/newIcon/groupIcon.png" alt="" />
  161. </div>
  162. <div>
  163. {{
  164. courseDetail.userid != userid &&
  165. courseDetail.course_teacher &&
  166. courseDetail.course_teacher.indexOf(userid) == -1
  167. ? "加入分组"
  168. : "设置分组"
  169. }}
  170. </div>
  171. </div>
  172. <div class="now_study" @click="exportCourse" v-if="tType != 2">
  173. <div class="returnIndexImg">
  174. <img src="../assets/icon/newIcon/CourseInfo.png" alt="" />
  175. </div>
  176. <div>导出信息</div>
  177. </div>
  178. <!-- -->
  179. <div class="now_study" @click="uploadCourse" v-if="tType != 2">
  180. <div class="returnIndexImg">
  181. <img src="../assets/icon/newIcon/uploadCourse.png" alt="" />
  182. </div>
  183. <div>导出文件</div>
  184. </div>
  185. <!-- <div
  186. class="now_group"
  187. v-if="groupInfo && courseDetail.state == 1"
  188. >
  189. <span>所在分组:</span>{{ groupInfo.name }}
  190. </div> -->
  191. </div>
  192. <div
  193. v-if="tType != 2 && (classList.length || courseDetail.userid == userid)"
  194. class="goToStudy"
  195. @click="goToStudyOrDia(classList)"
  196. >
  197. <div class="returnIndexImg">
  198. <img src="../assets/icon/newIcon/people.png" alt="" />
  199. </div>
  200. <div>以班级授课</div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <div class="student_body">
  206. <div class="sLeft" v-if="courseDetail.brief">
  207. <div class="courseT">
  208. <span>课程详情</span>
  209. <div class="r_pub_button_op" v-if="(courseDetail.state == 6 || courseDetail.state == 5) && courseDetail.userid == userid" @click="aiChatContent">优化</div>
  210. </div>
  211. <div v-loading="elLoading" element-loading-text="小可正在努力生成中,请稍等..." ref="chatDialog" class="courseTd vditor-reset" v-html="brief"></div>
  212. </div>
  213. <div :class="courseDetail.brief != '' ? 'rightTd' : 'noBRight'">
  214. <div v-if="(tType == 1 || tType == 4) && courseDetail.state !=7" class="checkBox">
  215. <span :class="{ active: type == 2 }" @click="type = 2"
  216. >阶段选择
  217. <div v-show="false">
  218. {{
  219. courseDetail.state == 1
  220. ? "阶段模式"
  221. : courseDetail.state == 2
  222. ? "任务模式"
  223. : courseDetail.state == 3
  224. ? "极简模式"
  225. : courseDetail.state == 4 || courseDetail.state == 5
  226. ? "AI模式"
  227. : "上课模式"
  228. }}
  229. </div></span
  230. >
  231. <span :class="{ active: type == 1 }" @click="getCTwo"
  232. >课程分析</span
  233. >
  234. <span :class="{ active: type == 3 }" @click="getCThree"
  235. >课程评价</span
  236. >
  237. </div>
  238. <div
  239. v-if="((tType == 1 || tType == 4) && type == 2) || tType == 2"
  240. :class="courseDetail.brief != '' ? 'rightTd' : 'noBRight'"
  241. style="width: 100%; padding-top: 20px"
  242. >
  243. <div
  244. class="courseItem"
  245. v-for="(item, index) in chapInfo"
  246. :key="index"
  247. v-if="courseDetail.state!=7"
  248. @click="goToStudyRate(index)"
  249. :class="{
  250. disabled: isFollow == 2 && tType == 2 && followC != index,
  251. }"
  252. >
  253. <div class="jdAndTask">
  254. <div>第{{ index + 1 }}阶段</div>
  255. <div
  256. v-if="courseDetail.state == 2 || courseDetail.state == 3 || courseDetail.state == 4 || courseDetail.state == 5 || courseDetail.state == 6"
  257. >
  258. 任务查看
  259. </div>
  260. <div :title="item.dyName">
  261. {{ item.dyName }}
  262. </div>
  263. </div>
  264. <div style="font-size: 14px; font-weight: 400; color: 3681FC">
  265. {{ item.chapterInfo[0].taskJson.length }}个任务
  266. </div>
  267. </div>
  268. <div
  269. class="courseItem"
  270. v-if="courseDetail.state==7"
  271. @click="goToStudyRate('')"
  272. >
  273. <div class="jdAndTask">
  274. <div>进入课程</div>
  275. <div>点击进入课程</div>
  276. </div>
  277. <div style="font-size: 14px; font-weight: 400; color: 3681FC;opacity: 0;">
  278. 0个任务
  279. </div>
  280. </div>
  281. <!-- <div
  282. class="blue_box_one"
  283. v-for="(item, index) in chapInfo"
  284. :key="index"
  285. @click="addUserRate(index)"
  286. :class="{
  287. disabled: isFollow == 2 && tType == 2 && followC != index,
  288. }"
  289. >
  290. <div v-if="courseDetail.state == 1">第{{ index + 1 }}阶段</div>
  291. <div v-if="courseDetail.state == 2 || courseDetail.state == 3">
  292. 任务查看
  293. </div>
  294. <div :title="item.dyName">{{ item.dyName }}</div>
  295. <div>{{ item.chapterInfo[0].taskJson.length }}个任务</div>
  296. </div> -->
  297. </div>
  298. <div
  299. v-if="
  300. (tType == 1 || tType == 4) &&
  301. Object.keys(chaptersJson).length &&
  302. type == 1
  303. "
  304. class="detail"
  305. >
  306. <div class="detail_box">
  307. <div class="title">
  308. <span class="toolIcon">工具分析</span>
  309. <div class="statebox">
  310. <div>
  311. <span class="taskIcon">全部阶段:</span
  312. ><span>{{ chaptersJson.state.stage }}</span>
  313. </div>
  314. <div>
  315. <span class="finishIcon">已进行:</span
  316. ><span>{{ chaptersJson.state.finish }}</span>
  317. </div>
  318. <div>
  319. <span class="learningIcon">未进行:</span
  320. ><span style="color: #fe9999">{{
  321. chaptersJson.state.learing
  322. }}</span>
  323. </div>
  324. </div>
  325. </div>
  326. <div class="box" v-if="chaptersJson.tool.length">
  327. <div class="progress">
  328. <div
  329. v-for="(item, index) in chaptersJson.tool"
  330. :key="index"
  331. class="chapter"
  332. >
  333. <div class="stageCss" @click="addUserRate(index)">
  334. <div
  335. style="
  336. width: 95%;
  337. height: 60px;
  338. display: flex;
  339. justify-content: space-between;
  340. flex-direction: row;
  341. flex-wrap: nowrap;
  342. align-items: center;
  343. "
  344. >
  345. <el-tooltip
  346. class="item"
  347. effect="light"
  348. :content="item.name"
  349. placement="top"
  350. >
  351. <div
  352. class="titleCss"
  353. style="width: 80%; max-width: unset"
  354. >
  355. 第{{ index + 1 }}阶段 {{ item.name }}
  356. </div>
  357. </el-tooltip>
  358. <!-- <div
  359. style="
  360. font-size: 14px;
  361. font-weight: 400;
  362. color: #3681fc;
  363. min-width: 30px;
  364. "
  365. >
  366. 查看
  367. </div> -->
  368. </div>
  369. </div>
  370. <!-- {{ chaptersJson.chapterState[index].isFinsh ? '已完成' : '进行中' }} -->
  371. <div class="task">
  372. <div
  373. v-for="(item2, index2) in item.array"
  374. :key="index + '-' + index2"
  375. class="taskBox"
  376. :class="item.array.length > 1 ? 'borderRight' : ''"
  377. >
  378. <div class="taskName">
  379. <div class="navIndex">任务{{ index2 + 1 }}:</div>
  380. <div>
  381. <el-tooltip
  382. class="item"
  383. effect="light"
  384. :content="item2.name"
  385. placement="top"
  386. >
  387. <div
  388. class="titleCss"
  389. style="
  390. font-size: 14px;
  391. font-weight: 400;
  392. color: #717c8d;
  393. "
  394. >
  395. {{ item2.name }}
  396. </div>
  397. </el-tooltip>
  398. </div>
  399. </div>
  400. <div class="p_tool_box">
  401. <span
  402. v-for="(item3, index3) in item2.array"
  403. :key="index + '-' + index2 + '-' + index3"
  404. class="p_tool"
  405. >
  406. <div v-if="item3.tool == 1">
  407. <img
  408. src="../assets/icon/secondToolList/whiteBoard.png"
  409. alt
  410. />
  411. <div>电子白板</div>
  412. </div>
  413. <div v-if="item3.tool == 3">
  414. <img
  415. src="../assets/icon/secondToolList/mindMapping.png"
  416. alt
  417. />
  418. <div>思维导图</div>
  419. </div>
  420. <div v-if="item3.tool == 6">
  421. <img
  422. src="../assets/icon/secondToolList/doc.png"
  423. alt
  424. />
  425. <div>协同文档</div>
  426. </div>
  427. <div v-if="item3.tool == 7">
  428. <img
  429. src="../assets/icon/secondToolList/mindNetwork.png"
  430. alt
  431. />
  432. <div>思维网格</div>
  433. </div>
  434. <div v-if="item3.tool == 8">
  435. <img
  436. src="../assets/icon/secondToolList/library.png"
  437. alt
  438. />
  439. <div>素材库</div>
  440. </div>
  441. <div v-if="item3.tool == 17">
  442. <img
  443. src="../assets/icon/secondToolList/library.png"
  444. alt
  445. />
  446. <div>学习资料</div>
  447. </div>
  448. <div v-if="item3.tool == 2">
  449. <img
  450. src="../assets/icon/secondToolList/note.png"
  451. alt
  452. />
  453. <div>便签</div>
  454. </div>
  455. <div v-if="item3.tool == 4">
  456. <img
  457. src="../assets/icon/thirdToolList/ask.png"
  458. alt
  459. />
  460. <div>问卷调查</div>
  461. </div>
  462. <div v-if="item3.tool == 45">
  463. <img
  464. src="../assets/icon/thirdToolList/choose.png"
  465. alt
  466. />
  467. <div>选择题</div>
  468. </div>
  469. <!-- <div v-if="item3.tool == 5">
  470. <img
  471. src="../assets/icon/thirdToolList/score.png"
  472. alt
  473. />
  474. <div >量规评分</div>
  475. </div> -->
  476. <div v-if="item3.tool == 10">
  477. <img
  478. src="../assets/icon/thirdToolList/time.png"
  479. alt
  480. />
  481. <div>倒计时</div>
  482. </div>
  483. <div v-if="item3.tool == 15">
  484. <img
  485. src="../assets/icon/thirdToolList/answer.png"
  486. alt
  487. />
  488. <div>问答</div>
  489. </div>
  490. <div v-if="item3.tool == 26">
  491. <img
  492. src="../assets/icon/thirdToolList/courseDesign.png"
  493. alt
  494. />
  495. <div>课程设计</div>
  496. </div>
  497. <div v-if="item3.tool == 18">
  498. <img
  499. src="../assets/icon/thirdToolList/trainPlatform.png"
  500. alt
  501. />
  502. <div>训练服务器</div>
  503. </div>
  504. <div v-if="item3.tool == 16">
  505. <img
  506. src="../assets/icon/thirdToolList/work.png"
  507. alt
  508. />
  509. <div>作业提交</div>
  510. </div>
  511. <div v-if="item3.tool == 21">
  512. <img
  513. src="../assets/icon/fourthToolList/program.png"
  514. alt
  515. />
  516. <div>AIoT Blockly</div>
  517. </div>
  518. <div v-if="item3.tool == 22">
  519. <img
  520. src="../assets/icon/fourthToolList/program.png"
  521. alt
  522. />
  523. <div>AI体验</div>
  524. </div>
  525. <div v-if="item3.tool == 23">
  526. <img
  527. src="../assets/icon/fourthToolList/program.png"
  528. alt
  529. />
  530. <div>AI Python</div>
  531. </div>
  532. <div v-if="item3.tool == 24">
  533. <img
  534. src="../assets/icon/fourthToolList/AIprogram.png"
  535. alt
  536. />
  537. <div>AI Blockly</div>
  538. </div>
  539. <div v-if="item3.tool == 25">
  540. <img
  541. src="../assets/icon/thirdToolList/evalua.png"
  542. alt
  543. />
  544. <div>目标管理</div>
  545. </div>
  546. <div v-if="item3.tool == 31">
  547. <img
  548. src="../assets/icon/secondToolList/networkPanel.png"
  549. alt
  550. />
  551. <div>数学画板</div>
  552. </div>
  553. <div v-if="item3.tool == 28">
  554. <img
  555. src="../assets/icon/secondToolList/translation.png"
  556. alt
  557. />
  558. <div>翻译</div>
  559. </div>
  560. <div v-if="item3.tool == 37">
  561. <img
  562. src="../assets/icon/secondToolList/mohe.png"
  563. alt
  564. />
  565. <div>魔盒识字</div>
  566. </div>
  567. <div v-if="item3.tool == 38">
  568. <img
  569. src="../assets/icon/secondToolList/24game.png"
  570. alt
  571. />
  572. <div>24点</div>
  573. </div>
  574. <div v-if="item3.tool == 39">
  575. <img
  576. src="../assets/icon/secondToolList/GeoGebra.png"
  577. alt
  578. />
  579. <div>GeoGebra</div>
  580. </div>
  581. <div v-if="item3.tool == 32">
  582. <img
  583. src="../assets/icon/thirdToolList/code.png"
  584. alt
  585. />
  586. <div>源码编辑</div>
  587. </div>
  588. <div v-if="item3.tool == 40">
  589. <img
  590. src="../assets/icon/secondToolList/eval.png"
  591. alt
  592. />
  593. <div>学生评价</div>
  594. </div>
  595. <div v-if="item3.tool == 41">
  596. <img
  597. src="../assets/icon/thirdToolList/select.png"
  598. alt
  599. />
  600. <div>选择匹配</div>
  601. </div>
  602. <div v-if="item3.tool == 44">
  603. <img
  604. src="../assets/icon/thirdToolList/hanClass.png"
  605. alt
  606. />
  607. <div>汉字宫</div>
  608. </div>
  609. <div v-if="item3.tool == 47">
  610. <img
  611. src="../assets/icon/fourthToolList/conSentences.png"
  612. alt
  613. />
  614. <div>排序</div>
  615. </div>
  616. <div v-if="item3.tool == 48">
  617. <img
  618. src="../assets/icon/fourthToolList/table.png"
  619. alt
  620. />
  621. <div>表格</div>
  622. </div>
  623. <div v-if="item3.tool == 49">
  624. <img
  625. src="../assets/icon/fourthToolList/group.png"
  626. alt
  627. />
  628. <div>学生分组</div>
  629. </div>
  630. <div v-if="item3.tool == 50">
  631. <img
  632. src="../assets/icon/thirdToolList/plwork.png"
  633. alt
  634. />
  635. <div>批量上传</div>
  636. </div>
  637. <div v-if="item3.tool == 57">
  638. <img
  639. src="../assets/icon/fourthToolList/cocopi.png"
  640. alt
  641. />
  642. <div>CocoPi</div>
  643. </div>
  644. <div v-if="item3.tool == 58">
  645. <img
  646. src="../assets/icon/fourthToolList/car.png"
  647. alt
  648. />
  649. <div>模拟驾驶</div>
  650. </div>
  651. <div v-if="item3.tool == 59">
  652. <img
  653. src="../assets/icon/fourthToolList/lineSearch.png"
  654. alt
  655. />
  656. <div>路径搜索</div>
  657. </div>
  658. <div v-if="item3.tool == 60">
  659. <img
  660. src="../assets/icon/fourthToolList/deepLearning.png"
  661. alt
  662. />
  663. <div>深度学习</div>
  664. </div>
  665. <div v-if="item3.tool == 61">
  666. <img
  667. src="../assets/icon/fourthToolList/allHistory.png"
  668. alt
  669. />
  670. <div>深度学习</div>
  671. </div>
  672. <div v-if="item3.tool == 62">
  673. <img
  674. src="../assets/icon/fourthToolList/interVideo.png"
  675. alt
  676. />
  677. <div>交互视频</div>
  678. </div>
  679. <div v-if="item3.tool == 63">
  680. <img
  681. src="../assets/icon/fourthToolList/Wood.png"
  682. alt
  683. />
  684. <div>海龟编程</div>
  685. </div>
  686. <div v-if="item3.tool == 65">
  687. <img
  688. src="../assets/icon/firstToolList/pickPeople.png"
  689. alt
  690. />
  691. <div>挑人</div>
  692. </div>
  693. <div v-if="item3.tool == 66">
  694. <img
  695. src="../assets/icon/secondToolList/formulaEdi.png"
  696. alt
  697. />
  698. <div>公式编辑</div>
  699. </div>
  700. <div v-if="item3.tool == 67">
  701. <img
  702. src="../assets/icon/secondToolList/molStr.png"
  703. alt
  704. />
  705. <div>分子结构</div>
  706. </div>
  707. <div v-if="item3.tool == 68">
  708. <img
  709. src="../assets/icon/secondToolList/timeAxis.png"
  710. alt
  711. />
  712. <div>时间轴</div>
  713. </div>
  714. <div v-if="item3.tool == 69">
  715. <img
  716. src="../assets/icon/secondToolList/english.png"
  717. alt
  718. />
  719. <div>英语写作</div>
  720. </div>
  721. <div v-if="item3.tool == 70">
  722. <img
  723. src="../assets/icon/thirdToolList/englishVoice.png"
  724. alt
  725. />
  726. <div>英语口语</div>
  727. </div>
  728. <div v-if="item3.tool == 71">
  729. <img
  730. src="../assets/icon/fourthToolList/chatgpt.png"
  731. alt
  732. />
  733. <div>AI智能体</div>
  734. </div>
  735. <div v-if="item3.tool == 72">
  736. <img
  737. src="../assets/icon/firstToolList/appStore.png"
  738. alt
  739. />
  740. <div>应用中心</div>
  741. </div>
  742. <div v-if="item3.tool == undefined">
  743. <img
  744. src="../assets/icon/empytool.png"
  745. alt
  746. style="width: 64px; height: 75px"
  747. />
  748. </div>
  749. </span>
  750. </div>
  751. </div>
  752. </div>
  753. </div>
  754. </div>
  755. </div>
  756. </div>
  757. <div
  758. class="detail_box"
  759. v-if="Object.keys(chaptersJson.time).length"
  760. >
  761. <div class="title">
  762. <span class="frequencyIcon">活跃频率</span>
  763. </div>
  764. <div class="box">
  765. <div>
  766. <Heatmap
  767. :Josn="chaptersJson.time"
  768. :num="chaptersJson.studentCount"
  769. ></Heatmap>
  770. </div>
  771. </div>
  772. </div>
  773. <div class="detail_box">
  774. <div class="title"><span class="timeIcon">实施时间</span></div>
  775. <div class="box">
  776. <div
  777. style="
  778. font-size: 22px;
  779. margin: 15px 0 45px;
  780. font-weight: 700;
  781. "
  782. >
  783. {{ courseDetail.title }}
  784. </div>
  785. <div class="chapter_time_box" style="margin-left: 170px">
  786. <div
  787. v-for="(item, index) in chaptersJson.work"
  788. :key="index"
  789. class="c_box"
  790. >
  791. <div class="stage_box" style="left: -195px">
  792. <div
  793. v-if="item.time"
  794. style="
  795. min-width: 150px;
  796. position: relative;
  797. left: -5px;
  798. "
  799. >
  800. {{ item.time }}
  801. </div>
  802. <div
  803. class="yuan"
  804. :class="
  805. (item.chapter.length == 1 ||
  806. item.chapter.length > 1) &&
  807. (item.chapter[0].task.length == 1 ||
  808. item.chapter[0].task.length > 1)
  809. "
  810. ></div>
  811. <div
  812. class="stage"
  813. :style="{
  814. background:
  815. (item.chapter.length == 1 ||
  816. item.chapter.length > 1) &&
  817. (item.chapter[0].task.length == 1 ||
  818. item.chapter[0].task.length > 1) ,
  819. }"
  820. >
  821. 第{{ index + 1 }}阶段 {{ item.name }}
  822. </div>
  823. <div
  824. class="s_up"
  825. :style="{
  826. display:
  827. (item.chapter.length == 1 ||
  828. item.chapter.length > 1) &&
  829. (item.chapter[0].task.length == 1 ||
  830. item.chapter[0].task.length > 1) ,
  831. }"
  832. :class="{ s_up2: !item.is }"
  833. @click="item.is = !item.is"
  834. >
  835. <img src="../assets/icon/up.png" alt="" />
  836. </div>
  837. </div>
  838. <div v-show="item.is">
  839. <div
  840. v-for="(item2, index2) in item.chapter"
  841. :key="index + '-' + index2"
  842. >
  843. <div
  844. style="
  845. display: flex;
  846. flex-direction: row;
  847. flex-wrap: nowrap;
  848. align-items: center;
  849. "
  850. v-if="
  851. item2.task[0].tool != undefined && item2.isWork
  852. "
  853. >
  854. <div
  855. style="
  856. width: 13px;
  857. height: 13px;
  858. background: #5a82cb 100%;
  859. border-radius: 50%;
  860. margin-right: 10px;
  861. "
  862. ></div>
  863. <div style="font-size: 20px; font-weight: bold">
  864. 任务{{ index2 + 1 }}:{{ item2.name }}
  865. </div>
  866. </div>
  867. <div class="p_tool_box2">
  868. <span
  869. v-for="(item3, index3) in item2.task"
  870. :key="index + '-' + index2 + '-' + index3"
  871. class="p_tool2"
  872. >
  873. <div
  874. class="toolBigBox"
  875. style="
  876. display: flex;
  877. flex-direction: row;
  878. flex-wrap: nowrap;
  879. align-items: center;
  880. "
  881. v-if="item3.works.length"
  882. >
  883. <div
  884. style="
  885. display: flex;
  886. flex-direction: row;
  887. flex-wrap: nowrap;
  888. align-items: flex-end;
  889. min-width: 140px;
  890. "
  891. >
  892. <div class="lineBox"></div>
  893. <div class="toolbox">
  894. <div
  895. style="font-size: 16px; font-weight: bold"
  896. >
  897. 步骤{{ index3 + 1 }}:
  898. </div>
  899. <div v-if="item3.tool == 1">电子白板</div>
  900. <div v-if="item3.tool == 3">思维导图</div>
  901. <div v-if="item3.tool == 6">协同文档</div>
  902. <div v-if="item3.tool == 7">思维网格</div>
  903. <div v-if="item3.tool == 8">素材库</div>
  904. <div v-if="item3.tool == 17">学习资料</div>
  905. <div v-if="item3.tool == 2">便签</div>
  906. <div v-if="item3.tool == 52">文档</div>
  907. <div v-if="item3.tool == 72">AI应用</div>
  908. <div v-if="item3.tool == 4">问卷调查</div>
  909. <div v-if="item3.tool == 45">选择题</div>
  910. <div v-if="item3.tool == 10">倒计时</div>
  911. <div v-if="item3.tool == 15">问答</div>
  912. <div v-if="item3.tool == 26">课程设计</div>
  913. <div v-if="item3.tool == 18">
  914. 训练服务器
  915. </div>
  916. <div v-if="item3.tool == 16">作业提交</div>
  917. <div v-if="item3.tool == 21">
  918. AIoT Blockly
  919. </div>
  920. <div v-if="item3.tool == 22">AI体验</div>
  921. <div v-if="item3.tool == 23">AI Python</div>
  922. <div v-if="item3.tool == 24">
  923. AI Blockly
  924. </div>
  925. <div v-if="item3.tool == 25">目标管理</div>
  926. <div v-if="item3.tool == 31">数学画板</div>
  927. <div v-if="item3.tool == 28">翻译</div>
  928. <div v-if="item3.tool == 37">魔盒识字</div>
  929. <div v-if="item3.tool == 38">24点</div>
  930. <div v-if="item3.tool == 39">GeoGebra</div>
  931. <div v-if="item3.tool == 32">源码编辑</div>
  932. <div v-if="item3.tool == 40">学生评价</div>
  933. <div v-if="item3.tool == 41">选择匹配</div>
  934. <div v-if="item3.tool == 44">汉字宫</div>
  935. <div v-if="item3.tool == 47">排序</div>
  936. <div v-if="item3.tool == 48">表格</div>
  937. <div v-if="item3.tool == 49">学生分组</div>
  938. <div v-if="item3.tool == 50">批量上传</div>
  939. <div v-if="item3.tool == 57">CocoPi</div>
  940. <div v-if="item3.tool == 58">模拟驾驶</div>
  941. <div v-if="item3.tool == 59">路径搜索</div>
  942. <div v-if="item3.tool == 60">深度学习</div>
  943. <div v-if="item3.tool == 69">英语写作</div>
  944. <div v-if="item3.tool == 70">英语口语</div>
  945. </div>
  946. </div>
  947. <div
  948. v-if="item3.works.length"
  949. style="
  950. display: flex;
  951. flex-direction: row;
  952. flex-wrap: wrap;
  953. align-items: center;
  954. margin-left: 10px;
  955. "
  956. >
  957. <!-- works:[],likeCount: 0, commentCount: 0, score: 0, isScore: 0 -->
  958. <div class="disCss">
  959. <div class="blueBtn">
  960. 作业数量:{{ item3.works.length }}
  961. </div>
  962. <div
  963. v-if="chaptersJson.studentCount"
  964. class="blueBtn"
  965. >
  966. 任务完成率:{{
  967. (
  968. (item3.works.length /
  969. chaptersJson.studentCount) *
  970. 100
  971. ).toFixed(2) > 100.0
  972. ? 100 + "%"
  973. : (
  974. (item3.works.length /
  975. chaptersJson.studentCount) *
  976. 100
  977. ).toFixed(2) + "%"
  978. }}
  979. </div>
  980. <div class="blueBtn">
  981. <div>点赞:{{ item3.likeCount }}</div>
  982. <div style="margin-left: 15px">
  983. 评论:{{ item3.commentCount }}
  984. </div>
  985. </div>
  986. </div>
  987. <div v-if="item3.isScore">
  988. <div class="disCss">
  989. <div class="blueBtn">
  990. 作业评价量:{{ item3.isScore }}
  991. </div>
  992. <div class="blueBtn">
  993. 评价平均分:{{
  994. (item3.score / item3.isScore).toFixed(
  995. 2
  996. )
  997. }}分
  998. </div>
  999. </div>
  1000. </div>
  1001. </div>
  1002. </div>
  1003. </span>
  1004. </div>
  1005. </div>
  1006. </div>
  1007. </div>
  1008. </div>
  1009. </div>
  1010. </div>
  1011. <!-- <div v-for="(item, index) in Object.keys(chaptersJson.time)" :key="index">
  1012. {{ '时间:' + item + '次数:' + chaptersJson.time[item] }}</div> -->
  1013. <!-- <div>实施时间:{{ chaptersJson.startTime }}</div> -->
  1014. </div>
  1015. <div
  1016. v-if="(type == 3)"
  1017. :class="courseDetail.brief != '' ? 'rightTd' : 'noBRight'"
  1018. style="width: 100%; padding-top: 20px"
  1019. >
  1020. <scoreZong :courseid="id" :title="courseDetail.title"></scoreZong>
  1021. </div>
  1022. </div>
  1023. </div>
  1024. <!-- <div
  1025. style="
  1026. text-align: center;
  1027. padding: 30px 0 20px 0;
  1028. box-sizing: border-box;
  1029. "
  1030. >
  1031. 此处滚动加载..
  1032. </div>-->
  1033. <el-dialog
  1034. title="阶段选择"
  1035. :visible.sync="dialogVisible"
  1036. :append-to-body="true"
  1037. width="700px"
  1038. :before-close="handleClose"
  1039. class="dialog_change"
  1040. >
  1041. <div style="font-size: 20px">请选择阶段</div>
  1042. <div
  1043. style="
  1044. padding: 20px 30px;
  1045. display: flex;
  1046. flex-direction: row;
  1047. flex-wrap: wrap;
  1048. "
  1049. >
  1050. <div
  1051. class="blue_box"
  1052. v-for="(item, index) in chapInfo"
  1053. v-if="courseDetail.state!=7"
  1054. :key="index"
  1055. @click="addUserRate(index)"
  1056. >
  1057. <div>第{{ index + 1 }}阶段</div>
  1058. <div>{{ item.dyName }}</div>
  1059. <div>{{ item.chapterInfo[0].taskJson.length }}个任务</div>
  1060. </div>
  1061. </div>
  1062. </el-dialog>
  1063. <Group
  1064. :dialogVisibleGroup.sync="dialogVisibleGroup"
  1065. :classList="classList"
  1066. :cid="id"
  1067. :courseDetail="courseDetail"
  1068. :userid="userid"
  1069. :oid="oid"
  1070. :type="tType"
  1071. :classId="classId"
  1072. @getGroup="getGroup"
  1073. ></Group>
  1074. </div>
  1075. </div>
  1076. <el-dialog title="课程二维码" :visible.sync="dialogVisibleQR" width="400px">
  1077. <div class="qrcode" ref="qrCodeUrl"></div>
  1078. </el-dialog>
  1079. <el-dialog
  1080. title="选择授课班级"
  1081. :visible.sync="dialogVisibleSk"
  1082. width="626px"
  1083. class="diy_sk"
  1084. >
  1085. <div class="classBox">
  1086. <div @click="gotoCourse('')">全部</div>
  1087. <div
  1088. @click="gotoCourse(item.id)"
  1089. v-for="(item, index) in classList"
  1090. :key="index"
  1091. >
  1092. {{ item.name }}
  1093. </div>
  1094. </div>
  1095. <div class="cancelDiy" @click="dialogVisibleSk = false">取消</div>
  1096. </el-dialog>
  1097. <!-- <selectTeachingClass ref="selectTeachingClassRef"/> -->
  1098. </div>
  1099. </template>
  1100. <script>
  1101. import Heatmap from "./tools/heatmap.vue";
  1102. import Group from "./group/group.vue";
  1103. import QRCode from "qrcodejs2";
  1104. import { tools } from "../common/tools";
  1105. import axios from "axios";
  1106. import JSZip from "jszip";
  1107. import FileSaver from "file-saver";
  1108. import scoreZong from './scoreZong/get.vue'
  1109. import MarkdownIt from "markdown-it";
  1110. import { v4 as uuidv4 } from "uuid";
  1111. import { myMixin } from "@/mixins/mixin.js"
  1112. var OpenCC = require("opencc-js");
  1113. let converter = OpenCC.Converter({
  1114. from:'hk',
  1115. to:'cn'
  1116. })
  1117. // import selectTeachingClass from "./dialog/selectTeachingClass.vue";
  1118. const getFile = (url) => {
  1119. return new Promise((resolve, reject) => {
  1120. var credentials = {
  1121. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  1122. secretAccessKey: "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",
  1123. }; //秘钥形式的登录上传
  1124. window.AWS.config.update(credentials);
  1125. window.AWS.config.region = "cn-northwest-1"; //设置区域
  1126. let url2 = url;
  1127. let _url2 = "";
  1128. if (
  1129. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  1130. ) {
  1131. _url2 = url2.split(
  1132. "https://view.officeapps.live.com/op/view.aspx?src="
  1133. )[1];
  1134. } else {
  1135. _url2 = url2;
  1136. }
  1137. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  1138. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  1139. var params = {
  1140. Bucket: "ccrb",
  1141. Key: name
  1142. };
  1143. s3.getObject(params, function (err, data) {
  1144. if (err) {
  1145. console.log(err, err.stack)
  1146. resolve({ data: 1 });
  1147. }else {
  1148. resolve({ data: data.Body });
  1149. console.log(data);
  1150. } // sxuccessful response
  1151. });
  1152. // axios({
  1153. // method: "get",
  1154. // url,
  1155. // responseType: "blob",
  1156. // })
  1157. // .then((data) => {
  1158. // resolve({ data: data.data });
  1159. // })
  1160. // .catch((error) => {
  1161. // resolve({ data: 1 });
  1162. // // reject(error.toString());
  1163. // });
  1164. });
  1165. };
  1166. export default {
  1167. mixins: [ myMixin ],
  1168. components: {
  1169. Heatmap,
  1170. Group,
  1171. scoreZong,
  1172. // selectTeachingClass
  1173. },
  1174. data() {
  1175. return {
  1176. choose: 0,
  1177. dialogVisibleSk: false,
  1178. dialogVisible: false,
  1179. dialogVisibleGroup: false,
  1180. id: this.$route.query.courseId,
  1181. userid: this.$route.query.userid,
  1182. oid: this.$route.query.oid,
  1183. org: this.$route.query.org,
  1184. classId: this.$route.query.cid,
  1185. tType: this.$route.query.tType,
  1186. screenType: this.$route.query.screenType,
  1187. courseDetail: {},
  1188. classList: [],
  1189. aStudentName: [],
  1190. chapInfo: [],
  1191. courseType: [],
  1192. Tname: [],
  1193. TnameCheck: false,
  1194. courseTypeJson: {},
  1195. userinfo: [],
  1196. mr: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/noBanner1656409780264.jpg",
  1197. rw: 0,
  1198. chaptersJson: {},
  1199. type: 2,
  1200. inviteCode: [],
  1201. groupInfo: "",
  1202. isFollow: "",
  1203. followC: "",
  1204. dialogVisibleQR: false,
  1205. checkStage: 0,
  1206. tools: JSON.parse(converter(JSON.stringify(tools))),
  1207. brief: '',
  1208. sbrief: '',
  1209. setting: {},
  1210. elLoading: false,
  1211. eltLoading: false,
  1212. languageSetting: 0,
  1213. };
  1214. },
  1215. computed: {
  1216. MarkdownT() {
  1217. return function (c) {
  1218. let md = new MarkdownIt();
  1219. return c
  1220. ? md.render(c) : "";
  1221. };
  1222. },
  1223. },
  1224. methods: {
  1225. insertMemorandum(_html,tcid=""){//保存行为操作
  1226. //variable
  1227. //btn
  1228. let params = [{
  1229. uid:this.userid,
  1230. courseId:this.id+tcid,
  1231. content:_html
  1232. }]
  1233. this.ajax.post(this.$store.state.api+'insert_systemOperation_countdownBehavior',params).then(res=>{
  1234. if(res.data==1){
  1235. console.log('保存操作成功')
  1236. }else{
  1237. console.log('保存操作失败')
  1238. }
  1239. }).catch(e=>{
  1240. console.log('保存操作失败')
  1241. console.log(e)
  1242. })
  1243. },
  1244. handleClose(done) {
  1245. done();
  1246. },
  1247. setQr(cid) {
  1248. this.dialogVisibleQR = true;
  1249. setTimeout(() => {
  1250. this.$refs.qrCodeUrl.innerHTML = "";
  1251. var qrcode = new QRCode(this.$refs.qrCodeUrl, {
  1252. text: "https://beta.cloud.cocorobo.cn/#/course?courseid=" + cid, // 需要转换为二维码的内容
  1253. width: 350,
  1254. height: 350,
  1255. colorDark: "#000000",
  1256. colorLight: "#ffffff",
  1257. correctLevel: QRCode.CorrectLevel.H,
  1258. });
  1259. }, 500);
  1260. },
  1261. goTo(path) {
  1262. this.$router.push(path);
  1263. },
  1264. gotoCourse(id) {
  1265. if(!id){
  1266. this.insertMemorandum(`开始为<span class='variable'>全部班级</span>授课`)
  1267. }else{
  1268. let _classData = this.classList.find(item=>item.id == id)
  1269. this.insertMemorandum(`开始为<span class='variable'>${_classData.name}</span>授课`,id)
  1270. }
  1271. this.addOp3('1', "", { courseid: this.id,classIdL: !id ? '全部' : id ,type: "course_class_open" }, "success")
  1272. if (this.courseDetail.state == 1) {
  1273. if (this.classList.length) {
  1274. this.goTo(
  1275. "/studyStudent?type=" +
  1276. this.checkStage +
  1277. "&courseId=" +
  1278. this.id +
  1279. "&userid=" +
  1280. this.userid +
  1281. "&oid=" +
  1282. this.oid +
  1283. "&org=" +
  1284. this.org +
  1285. "&cid=" +
  1286. this.classId +
  1287. "&tType=" +
  1288. this.tType +
  1289. "&screenType=" +
  1290. this.screenType +
  1291. "&tcid=" +
  1292. id
  1293. );
  1294. } else {
  1295. this.goTo(
  1296. "/studyStudent?type=" +
  1297. this.checkStage +
  1298. "&courseId=" +
  1299. this.id +
  1300. "&userid=" +
  1301. this.userid +
  1302. "&oid=" +
  1303. this.oid +
  1304. "&org=" +
  1305. this.org +
  1306. "&cid=" +
  1307. this.classId +
  1308. "&tType=" +
  1309. this.tType +
  1310. "&screenType=" +
  1311. this.screenType
  1312. );
  1313. }
  1314. } else if (this.courseDetail.state == 2 || this.courseDetail.state == 5) {
  1315. if (this.classList.length) {
  1316. this.goTo(
  1317. "/studystudentE2?type=" +
  1318. this.checkStage +
  1319. "&courseId=" +
  1320. this.id +
  1321. "&userid=" +
  1322. this.userid +
  1323. "&oid=" +
  1324. this.oid +
  1325. "&org=" +
  1326. this.org +
  1327. "&cid=" +
  1328. this.classId +
  1329. "&tType=" +
  1330. this.tType +
  1331. "&screenType=" +
  1332. this.screenType +
  1333. "&tcid=" +
  1334. id
  1335. );
  1336. } else {
  1337. this.goTo(
  1338. "/studystudentE2?type=" +
  1339. this.checkStage +
  1340. "&courseId=" +
  1341. this.id +
  1342. "&userid=" +
  1343. this.userid +
  1344. "&oid=" +
  1345. this.oid +
  1346. "&org=" +
  1347. this.org +
  1348. "&cid=" +
  1349. this.classId +
  1350. "&tType=" +
  1351. this.tType +
  1352. "&screenType=" +
  1353. this.screenType
  1354. );
  1355. }
  1356. } else if (this.courseDetail.state == 3 || this.courseDetail.state == 4) {
  1357. if (this.classList.length) {
  1358. this.goTo(
  1359. "/studystudentE3?type=" +
  1360. this.checkStage +
  1361. "&courseId=" +
  1362. this.id +
  1363. "&userid=" +
  1364. this.userid +
  1365. "&oid=" +
  1366. this.oid +
  1367. "&org=" +
  1368. this.org +
  1369. "&cid=" +
  1370. this.classId +
  1371. "&tType=" +
  1372. this.tType +
  1373. "&screenType=" +
  1374. this.screenType +
  1375. "&tcid=" +
  1376. id
  1377. );
  1378. } else {
  1379. this.goTo(
  1380. "/studystudentE3?type=" +
  1381. this.checkStage +
  1382. "&courseId=" +
  1383. this.id +
  1384. "&userid=" +
  1385. this.userid +
  1386. "&oid=" +
  1387. this.oid +
  1388. "&org=" +
  1389. this.org +
  1390. "&cid=" +
  1391. this.classId +
  1392. "&tType=" +
  1393. this.tType +
  1394. "&screenType=" +
  1395. this.screenType
  1396. );
  1397. }
  1398. } else if (this.courseDetail.state == 6) {
  1399. if (this.classList.length) {
  1400. this.goTo(
  1401. "/studySutdentClass?type=" +
  1402. this.checkStage +
  1403. "&courseId=" +
  1404. this.id +
  1405. "&userid=" +
  1406. this.userid +
  1407. "&oid=" +
  1408. this.oid +
  1409. "&org=" +
  1410. this.org +
  1411. "&cid=" +
  1412. this.classId +
  1413. "&tType=" +
  1414. this.tType +
  1415. "&screenType=" +
  1416. this.screenType +
  1417. "&tcid=" +
  1418. id
  1419. );
  1420. } else {
  1421. this.goTo(
  1422. "/studySutdentClass?type=" +
  1423. this.checkStage +
  1424. "&courseId=" +
  1425. this.id +
  1426. "&userid=" +
  1427. this.userid +
  1428. "&oid=" +
  1429. this.oid +
  1430. "&org=" +
  1431. this.org +
  1432. "&cid=" +
  1433. this.classId +
  1434. "&tType=" +
  1435. this.tType +
  1436. "&screenType=" +
  1437. this.screenType
  1438. );
  1439. }
  1440. } else if (this.courseDetail.state == 7) {
  1441. if(this.classList.length){
  1442. this.goTo(
  1443. "/pptEasyClass?type=" +
  1444. this.checkStage +
  1445. "&courseId=" +
  1446. this.id +
  1447. "&userid=" +
  1448. this.userid +
  1449. "&oid=" +
  1450. this.oid +
  1451. "&org=" +
  1452. this.org +
  1453. "&cid=" +
  1454. this.classId +
  1455. "&tType=" +
  1456. this.tType +
  1457. "&screenType=" +
  1458. this.screenType +
  1459. "&tcid=" +
  1460. id
  1461. );
  1462. }else {
  1463. this.goTo(
  1464. "/pptEasyClass?type=" +
  1465. this.checkStage +
  1466. "&courseId=" +
  1467. this.id +
  1468. "&userid=" +
  1469. this.userid +
  1470. "&oid=" +
  1471. this.oid +
  1472. "&org=" +
  1473. this.org +
  1474. "&cid=" +
  1475. this.classId +
  1476. "&tType=" +
  1477. this.tType +
  1478. "&screenType=" +
  1479. this.screenType
  1480. );
  1481. }
  1482. }
  1483. let params = [
  1484. {
  1485. courseId: this.id,
  1486. },
  1487. ];
  1488. this.ajax
  1489. .post(this.$store.state.api + "addOpenCoursenum", params)
  1490. .then((res) => {})
  1491. .catch((err) => {
  1492. console.error(err);
  1493. });
  1494. },
  1495. goToStudyOrDia(l) {
  1496. if (l.length > 0) {
  1497. this.dialogVisibleSk = true;
  1498. // this.$refs.selectTeachingClassRef.open()
  1499. this.insertMemorandum("点击<span class='btn'>以班级授课</span>")
  1500. } else {
  1501. this.getCourseDetail1().then(_=>{
  1502. if(this.classList.length<=0){
  1503. this.$confirm("该课程尚未指定授课班级,请返回首页,使用修改功能添加授课班级。","提示",{
  1504. confirmButtonText: '去修改',
  1505. cancelButtonText: '取消',
  1506. type:"error",
  1507. }).then(() => {
  1508. if(this.courseDetail.state == 1 || this.courseDetail.state == 2){
  1509. window.topU.postMessage({ tools: "openNewCourseUpdate",cid:this.id }, "*");
  1510. }else if(this.courseDetail.state == 3){
  1511. window.topU.postMessage({ tools: "openCourseEUpdate",cid:this.id }, "*");
  1512. }else if(this.courseDetail.state == 4 || this.courseDetail.state == 5){
  1513. window.topU.postMessage({ tools: "openCourseAiUpdate",cid:this.id }, "*");
  1514. }else if(this.courseDetail.state == 6){
  1515. window.topU.postMessage({ tools: "openCourseAiUpdate2",cid:this.id }, "*");
  1516. }else if(this.courseDetail.state == 7){
  1517. window.topU.postMessage({ tools: "openCoursePptUpdate",cid:this.id }, "*");
  1518. }
  1519. })
  1520. }else{
  1521. this.dialogVisibleSk = true;
  1522. }
  1523. })
  1524. // this.addUserRate(0);
  1525. }
  1526. },
  1527. goToStudyRate(i) {
  1528. this.checkStage = i;
  1529. if (this.tType == 2) {
  1530. this.addUserRate(i);
  1531. } else {
  1532. if (this.classList.length > 0) {
  1533. this.dialogVisibleSk = true;
  1534. } else {
  1535. this.addUserRate(i);
  1536. }
  1537. }
  1538. },
  1539. addUserRate(i) {
  1540. // var suid = this.userid;
  1541. // if (
  1542. // JSON.parse(this.courseDetail.course_student).indexOf(suid) == -1 &&
  1543. // JSON.parse(this.courseDetail.userid) != suid
  1544. // ) {
  1545. // this.$message.error("你没有该权限");
  1546. // return;
  1547. // }
  1548. // var a =
  1549. // this.courseDetail.course_student != ""
  1550. // ? JSON.parse(this.courseDetail.course_student)
  1551. // : "";
  1552. // if (this.courseDetail.userid != suid) {
  1553. // if (this.userinfo.type == 2) {
  1554. // if (a != "") {
  1555. // if (
  1556. // JSON.parse(this.courseDetail.course_student).indexOf(suid) == -1
  1557. // ) {
  1558. // this.$message.error("你没有该权限");
  1559. // return;
  1560. // }
  1561. // } else {
  1562. // this.$message.error("暂无项目学员,请联系老师添加项目学员!");
  1563. // return;
  1564. // }
  1565. // }
  1566. // }
  1567. if (this.isFollow == 2 && this.tType == 2 && this.followC != i && this.courseDetail.state != 7) {
  1568. return;
  1569. }
  1570. let params = {
  1571. uid: this.userid,
  1572. cid: this.id,
  1573. };
  1574. this.ajax
  1575. .get(this.$store.state.api + "addUserR", params)
  1576. .then((res) => {
  1577. this.updateVc();
  1578. if (this.tType == 1 || this.tType == 4) {
  1579. if (this.courseDetail.state == 1) {
  1580. this.goTo(
  1581. "/studyStudent?type=" +
  1582. i +
  1583. "&courseId=" +
  1584. this.id +
  1585. "&userid=" +
  1586. this.userid +
  1587. "&oid=" +
  1588. this.oid +
  1589. "&org=" +
  1590. this.org +
  1591. "&cid=" +
  1592. this.classId +
  1593. "&tType=" +
  1594. this.tType +
  1595. "&screenType=" +
  1596. this.screenType
  1597. );
  1598. } else if (this.courseDetail.state == 2 || this.courseDetail.state == 5) {
  1599. this.goTo(
  1600. "/studystudentE2?type=" +
  1601. i +
  1602. "&courseId=" +
  1603. this.id +
  1604. "&userid=" +
  1605. this.userid +
  1606. "&oid=" +
  1607. this.oid +
  1608. "&org=" +
  1609. this.org +
  1610. "&cid=" +
  1611. this.classId +
  1612. "&tType=" +
  1613. this.tType +
  1614. "&screenType=" +
  1615. this.screenType
  1616. );
  1617. } else if (this.courseDetail.state == 3 || this.courseDetail.state == 4) {
  1618. this.goTo(
  1619. "/studystudentE3?type=" +
  1620. i +
  1621. "&courseId=" +
  1622. this.id +
  1623. "&userid=" +
  1624. this.userid +
  1625. "&oid=" +
  1626. this.oid +
  1627. "&org=" +
  1628. this.org +
  1629. "&cid=" +
  1630. this.classId +
  1631. "&tType=" +
  1632. this.tType +
  1633. "&screenType=" +
  1634. this.screenType
  1635. );
  1636. } else if (this.courseDetail.state == 6) {
  1637. this.goTo(
  1638. "/studySutdentClass?type=" +
  1639. i +
  1640. "&courseId=" +
  1641. this.id +
  1642. "&userid=" +
  1643. this.userid +
  1644. "&oid=" +
  1645. this.oid +
  1646. "&org=" +
  1647. this.org +
  1648. "&cid=" +
  1649. this.classId +
  1650. "&tType=" +
  1651. this.tType +
  1652. "&screenType=" +
  1653. this.screenType
  1654. );
  1655. }else if (this.courseDetail.state == 7) {
  1656. this.goTo(
  1657. "/pptEasyClass?type=" +
  1658. this.checkStage +
  1659. "&courseId=" +
  1660. this.id +
  1661. "&userid=" +
  1662. this.userid +
  1663. "&oid=" +
  1664. this.oid +
  1665. "&org=" +
  1666. this.org +
  1667. "&cid=" +
  1668. this.classId +
  1669. "&tType=" +
  1670. this.tType +
  1671. "&screenType=" +
  1672. this.screenType
  1673. );
  1674. // this.gotoCourse(this.classId);
  1675. }
  1676. } else if (this.tType == 2) {
  1677. // this.goTo(
  1678. // "/studyStudent?type=" +
  1679. // i +
  1680. // "&courseId=" +
  1681. // this.id +
  1682. // "&userid=" +
  1683. // this.userid +
  1684. // "&oid=" +
  1685. // this.oid +
  1686. // "&org=" +
  1687. // this.org +
  1688. // "&cid=" +
  1689. // this.classId +
  1690. // "&tType=" +
  1691. // this.tType +
  1692. // "&screenType=" +
  1693. // this.screenType
  1694. // );
  1695. if (this.courseDetail.state == 1) {
  1696. this.goTo(
  1697. "/studyStudent?type=" +
  1698. i +
  1699. "&courseId=" +
  1700. this.id +
  1701. "&userid=" +
  1702. this.userid +
  1703. "&oid=" +
  1704. this.oid +
  1705. "&org=" +
  1706. this.org +
  1707. "&cid=" +
  1708. this.classId +
  1709. "&tType=" +
  1710. this.tType +
  1711. "&screenType=" +
  1712. this.screenType
  1713. );
  1714. } else if (this.courseDetail.state == 2 || this.courseDetail.state == 5) {
  1715. this.goTo(
  1716. "/studystudentE2?type=" +
  1717. i +
  1718. "&courseId=" +
  1719. this.id +
  1720. "&userid=" +
  1721. this.userid +
  1722. "&oid=" +
  1723. this.oid +
  1724. "&org=" +
  1725. this.org +
  1726. "&cid=" +
  1727. this.classId +
  1728. "&tType=" +
  1729. this.tType +
  1730. "&screenType=" +
  1731. this.screenType
  1732. );
  1733. } else if (this.courseDetail.state == 3 || this.courseDetail.state == 4) {
  1734. this.goTo(
  1735. "/studystudentE3?type=" +
  1736. i +
  1737. "&courseId=" +
  1738. this.id +
  1739. "&userid=" +
  1740. this.userid +
  1741. "&oid=" +
  1742. this.oid +
  1743. "&org=" +
  1744. this.org +
  1745. "&cid=" +
  1746. this.classId +
  1747. "&tType=" +
  1748. this.tType +
  1749. "&screenType=" +
  1750. this.screenType
  1751. );
  1752. }else if (this.courseDetail.state == 6) {
  1753. this.goTo(
  1754. "/studySutdentClass?type=" +
  1755. i +
  1756. "&courseId=" +
  1757. this.id +
  1758. "&userid=" +
  1759. this.userid +
  1760. "&oid=" +
  1761. this.oid +
  1762. "&org=" +
  1763. this.org +
  1764. "&cid=" +
  1765. this.classId +
  1766. "&tType=" +
  1767. this.tType +
  1768. "&screenType=" +
  1769. this.screenType
  1770. );
  1771. }else if (this.courseDetail.state == 7) {
  1772. this.goTo(
  1773. "/pptEasyClass?type=" +
  1774. this.checkStage +
  1775. "&courseId=" +
  1776. this.id +
  1777. "&userid=" +
  1778. this.userid +
  1779. "&oid=" +
  1780. this.oid +
  1781. "&org=" +
  1782. this.org +
  1783. "&cid=" +
  1784. this.classId +
  1785. "&tType=" +
  1786. this.tType +
  1787. "&screenType=" +
  1788. this.screenType
  1789. );
  1790. // this.gotoCourse(this.classId);
  1791. }
  1792. // this.gotoCourse(this.classId);
  1793. } else {
  1794. this.goTo(
  1795. "/study?type=" +
  1796. i +
  1797. "&courseId=" +
  1798. this.id +
  1799. "&userid=" +
  1800. this.userid +
  1801. "&oid=" +
  1802. this.oid +
  1803. "&org=" +
  1804. this.org +
  1805. "&cid=" +
  1806. this.classId +
  1807. "&tType=" +
  1808. this.tType +
  1809. "&screenType=" +
  1810. this.screenType
  1811. );
  1812. }
  1813. })
  1814. .catch((err) => {
  1815. console.error(err);
  1816. });
  1817. },
  1818. updateVc() {
  1819. let params = {
  1820. cid: this.id,
  1821. };
  1822. this.ajax
  1823. .get(this.$store.state.api + "updateVc", params)
  1824. .then((res) => {
  1825. console.log(res.data);
  1826. })
  1827. .catch((err) => {
  1828. console.error(err);
  1829. });
  1830. },
  1831. async getCourseDetail1() {
  1832. const loading = this.$loading.service({
  1833. background: "rgba(255, 255, 255, 0.7)",
  1834. target: document.querySelector(".student_table"),
  1835. });
  1836. let params = {
  1837. courseId: this.id,
  1838. };
  1839. let res = await this.ajax.get(
  1840. this.$store.state.api + "selectCourseDetail2",
  1841. params
  1842. );
  1843. loading.close();
  1844. // this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  1845. this.courseDetail = res.data[0][0];
  1846. if(res.data[0][0].setting){
  1847. try {
  1848. this.languageSetting = (JSON.parse(res.data[0][0].setting).languageSetting || JSON.parse(res.data[0][0].setting).languageSetting == 0) ? JSON.parse(res.data[0][0].setting).languageSetting : 0;
  1849. this.sbrief = JSON.parse(res.data[0][0].setting).sbrief ? JSON.parse(res.data[0][0].setting).sbrief : '';
  1850. this.setting = JSON.parse(res.data[0][0].setting)
  1851. }catch(error){
  1852. console.error(error)
  1853. }
  1854. }
  1855. this.brief = this.sbrief ? this.sbrief : this.MarkdownT(this.courseDetail.brief)
  1856. if(this.brief && !this.sbrief && (this.courseDetail.state == 6 || this.courseDetail.state == 5) && this.courseDetail.userid == this.userid){
  1857. this.aiChatContent()
  1858. }
  1859. this.isFollow = res.data[0][0].follow;
  1860. this.followC = res.data[0][0].followC
  1861. ? res.data[0][0].followC.split("-")[0]
  1862. : "";
  1863. this.classList = res.data[3];
  1864. let groupData = res.data[5];
  1865. var a = res.data[0];
  1866. var b = res.data[1];
  1867. var c = res.data[2];
  1868. for (var i = 0; i < b.length; i++) {
  1869. // if (!this.id) {
  1870. // this.courseType[b[i].id] = [];
  1871. // }
  1872. for (var j = 0; j < a.length; j++) {
  1873. if (b[i].id == a[j].pid) {
  1874. if (!this.courseTypeJson[b[i].name]) {
  1875. this.courseType.push(b[i].name);
  1876. this.courseTypeJson[b[i].name] = [];
  1877. }
  1878. this.courseTypeJson[b[i].name].push(a[j].name);
  1879. }
  1880. }
  1881. }
  1882. this.Tname = [];
  1883. for (var k = 0; k < c.length; k++) {
  1884. this.Tname.push(c[k].name);
  1885. }
  1886. console.log(this.courseTypeJson.length);
  1887. this.aStudentName = res.data[2];
  1888. this.chapInfo = JSON.parse(this.courseDetail.chapters);
  1889. this.rw = 0
  1890. for (var z = 0; z < this.chapInfo.length; z++) {
  1891. this.rw += this.chapInfo[z].chapterInfo[0].taskJson.length;
  1892. }
  1893. this.inviteCode = [];
  1894. for (var i = 0; i < res.data[4].length; i++) {
  1895. this.inviteCode.push({
  1896. cid: res.data[4][i].classid,
  1897. ic: res.data[4][i].code,
  1898. });
  1899. }
  1900. if (res.data[3].length != this.inviteCode.length) {
  1901. let classArray = [];
  1902. let noClassArray = [];
  1903. for (var i = 0; i < res.data[3].length; i++) {
  1904. classArray.push(res.data[3][i].id);
  1905. noClassArray.push(res.data[3][i].id);
  1906. }
  1907. this.inviteCode = this.inviteCode.filter((el) => {
  1908. if (classArray.indexOf(el.cid) != -1) {
  1909. noClassArray.splice(noClassArray.indexOf(el.cid), 1);
  1910. return el;
  1911. }
  1912. });
  1913. for (var i = 0; i < noClassArray.length; i++) {
  1914. await this.getInviteCode(noClassArray[i]);
  1915. }
  1916. let a = this.inviteCode;
  1917. console.log(this.inviteCode);
  1918. this.addInviteCode();
  1919. }
  1920. this.groupInfo = "";
  1921. if (groupData.length) {
  1922. gp: for (var g = 0; g < groupData.length; g++) {
  1923. if (groupData[g].userid == this.userid) {
  1924. let gid = groupData[g].groupCid;
  1925. let groupA = JSON.parse(groupData[g].group).group;
  1926. for (var gA = 0; gA < groupA.length; gA++) {
  1927. if (groupA[gA].id == gid) {
  1928. this.groupInfo = {
  1929. name: groupA[gA].name,
  1930. };
  1931. break gp;
  1932. }
  1933. }
  1934. }
  1935. }
  1936. }
  1937. if(this.courseDetail.state == 7 && this.tType == 2){
  1938. this.goToStudyRate('')
  1939. }
  1940. // debugger
  1941. },
  1942. addInviteCode() {
  1943. let params = [
  1944. {
  1945. courseId: this.id,
  1946. inviteCode: JSON.stringify(this.inviteCode),
  1947. },
  1948. ];
  1949. this.ajax
  1950. .post(this.$store.state.api + "addInviteCode", params)
  1951. .then((res) => {})
  1952. .catch((err) => {
  1953. console.error(err);
  1954. });
  1955. },
  1956. getCTwo() {
  1957. this.type = 1;
  1958. this.getCourseDetail2();
  1959. },
  1960. getCThree(){
  1961. this.type = 3
  1962. },
  1963. getCourseDetail2() {
  1964. const loading = this.$loading.service({
  1965. background: "rgba(255, 255, 255, 0.7)",
  1966. target: document.querySelector(".student_table"),
  1967. });
  1968. let params = {
  1969. courseId: this.id,
  1970. };
  1971. this.ajax
  1972. .get(this.$store.state.api + "selectCourseDetail", params)
  1973. .then((res) => {
  1974. loading.close();
  1975. // this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  1976. this.courseDetail = res.data[0][0];
  1977. var a = res.data[0];
  1978. var b = res.data[1];
  1979. var c = res.data[2];
  1980. var d = res.data[3];
  1981. for (var i = 0; i < b.length; i++) {
  1982. // if (!this.id) {
  1983. // this.courseType[b[i].id] = [];
  1984. // }
  1985. for (var j = 0; j < a.length; j++) {
  1986. if (b[i].id == a[j].pid) {
  1987. if (!this.courseTypeJson[b[i].name]) {
  1988. this.courseType.push(b[i].name);
  1989. this.courseTypeJson[b[i].name] = [];
  1990. }
  1991. this.courseTypeJson[b[i].name].push(a[j].name);
  1992. }
  1993. }
  1994. }
  1995. this.Tname = [];
  1996. for (var k = 0; k < c.length; k++) {
  1997. this.Tname.push(c[k].name);
  1998. }
  1999. console.log(this.courseTypeJson.length);
  2000. this.aStudentName = res.data[2];
  2001. this.chapInfo = JSON.parse(this.courseDetail.chapters);
  2002. this.rw = 0
  2003. for (var z = 0; z < this.chapInfo.length; z++) {
  2004. this.rw += this.chapInfo[z].chapterInfo[0].taskJson.length;
  2005. }
  2006. let _chapters = JSON.parse(a[0].chapters);
  2007. let _works = res.data[3];
  2008. let _sCont = res.data[4];
  2009. let _comment = res.data[5];
  2010. let _chaptersJson = {
  2011. chapterState: _chapters,
  2012. state: {
  2013. stage: _chapters.length,
  2014. finish: 0,
  2015. learing: 0,
  2016. },
  2017. tool: [],
  2018. chapter: [],
  2019. time: {},
  2020. startTime: _works.length ? _works[0].time : "",
  2021. work: [],
  2022. studentCount: _sCont[0].usercount,
  2023. };
  2024. let timeAarry = [];
  2025. for (var j = 0; j < _works.length; j++) {
  2026. timeAarry.push(_works[j].vtime);
  2027. }
  2028. timeAarry.forEach((item) => {
  2029. _chaptersJson.time[item] = _chaptersJson.time[item] + 1 || 1;
  2030. });
  2031. for (var i = 0; i < _chapters.length; i++) {
  2032. _chaptersJson.chapterState[i].isFinsh = false;
  2033. // _chaptersJson.tool[i] = []
  2034. _chaptersJson.tool[i] = { array: [], name: _chapters[i].dyName };
  2035. _chaptersJson.chapter[i] = [];
  2036. _chaptersJson.work[i] = {
  2037. name: _chapters[i].dyName,
  2038. chapter: [],
  2039. time: "",
  2040. };
  2041. for (var j = 0; j < _works.length; j++) {
  2042. if (i == _works[j].stage) {
  2043. _chaptersJson.chapterState[i].isFinsh = true;
  2044. _chaptersJson.work[i].time = _works[j].time;
  2045. _chaptersJson.state.finish++;
  2046. break;
  2047. }
  2048. }
  2049. let el = _chapters[i].chapterInfo[0].taskJson;
  2050. for (var z = 0; z < el.length; z++) {
  2051. // _chaptersJson.tool[i][z] = [];
  2052. _chaptersJson.tool[i].array[z] = { array: [], name: el[z].task };
  2053. _chaptersJson.chapter[i][z] = [];
  2054. _chaptersJson.work[i].chapter[z] = {
  2055. name: el[z].task,
  2056. task: [],
  2057. isWork: false,
  2058. };
  2059. if (d.length > 0) {
  2060. _chaptersJson.work[i].chapter[z].isWork = true;
  2061. }
  2062. _chaptersJson.work[i].is = false;
  2063. let tools = el[z].toolChoose;
  2064. for (var k = 0; k < tools.length; k++) {
  2065. _chaptersJson.work[i].chapter[z].task[k] = {
  2066. tool: tools[k].tool[0],
  2067. works: [],
  2068. likeCount: 0,
  2069. commentCount: 0,
  2070. score: 0,
  2071. isScore: 0,
  2072. };
  2073. for (var j = 0; j < _works.length; j++) {
  2074. if (
  2075. i == _works[j].stage &&
  2076. z == _works[j].task &&
  2077. k == _works[j].tool
  2078. ) {
  2079. _chaptersJson.work[i].chapter[z].task[k].works.push(
  2080. _works[j]
  2081. );
  2082. if (_works[j].score) {
  2083. _chaptersJson.work[i].chapter[z].task[k].score +=
  2084. JSON.parse(_works[j].score).wScore;
  2085. _chaptersJson.work[i].chapter[z].task[k].isScore++;
  2086. }
  2087. }
  2088. }
  2089. for (var j = 0; j < _comment.length; j++) {
  2090. if (
  2091. i == _comment[j].stage &&
  2092. z == _comment[j].task &&
  2093. k == _comment[j].tool
  2094. ) {
  2095. if (_comment[j].cType == 1) {
  2096. _chaptersJson.work[i].chapter[z].task[k].likeCount++;
  2097. }
  2098. if (_comment[j].cType == 2) {
  2099. _chaptersJson.work[i].chapter[z].task[k].commentCount++;
  2100. }
  2101. }
  2102. }
  2103. // if (_chaptersJson.chapter[i][z].indexOf(tools[k].tool[0]) == -1) {
  2104. // _chaptersJson.tool[i][z].push(tools[k].tool[0])
  2105. // }
  2106. _chaptersJson.chapter[i][z][k] = { tool: tools[k].tool[0] };
  2107. // _chaptersJson.tool[i][z][k] = { tool: tools[k].tool[0] };
  2108. _chaptersJson.tool[i].array[z].array[k] = {
  2109. tool: tools[k].tool[0],
  2110. };
  2111. }
  2112. }
  2113. }
  2114. _chaptersJson.state.learing =
  2115. _chaptersJson.state.stage - _chaptersJson.state.finish;
  2116. this.chaptersJson = _chaptersJson;
  2117. // debugger
  2118. })
  2119. .catch((err) => {
  2120. loading.close();
  2121. console.error(err);
  2122. });
  2123. },
  2124. getGroup() {
  2125. this.getCourseDetail1();
  2126. },
  2127. getUser() {
  2128. let params = { uid: this.userid };
  2129. this.ajax
  2130. .get(this.$store.state.api + "getUser", params)
  2131. .then((res) => {
  2132. this.userinfo = res.data[0][0];
  2133. })
  2134. .catch((err) => {
  2135. console.error(err);
  2136. });
  2137. },
  2138. // getSName() {
  2139. // let params = {
  2140. // uid: JSON.stringify(this.courseDetail.course_student),
  2141. // };
  2142. // this.ajax
  2143. // .get(this.$store.state.api + "selectSName", params)
  2144. // .then((res) => {
  2145. // this.aStudentName = res.data[0];
  2146. // })
  2147. // .catch((err) => {
  2148. // console.error(err);
  2149. // });
  2150. // },
  2151. async getInviteCode(cid) {
  2152. let code = this.randomNumber();
  2153. // let params = {
  2154. // code: code,
  2155. // oid: this.oid,
  2156. // }
  2157. // let type = 1
  2158. // for (var i = 0; i < this.inviteCode.length; i++) {
  2159. // if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  2160. // type = 2
  2161. // }
  2162. // }
  2163. // if (type == 2) {
  2164. // this.getInviteCode(cid)
  2165. // return;
  2166. // }
  2167. // const res = await this.ajax.get(this.$store.state.api + "selectInviteCode2", params)
  2168. // if (res.data.length && res.data[0].length && res.data[0][0].courseId != this.cid) {
  2169. // this.getInviteCode(cid)
  2170. // return;
  2171. // }
  2172. let array = [];
  2173. for (var i = 0; i < this.inviteCode.length; i++) {
  2174. array.push(this.inviteCode[i].cid);
  2175. }
  2176. if (array.indexOf(cid) != -1) {
  2177. this.inviteCode[array.indexOf(cid)].ic = code;
  2178. } else {
  2179. this.inviteCode.push({ cid: cid, ic: code });
  2180. }
  2181. },
  2182. randomNumber() {
  2183. // 随机生成两位数
  2184. // let num = Math.floor(Math.random() * 900) + 100;
  2185. // 生成 0 到 99 之间的随机整数
  2186. const randomNumber = Math.floor(Math.random() * 100);
  2187. // 如果随机数小于 10,补上前导零
  2188. const num =
  2189. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  2190. // 随机生成两个大写字母
  2191. let letters = "";
  2192. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  2193. for (let i = 0; i < 3; i++) {
  2194. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  2195. }
  2196. // 随机生成两位数字和字母的组合
  2197. let mix = "";
  2198. let chars =
  2199. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  2200. for (let i = 0; i < 3; i++) {
  2201. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  2202. mix += char;
  2203. }
  2204. // 随机选择一种类型
  2205. let type = Math.floor(Math.random() * 3);
  2206. return num;
  2207. // 根据类型输出结果
  2208. switch (type) {
  2209. case 0:
  2210. console.log(num); // 输出两位数
  2211. return num;
  2212. case 1:
  2213. console.log(letters); // 输出两个大写字母
  2214. return letters;
  2215. case 2:
  2216. console.log(mix); // 输出两位数字和字母的组合
  2217. return mix;
  2218. }
  2219. },
  2220. exportCourse() {
  2221. let _title = `<div style="font-size:50px;font-weight:bold;">${this.courseDetail.title}</div>`;
  2222. let _type = "";
  2223. if (this.courseType.length) {
  2224. _type = `<div style="font-size:30px;margin-top:10px;"><span style="color: rgb(113, 124, 141); font-weight: 400;">分类:</span><span>${
  2225. this.courseTypeJson[Object.keys(this.courseTypeJson)[0]]
  2226. }</span></div>`;
  2227. }
  2228. let _user = `<div style="font-size:30px;margin-top:10px;"><span style="color: rgb(113, 124, 141); font-weight: 400;">创建者:</span><span>${this.courseDetail.username}</span></div>`;
  2229. const _chapInfo = this.chapInfo;
  2230. let _chap = "";
  2231. for (let i = 0; i < _chapInfo.length; i++) {
  2232. _chap += `<div style="font-size:40px;margin-top:70px;"><span>第${
  2233. i + 1
  2234. }阶段:${_chapInfo[i].dyName}</span></div>`;
  2235. let _task = _chapInfo[i].chapterInfo[0].taskJson;
  2236. for (let j = 0; j < _task.length; j++) {
  2237. _chap += `<div style="font-size:30px;margin-top:50px;"><span>任务${
  2238. j + 1
  2239. }:${_task[j].task}</span></div>`;
  2240. if (_task[j].taskDetail) {
  2241. _chap += `<div style="font-size:25px;margin-top:40px;">任务描述</div>`;
  2242. _chap += `<div style="font-size:25px;margin-top:10px;">${_task[j].taskDetail}</div>`;
  2243. }
  2244. let _tool = _task[j].toolChoose;
  2245. if (_tool[0].tool.length) {
  2246. for (let z = 0; z < _tool.length; z++) {
  2247. _chap += `<div style="font-size:23px;margin-top:30px;"><span>步骤${
  2248. z + 1
  2249. }:</span><span>${
  2250. tools[_tool[z].tool[0]] ? tools[_tool[z].tool[0]].name : ""
  2251. }</span></div>`;
  2252. if (_tool[z].toolDetail) {
  2253. _chap += `<div style="font-size:23px;margin-top:20px;">工具描述</div>`;
  2254. _chap += `<div style="font-size:23px;margin-top:10px;">${_tool[z].toolDetail}</div>`;
  2255. }
  2256. }
  2257. }
  2258. }
  2259. }
  2260. let _html = _title + _type + _user + _chap;
  2261. this.generate(this.courseDetail, _html);
  2262. },
  2263. async generate(a, html) {
  2264. // 将html文件中需要用到的数据挂载到store上
  2265. const content = `<!DOCTYPE html>
  2266. <html lang="en">
  2267. <head>
  2268. <meta charset="UTF-8">
  2269. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  2270. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  2271. <title>${a.title}</title>
  2272. <style>
  2273. </style>
  2274. </head>
  2275. <body>
  2276. ${html}
  2277. </body>
  2278. </html>`;
  2279. // debugger
  2280. // 生成报告
  2281. const link = document.createElement("a");
  2282. let dname = a.title + ".doc";
  2283. // link.download = "报告.html"; // 文件名
  2284. link.download = dname; // 文件名
  2285. link.style.display = "none";
  2286. // 创建文件流
  2287. // 创建bolb实例时,内容一定要放在[]中
  2288. const blob = new Blob([content], {
  2289. type: "text/plain;charset='utf-8'",
  2290. });
  2291. link.href = window.URL.createObjectURL(blob);
  2292. document.body.appendChild(link);
  2293. link.click();
  2294. document.body.removeChild(link);
  2295. // saveAs(
  2296. // htmlDocx.asBlob(content, {
  2297. // orientation: "landscape", //跨域设置
  2298. // }),
  2299. // //文件名
  2300. // "报告.doc"
  2301. // );
  2302. },
  2303. uploadCourse() {
  2304. // this.$confirm("确定导出课件吗?", "提示", {
  2305. // confirmButtonText: "确定",
  2306. // cancelButtonText: "取消",
  2307. // type: "warning",
  2308. // })
  2309. // .then(() => {
  2310. const loading = this.$loading.service({
  2311. background: "rgba(255, 255, 255, 0.7)",
  2312. target: document.body,
  2313. text: "文件加载中...",
  2314. });
  2315. const _chapInfo = this.chapInfo;
  2316. let url = [];
  2317. for (let i = 0; i < _chapInfo.length; i++) {
  2318. let _task = _chapInfo[i].chapterInfo[0].taskJson;
  2319. for (let j = 0; j < _task.length; j++) {
  2320. let _chapterData = _task[j].chapterData;
  2321. for (let k = 0; k < _chapterData.length; k++) {
  2322. if (
  2323. _chapterData[k].url.indexOf(
  2324. "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn"
  2325. ) !== -1 &&
  2326. _chapterData[k].url.indexOf("img") === -1
  2327. ) {
  2328. let _point = _chapterData[k].url.split(".")[_chapterData[k].url.split(".").length - 1]
  2329. url.push({
  2330. name: _chapterData[k].name.indexOf(_point) == -1 ? (_chapterData[k].name + '.' + _point) : _chapterData[k].name,
  2331. url: _chapterData[k].url,
  2332. });
  2333. }
  2334. }
  2335. }
  2336. }
  2337. console.log(url);
  2338. this.downLoadAll(url, loading);
  2339. // })
  2340. // .catch(() => {});
  2341. },
  2342. downLoadAll(url, loading) {
  2343. const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
  2344. const zip = new JSZip();
  2345. const cache = {};
  2346. const promises = [];
  2347. data.forEach((item) => {
  2348. const promise = getFile(item.url).then((data) => {
  2349. if (data.data != 1) {
  2350. // 下载文件, 并存成ArrayBuffer对象
  2351. const file_name = item.name; // 获取文件名
  2352. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  2353. cache[file_name] = data.data;
  2354. }
  2355. });
  2356. promises.push(promise);
  2357. });
  2358. Promise.all(promises).then(() => {
  2359. zip.generateAsync({ type: "blob" }).then((content) => {
  2360. // 生成二进制流
  2361. FileSaver.saveAs(content, this.courseDetail.title + ".zip"); // 利用file-saver保存文件 自定义文件名
  2362. setTimeout(() => {
  2363. loading.close();
  2364. }, 2000);
  2365. });
  2366. });
  2367. },
  2368. getLang(){
  2369. let lang = ''
  2370. if(this.languageSetting == 0){
  2371. lang = 'Chinese.'
  2372. }else if(this.languageSetting == 1){
  2373. lang = 'Traditional Chinese.'
  2374. }else if(this.languageSetting == 2){
  2375. lang = 'English.'
  2376. }
  2377. return lang
  2378. },
  2379. updateSetting(){
  2380. let params = [{
  2381. cid: this.id,
  2382. setting: JSON.stringify(this.setting)
  2383. }]
  2384. this.ajax.post(this.$store.state.api+'updateWorksSetting',params).then(res=>{
  2385. if(res.data==1){
  2386. console.log('保存操作成功')
  2387. }else{
  2388. console.log('保存操作失败')
  2389. }
  2390. }).catch(e=>{
  2391. console.log('保存操作失败')
  2392. console.log(e)
  2393. })
  2394. },
  2395. aiChatContent() {
  2396. if(this.elLoading || this.eltLoading){
  2397. this.$message.error('正在优化中,请稍后')
  2398. return
  2399. }
  2400. this.elLoading = true
  2401. this.eltLoading = true
  2402. let _uuid = uuidv4();
  2403. this.brief = "";
  2404. let params = {
  2405. model: "qwen-plus",
  2406. temperature: 0,
  2407. max_tokens: 4096,
  2408. top_p: 1,
  2409. frequency_penalty: 0,
  2410. presence_penalty: 0,
  2411. messages: [
  2412. {
  2413. role: "user",
  2414. content: `Language: ${this.getLang()} 总结以下内容为150字左右的课程简介:${this.courseDetail.brief}`
  2415. }
  2416. ],
  2417. uid: _uuid,
  2418. mind_map_question: ""
  2419. }
  2420. this.ajax
  2421. .post("https://gpt4.cocorobo.cn/chat", params)
  2422. .then(res => {
  2423. if (
  2424. converter(res.data.FunctionResponse.result) ==
  2425. converter("发送成功")
  2426. ) {
  2427. } else {
  2428. this.$message.warning(res.data.FunctionResponse.result);
  2429. }
  2430. })
  2431. .catch(e => {
  2432. console.log(e);
  2433. this.elLoading = false
  2434. this.eltLoading = false
  2435. });
  2436. this.getAiContent(_uuid);
  2437. },
  2438. getAiContent(_uid) {
  2439. this.fasource = new EventSource(
  2440. `https://gpt4.cocorobo.cn/stream/${_uid}`
  2441. ); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  2442. let _allText = "";
  2443. let _mdText = "";
  2444. const md = new MarkdownIt();
  2445. this.fasource.onmessage = _e => {
  2446. if (_e.data.replace("'", "").replace("'", "") == "[DONE]") {
  2447. //对话已经完成
  2448. _mdText = _mdText.replace("_", "");
  2449. this.fasource.close();
  2450. this.fasource = null;
  2451. this.$nextTick(() => {
  2452. this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
  2453. });
  2454. this.brief = _mdText;
  2455. this.setting.sbrief = _mdText
  2456. this.eltLoading = false
  2457. this.$forceUpdate()
  2458. this.updateSetting();
  2459. return;
  2460. } else {
  2461. //对话还在继续
  2462. let _text = "";
  2463. _text = _e.data.replaceAll("'", "");
  2464. if (_allText == "") {
  2465. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  2466. } else {
  2467. _allText += _text;
  2468. }
  2469. _mdText = _allText + "_";
  2470. _mdText = _mdText.replace(/\\n/g, "\n");
  2471. _mdText = _mdText.replace(/\\/g, "");
  2472. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  2473. //转化返回的回复流数据
  2474. _mdText = md.render(_mdText);
  2475. this.brief = _mdText;
  2476. this.elLoading = false
  2477. this.$nextTick(() => {
  2478. this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
  2479. });
  2480. // 处理流数据
  2481. }
  2482. };
  2483. },
  2484. },
  2485. created() {
  2486. // if(this.tType == 1 || this.tType == 4){
  2487. // this.getCourseDetail2();
  2488. // }else{
  2489. // this.getCourseDetail1();
  2490. // }
  2491. this.getCourseDetail1();
  2492. this.getUser();
  2493. document.scrollingElement.scrollTop = 0;
  2494. // this.getSName();
  2495. },
  2496. };
  2497. </script>
  2498. <style scoped>
  2499. @media screen and (max-width: 1024px) {
  2500. /* .Tname {
  2501. width: 500px;
  2502. white-space: nowrap;
  2503. overflow: hidden;
  2504. text-overflow: ellipsis;
  2505. } */
  2506. }
  2507. .body_student {
  2508. margin: 10px auto;
  2509. width: 98%;
  2510. height: 100%;
  2511. }
  2512. .student_head {
  2513. width: 100%;
  2514. background: #fff;
  2515. height: 30%;
  2516. position: relative;
  2517. }
  2518. .returnIndexImg {
  2519. width: 18px;
  2520. margin: 0 7px 0 0;
  2521. height: auto;
  2522. box-sizing: border-box;
  2523. display: flex;
  2524. align-items: center;
  2525. }
  2526. .returnIndexImg > img {
  2527. width: 100%;
  2528. }
  2529. .wheel {
  2530. width: 250px;
  2531. max-height: 146px;
  2532. display: flex;
  2533. align-items: center;
  2534. }
  2535. .man {
  2536. width: 16px;
  2537. height: 16px;
  2538. }
  2539. .wheel > img,
  2540. .man > img {
  2541. width: 100%;
  2542. height: 100%;
  2543. }
  2544. .box_course {
  2545. display: flex;
  2546. padding: 25px 0 20px 60px;
  2547. }
  2548. .right_box {
  2549. display: flex;
  2550. flex-direction: column;
  2551. margin-left: 30px;
  2552. align-items: flex-start;
  2553. width: calc(100% - 350px);
  2554. }
  2555. .right_box_title {
  2556. font-size: 20px;
  2557. font-weight: bold;
  2558. max-width: calc(100% - 250px);
  2559. white-space: nowrap;
  2560. overflow: hidden;
  2561. text-overflow: ellipsis;
  2562. }
  2563. .people {
  2564. display: flex;
  2565. margin-top: 20px;
  2566. }
  2567. .person {
  2568. margin-left: 10px;
  2569. /* line-height: 18px; */
  2570. }
  2571. .btnBox {
  2572. display: flex;
  2573. margin-top: 20px;
  2574. }
  2575. .now_study {
  2576. /* width: 120px; */
  2577. padding: 0 10px;
  2578. height: 45px;
  2579. color: #fff;
  2580. background: #3681fc;
  2581. text-align: center;
  2582. line-height: 45px;
  2583. border-radius: 8px;
  2584. font-size: 16px;
  2585. cursor: pointer;
  2586. display: flex;
  2587. flex-direction: row;
  2588. flex-wrap: nowrap;
  2589. align-items: center;
  2590. justify-content: center;
  2591. }
  2592. .now_study + .now_study {
  2593. margin-left: 10px;
  2594. }
  2595. .goToStudy {
  2596. /* width: 120px; */
  2597. padding: 0 10px;
  2598. height: 45px;
  2599. background: #3681fc;
  2600. border-radius: 8px;
  2601. color: #fff;
  2602. display: flex;
  2603. flex-direction: row;
  2604. flex-wrap: nowrap;
  2605. align-items: center;
  2606. justify-content: center;
  2607. position: absolute;
  2608. right: 25px;
  2609. bottom: 25px;
  2610. font-size: 16px;
  2611. cursor: pointer;
  2612. }
  2613. .now_group {
  2614. height: 35px;
  2615. font-size: 14px;
  2616. line-height: 35px;
  2617. margin-left: 32px;
  2618. }
  2619. .now_group > span:nth-child(1) {
  2620. color: rgb(108, 108, 108);
  2621. }
  2622. .choose_who {
  2623. display: flex;
  2624. margin: 15px 0 0 25px;
  2625. }
  2626. .who_choose {
  2627. height: 28px;
  2628. cursor: pointer;
  2629. }
  2630. .choose_who > div:nth-child(2) {
  2631. margin-left: 35px;
  2632. }
  2633. .choose {
  2634. border-bottom: 5px solid #4a9eed;
  2635. color: #4a9eed;
  2636. }
  2637. .student_body {
  2638. display: flex;
  2639. }
  2640. .student_body,
  2641. .right {
  2642. width: 100%;
  2643. margin: 10px auto;
  2644. min-height: 688px;
  2645. }
  2646. .nav {
  2647. margin: auto 25px;
  2648. width: 80%;
  2649. padding-top: 5px;
  2650. text-indent: 25px;
  2651. }
  2652. .pic {
  2653. width: 100%;
  2654. display: flex;
  2655. flex-direction: row;
  2656. flex-wrap: wrap;
  2657. height: 100%;
  2658. justify-content: space-evenly;
  2659. }
  2660. .Img {
  2661. /*width: 30%; */
  2662. width: 300px;
  2663. margin: 20px 50px;
  2664. margin: 20px 10px;
  2665. border: 1px solid #dbdbdb;
  2666. border-radius: 5px;
  2667. overflow: hidden;
  2668. }
  2669. .Img > img {
  2670. width: 100%;
  2671. height: 100%;
  2672. }
  2673. .student_body_one,
  2674. .right_one {
  2675. width: 100%;
  2676. margin: 0 auto;
  2677. background: #fff;
  2678. margin-top: 10px;
  2679. min-height: 688px;
  2680. }
  2681. .student {
  2682. width: 85%;
  2683. display: flex;
  2684. flex-direction: row;
  2685. flex-wrap: wrap;
  2686. justify-content: flex-start;
  2687. margin: auto 10px;
  2688. }
  2689. .student > div {
  2690. width: 12%;
  2691. height: 35px;
  2692. background: #e3759a;
  2693. text-align: center;
  2694. border: 1px solid #e3759a;
  2695. border-radius: 5px;
  2696. color: #fff;
  2697. line-height: 35px;
  2698. margin: 10px;
  2699. }
  2700. .dialog_change >>> .el-dialog {
  2701. border-radius: 5px;
  2702. }
  2703. .dialog_change >>> .el-dialog__header {
  2704. background: #303030;
  2705. height: 36px;
  2706. line-height: 36px;
  2707. padding-left: 10px;
  2708. padding: 0px 10px 0px;
  2709. }
  2710. .dialog_change >>> .el-dialog__headerbtn {
  2711. top: 10px !important;
  2712. right: 10px !important;
  2713. }
  2714. .dialog_change >>> .el-dialog__title {
  2715. color: #fff;
  2716. font-size: 14px;
  2717. line-height: 5px;
  2718. }
  2719. .dialog_change >>> .el-dialog__body {
  2720. background: #f5f5f5;
  2721. }
  2722. .blue_box {
  2723. align-items: center;
  2724. display: flex;
  2725. flex-direction: column;
  2726. justify-content: center;
  2727. }
  2728. .blue_box,
  2729. .blue_box_one {
  2730. width: 30%;
  2731. height: 100px;
  2732. text-align: center;
  2733. color: #fff;
  2734. background-image: linear-gradient(90deg, #477cd7, #65b9fc);
  2735. border-radius: 15px;
  2736. margin: 15px 0 15px 15px;
  2737. cursor: pointer;
  2738. }
  2739. .courseItem {
  2740. width: 299px;
  2741. height: 70px;
  2742. background: #ddebf8;
  2743. border-radius: 8px;
  2744. margin-right: 16px;
  2745. margin-bottom: 16px;
  2746. display: flex;
  2747. flex-direction: row;
  2748. flex-wrap: nowrap;
  2749. align-items: flex-start;
  2750. justify-content: center;
  2751. padding-top: 20px;
  2752. cursor: pointer;
  2753. }
  2754. .jdAndTask {
  2755. display: flex;
  2756. flex-direction: column;
  2757. flex-wrap: nowrap;
  2758. justify-content: center;
  2759. align-items: flex-start;
  2760. }
  2761. .jdAndTask > div:nth-child(1) {
  2762. font-size: 18px;
  2763. font-weight: bold;
  2764. color: #000;
  2765. margin-bottom: 10px;
  2766. }
  2767. .jdAndTask > div:nth-child(2) {
  2768. font-size: 14px;
  2769. font-weight: 400;
  2770. color: #000;
  2771. max-width: 180px;
  2772. white-space: nowrap;
  2773. overflow: hidden;
  2774. text-overflow: ellipsis;
  2775. word-break: break-word;
  2776. width: 180px;
  2777. }
  2778. .blue_box_one {
  2779. width: 200px;
  2780. height: 200px;
  2781. background-image: linear-gradient(90deg, #477cd7, #65b9fc);
  2782. display: flex;
  2783. flex-direction: column;
  2784. flex-wrap: nowrap;
  2785. align-items: center;
  2786. justify-content: center;
  2787. }
  2788. .blue_box_one > div {
  2789. margin: 5px 0;
  2790. }
  2791. .blue_box_one > div:nth-child(1) {
  2792. font-size: 20px;
  2793. font-weight: bold;
  2794. }
  2795. .blue_box > div:nth-child(2) {
  2796. margin-top: 10px;
  2797. }
  2798. .blue_box_one > div:nth-child(2) {
  2799. white-space: nowrap;
  2800. text-overflow: ellipsis;
  2801. overflow: hidden;
  2802. word-break: break-all;
  2803. width: 100%;
  2804. text-align: center;
  2805. max-width: calc(100% - 85px);
  2806. margin: 0 auto;
  2807. }
  2808. .return {
  2809. background: #f0f4fa;
  2810. width: 75px;
  2811. height: 36px;
  2812. color: #000;
  2813. text-align: center;
  2814. line-height: 36px;
  2815. margin-right: 20px;
  2816. cursor: pointer;
  2817. border-radius: 5px;
  2818. position: absolute;
  2819. right: 10px;
  2820. top: 24px;
  2821. font-size: 14px;
  2822. display: flex;
  2823. flex-direction: row;
  2824. flex-wrap: nowrap;
  2825. justify-content: center;
  2826. align-items: center;
  2827. }
  2828. .return > img {
  2829. width: 100%;
  2830. height: 100%;
  2831. }
  2832. .cType {
  2833. display: flex;
  2834. flex-direction: row;
  2835. justify-content: center;
  2836. align-items: center;
  2837. margin-top: 20px;
  2838. }
  2839. .cType > div > span {
  2840. font-weight: 400;
  2841. color: #717c8d;
  2842. }
  2843. .type_children + .type_children {
  2844. margin-left: 10px;
  2845. }
  2846. .all_choose {
  2847. margin-right: 10px;
  2848. max-width: 250px;
  2849. white-space: nowrap;
  2850. overflow: hidden;
  2851. text-overflow: ellipsis;
  2852. }
  2853. .rightT {
  2854. display: flex;
  2855. flex-direction: row;
  2856. flex-wrap: nowrap;
  2857. align-items: center;
  2858. width: calc(100% - 20px);
  2859. }
  2860. .jd {
  2861. background: #f0f0f0;
  2862. margin-left: 12px;
  2863. border-radius: 4px;
  2864. font-size: 14px;
  2865. color: #3d3d3d;
  2866. width: 90px;
  2867. height: 28px;
  2868. text-align: center;
  2869. line-height: 28px;
  2870. }
  2871. .sLeft {
  2872. width: 343px;
  2873. margin-right: 10px;
  2874. background: rgb(255, 255, 255);
  2875. padding: 20px 20px 0 20px;
  2876. box-sizing: border-box;
  2877. border-radius: 12px;
  2878. }
  2879. .courseT {
  2880. border-left: 3px solid #3681fc;
  2881. padding-left: 5px;
  2882. font-weight: bold;
  2883. display: flex;
  2884. align-items: center;
  2885. justify-content: space-between;
  2886. }
  2887. .courseTd {
  2888. padding-top: 15px;
  2889. height: 700px;
  2890. overflow: auto;
  2891. word-break: break-word;
  2892. white-space: pre-line;
  2893. }
  2894. .courseTd::-webkit-scrollbar {
  2895. /*滚动条整体样式*/
  2896. width: 6px;
  2897. /*高宽分别对应横竖滚动条的尺寸*/
  2898. height: 6px;
  2899. }
  2900. /*定义滚动条轨道 内阴影+圆角*/
  2901. .courseTd::-webkit-scrollbar {
  2902. border-radius: 10px;
  2903. background-color: #eee;
  2904. }
  2905. /*定义滑块 内阴影+圆角*/
  2906. .courseTd::-webkit-scrollbar-thumb {
  2907. border-radius: 10px;
  2908. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  2909. background-color: rgba(0, 0, 0, 0.1);
  2910. }
  2911. .rightTd,
  2912. .noBRight {
  2913. width: calc(100% - 28% - 10px);
  2914. background: #fff;
  2915. display: flex;
  2916. flex-direction: row;
  2917. flex-wrap: wrap;
  2918. align-content: flex-start;
  2919. align-items: center;
  2920. justify-content: flex-start;
  2921. border-radius: 12px;
  2922. padding-left: 17px;
  2923. }
  2924. .rightTd:nth-child(5n),
  2925. .noBRight:nth-child(5n) {
  2926. margin-right: 0;
  2927. }
  2928. .noBRight {
  2929. width: 100%;
  2930. }
  2931. .Tname {
  2932. word-break: break-all;
  2933. width: auto;
  2934. /* overflow: hidden;
  2935. white-space: nowrap;
  2936. text-overflow: ellipsis; */
  2937. }
  2938. /* .TnameC{
  2939. width:auto;
  2940. overflow: unset;
  2941. white-space: unset;
  2942. text-overflow: unset;
  2943. } */
  2944. .Tname > span {
  2945. cursor: pointer;
  2946. color: #1463eb;
  2947. margin-left: 10px;
  2948. }
  2949. .detail {
  2950. width: 100%;
  2951. padding: 15px;
  2952. box-sizing: border-box;
  2953. }
  2954. .statebox {
  2955. display: flex;
  2956. align-items: center;
  2957. box-sizing: border-box;
  2958. margin-left: 30px;
  2959. }
  2960. .statebox div {
  2961. padding: 10px 20px;
  2962. border-radius: 5px;
  2963. background: #fff;
  2964. display: flex;
  2965. align-items: center;
  2966. height: 46px;
  2967. line-height: 46px;
  2968. box-sizing: border-box;
  2969. }
  2970. .statebox div + div {
  2971. margin-left: 20px;
  2972. }
  2973. .statebox div span {
  2974. font-size: 16px;
  2975. display: flex;
  2976. align-items: center;
  2977. }
  2978. .statebox div span + span {
  2979. margin-left: 10px;
  2980. color: #1463eb;
  2981. }
  2982. .p_tool_box {
  2983. display: flex;
  2984. flex-wrap: wrap;
  2985. /* color: #fff; */
  2986. padding: 0 15px 10px;
  2987. align-items: center;
  2988. justify-content: space-evenly;
  2989. border-radius: 5px;
  2990. height: 200px;
  2991. overflow: auto;
  2992. max-width: 150px;
  2993. }
  2994. .p_tool {
  2995. display: flex;
  2996. margin-top: 10px;
  2997. }
  2998. .p_tool > div {
  2999. display: flex;
  3000. flex-direction: column;
  3001. align-items: center;
  3002. min-width: 60px;
  3003. }
  3004. .p_tool > div img {
  3005. width: 50px;
  3006. height: 50px;
  3007. }
  3008. .p_tool > div > div {
  3009. margin-top: 5px;
  3010. font-size: 12px;
  3011. }
  3012. .p_tool_box2 {
  3013. padding: 10px 15px;
  3014. }
  3015. .p_tool2 {
  3016. margin-right: 20px;
  3017. display: flex;
  3018. flex-direction: column;
  3019. align-items: flex-start;
  3020. /* margin-bottom: 10px; */
  3021. }
  3022. .p_tool2 > div:nth-child(1) {
  3023. margin-bottom: 10px;
  3024. }
  3025. .toolBigBox {
  3026. display: flex;
  3027. flex-direction: column;
  3028. }
  3029. .toolSta {
  3030. display: flex;
  3031. margin: 20px 0 0;
  3032. }
  3033. .toolSta > div {
  3034. display: flex;
  3035. }
  3036. .toolSta > div + div {
  3037. margin-left: 50px;
  3038. }
  3039. .toolSta > div > div:nth-child(1) {
  3040. margin: 10px 10px 0 0;
  3041. }
  3042. .blueBtn {
  3043. background: #61a0f5;
  3044. color: #fff;
  3045. display: flex;
  3046. padding: 10px 15px;
  3047. /* min-width: 150px; */
  3048. min-width: 165px;
  3049. font-size: 16px;
  3050. align-items: center;
  3051. border-radius: 5px;
  3052. }
  3053. .toolSta > div > div:nth-child(2) > div + div {
  3054. margin-top: 10px;
  3055. }
  3056. .toolSta > div > div:nth-child(2) > div > div + div {
  3057. margin: 0 20px;
  3058. }
  3059. .p_tool2 .toolbox {
  3060. display: flex;
  3061. align-items: center;
  3062. margin-top: 10px;
  3063. }
  3064. .p_tool2 .toolbox > div {
  3065. font-size: 16px;
  3066. font-weight: bold;
  3067. }
  3068. .checkBox {
  3069. display: flex;
  3070. padding: 20px 0 0 20px;
  3071. box-sizing: border-box;
  3072. width: 100%;
  3073. }
  3074. .checkBox span {
  3075. padding: 0 5px 5px;
  3076. cursor: pointer;
  3077. font-size: 18px;
  3078. font-weight: 400;
  3079. }
  3080. .checkBox span + span {
  3081. margin-left: 20px;
  3082. }
  3083. .checkBox .active {
  3084. border-bottom: 3px solid #3681fc;
  3085. color: #3681fc;
  3086. font-weight: bold;
  3087. }
  3088. .detail_box {
  3089. background-color: #f0f4fa;
  3090. padding: 15px 20px;
  3091. box-sizing: border-box;
  3092. width: 100%;
  3093. border-radius: 12px;
  3094. }
  3095. .detail_box + .detail_box {
  3096. margin-top: 20px;
  3097. }
  3098. .detail_box .title {
  3099. display: flex;
  3100. align-items: center;
  3101. }
  3102. .detail_box .title > span:nth-child(1) {
  3103. font-size: 18px;
  3104. display: flex;
  3105. align-items: center;
  3106. font-weight: 400;
  3107. color: #0e1e33;
  3108. }
  3109. .detail_box .box {
  3110. margin-top: 20px;
  3111. border-radius: 5px;
  3112. /* width: 100%; */
  3113. box-sizing: border-box;
  3114. overflow: auto;
  3115. }
  3116. .progress {
  3117. display: -webkit-box;
  3118. display: -ms-flexbox;
  3119. width: 100%;
  3120. overflow: auto;
  3121. }
  3122. .chapter {
  3123. margin-right: 30px;
  3124. min-width: 180px;
  3125. background-color: #fff;
  3126. border-radius: 12px;
  3127. }
  3128. .chapter + .chapter {
  3129. padding-left: 10px;
  3130. border-left: 1px solid rgb(220, 220, 220);
  3131. }
  3132. .chapter .stage {
  3133. width: 100%;
  3134. color: #fff;
  3135. background: linear-gradient(90deg, #477cd7, #65b9fc);
  3136. border-radius: 5px;
  3137. height: 50px;
  3138. line-height: 50px;
  3139. font-size: 18px;
  3140. text-align: center;
  3141. min-width: 180px;
  3142. }
  3143. .chapter .task {
  3144. display: flex;
  3145. width: 100%;
  3146. min-width: 180px;
  3147. padding-top: 15px;
  3148. }
  3149. .chapter .task .taskBox {
  3150. min-width: 180px;
  3151. height: 100%;
  3152. }
  3153. .borderRight {
  3154. border-right: 1px solid #eceef7;
  3155. }
  3156. .chapter .task .taskBox + .taskBox {
  3157. margin-left: 10px;
  3158. }
  3159. .chapter .task .taskBox .taskName {
  3160. text-align: center;
  3161. margin: 10px 0 10px 10px;
  3162. display: flex;
  3163. flex-direction: row;
  3164. flex-wrap: nowrap;
  3165. align-items: center;
  3166. min-width: 180px;
  3167. width: 100%;
  3168. }
  3169. /* .toolIcon::before {
  3170. content: "";
  3171. width: 26px;
  3172. height: 26px;
  3173. display: inline-block;
  3174. background-image: url(../assets/icon/toolion.png);
  3175. background-size: 100% 100%;
  3176. }
  3177. .toolIcon::before {
  3178. content: "";
  3179. width: 26px;
  3180. height: 26px;
  3181. display: inline-block;
  3182. background-image: url(../assets/icon/toolion.png);
  3183. background-size: 100% 100%;
  3184. }
  3185. .taskIcon::before {
  3186. content: "";
  3187. width: 26px;
  3188. height: 26px;
  3189. display: inline-block;
  3190. background-image: url(../assets/icon/task.png);
  3191. background-size: 100% 100%;
  3192. }
  3193. .finishIcon::before {
  3194. content: "";
  3195. width: 26px;
  3196. height: 26px;
  3197. display: inline-block;
  3198. background-image: url(../assets/icon/finish.png);
  3199. background-size: 100% 100%;
  3200. } */
  3201. .learningIcon {
  3202. color: #fe9999;
  3203. }
  3204. /* .learningIcon::before {
  3205. content: "";
  3206. width: 22px;
  3207. height: 22px;
  3208. display: inline-block;
  3209. background-image: url(../assets/icon/learning.png);
  3210. background-size: 100% 100%;
  3211. }
  3212. .frequencyIcon::before {
  3213. content: "";
  3214. width: 26px;
  3215. height: 26px;
  3216. display: inline-block;
  3217. background-image: url(../assets/icon/frequency.png);
  3218. background-size: 100% 100%;
  3219. }
  3220. .timeIcon::before {
  3221. content: "";
  3222. width: 26px;
  3223. height: 26px;
  3224. display: inline-block;
  3225. background-image: url(../assets/icon/time.png);
  3226. background-size: 100% 100%;
  3227. } */
  3228. .chapter_time_box {
  3229. border-left: 5px solid #f0f0f0;
  3230. padding: 0 30px;
  3231. box-sizing: border-box;
  3232. margin-top: 35px;
  3233. }
  3234. .c_box {
  3235. padding-top: 40px;
  3236. position: relative;
  3237. margin-top: 45px;
  3238. }
  3239. .c_box .stage_box {
  3240. display: flex;
  3241. align-items: center;
  3242. position: absolute;
  3243. top: -20px;
  3244. left: -45px;
  3245. }
  3246. .c_box .stage_box .yuan {
  3247. width: 25px;
  3248. height: 25px;
  3249. background: rgb(244, 244, 244);
  3250. border-radius: 25px;
  3251. display: flex;
  3252. align-items: center;
  3253. justify-content: center;
  3254. margin-right: 10px;
  3255. }
  3256. .bgCss::before {
  3257. background: #ccc !important;
  3258. }
  3259. .c_box .stage_box .yuan::before {
  3260. content: "";
  3261. width: 15px;
  3262. height: 15px;
  3263. background: rgb(59, 149, 238);
  3264. border-radius: 25px;
  3265. }
  3266. .c_box .stage_box .stage {
  3267. background: linear-gradient(90deg, #478bff, #65b9fc);
  3268. border-radius: 5px;
  3269. height: 50px;
  3270. line-height: 50px;
  3271. font-size: 18px;
  3272. color: #fff;
  3273. width: fit-content;
  3274. padding: 0 20px;
  3275. }
  3276. .s_up {
  3277. cursor: pointer;
  3278. transition: all 0.5s;
  3279. }
  3280. .s_up img {
  3281. width: 35px;
  3282. }
  3283. .s_up2 {
  3284. transform: rotate(90deg);
  3285. }
  3286. .lineBox {
  3287. width: 5px;
  3288. height: 20px;
  3289. background-image: linear-gradient(180deg, #3c65ba, #a1c6ec);
  3290. margin-right: 5px;
  3291. }
  3292. .disCss {
  3293. display: flex;
  3294. flex-direction: row;
  3295. flex-wrap: nowrap;
  3296. align-items: center;
  3297. }
  3298. .disCss > div {
  3299. margin: 10px 10px 0 0;
  3300. }
  3301. .titleCss {
  3302. max-width: 100px;
  3303. white-space: nowrap;
  3304. overflow: hidden;
  3305. text-overflow: ellipsis;
  3306. word-break: break-word;
  3307. margin-left: 10px;
  3308. font-size: 16px;
  3309. font-weight: bold;
  3310. color: #0e1e33;
  3311. }
  3312. .navIndex {
  3313. font-weight: bold;
  3314. color: #0e1e33;
  3315. font-size: 14px;
  3316. }
  3317. .stageCss {
  3318. cursor: pointer;
  3319. display: flex;
  3320. flex-direction: row;
  3321. flex-wrap: nowrap;
  3322. justify-content: center;
  3323. align-items: center;
  3324. border-bottom: 1px solid #e7ebf1;
  3325. }
  3326. .disabled {
  3327. background: rgba(210, 210, 210, 1);
  3328. }
  3329. .teaClass {
  3330. display: flex;
  3331. flex-direction: row;
  3332. flex-wrap: nowrap;
  3333. align-items: center;
  3334. }
  3335. .teaClass > div:nth-child(1) {
  3336. min-width: 90px;
  3337. }
  3338. .diy_sk >>> .el-dialog {
  3339. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  3340. border-radius: 18px 18px 18px 18px;
  3341. }
  3342. .diy_sk >>> .el-dialog__title {
  3343. font-size: 16px;
  3344. font-weight: bold;
  3345. color: #0e1e33;
  3346. }
  3347. .diy_sk >>> .el-dialog__body {
  3348. padding: 0 20px 15px 20px;
  3349. }
  3350. .classBox {
  3351. display: flex;
  3352. flex-direction: row;
  3353. flex-wrap: wrap;
  3354. justify-content: flex-start;
  3355. align-items: flex-start;
  3356. min-height: 300px;
  3357. max-height: 500px;
  3358. overflow: auto;
  3359. align-content: flex-start;
  3360. margin-bottom: 15px;
  3361. }
  3362. .classBox > div {
  3363. width: 106px;
  3364. height: 32px;
  3365. background: #3681fc;
  3366. border-radius: 4px;
  3367. font-weight: 400;
  3368. color: #fff;
  3369. font-size: 14px;
  3370. text-align: center;
  3371. line-height: 32px;
  3372. margin: 0 8px 8px 0;
  3373. cursor: pointer;
  3374. }
  3375. .cancelDiy {
  3376. width: 102px;
  3377. height: 36px;
  3378. background: #e7ebf1;
  3379. border-radius: 4px;
  3380. font-size: 14px;
  3381. font-weight: 400;
  3382. color: #717c8d;
  3383. text-align: center;
  3384. line-height: 32px;
  3385. margin: 0 auto;
  3386. cursor: pointer;
  3387. }
  3388. .confirmButtonClass{
  3389. background-color: #1463eb !important;
  3390. border-color: #1463eb !important;
  3391. }
  3392. .r_pub_button_op{
  3393. color: #448bff;
  3394. font-size: 14px;
  3395. cursor: pointer;
  3396. display: flex;
  3397. align-items: center;
  3398. justify-content: center;
  3399. }
  3400. .r_pub_button_op::before {
  3401. content: "";
  3402. width: 14px;
  3403. height: 14px;
  3404. min-width: 14px;
  3405. min-height: 14px;
  3406. background-size: 100% 100%;
  3407. display: block;
  3408. margin-right: 7px;
  3409. background-image: url(../assets/icon/u_op.png);
  3410. }
  3411. </style>