liveProjectDetail.vue 57 KB

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