courseDetail.vue 97 KB

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