liveProjectDetail.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048
  1. <template>
  2. <div
  3. style="
  4. background: rgb(230, 234, 240);
  5. width: 100%;
  6. margin: 0;
  7. position: relate;
  8. height: 100%;
  9. "
  10. >
  11. <div class="blackBottom">
  12. <div
  13. style="
  14. display: flex;
  15. flex-direction: row;
  16. flex-wrap: nowrap;
  17. align-items: stretch;
  18. padding-left: 10px;
  19. "
  20. >
  21. <div class="logoLive">
  22. <img src="../assets/icon/logo.png" alt />
  23. </div>
  24. <div style="color: #fff; line-height: 45px; padding-left: 15px">
  25. introduce a festival (Final)
  26. </div>
  27. </div>
  28. </div>
  29. <div class="isNoOther">
  30. <div
  31. class="imgMiddle"
  32. :class="isBlock > 0 ? 'imghalf' : 'imgMiddle'"
  33. v-show="!full"
  34. >
  35. <pdf
  36. :pdfUrl="pdfUrl"
  37. style="width: 100%; height: 100%"
  38. :ppage="ppage"
  39. @getPageTotal="getPageTotal"
  40. ></pdf>
  41. </div>
  42. <div
  43. style="
  44. background: #d0d6e4;
  45. width: 40%;
  46. height: 100%;
  47. max-width: 40%;
  48. overflow: auto;
  49. "
  50. :class="{ fullStyle: full }"
  51. v-if="isBlock > 0"
  52. >
  53. <div
  54. style="
  55. background: #fff;
  56. width: 96%;
  57. margin: 10px auto;
  58. height: 96%;
  59. position: relative;
  60. "
  61. >
  62. <div
  63. style="color: #bfbfbf; padding: 15px 0 15px 25px; font-size: 20px"
  64. v-if="isBlock == 3"
  65. >
  66. 课堂评价
  67. </div>
  68. <div
  69. style="color: #bfbfbf; padding: 15px 0 15px 25px; font-size: 20px"
  70. v-if="isBlock == 8"
  71. >
  72. 根据题目选择对应的答案
  73. </div>
  74. <div
  75. style="
  76. margin-left: 25px;
  77. border-bottom: 3px solid #2c83ee;
  78. width: 70px;
  79. padding-bottom: 3px;
  80. text-align: center;
  81. padding-top: 15px;
  82. "
  83. v-if="isBlock == 1"
  84. >
  85. 开始答题
  86. </div>
  87. <div class="answerBox" v-if="isBlock == 1">
  88. <div class="answerBox">
  89. <div
  90. style="
  91. display: flex;
  92. flex-direction: column;
  93. flex-wrap: wrap;
  94. align-items: center;
  95. justify-content: center;
  96. "
  97. v-for="item in 1"
  98. :key="item"
  99. >
  100. <div class="choose_style">
  101. <span
  102. @click="isChooseActive(1)"
  103. :class="typeC.indexOf(1) != -1 ? 'isChoose' : ''"
  104. >A</span
  105. >
  106. <span
  107. @click="isChooseActive(2)"
  108. :class="typeC.indexOf(2) != -1 ? 'isChoose' : ''"
  109. >B</span
  110. >
  111. <span
  112. @click="isChooseActive(3)"
  113. :class="typeC.indexOf(3) != -1 ? 'isChoose' : ''"
  114. >C</span
  115. >
  116. <span
  117. @click="isChooseActive(4)"
  118. :class="typeC.indexOf(4) != -1 ? 'isChoose' : ''"
  119. >D</span
  120. >
  121. </div>
  122. <el-button style="margin: 0 auto" @click="showMember(item)"
  123. >提交</el-button
  124. >
  125. </div>
  126. </div>
  127. </div>
  128. <div
  129. class="answerBox tools_box"
  130. v-if="isBlock == 4"
  131. style="padding: 10px 0 0 25px; width: 100%; max-width: 100%"
  132. >
  133. <div style="color: #d1d1d1; font-size: 24px">课堂实践</div>
  134. <div
  135. style="
  136. margin: 20px 0 20px 0;
  137. border-bottom: 4px solid #3e86f3;
  138. width: 75px;
  139. text-align: center;
  140. padding-bottom: 3px;
  141. "
  142. >
  143. 选择工具
  144. </div>
  145. <div
  146. style="
  147. display: flex;
  148. flex-direction: row;
  149. flex-wrap: wrap;
  150. width: 100%;
  151. justify-content: flex-start;
  152. align-items: center;
  153. "
  154. >
  155. <div
  156. v-if="
  157. tools[ppage - 1].tools &&
  158. tools[ppage - 1].tools.indexOf(1) != -1
  159. "
  160. @click="checkTools(1)"
  161. class="toolCss"
  162. >
  163. <div class="toolImg">
  164. <img src="../assets/icon/secondToolList/whiteBoard.png" alt />
  165. <div>电子白板</div>
  166. </div>
  167. </div>
  168. <div
  169. v-if="
  170. tools[ppage - 1].tools &&
  171. tools[ppage - 1].tools.indexOf(3) != -1
  172. "
  173. @click="checkTools(3)"
  174. class="toolCss"
  175. >
  176. <div class="toolImg">
  177. <img
  178. src="../assets/icon/secondToolList/mindMapping.png"
  179. alt
  180. />
  181. <div>思维导图</div>
  182. </div>
  183. </div>
  184. <div
  185. v-if="
  186. tools[ppage - 1].tools &&
  187. tools[ppage - 1].tools.indexOf(28) != -1
  188. "
  189. @click="checkTools(28)"
  190. class="toolCss"
  191. >
  192. <div class="toolImg">
  193. <img src="../assets/icon/thirdToolList/translation.png" alt />
  194. <div>翻译</div>
  195. </div>
  196. </div>
  197. <div
  198. v-if="
  199. tools[ppage - 1].tools &&
  200. tools[ppage - 1].tools.indexOf(4) != -1
  201. "
  202. @click="checkTools(4)"
  203. class="toolCss"
  204. >
  205. <div class="toolImg">
  206. <img src="../assets/icon/thirdToolList/ask.png" alt />
  207. <div>问卷调查</div>
  208. </div>
  209. </div>
  210. <div
  211. v-if="
  212. tools[ppage - 1].tools &&
  213. tools[ppage - 1].tools.indexOf(6) != -1
  214. "
  215. @click="checkTools(6)"
  216. class="toolCss"
  217. >
  218. <div class="toolImg">
  219. <img src="../assets/icon/secondToolList/doc.png" alt />
  220. <div>协同文档</div>
  221. </div>
  222. </div>
  223. <div
  224. v-if="
  225. tools[ppage - 1].tools &&
  226. tools[ppage - 1].tools.indexOf(7) != -1
  227. "
  228. @click="checkTools(7)"
  229. class="toolCss"
  230. >
  231. <div class="toolImg">
  232. <img
  233. src="../assets/icon/secondToolList/mindNetwork.png"
  234. alt
  235. />
  236. <div>思维网格</div>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. <div
  242. class="answerBox"
  243. style="height: 100%"
  244. v-if="isBlock == 2"
  245. ref="qrcodePicture"
  246. >
  247. <div style="height: 100%; width: 100%">
  248. <div v-if="toolCount == 1" class="tools_child_box">
  249. <div class="tools_title">
  250. <span>电子白板</span>
  251. <div>
  252. <img
  253. src="../assets/full.png"
  254. class="full"
  255. @click="fullTools"
  256. />
  257. </div>
  258. </div>
  259. <iframe
  260. webkitallowfullscreen=''
  261. mozallowfullscreen=''
  262. allowfullscreen=''
  263. style="width: 100%; height: 100%; border: none"
  264. src="https://iwb.cocorobo.cn/"
  265. ref="whiteBoard"
  266. ></iframe>
  267. </div>
  268. <div v-if="toolCount == 3" class="tools_child_box">
  269. <div class="tools_title">
  270. <span>思维导图</span>
  271. <div>
  272. <img
  273. src="../assets/full.png"
  274. class="full"
  275. @click="fullTools"
  276. />
  277. </div>
  278. </div>
  279. <iframe
  280. webkitallowfullscreen=''
  281. mozallowfullscreen=''
  282. allowfullscreen=''
  283. style="width: 100%; height: 100%; border: none"
  284. src="//cloud.cocorobo.cn/mind/"
  285. ref="mind"
  286. ></iframe>
  287. </div>
  288. <div v-if="toolCount == 28" class="tools_child_box">
  289. <div class="tools_title">
  290. <span>翻译</span>
  291. <div>
  292. <img
  293. src="../assets/full.png"
  294. class="full"
  295. @click="fullTools"
  296. />
  297. </div>
  298. </div>
  299. <iframe
  300. webkitallowfullscreen=''
  301. mozallowfullscreen=''
  302. allowfullscreen=''
  303. style="width: 100%; height: 100%; border: none"
  304. src="//dict.youdao.com/"
  305. ref="mind"
  306. ></iframe>
  307. </div>
  308. <div v-if="toolCount == 6" class="tools_child_box">
  309. <div class="tools_title">
  310. <span>协同文档</span>
  311. <div>
  312. <img
  313. src="../assets/full.png"
  314. class="full"
  315. @click="fullTools"
  316. />
  317. </div>
  318. </div>
  319. <iframe
  320. webkitallowfullscreen=''
  321. mozallowfullscreen=''
  322. allowfullscreen=''
  323. style="width: 100%; height: 100%; border: none"
  324. src="https://cloud.cocorobo.cn/Office/Word/WordEditArea.htm"
  325. ></iframe>
  326. </div>
  327. <div v-if="toolCount == 7" class="tools_child_box">
  328. <div class="tools_title">
  329. <span>思维网格</span>
  330. <div>
  331. <img
  332. src="../assets/full.png"
  333. class="full"
  334. @click="fullTools"
  335. />
  336. </div>
  337. </div>
  338. <iframe
  339. webkitallowfullscreen=''
  340. mozallowfullscreen=''
  341. allowfullscreen=''
  342. style="width: 100%; height: 100%; border: none"
  343. src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid"
  344. ref="grid"
  345. ></iframe>
  346. </div>
  347. <div
  348. id="shishi_loading"
  349. style="
  350. width: 100%;
  351. height: 100%;
  352. background: #0000008f;
  353. position: absolute;
  354. top: 0;
  355. left: 0;
  356. z-index: 99999999999999;
  357. display: none;
  358. justify-content: center;
  359. align-items: center;
  360. "
  361. >
  362. <div
  363. style="
  364. color: #fff;
  365. padding: 15px;
  366. background: #00000070;
  367. border-radius: 5px;
  368. font-size: 18px;
  369. display: flex;
  370. align-items: center;
  371. "
  372. >
  373. <img
  374. src="https://pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif"
  375. alt
  376. style="width: 26px; margin-right: 10px"
  377. />
  378. <span>上传中...</span>
  379. </div>
  380. </div>
  381. <div class="nextStepBox">
  382. <div class="nextStepOne" @click="(isBlock = 4), (full = false)">
  383. 返回
  384. </div>
  385. </div>
  386. <div
  387. class="nextStepOne"
  388. style="float: right"
  389. @click="addJtWork(4)"
  390. v-if="toolCount == 1 || toolCount == 3 || toolCount == 7"
  391. >
  392. 截图
  393. </div>
  394. <!-- <div
  395. class="nextStepOne"
  396. style="float: right"
  397. @click="addImg($event)"
  398. v-if="toolCount == 1 || toolCount == 3 || toolCount == 7"
  399. >
  400. 上传文件
  401. <input
  402. type="file"
  403. accept="image/png, image/gif, image/jpeg"
  404. style="display: none"
  405. @change="beforeUpload1($event, 1)"
  406. />
  407. </div> -->
  408. </div>
  409. </div>
  410. <div
  411. class="answerBox"
  412. v-if="
  413. isBlock == 3 &&
  414. tools[ppage - 1].tools &&
  415. tools[ppage - 1].tools.indexOf(14) != -1
  416. "
  417. style="padding: 0 0 0 25px"
  418. >
  419. <div>
  420. <div class="score_box">
  421. <span>聚焦主题</span>
  422. <el-rate v-model="rateList.ca"></el-rate>
  423. </div>
  424. <div class="score_box">
  425. <span>有开头结尾</span>
  426. <el-rate v-model="rateList.sia"></el-rate>
  427. </div>
  428. <div class="score_box">
  429. <span>语言正确,流畅</span>
  430. <el-rate v-model="rateList.zia"></el-rate>
  431. </div>
  432. <div class="score_box">
  433. <span>书写规范,美观</span>
  434. <el-rate v-model="rateList.qia"></el-rate>
  435. </div>
  436. </div>
  437. <!-- <div>
  438. <div style="padding-bottom: 15px; sont-size: 14px">备注</div>
  439. <div class="bz">
  440. <el-input
  441. type="textarea"
  442. placeholder="请输入备注…"
  443. :rows="6"
  444. resize="none"
  445. v-model="rateList.content"
  446. ></el-input>
  447. </div>
  448. </div>-->
  449. <span
  450. slot="footer"
  451. class="dialog-footer sztFooter"
  452. style="
  453. padding: 0 0 30px 0px;
  454. position: absolute;
  455. right: 20px;
  456. bottom: 0;
  457. "
  458. >
  459. <!-- <el-button @click="isBlock = 0">取消</el-button> -->
  460. <el-button type="primary" @click="addWork(6)">确定</el-button>
  461. </span>
  462. </div>
  463. <div
  464. class="answerBox"
  465. v-if="
  466. isBlock == 8 &&
  467. tools[ppage - 1].tools &&
  468. tools[ppage - 1].tools.indexOf(27) != -1
  469. "
  470. style="padding: 0 0 0 25px"
  471. >
  472. <div>
  473. <div v-for="(tk, tIndex) in 7" :key="tIndex" class="tkCss">
  474. <div style="margin-right: 10px; font-size: 18px">
  475. {{ tIndex + 1 }}、
  476. </div>
  477. <el-select v-model="tkAnswer[tIndex]" placeholder="请选择答案">
  478. <el-option
  479. v-for="(tkA, tkAIndex) in tkAnswerBox"
  480. :key="tkAIndex"
  481. :label="tkA"
  482. :value="tkA"
  483. ></el-option>
  484. </el-select>
  485. </div>
  486. </div>
  487. <span
  488. slot="footer"
  489. class="dialog-footer sztFooter"
  490. style="
  491. padding: 0 0 30px 0px;
  492. position: absolute;
  493. right: 20px;
  494. bottom: 0;
  495. "
  496. >
  497. <el-button @click="isBlock = 0">取消</el-button>
  498. <el-button type="primary" @click="addWork(5)">提交</el-button>
  499. </span>
  500. </div>
  501. <div
  502. class="answerBox"
  503. v-if="isBlock == 5"
  504. style="padding: 10px 0 0 25px"
  505. >
  506. <div style="color: #d1d1d1; font-size: 24px">课堂实践</div>
  507. <div
  508. style="
  509. margin: 20px 0 20px 0;
  510. border-bottom: 4px solid #3e86f3;
  511. width: 75px;
  512. text-align: center;
  513. padding-bottom: 3px;
  514. "
  515. >
  516. 选择附件
  517. </div>
  518. <div
  519. style="
  520. display: flex;
  521. flex-direction: row;
  522. flex-wrap: wrap;
  523. width: 100%;
  524. justify-content: flex-start;
  525. align-items: center;
  526. "
  527. >
  528. <div
  529. v-if="tools[ppage - 1].file && tools[ppage - 1].file.length"
  530. class="fileBox"
  531. >
  532. <div
  533. class="fileListCss"
  534. v-for="(v, vIndex) in videoList"
  535. :key="vIndex"
  536. >
  537. <div class="fileCss" @click="playVideo(v.src, vIndex)">
  538. <img src="../assets/uploadMp4.png" alt />
  539. </div>
  540. <div>{{ v.name }}</div>
  541. </div>
  542. <div
  543. class="fileListCss"
  544. v-for="(f, fIndex) in fileList"
  545. :key="fIndex"
  546. >
  547. <div class="fileCss" @click="openFile(f.src)">
  548. <img src="../assets/file.png" alt />
  549. </div>
  550. <div>{{ f.name }}</div>
  551. </div>
  552. </div>
  553. </div>
  554. <!-- <div class="nextStepBox">
  555. <div class="nextStepOne" @click="isBlock = 0">关闭</div>
  556. </div> -->
  557. </div>
  558. <div
  559. class="answerBox"
  560. :class="{ fullStyle: full }"
  561. v-if="isBlock == 6"
  562. >
  563. <div style="height: 70%; width: 100%">
  564. <div class="wheel">
  565. <div class="workd_media" style="height: 100%">
  566. <video-player
  567. class="video-player vjs-custom-skin"
  568. :playsinline="true"
  569. :options="playerO[videoindex]"
  570. @play="onPlayerPlay($event)"
  571. style="width: 90%; height: 100%; margin: 0 0 0 30px"
  572. ></video-player>
  573. </div>
  574. </div>
  575. <!-- <div class="nextStepBox" style="margin-top: 5%">
  576. <div class="nextStepOne" @click="isBlock = 0">关闭</div>
  577. </div> -->
  578. </div>
  579. </div>
  580. <div
  581. class="answerBox"
  582. style="height: 100%"
  583. :class="{ fullStyle: full }"
  584. v-if="isBlock == 7"
  585. >
  586. <div style="height: 70%; width: 100%">
  587. <div class="wheel" style="height: 520px; width: 100%">
  588. <iframe
  589. style="width: 100%; height: 100%; border: none"
  590. :src="pptImgUrl"
  591. ></iframe>
  592. </div>
  593. <div class="nextStepBox" style="margin-top: 5%">
  594. <div class="nextStepOne" @click="isBlock = 5">返回</div>
  595. </div>
  596. </div>
  597. </div>
  598. <div
  599. class="answerBox"
  600. :class="{ fullStyle: full }"
  601. v-if="isBlock == 9"
  602. >
  603. <div style="height: 70%; width: 100%">
  604. <div class="wheel">
  605. <div class="workd_media" style="height: 100%">
  606. <audio
  607. style="margin: 0 auto; display: block"
  608. :src="audioUrl"
  609. controls="controls"
  610. ref="audio"
  611. >
  612. Your browser does not support the audio element.
  613. </audio>
  614. </div>
  615. </div>
  616. <!-- <div class="nextStepBox" style="margin-top: 5%">
  617. <div class="nextStepOne" @click="isBlock = 0">关闭</div>
  618. </div> -->
  619. </div>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. <div class="blackBottomB">
  625. <div
  626. class="nextStepOne"
  627. style="float: right"
  628. @click="addImg($event)"
  629. v-if="
  630. tools[ppage - 1].tools && tools[ppage - 1].tools.indexOf(16) != -1
  631. "
  632. >
  633. 上传文件
  634. <input
  635. type="file"
  636. accept="image/png, image/gif, image/jpeg"
  637. style="display: none"
  638. @change="beforeUpload1($event, 1)"
  639. />
  640. </div>
  641. </div>
  642. <div v-if="proVisible" class="mask">
  643. <div class="progressBox">
  644. <div class="lbox">
  645. <img src="../assets/loading.gif" />上传中,请稍后
  646. </div>
  647. <el-progress
  648. :text-inside="true"
  649. :stroke-width="20"
  650. :percentage="progress"
  651. style="width: 80%"
  652. ></el-progress>
  653. </div>
  654. </div>
  655. <el-dialog
  656. :visible.sync="dialogVisible"
  657. :append-to-body="true"
  658. width="500px"
  659. :before-close="handleClose"
  660. class="dialog_diy"
  661. >
  662. <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
  663. 提交成功
  664. </div>
  665. <div
  666. style="
  667. width: 200px;
  668. background: #4d8ae0;
  669. height: 35px;
  670. margin: 0 auto;
  671. text-align: center;
  672. line-height: 35px;
  673. color: #fff;
  674. border-radius: 5px;
  675. cursor: pointer;
  676. "
  677. @click="dialogVisible = false"
  678. >
  679. 确定
  680. </div>
  681. </el-dialog>
  682. <el-dialog
  683. :visible.sync="dialogVisiblePick"
  684. :append-to-body="true"
  685. width="500px"
  686. class="dialog_diy"
  687. >
  688. <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
  689. 你被老师点名起来回答了!!!
  690. </div>
  691. <div
  692. style="
  693. width: 200px;
  694. background: #4d8ae0;
  695. height: 35px;
  696. margin: 0 auto;
  697. text-align: center;
  698. line-height: 35px;
  699. color: #fff;
  700. border-radius: 5px;
  701. cursor: pointer;
  702. "
  703. @click="pick"
  704. >
  705. 确定
  706. </div>
  707. </el-dialog>
  708. <div v-html="iframeInnerHtml" ref="iframeIh" class="iframeBox"></div>
  709. </div>
  710. </template>
  711. <script>
  712. import pdf from "./components/pdf";
  713. import html2canvas from "html2canvas";
  714. export default {
  715. components: {
  716. pdf,
  717. },
  718. data() {
  719. return {
  720. iframeInnerHtml: "",
  721. pdfUrl:
  722. "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E4%B8%8A%E8%AF%BE%E8%AF%BE%E4%BB%B6---%E4%BA%94%E4%B8%8Bintroduce%20a%20festival%20%28Final%20%29_202208251543361661413469082.pdf",
  723. pptImgUrl: "",
  724. ppage: 2,
  725. full: false,
  726. pageTotal: 0,
  727. howTools: 0,
  728. toolsList: [],
  729. timer: null,
  730. isLoading: false,
  731. formLabelWidth: "100px",
  732. userid: this.$route.query.userid,
  733. cid: this.$route.query.courseId,
  734. oid: this.$route.query.oid,
  735. mr: require("../assets/kc1.png"),
  736. timu: [],
  737. dialogVisible: false,
  738. dialogVisiblePick: false,
  739. answerBox: "",
  740. isNoHomeWork: false,
  741. answer: [
  742. { name: "A.1568" },
  743. { name: "B.720" },
  744. { name: "C.1728" },
  745. { name: "D.480" },
  746. ],
  747. steps: 0,
  748. isBlock: 0,
  749. isNext: false,
  750. isAnswer: false,
  751. upload: [
  752. {
  753. url: "",
  754. },
  755. ],
  756. noneBtnImg: false,
  757. proVisible: false,
  758. progress: 0,
  759. typeC: [],
  760. toolCount: 0,
  761. tools: [
  762. "",
  763. // {
  764. // file: [
  765. // {
  766. // name: "音频1.MP3",
  767. // src: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E6%9F%B3%E8%BD%BB%E9%A2%82%20-%20%E6%BA%AF%EF%BC%88%E9%92%A2%E7%90%B4%E7%89%88%EF%BC%891661673251415.mp3",
  768. // },
  769. // ],
  770. // }
  771. "",
  772. {
  773. file: [
  774. {
  775. name: "视频1.mp4",
  776. src: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AA%92%E4%BD%9311661413782505.mp4",
  777. },
  778. ],
  779. },
  780. { tools: [9] }, //问答题
  781. { tools: [9] },
  782. { tools: [9] }, //协同文档
  783. { tools: [9] }, //思维导图
  784. { tools: [9] },
  785. { tools: [9] },
  786. { tools: [12] },
  787. { tools: [27] },
  788. {
  789. file: [
  790. {
  791. name: "视频2.mp4",
  792. src: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AA%92%E4%BD%9321661413797366.mp4",
  793. },
  794. ],
  795. },
  796. { tools: [9] },
  797. "",
  798. { tools: [3, 28] },
  799. { tools: [16] },
  800. { tools: [14] },
  801. "",
  802. "",
  803. "",
  804. "",
  805. "",
  806. //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价 15、问答 16、作业提交 17、学习资料 18、训练平台 19、目标管理 20、课程设计 21、编程平台 22、AI体验 23、python 24、AI平台
  807. ],
  808. rateList: {
  809. ca: 0,
  810. sia: 0,
  811. zia: 0,
  812. qia: 0,
  813. content: "",
  814. },
  815. tkAnswerBox: [
  816. "Feelings",
  817. "Weather",
  818. "Activities before the festival",
  819. "Origin",
  820. "Food",
  821. "Time",
  822. "ctivities during the festival",
  823. "Reason",
  824. ],
  825. tkAnswer: [],
  826. imgUrl: "",
  827. imgFile: "",
  828. imgFileUp: [],
  829. videoList: [],
  830. videoList2: [],
  831. audioUrl: "",
  832. fileList: [],
  833. playerOptions: {
  834. playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
  835. autoplay: false, //如果true,浏览器准备好时开始回放。
  836. muted: false, // 默认情况下将会消除任何音频。
  837. loop: false, // 导致视频一结束就重新开始。
  838. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  839. language: "zh-CN",
  840. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  841. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  842. sources: [
  843. {
  844. type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 || "video/ogg"|| "video/webm"
  845. src: "", //url地址require("../../assets/media/aaa.mp4")
  846. },
  847. ],
  848. // poster: require("../../assets/tu31.png"), //你的封面地址
  849. // poster: dataRes.imgUrl, //你的封面地址
  850. notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
  851. controlBar: {
  852. timeDivider: true, //当前时间和持续时间的分隔符
  853. durationDisplay: true, //显示持续时间
  854. remainingTimeDisplay: false, //是否显示剩余时间功能
  855. fullscreenToggle: true, //全屏按钮
  856. },
  857. },
  858. playerO: {},
  859. videoindex: 0,
  860. };
  861. },
  862. methods: {
  863. change(val) {
  864. console.log(val);
  865. },
  866. goTo(path) {
  867. this.$router.push(path);
  868. },
  869. tableRowClassName({ row, rowIndex }) {
  870. if ((rowIndex + 1) % 2 === 0) {
  871. return "even_row";
  872. } else {
  873. return "";
  874. }
  875. },
  876. jump(cid) {
  877. window.parent.postMessage({ cid: cid, type: "1" }, "*");
  878. },
  879. handleCurrentChange(val) {
  880. // console.log(`当前页: ${val}`);
  881. this.page = val;
  882. },
  883. init() {},
  884. handleClose(done) {
  885. done();
  886. },
  887. handleRemove(file, fileList) {
  888. console.log(file, fileList);
  889. },
  890. onExceed() {
  891. this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
  892. },
  893. //uuid生成
  894. guid() {
  895. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
  896. /[xy]/g,
  897. function (c) {
  898. var r = (Math.random() * 16) | 0,
  899. v = c == "x" ? r : (r & 0x3) | 0x8;
  900. return v.toString(16);
  901. }
  902. );
  903. },
  904. time() {
  905. if (!this.now) {
  906. this.now = new Date().getTime();
  907. return true;
  908. } else {
  909. let time = new Date().getTime();
  910. if (time - this.now > 3000) {
  911. this.now = time;
  912. return true;
  913. } else {
  914. return false;
  915. }
  916. }
  917. },
  918. // answerWork() {
  919. // this.steps++;
  920. // },
  921. addTool(t) {
  922. if (t == 1) {
  923. window.parent.postMessage({ tools: "1" }, "*");
  924. } else if (t == 3) {
  925. window.parent.postMessage({ tools: "3" }, "*");
  926. } else if (t == 7) {
  927. window.parent.postMessage({ tools: "7" }, "*");
  928. }
  929. },
  930. answerQue() {
  931. this.dialogVisible = true;
  932. },
  933. isChooseActive(t) {
  934. if (this.typeC.length == 0) {
  935. this.typeC.push(t);
  936. } else {
  937. if (this.typeC.indexOf(t) != -1) {
  938. this.typeC.splice(this.typeC.indexOf(t), 1);
  939. } else {
  940. this.typeC.push(t);
  941. }
  942. }
  943. },
  944. showMember(i) {
  945. if (this.typeC.length > 0) {
  946. this.addWork(1);
  947. } else {
  948. this.$message.error("至少选择一个答案!");
  949. }
  950. },
  951. clean(type) {
  952. if (type == 1) {
  953. this.upload[0].url.splice(0, 1);
  954. } else if (type == 2) {
  955. this.upload[0].upVedio.splice(0, 1);
  956. }
  957. },
  958. addImg(e) {
  959. var el = e.currentTarget;
  960. el.getElementsByTagName("input")[0].click();
  961. },
  962. imgChange(file, fileList, type) {
  963. if (type == 1) {
  964. var _tmp = this.upload[0].url;
  965. } else if (type == 2) {
  966. var _tmp = this.upload[0].upVedio;
  967. } else if (type == 100) {
  968. var _tmp = this.imgFileUp;
  969. }
  970. this.noneBtnImg = _tmp.length >= 1;
  971. },
  972. beforeUpload1(event, type) {
  973. var file = event.target.files[0];
  974. var credentials = {
  975. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  976. secretAccessKey: "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",
  977. }; //秘钥形式的登录上传
  978. window.AWS.config.update(credentials);
  979. window.AWS.config.region = "cn-northwest-1"; //设置区域
  980. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  981. var _this = this;
  982. _this.progress = 0;
  983. _this.proVisible = true;
  984. if (file) {
  985. var params = {
  986. Key:
  987. file.name.split(".")[0] +
  988. new Date().getTime() +
  989. "." +
  990. file.name.split(".")[file.name.split(".").length - 1],
  991. ContentType: file.type,
  992. Body: file,
  993. "Access-Control-Allow-Credentials": "*",
  994. ACL: "public-read",
  995. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  996. var options = {
  997. partSize: 2048 * 1024 * 1024,
  998. queueSize: 2,
  999. leavePartsOnError: true,
  1000. };
  1001. bucket
  1002. .upload(params, options)
  1003. .on("httpUploadProgress", function (evt) {
  1004. //这里可以写进度条
  1005. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  1006. _this.progress = parseInt((evt.loaded * 80) / evt.total);
  1007. })
  1008. .send(function (err, data) {
  1009. _this.progress = 100;
  1010. setTimeout(() => {
  1011. _this.proVisible = false;
  1012. }, 1000);
  1013. if (err) {
  1014. var a = _this.$refs.upload1.uploadFiles;
  1015. a.splice(a.length - 1, a.length);
  1016. _this.$message.error("上传失败");
  1017. } else {
  1018. _this.upload[0].url = "";
  1019. if (type == 1) {
  1020. _this.upload[0].url = data.Location;
  1021. _this.imgChange(null, null, type);
  1022. _this.addWork(4);
  1023. } else if (type == 2) {
  1024. _this.upload[0].upVedio.push({
  1025. name: file.name,
  1026. url: data.Location,
  1027. uid: file.uid,
  1028. });
  1029. _this.imgChange(null, null, type);
  1030. }
  1031. console.log(data.Location);
  1032. }
  1033. });
  1034. }
  1035. },
  1036. beforeUpload2(event) {
  1037. var file = event;
  1038. var credentials = {
  1039. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  1040. secretAccessKey: "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",
  1041. }; //秘钥形式的登录上传
  1042. window.AWS.config.update(credentials);
  1043. window.AWS.config.region = "cn-northwest-1"; //设置区域
  1044. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  1045. var _this = this;
  1046. _this.progress = 0;
  1047. _this.proVisible = true;
  1048. if (file) {
  1049. var params = {
  1050. Key: file.name.split(".")[0] + new Date().getTime() + "." + "png",
  1051. ContentType: file.type,
  1052. Body: file,
  1053. "Access-Control-Allow-Credentials": "*",
  1054. ACL: "public-read",
  1055. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  1056. var options = {
  1057. partSize: 2048 * 1024 * 1024,
  1058. queueSize: 2,
  1059. leavePartsOnError: true,
  1060. };
  1061. bucket
  1062. .upload(params, options)
  1063. .on("httpUploadProgress", function (evt) {
  1064. //这里可以写进度条
  1065. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  1066. _this.progress = parseInt((evt.loaded * 80) / evt.total);
  1067. })
  1068. .send(function (err, data) {
  1069. _this.progress = 100;
  1070. setTimeout(() => {
  1071. _this.proVisible = false;
  1072. }, 1000);
  1073. if (err) {
  1074. var a = _this.$refs.upload1.uploadFiles;
  1075. a.splice(a.length - 1, a.length);
  1076. _this.$message.error("上传失败");
  1077. } else {
  1078. _this.imgFileUp.push({
  1079. name: file.name,
  1080. url: data.Location,
  1081. uid: file.uid,
  1082. });
  1083. _this.imgChange(null, null, type);
  1084. console.log(data.Location);
  1085. }
  1086. });
  1087. }
  1088. },
  1089. addJtWork(type) {
  1090. if (this.isNoHomeWork == true || this.isAnswer == true) {
  1091. this.$confirm(
  1092. "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
  1093. "提示",
  1094. {
  1095. confirmButtonText: "确定",
  1096. cancelButtonText: "取消",
  1097. type: "warning",
  1098. }
  1099. )
  1100. .then(() => {
  1101. this.getImg();
  1102. this.addSWork(type);
  1103. })
  1104. .catch(() => {});
  1105. } else {
  1106. this.getImg();
  1107. this.addSWork(type);
  1108. }
  1109. },
  1110. addWork(type) {
  1111. if (type == 5) {
  1112. if (this.tkAnswer.length == 0) {
  1113. this.$message.error("请选择对应的答案");
  1114. return;
  1115. }
  1116. }
  1117. // else if (this.upload[0].upVedio.length == 0) {
  1118. // this.$message.error("请上传视频");
  1119. // return;
  1120. // }
  1121. // else if (this.upload[0].upIntro == "") {
  1122. // this.$message.error("请填写简要描述");
  1123. // return;
  1124. // }
  1125. var _str = "";
  1126. if (type == 6) {
  1127. _str = "您已经提交了评价了,如果您再提交将覆盖上次提交的评价!";
  1128. } else {
  1129. _str = "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!";
  1130. }
  1131. if (this.isNoHomeWork == true || this.isAnswer == true) {
  1132. this.$confirm(_str, "提示", {
  1133. confirmButtonText: "确定",
  1134. cancelButtonText: "取消",
  1135. type: "warning",
  1136. })
  1137. .then(() => {
  1138. this.addSWork(type);
  1139. })
  1140. .catch(() => {});
  1141. } else {
  1142. this.addSWork(type);
  1143. }
  1144. },
  1145. addSWork(type) {
  1146. var a;
  1147. if (type == 4) {
  1148. a = this.upload[0].url;
  1149. } else if (type == 6) {
  1150. a = JSON.stringify(this.rateList);
  1151. } else if (type == 1) {
  1152. a = JSON.stringify(this.typeC);
  1153. } else if (type == 5) {
  1154. a = JSON.stringify(this.tkAnswer);
  1155. }
  1156. let params = {
  1157. uid: this.userid,
  1158. cid: this.cid,
  1159. p: this.ppage - 1,
  1160. t: type,
  1161. upload: a,
  1162. // upload: JSON.stringify(this.imgFileUp),
  1163. };
  1164. this.ajax
  1165. .get(this.$store.state.api + "insertSWork", params)
  1166. .then((res) => {
  1167. // this.isNoHomeWork = true;
  1168. // this.dialogVisible = true;
  1169. // this.upload = res.data[0][0].upload;
  1170. this.$message({
  1171. message: "提交成功",
  1172. type: "success",
  1173. });
  1174. this.selectSWork();
  1175. })
  1176. .catch((err) => {
  1177. this.$message.error("提交成功");
  1178. console.error(err);
  1179. });
  1180. },
  1181. selectSWork() {
  1182. this.isAnswer = false;
  1183. this.isNoHomeWork = false;
  1184. let params = {
  1185. uid: this.userid,
  1186. cid: this.cid,
  1187. p: this.ppage - 1,
  1188. };
  1189. this.ajax
  1190. .get(this.$store.state.api + "selectSWork", params)
  1191. .then((res) => {
  1192. if (res.data[0].length > 0) {
  1193. if (res.data[0][0].type == 1) {
  1194. this.isAnswer = true;
  1195. this.typeC = JSON.parse(res.data[0][0].upload);
  1196. } else if (res.data[0][0].type == 5) {
  1197. this.isNoHomeWork = true;
  1198. this.tkAnswer = JSON.parse(res.data[0][0].upload);
  1199. } else if (res.data[0][0].type == 4) {
  1200. this.isNoHomeWork = true;
  1201. this.upload[0].url = res.data[0][0].upload;
  1202. } else if (res.data[0][0].type == 6) {
  1203. this.isNoHomeWork = true;
  1204. this.rateList = JSON.parse(res.data[0][0].upload);
  1205. }
  1206. }
  1207. })
  1208. .catch((err) => {
  1209. console.log("暂无作业");
  1210. console.error(err);
  1211. });
  1212. },
  1213. getImg() {
  1214. var iframeHtml;
  1215. let iframeBody;
  1216. if (this.toolCount == 1) {
  1217. iframeHtml = this.$refs.whiteBoard;
  1218. } else if (this.toolCount == 3) {
  1219. iframeHtml = this.$refs.mind;
  1220. } else if (this.toolCount == 7) {
  1221. iframeHtml = this.$refs.grid;
  1222. }
  1223. iframeBody = iframeHtml.contentWindow.document.body;
  1224. this.iframeInnerHtml = iframeBody.innerHTML;
  1225. var iframeIh = this.$refs.iframeIh;
  1226. iframeIh.innerHTML = this.iframeInnerHtml;
  1227. this.$forceUpdate();
  1228. console.log(iframeIh);
  1229. // var iframeHtml = this.$refs.whiteBoard;
  1230. document.getElementById("shishi_loading").style.display = "flex";
  1231. var _ajs = iframeHtml.contentWindow.document.createElement("script");
  1232. _ajs.type = "text/javascript";
  1233. _ajs.innerHTML =
  1234. 'var _js = document.createElement("script");\n' +
  1235. '_js.type="text/javascript";\n' +
  1236. '_js.src="https://html2canvas.hertzen.com/dist/html2canvas.min.js";\n' +
  1237. "_js.onload = function(){\n" +
  1238. ' var a = document.getElementsByTagName("img")\n' +
  1239. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  1240. " html2canvas(document.body).then(canvas => {\n" +
  1241. ' var base64Url = canvas.toDataURL("image/png");\n' +
  1242. 'var base64 = "<img src=" + base64Url + " />"\n' +
  1243. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  1244. "beforeUpload_shishi(file," +
  1245. "'" +
  1246. this.userid +
  1247. "'" +
  1248. ", " +
  1249. "'" +
  1250. this.cid +
  1251. "'" +
  1252. ", " +
  1253. "'" +
  1254. (this.ppage - 1) +
  1255. "'" +
  1256. ", " +
  1257. "'4'" +
  1258. ")\n" +
  1259. " });\n" +
  1260. "}\n" +
  1261. "document.head.appendChild(_js);\n";
  1262. iframeHtml.contentWindow.document.head.appendChild(_ajs);
  1263. // iframeHtml.contentWindow.jietu_shishi(this.userid, this.cid);
  1264. // 第一个参数是需要生成截图的元素,第二个是自己需要配置的参数,宽高等
  1265. // html2canvas(iframeBody, {
  1266. // allowTaint: true,
  1267. // backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
  1268. // useCORS: true, //支持图片跨域
  1269. // scale: 1, //设置放大的倍数
  1270. // }).then((canvas) => {
  1271. // // 把生成的base64位图片上传到服务器,生成在线图片地址
  1272. // let url = canvas.toDataURL("image/png"); // toDataURL: 图片格式转成 base64
  1273. // this.imgUrl = url; //将图片下载到本地
  1274. // let a = document.createElement("a"); // 生成一个a元素
  1275. // let event = new MouseEvent("click"); // 创建一个单击事件
  1276. // a.download = "作业"; // 设置图片名称没有设置则为默认
  1277. // a.href = this.imgUrl; // 将生成的URL设置为a.href属性
  1278. // a.dispatchEvent(event); // 触发a的单击事件
  1279. // let file = this.dataURLtoFile(url, "作业");
  1280. // this.imgFile = file;
  1281. // this.beforeUpload2(this.imgFile);
  1282. // this.addSWork();
  1283. // console.log(this.imgFile);
  1284. // });
  1285. },
  1286. dataURLtoFile(dataurl, filename) {
  1287. let arr = dataurl.split(","),
  1288. mime = arr[0].match(/:(.*?);/)[1],
  1289. bstr = atob(arr[1]),
  1290. n = bstr.length,
  1291. u8arr = new Uint8Array(n);
  1292. while (n--) {
  1293. u8arr[n] = bstr.charCodeAt(n);
  1294. }
  1295. return new File([u8arr], filename, { type: mime });
  1296. },
  1297. search() {},
  1298. selectFile() {
  1299. this.fileList = [];
  1300. this.videoList = [];
  1301. this.videoList2 = [];
  1302. var a = ["PDF", "DOC", "DOCX", "PPT", "PPTX", "XLSX", "XLS"];
  1303. var b = this.tools[this.ppage - 1].file;
  1304. for (var i = 0; i < b.length; i++) {
  1305. if (
  1306. a.indexOf(
  1307. b[i].src
  1308. .split(".")
  1309. [b[i].src.split(".").length - 1].toLocaleUpperCase()
  1310. ) != -1
  1311. ) {
  1312. this.fileList.push(b[i]);
  1313. } else if (
  1314. b[i].src
  1315. .split(".")
  1316. [b[i].src.split(".").length - 1].toLocaleUpperCase() == "MP3"
  1317. ) {
  1318. this.videoList2.push(b[i]);
  1319. } else {
  1320. this.videoList.push(b[i]);
  1321. }
  1322. }
  1323. if (this.videoList.length) {
  1324. this.playVideo();
  1325. } else if (this.videoList2.length) {
  1326. this.playVideo2();
  1327. }
  1328. },
  1329. openFile(u) {
  1330. this.pptImgUrl = "https://view.officeapps.live.com/op/view.aspx?src=" + u;
  1331. this.isBlock = 7;
  1332. },
  1333. playVideo() {
  1334. var d = JSON.parse(JSON.stringify(this.playerOptions));
  1335. for (var i = 0; i < this.videoList.length; i++) {
  1336. d.sources[0].src = this.videoList[i].src;
  1337. this.playerO[0] = d;
  1338. this.videoindex = i;
  1339. }
  1340. this.isBlock = 6;
  1341. },
  1342. playVideo2() {
  1343. this.audioUrl = this.videoList2[0].src;
  1344. this.isBlock = 9;
  1345. },
  1346. switchVideo(media) {
  1347. this.playerO = {};
  1348. this.playerOptions.poster = "";
  1349. this.playerOptions.sources[0].src = media;
  1350. this.playerO = this.playerOptions;
  1351. },
  1352. onPlayerPlay() {},
  1353. howPage(page) {
  1354. if (!this.pageTotal) {
  1355. return;
  1356. }
  1357. if (page == this.pageTotal) {
  1358. // this.isBlock = 3;
  1359. } else {
  1360. this.isBlock = 0;
  1361. if (
  1362. this.tools[page - 1].tools &&
  1363. this.tools[page - 1].tools.indexOf(9) != -1
  1364. ) {
  1365. this.isBlock = 1;
  1366. }
  1367. // if (this.ppage > 3) {
  1368. // this.isBlock = 2;
  1369. // }
  1370. this.full = false;
  1371. this.howTools = 0;
  1372. this.toolCount = 0;
  1373. if (
  1374. this.tools[page - 1].tools &&
  1375. (this.tools[page - 1].tools[0] == 14 ||
  1376. this.tools[page - 1].tools[0] == 12)
  1377. ) {
  1378. this.isBlock = 0;
  1379. }
  1380. if (
  1381. this.tools[page - 1].tools &&
  1382. (this.tools[page - 1].tools.indexOf(1) != -1 ||
  1383. this.tools[page - 1].tools.indexOf(3) != -1 ||
  1384. this.tools[page - 1].tools.indexOf(7) != -1)
  1385. ) {
  1386. this.isBlock = 4;
  1387. }
  1388. if (
  1389. this.tools[page - 1].tools &&
  1390. this.tools[page - 1].tools.length > 1
  1391. ) {
  1392. this.isBlock = 4;
  1393. }
  1394. if (this.tools[page - 1].tools && !this.tools[page - 1].tools.length) {
  1395. this.isBlock = 0;
  1396. }
  1397. if (
  1398. this.tools[this.ppage - 1].tools &&
  1399. this.tools[this.ppage - 1].tools.indexOf(14) != -1
  1400. ) {
  1401. this.isBlock = 3;
  1402. } else if (
  1403. this.tools[this.ppage - 1].tools &&
  1404. (this.tools[this.ppage - 1].tools.indexOf(3) != -1 ||
  1405. this.tools[this.ppage - 1].tools.indexOf(3) != -1 ||
  1406. this.tools[this.ppage - 1].tools.indexOf(6) != -1 ||
  1407. this.tools[this.ppage - 1].tools.indexOf(7) != -1 ||
  1408. this.tools[this.ppage - 1].tools.indexOf(10) != -1 ||
  1409. this.tools[this.ppage - 1].tools.indexOf(13) != -1)
  1410. ) {
  1411. this.isBlock = 4;
  1412. } else if (
  1413. this.tools[this.ppage - 1].file &&
  1414. this.tools[this.ppage - 1].file.length
  1415. ) {
  1416. this.selectFile();
  1417. } else if (
  1418. this.tools[this.ppage - 1].tools &&
  1419. this.tools[this.ppage - 1].tools.indexOf(27) != -1
  1420. ) {
  1421. this.isBlock = 8;
  1422. }
  1423. }
  1424. this.selectSWork();
  1425. },
  1426. pick() {
  1427. let params = [
  1428. {
  1429. h: "",
  1430. cid: this.cid,
  1431. },
  1432. ];
  1433. this.ajax
  1434. .post(this.$store.state.api + "updatePPTHandle", params)
  1435. .then((res) => {
  1436. this.dialogVisiblePick = false;
  1437. })
  1438. .catch((err) => {
  1439. console.error(err);
  1440. });
  1441. },
  1442. setPage() {
  1443. this.ajax
  1444. .get(this.$store.state.api + "selectPptPage", "")
  1445. .then((res) => {
  1446. if (res.data[0].length > 0) {
  1447. if (
  1448. res.data[0][0].handle &&
  1449. JSON.parse(res.data[0][0].handle).type == 2 &&
  1450. JSON.parse(res.data[0][0].handle).userid == this.userid
  1451. ) {
  1452. this.dialogVisiblePick = true;
  1453. }
  1454. if (this.ppage == res.data[0][0].page && this.isBlock !== 0) {
  1455. return;
  1456. } else {
  1457. this.ppage = res.data[0][0].page;
  1458. // this.ppage = 11;
  1459. this.typeC = [];
  1460. this.isAnswer = false;
  1461. this.howPage(this.ppage);
  1462. }
  1463. }
  1464. })
  1465. .catch((err) => {
  1466. // this.$message.error("查询失败");
  1467. console.error(err);
  1468. });
  1469. },
  1470. getPageTotal(total) {
  1471. this.pageTotal = total;
  1472. },
  1473. fullTools() {
  1474. this.full = !this.full;
  1475. },
  1476. checkTools(tcount) {
  1477. this.isBlock = 2;
  1478. this.toolCount = tcount;
  1479. let _this = this;
  1480. _this.$nextTick(() => {
  1481. setTimeout(() => {
  1482. const script1 = document.createElement("script");
  1483. script1.type = "text/javascript";
  1484. script1.src =
  1485. "https://pbl.cocorobo.cn/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  1486. const script2 = document.createElement("script");
  1487. script2.type = "text/javascript";
  1488. script2.src =
  1489. "https://pbl.cocorobo.cn/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  1490. const script3 = document.createElement("script");
  1491. script3.type = "text/javascript";
  1492. script3.src =
  1493. "https://html2canvas.hertzen.com/dist/js/html2canvas.min.js";
  1494. const script4 = document.createElement("script");
  1495. script4.type = "text/javascript";
  1496. script4.src =
  1497. "https://pbl.cocorobo.cn/pbl-student-table/dist/js/jietu.js";
  1498. if (_this.toolCount == 1) {
  1499. _this.$refs.whiteBoard.onload = () => {
  1500. _this.$refs.whiteBoard.contentWindow.document.body.appendChild(
  1501. script1
  1502. );
  1503. _this.$refs.whiteBoard.contentWindow.document.body.appendChild(
  1504. script2
  1505. );
  1506. // _this.$refs.whiteBoard.contentWindow.document.body.appendChild(script3);
  1507. _this.$refs.whiteBoard.contentWindow.document.body.appendChild(
  1508. script4
  1509. );
  1510. };
  1511. } else if (_this.toolCount == 3) {
  1512. _this.$refs.mind.onload = () => {
  1513. _this.$refs.mind.contentWindow.document.body.appendChild(script1);
  1514. _this.$refs.mind.contentWindow.document.body.appendChild(script2);
  1515. // _this.$refs.mind.contentWindow.document.body.appendChild(script3);
  1516. _this.$refs.mind.contentWindow.document.body.appendChild(script4);
  1517. };
  1518. } else if (_this.toolCount == 7) {
  1519. _this.$refs.grid.onload = () => {
  1520. _this.$refs.grid.contentWindow.document.body.appendChild(script1);
  1521. _this.$refs.grid.contentWindow.document.body.appendChild(script2);
  1522. // _this.$refs.grid.contentWindow.document.body.appendChild(script3);
  1523. _this.$refs.grid.contentWindow.document.body.appendChild(script4);
  1524. };
  1525. }
  1526. }, 0);
  1527. });
  1528. },
  1529. },
  1530. beforeDestroy() {
  1531. clearInterval(this.timer);
  1532. this.timer = null;
  1533. // window.removeEventListener("message");
  1534. },
  1535. created() {
  1536. // this.selectSWork();
  1537. let _this = this;
  1538. this.timer = setInterval(() => {
  1539. _this.setPage();
  1540. }, 1000);
  1541. // window.addEventListener("message", function (e) {
  1542. // // 监听 message 事件
  1543. // if (e.data.type && e.data.type == "shishi_canvas") {
  1544. // console.log(e.data.data);
  1545. // }
  1546. // });
  1547. },
  1548. };
  1549. </script>
  1550. <style scoped>
  1551. .dialog_diy >>> .el-dialog__header {
  1552. background: #3d67bc !important;
  1553. padding: 15px 20px;
  1554. }
  1555. .dialog_diy >>> .el-dialog__title {
  1556. color: #fff;
  1557. }
  1558. .dialog_diy >>> .el-dialog__headerbtn {
  1559. top: 9px;
  1560. }
  1561. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
  1562. color: #fff;
  1563. }
  1564. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
  1565. color: #fff;
  1566. }
  1567. .blackBottom {
  1568. background: rgb(0, 0, 0);
  1569. height: 45px;
  1570. width: 100%;
  1571. display: flex;
  1572. flex-direction: row;
  1573. flex-wrap: nowrap;
  1574. align-items: center;
  1575. justify-content: space-between;
  1576. }
  1577. .imgMiddle {
  1578. width: 100%;
  1579. }
  1580. .imgMiddle > img,
  1581. .imghalf > img,
  1582. .szt > img,
  1583. .uploadImg > img,
  1584. .uploadVedio > img,
  1585. .uploadImgPic > img,
  1586. .logoLive > img,
  1587. .close > img,
  1588. .deleteWord > img {
  1589. width: 100%;
  1590. height: 100%;
  1591. }
  1592. .deleteWord {
  1593. width: 22px !important;
  1594. height: 22px;
  1595. position: absolute;
  1596. right: -5px;
  1597. top: -5px;
  1598. cursor: pointer;
  1599. }
  1600. .blackBottomB {
  1601. position: sticky;
  1602. bottom: 0px;
  1603. left: 0px;
  1604. display: flex;
  1605. flex-direction: row;
  1606. flex-wrap: wrap;
  1607. align-content: center;
  1608. justify-content: space-between;
  1609. align-items: center;
  1610. background: rgb(0, 0, 0);
  1611. height: 45px;
  1612. width: 100%;
  1613. }
  1614. .blackBottomB > div:nth-child(1) {
  1615. margin-left: 10px !important;
  1616. }
  1617. .blackButton {
  1618. color: #fff;
  1619. background: #066ebe;
  1620. width: 100px;
  1621. height: 30px;
  1622. line-height: 30px;
  1623. text-align: center;
  1624. margin: 0 25px;
  1625. border-radius: 5px;
  1626. font-size: 15px;
  1627. cursor: pointer;
  1628. }
  1629. .isNoOther {
  1630. width: 100%;
  1631. display: flex;
  1632. height: calc(100% - 90px);
  1633. }
  1634. .imghalf {
  1635. width: 60% !important;
  1636. }
  1637. .answerBox {
  1638. padding: 25px;
  1639. overflow: auto;
  1640. height: 70%;
  1641. box-sizing: border-box;
  1642. }
  1643. .answerTimuBox {
  1644. display: flex;
  1645. flex-direction: row;
  1646. flex-wrap: nowrap;
  1647. align-items: center;
  1648. justify-content: space-between;
  1649. padding-bottom: 15px;
  1650. }
  1651. .memberBox {
  1652. display: flex;
  1653. flex-direction: row;
  1654. flex-wrap: wrap;
  1655. align-items: center;
  1656. }
  1657. .memberBox > div {
  1658. background: rgb(240, 185, 204);
  1659. width: 120px;
  1660. color: #fff;
  1661. height: 40px;
  1662. text-align: center;
  1663. line-height: 40px;
  1664. border-radius: 5px;
  1665. margin: 0 15px 15px 0;
  1666. cursor: pointer;
  1667. }
  1668. .viewSta {
  1669. background: rgb(97, 97, 97);
  1670. color: #bebebe;
  1671. margin: 20% auto 20px;
  1672. width: 300px;
  1673. height: 40px;
  1674. text-align: center;
  1675. line-height: 40px;
  1676. border-radius: 5px;
  1677. cursor: pointer;
  1678. }
  1679. .szt {
  1680. width: 450px;
  1681. margin: 20px auto;
  1682. }
  1683. .sztFooter {
  1684. padding: 20px 10px 50px 0;
  1685. display: flex;
  1686. flex-direction: row;
  1687. flex-wrap: nowrap;
  1688. justify-content: flex-end;
  1689. align-items: center;
  1690. }
  1691. .timuButton {
  1692. background: #649ef2;
  1693. width: 75px;
  1694. height: 27px;
  1695. line-height: 27px;
  1696. text-align: center;
  1697. border-radius: 5px;
  1698. color: #fff;
  1699. margin-right: 20px;
  1700. display: inline-block;
  1701. }
  1702. .anserBoxCss {
  1703. margin: 30px 0 20px 0;
  1704. }
  1705. .anserBoxCss >>> .el-radio__label {
  1706. font-size: 18px;
  1707. }
  1708. .anserBoxCss >>> .el-radio__inner {
  1709. border-radius: 0px !important;
  1710. }
  1711. .nextStepBox {
  1712. display: flex;
  1713. justify-content: center;
  1714. margin-top: 10px;
  1715. }
  1716. .nextStepOne {
  1717. background: #6b92c9;
  1718. color: #fff;
  1719. width: 110px;
  1720. text-align: center;
  1721. height: 35px;
  1722. line-height: 35px;
  1723. font-size: 14px;
  1724. border-radius: 5px;
  1725. cursor: pointer;
  1726. }
  1727. .nextStepOne,
  1728. .nextStepOne {
  1729. margin-left: 10px;
  1730. }
  1731. .toolList {
  1732. display: flex;
  1733. flex-direction: row;
  1734. flex-wrap: wrap;
  1735. justify-content: flex-start;
  1736. align-items: center;
  1737. }
  1738. .tools {
  1739. display: flex;
  1740. flex-direction: column;
  1741. align-items: center;
  1742. margin-right: 20px;
  1743. }
  1744. .tools > div:nth-child(1) {
  1745. width: 60px;
  1746. }
  1747. .tools > div:nth-child(1) > img {
  1748. width: 100%;
  1749. height: 100%;
  1750. }
  1751. .uploadImg {
  1752. width: 100px;
  1753. margin: 10px 0 0 15px;
  1754. cursor: pointer;
  1755. }
  1756. .upImg {
  1757. display: flex;
  1758. flex-direction: column;
  1759. flex-wrap: nowrap;
  1760. align-items: center;
  1761. justify-content: center;
  1762. color: rgb(182, 182, 182);
  1763. font-size: 20px;
  1764. }
  1765. .binfo_input {
  1766. font: inherit;
  1767. color: currentColor;
  1768. width: 100%;
  1769. margin: 0;
  1770. padding: 15px 14px;
  1771. display: block;
  1772. min-width: 0;
  1773. outline: none;
  1774. box-sizing: content-box;
  1775. background: none;
  1776. -webkit-tap-highlight-color: transparent;
  1777. border: 1px solid rgba(0, 0, 0, 0.23);
  1778. border-radius: 4px;
  1779. box-sizing: border-box;
  1780. resize: none;
  1781. }
  1782. .binfo_input:focus-visible {
  1783. border: 1px solid rgba(61, 103, 188);
  1784. }
  1785. .hengCss {
  1786. display: flex;
  1787. flex-direction: row;
  1788. flex-wrap: wrap;
  1789. align-items: center;
  1790. padding: 5px 0 0 20px;
  1791. }
  1792. .uploadImgPic {
  1793. width: 100px;
  1794. height: 100px;
  1795. position: relative;
  1796. margin: 0 20px 0 0;
  1797. }
  1798. .uploadImgPic > div {
  1799. width: 100px;
  1800. white-space: nowrap;
  1801. overflow: hidden;
  1802. text-overflow: ellipsis;
  1803. }
  1804. .mask {
  1805. background-color: rgba(0, 0, 0, 0);
  1806. position: fixed;
  1807. top: 0;
  1808. left: 0;
  1809. width: 100%;
  1810. height: 100%;
  1811. z-index: 20000;
  1812. display: flex;
  1813. align-items: center;
  1814. justify-content: center;
  1815. }
  1816. .progressBox {
  1817. width: 500px;
  1818. height: 180px;
  1819. background: #fff;
  1820. border-radius: 10px;
  1821. box-shadow: 0 0 6px 1px #bfbfbf;
  1822. display: flex;
  1823. align-items: center;
  1824. justify-content: center;
  1825. flex-direction: column;
  1826. }
  1827. .progressBox .lbox {
  1828. height: 100px;
  1829. font-size: 19px;
  1830. display: flex;
  1831. align-items: center;
  1832. }
  1833. .progressBox .lbox img {
  1834. width: 40px;
  1835. margin-right: 20px;
  1836. }
  1837. .progressBox >>> .el-progress-bar__outer {
  1838. background-color: #d1dfff !important;
  1839. }
  1840. .progressBox .lbox {
  1841. height: 100px;
  1842. font-size: 19px;
  1843. display: flex;
  1844. align-items: center;
  1845. }
  1846. .progressBox .lbox img {
  1847. width: 40px;
  1848. margin-right: 20px;
  1849. }
  1850. .logoLive {
  1851. width: 35px;
  1852. }
  1853. .choose_style {
  1854. display: flex;
  1855. justify-content: center;
  1856. align-items: center;
  1857. width: 100%;
  1858. margin: 10px 0 30px;
  1859. }
  1860. .choose_style span {
  1861. background: #f8f9ff;
  1862. color: #677fff;
  1863. border: 1px solid #95b5ff;
  1864. padding: 15px 20px;
  1865. font-size: 25px;
  1866. border-radius: 18px;
  1867. cursor: pointer;
  1868. }
  1869. .choose_style span + span {
  1870. margin-left: 25px;
  1871. }
  1872. .isChoose {
  1873. color: #fff !important;
  1874. background: #5e78fa !important;
  1875. }
  1876. .close {
  1877. position: absolute;
  1878. right: 10px;
  1879. top: 10px;
  1880. width: 20px;
  1881. cursor: pointer;
  1882. }
  1883. .score_box {
  1884. font-size: 14px;
  1885. }
  1886. .score_box >>> .el-rate {
  1887. margin: 10px 0 20px 0;
  1888. }
  1889. .score_box >>> .el-rate__icon {
  1890. font-size: 23px;
  1891. }
  1892. .bz >>> .el-textarea__inner {
  1893. width: 80%;
  1894. background: #f9f9f9;
  1895. border: 1px solid #afafaf;
  1896. border-radius: 0px;
  1897. }
  1898. .tools_title {
  1899. background: #000;
  1900. position: absolute;
  1901. width: 100%;
  1902. top: 0;
  1903. left: 0;
  1904. display: flex;
  1905. align-items: center;
  1906. height: 40px;
  1907. justify-content: space-between;
  1908. padding: 0 15px;
  1909. box-sizing: border-box;
  1910. }
  1911. .tools_title span {
  1912. color: #fff;
  1913. }
  1914. .tools_title div {
  1915. display: flex;
  1916. align-items: center;
  1917. }
  1918. .full,
  1919. .closeImg {
  1920. height: 22px;
  1921. cursor: pointer;
  1922. }
  1923. .tools_title img,
  1924. img {
  1925. margin-left: 10px;
  1926. }
  1927. .tools_box {
  1928. width: 38.5%;
  1929. max-width: 38.5%;
  1930. overflow: auto;
  1931. background: rgb(255, 255, 255);
  1932. height: 91.5%;
  1933. position: relative;
  1934. margin: 10px 15px;
  1935. }
  1936. .tools_child_box {
  1937. width: 100%;
  1938. height: calc(90% - 40px);
  1939. padding-top: 40px;
  1940. }
  1941. .fullStyle {
  1942. width: 100% !important;
  1943. max-width: 100% !important;
  1944. }
  1945. .toolCss {
  1946. display: flex;
  1947. flex-direction: column;
  1948. flex-wrap: wrap;
  1949. width: calc(100% / 6);
  1950. align-items: center;
  1951. text-align: center;
  1952. }
  1953. .toolImg {
  1954. width: 70px;
  1955. height: 70px;
  1956. cursor: pointer;
  1957. }
  1958. .toolImg > img {
  1959. width: 100%;
  1960. height: 100%;
  1961. margin: 0 !important;
  1962. }
  1963. .toolImg > div {
  1964. font-size: 14px;
  1965. }
  1966. .iframeBox {
  1967. overflow: auto;
  1968. position: absolute;
  1969. top: 0;
  1970. z-index: -2;
  1971. width: 100%;
  1972. height: 100%;
  1973. }
  1974. .fileBox {
  1975. display: flex;
  1976. flex-direction: row;
  1977. flex-wrap: wrap;
  1978. align-items: center;
  1979. justify-content: flex-start;
  1980. align-content: center;
  1981. width: 100%;
  1982. }
  1983. .fileListCss {
  1984. display: flex;
  1985. flex-direction: column;
  1986. flex-wrap: nowrap;
  1987. align-items: center;
  1988. margin: 0 15px 15px 0;
  1989. }
  1990. .fileCss {
  1991. width: 70px;
  1992. height: 70px;
  1993. cursor: pointer;
  1994. margin: 0 0 10px 0;
  1995. }
  1996. .fileCss > img {
  1997. width: 100%;
  1998. height: 100%;
  1999. margin: 0;
  2000. }
  2001. .wheel {
  2002. width: 100%;
  2003. height: 100%;
  2004. }
  2005. .video-player >>> .video-js {
  2006. height: 100%;
  2007. }
  2008. .tkCss {
  2009. display: flex;
  2010. flex-direction: row;
  2011. align-items: center;
  2012. flex-wrap: nowrap;
  2013. margin-bottom: 15px;
  2014. }
  2015. </style>