liveProjectDetail.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317
  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. 湖心亭看雪可可乐博模拟展示课件
  26. </div>
  27. </div>
  28. <!-- <div
  29. style="display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center"
  30. >
  31. <div class="blackButton" @click="answerWork" v-if="steps == 0">下一步</div>
  32. <div class="blackButton" @click="steps = 3" v-if="steps != 3">提交作业</div>
  33. </div>-->
  34. </div>
  35. <div class="isNoOther">
  36. <div
  37. class="imgMiddle"
  38. :class="isBlock > 0 ? 'imghalf' : 'imgMiddle'"
  39. v-show="!full"
  40. >
  41. <!-- <iframe
  42. style="width: 100%; height: 100%; border: none"
  43. src="https://view.officeapps.live.com/op/view.aspx?src=https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0701%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656644341323.pptx"
  44. ></iframe>-->
  45. <pdf
  46. :pdfUrl="pdfUrl"
  47. style="width: 100%; height: 100%"
  48. :ppage="ppage"
  49. @getPageTotal="getPageTotal"
  50. ></pdf>
  51. </div>
  52. <div
  53. style="
  54. background: #d0d6e4;
  55. width: 40%;
  56. height: 100%;
  57. max-width: 40%;
  58. overflow: auto;
  59. "
  60. :class="{ fullStyle: full }"
  61. v-if="isBlock > 0"
  62. >
  63. <div
  64. style="
  65. background: #fff;
  66. width: 96%;
  67. margin: 10px auto;
  68. height: 96%;
  69. position: relative;
  70. "
  71. >
  72. <div
  73. style="color: #bfbfbf; padding: 15px 0 15px 25px; font-size: 20px"
  74. v-if="isBlock == 3"
  75. >
  76. 课堂评价
  77. </div>
  78. <div
  79. style="
  80. margin-left: 25px;
  81. border-bottom: 3px solid #2c83ee;
  82. width: 70px;
  83. padding-bottom: 3px;
  84. text-align: center;
  85. padding-top: 15px;
  86. "
  87. v-if="isBlock == 1"
  88. >
  89. 开始答题
  90. </div>
  91. <!-- <div
  92. style="
  93. margin-left: 25px;
  94. border-bottom: 3px solid #2c83ee;
  95. width: 70px;
  96. padding-bottom: 3px;
  97. text-align: center;
  98. "
  99. v-if="steps == 2"
  100. >
  101. 选择工具
  102. </div>-->
  103. <div class="answerBox" v-if="isBlock == 1">
  104. <!-- <div>
  105. <span class="timuButton">题目</span>
  106. <span style="letter-spacing: 3px; line-height: 35px"
  107. >小明有3本不同的语文书,2本不同的数学书,4本不同的英语书,小明整理书架时,要把这些书放在同一层,且相同科目的书要相邻摆放,问共有多少种摆放方式?</span
  108. >
  109. </div>
  110. <el-radio-group v-model="answerBox" class="anserBoxCss">
  111. <el-radio v-for="item1 in answer" :key="item1" :label="item1">{{
  112. item1.name
  113. }}</el-radio>
  114. </el-radio-group>
  115. <span slot="footer" class="dialog-footer sztFooter">
  116. <el-button type="primary" @click="answerQue">确定</el-button>
  117. </span>
  118. <div class="nextStepOne" @click="answerWork">下一步</div>-->
  119. <div class="answerBox">
  120. <div
  121. style="
  122. display: flex;
  123. flex-direction: column;
  124. flex-wrap: wrap;
  125. align-items: center;
  126. justify-content: center;
  127. "
  128. v-for="item in 1"
  129. :key="item"
  130. >
  131. <div class="choose_style">
  132. <!-- {{
  133. item
  134. }}、小明有3本不同的语文书,2本不同的数学书,4本不同的英语书,小明整理书架时,要把这些书放在同一层,且相同科目的书要相邻摆放,问共有多少种摆放方式?-->
  135. <span
  136. @click="isChooseActive(1)"
  137. :class="typeC.indexOf(1) != -1 ? 'isChoose' : ''"
  138. >A</span
  139. >
  140. <span
  141. @click="isChooseActive(2)"
  142. :class="typeC.indexOf(2) != -1 ? 'isChoose' : ''"
  143. >B</span
  144. >
  145. <span
  146. @click="isChooseActive(3)"
  147. :class="typeC.indexOf(3) != -1 ? 'isChoose' : ''"
  148. >C</span
  149. >
  150. <span
  151. @click="isChooseActive(4)"
  152. :class="typeC.indexOf(4) != -1 ? 'isChoose' : ''"
  153. >D</span
  154. >
  155. </div>
  156. <el-button style="margin: 0 auto" @click="showMember(item)"
  157. >开始答题</el-button
  158. >
  159. </div>
  160. </div>
  161. </div>
  162. <div class="answerBox" style="height: 90%" v-if="isBlock == 2">
  163. <div v-if="toolsList[0].tools.length == 1" style="height: 100%; width: 100%">
  164. <!-- <div v-if="toolsList[0].tools[0] == 9" style="height: 90%; width: 100%">
  165. 选择题
  166. </div>-->
  167. <div v-if="toolsList[0].tools[0] == 10" style="height: 90%; width: 100%">
  168. 倒计时
  169. </div>
  170. <div v-if="toolsList[0].tools[0] == 11" style="height: 90%; width: 100%">
  171. 问答题
  172. </div>
  173. <div v-if="toolsList[0].tools[0] == 12" style="height: 90%; width: 100%">
  174. 选人回答
  175. </div>
  176. <div v-if="toolsList[0].tools[0] == 13" style="height: 90%; width: 100%">
  177. 分小组
  178. </div>
  179. <!-- <div v-if="toolsList[0].tools[0] == 14" style="height: 90%; width: 100%">
  180. 作业评价
  181. </div>-->
  182. <div class="nextStepOne" @click="isBlock = 0">关闭</div>
  183. </div>
  184. <div v-else style="height: 100%; width: 100%">
  185. <div v-if="toolsList[0].tools[howTools] == 1" class="tools_child_box">
  186. <div class="tools_title">
  187. <span>电子白板</span>
  188. <div>
  189. <img src="../assets/full.png" class="full" @click="fullTools" />
  190. </div>
  191. </div>
  192. <iframe
  193. style="width: 100%; height: 100%; border: none"
  194. src="https://iwb.cocorobo.cn/"
  195. ></iframe>
  196. </div>
  197. <div v-if="toolsList[0].tools[howTools] == 2" class="tools_child_box">
  198. <iframe
  199. style="width: 100%; height: 100%; border: none"
  200. src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note"
  201. ></iframe>
  202. </div>
  203. <div v-if="toolsList[0].tools[howTools] == 3" class="tools_child_box">
  204. <iframe
  205. style="width: 100%; height: 100%; border: none"
  206. src="https://cloud.cocorobo.cn/kityminder-editor/dist/index.html"
  207. ></iframe>
  208. </div>
  209. <div v-if="toolsList[0].tools[howTools] == 4" class="tools_child_box">
  210. <iframe
  211. style="width: 100%; height: 100%; border: none"
  212. src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask"
  213. ></iframe>
  214. </div>
  215. <div v-if="toolsList[0].tools[howTools] == 6" class="tools_child_box">
  216. <iframe
  217. style="width: 100%; height: 100%; border: none"
  218. src="https://cloud.cocorobo.cn/Office/Word/WordEditArea.htm"
  219. ></iframe>
  220. </div>
  221. <div v-if="toolsList[0].tools[howTools] == 7" class="tools_child_box">
  222. <iframe
  223. style="width: 100%; height: 100%; border: none"
  224. src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid"
  225. ></iframe>
  226. </div>
  227. <div v-if="toolsList[0].tools[howTools] == 8" class="tools_child_box">
  228. <iframe
  229. style="width: 100%; height: 100%; border: none"
  230. src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library"
  231. ></iframe>
  232. </div>
  233. <div v-if="toolsList[0].tools[howTools] == 10" class="tools_child_box">
  234. <div>倒计时</div>
  235. </div>
  236. <div v-if="toolsList[0].tools[howTools] == 13" class="tools_child_box">
  237. <div>分小组</div>
  238. </div>
  239. <div class="nextStepOne" @click="nextTool" v-if="isNext == true">
  240. 上一步
  241. </div>
  242. <div class="nextStepOne" @click="nextTool" v-else>下一步</div>
  243. </div>
  244. <!-- <div v-if="toolCount == 0" style="height: 100%">
  245. <iframe
  246. style="width: 100%; height: 100%; border: none"
  247. src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid"
  248. ></iframe>
  249. </div>
  250. <div v-if="toolCount == 1" style="height: 100%">
  251. <iframe
  252. style="width: 100%; height: 100%; border: none"
  253. src="https://iwb.cocorobo.cn/"
  254. ></iframe>
  255. </div>
  256. <div v-if="toolCount == 2" style="height: 90%">
  257. <iframe
  258. style="width: 100%; height: 100%; border: none"
  259. src="https://cloud.cocorobo.cn/kityminder-editor/dist/index.html"
  260. ></iframe>
  261. </div>-->
  262. <!-- <div class="toolList">
  263. <div class="tools">
  264. <div>
  265. <img
  266. src="../assets/icon/mindNetwork.png"
  267. alt=""
  268. @click="addTool(7)"
  269. />
  270. </div>
  271. <div>思维网格</div>
  272. </div>
  273. <div class="tools">
  274. <div>
  275. <img
  276. src="../assets/icon/whiteBoard.png"
  277. alt=""
  278. @click="addTool(1)"
  279. />
  280. </div>
  281. <div>电子白板</div>
  282. </div>
  283. <div class="tools">
  284. <div>
  285. <img
  286. src="../assets/icon/secondToolList/mindMapping.png"
  287. alt=""
  288. @click="addTool(3)"
  289. />
  290. </div>
  291. <div>思维导图</div>
  292. </div>
  293. </div>-->
  294. <!-- <div class="nextStepOne" @click="nextTool">下一步</div> -->
  295. </div>
  296. <div class="answerBox" v-if="isBlock == 3" style="padding: 0 0 0 25px">
  297. <div>
  298. <div class="score_box">
  299. <span>自我评价</span>
  300. <el-rate v-model="rateList.ca"></el-rate>
  301. </div>
  302. <div class="score_box">
  303. <span>他人评价</span>
  304. <el-rate v-model="rateList.sia"></el-rate>
  305. </div>
  306. </div>
  307. <div>
  308. <div style="padding-bottom: 15px; sont-size: 14px">备注</div>
  309. <div class="bz">
  310. <el-input
  311. type="textarea"
  312. placeholder="请输入一些你想表达的"
  313. :rows="6"
  314. resize="none"
  315. v-model="rateList.content"
  316. ></el-input>
  317. </div>
  318. </div>
  319. <span
  320. slot="footer"
  321. class="dialog-footer sztFooter"
  322. style="padding: 0 0 30px 0px; position: absolute; right: 20px; bottom: 0"
  323. >
  324. <el-button>取消</el-button>
  325. <el-button type="primary">确定</el-button>
  326. </span>
  327. </div>
  328. </div>
  329. </div>
  330. <!-- <div v-if="steps == 3" style="width: 40%; height: 96%">
  331. <div
  332. style="
  333. box-sizing: border-box;
  334. background: rgb(255, 255, 255);
  335. width: 96%;
  336. height: 96%;
  337. margin: 10px auto;
  338. overflow: auto;
  339. position: relative;
  340. "
  341. >
  342. <div class="close" @click="(steps = 0), (type = 0)">
  343. <img src="../assets/icon/close.png" alt />
  344. </div>
  345. <div style="color: #b6b6b6; font-size: 20px; padding: 20px">上传作业</div>
  346. <div
  347. style="
  348. display: flex;
  349. flex-direction: row;
  350. flex-wrap: wrap;
  351. justify-content: flex-start;
  352. align-items: flex-start;
  353. margin-bottom: 30px;
  354. "
  355. >
  356. <div v-if="upload[0].upImg.length > 0" class="hengCss">
  357. <div
  358. v-for="(uImg, imgIndex) in upload[0].upImg"
  359. :key="imgIndex"
  360. class="uploadImgPic"
  361. >
  362. <img :src="uImg.url" alt />
  363. <div>{{ uImg.name }}</div>
  364. <div class="deleteWord" @click="clean(1)">
  365. <img src="../assets/icon/delete.png" alt />
  366. </div>
  367. </div>
  368. </div>
  369. <div
  370. class="uploadImg"
  371. @click="addImg($event)"
  372. v-if="upload[0].upImg.length == 0"
  373. >
  374. <img src="../assets/icon/uploadImg.png" alt />
  375. <input
  376. type="file"
  377. accept="image/png, image/gif, image/jpeg"
  378. style="display: none"
  379. @change="beforeUpload1($event, 1)"
  380. />
  381. <div style="text-align: center; color: rgb(182, 182, 182); font-size: 20px">
  382. 上传截图
  383. </div>
  384. </div>
  385. </div>-->
  386. <!-- <div
  387. style="
  388. display: flex;
  389. flex-direction: row;
  390. flex-wrap: wrap;
  391. justify-content: flex-start;
  392. align-items: flex-start;
  393. margin-bottom: 30px;
  394. "
  395. >
  396. <div v-if="upload[0].upVedio.length > 0" class="hengCss">
  397. <div
  398. v-for="(uVedio, vedioIndex) in upload[0].upVedio"
  399. :key="vedioIndex"
  400. class="uploadImgPic"
  401. >
  402. <img src="../assets/uploadMp4.png" alt="" />
  403. <div>{{ uVedio.name }}</div>
  404. <div class="deleteWord" @click="clean(2)">
  405. <img src="../assets/icon/delete.png" alt="" />
  406. </div>
  407. </div>
  408. </div>
  409. <div class="uploadImg" @click="addImg($event)">
  410. <img src="../assets/icon/uploadVedio.png" alt="" />
  411. <input
  412. type="file"
  413. accept="video/mp4,video/quicktime,video/x-msvideo"
  414. style="display: none"
  415. @change="beforeUpload1($event, 2)"
  416. />
  417. <div
  418. style="
  419. text-align: center;
  420. color: rgb(182, 182, 182);
  421. font-size: 20px;
  422. "
  423. >
  424. 上传视频
  425. </div>
  426. </div>
  427. </div>-->
  428. <!-- <div style="padding-left: 25px"><span style="color: red">*</span> 简要描述</div>
  429. <div style="padding: 10px 0 0 25px">
  430. <textarea
  431. rows="6"
  432. class="binfo_input"
  433. cols
  434. style="width: 95%; height: 120px"
  435. v-model="upload[0].upIntro"
  436. ></textarea>
  437. </div>
  438. <span
  439. slot="footer"
  440. class="dialog-footer sztFooter"
  441. style="padding: 10% 10px 50px 0px"
  442. >
  443. <el-button @click="steps = 1">返回答题</el-button>
  444. <el-button type="primary" @click="addWork">确定</el-button>
  445. </span>
  446. </div>
  447. </div>-->
  448. </div>
  449. <div class="blackBottomB"></div>
  450. <div v-if="proVisible" class="mask">
  451. <div class="progressBox">
  452. <div class="lbox"><img src="../assets/loading.gif" />上传中,请稍后</div>
  453. <el-progress
  454. :text-inside="true"
  455. :stroke-width="20"
  456. :percentage="progress"
  457. style="width: 80%"
  458. ></el-progress>
  459. </div>
  460. </div>
  461. <el-dialog
  462. :visible.sync="dialogVisible"
  463. :append-to-body="true"
  464. width="500px"
  465. :before-close="handleClose"
  466. class="dialog_diy"
  467. >
  468. <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
  469. 提交成功
  470. </div>
  471. <div
  472. style="
  473. width: 200px;
  474. background: #4d8ae0;
  475. height: 35px;
  476. margin: 0 auto;
  477. text-align: center;
  478. line-height: 35px;
  479. color: #fff;
  480. border-radius: 5px;
  481. cursor: pointer;
  482. "
  483. @click="dialogVisible = false"
  484. >
  485. 确定
  486. </div>
  487. </el-dialog>
  488. </div>
  489. </template>
  490. <script>
  491. import pdf from "./components/pdf";
  492. export default {
  493. components: {
  494. pdf,
  495. },
  496. data() {
  497. return {
  498. pdfUrl:
  499. "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0629%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656920880446.pdf",
  500. ppage: 2,
  501. full: false,
  502. pageTotal: 0,
  503. howTools: 0,
  504. toolsList: [],
  505. timer: null,
  506. isLoading: false,
  507. formLabelWidth: "100px",
  508. userid: this.$route.query.userid,
  509. cid: this.$route.query.courseId,
  510. oid: this.$route.query.oid,
  511. mr: require("../assets/kc1.png"),
  512. timu: [],
  513. dialogVisible: false,
  514. answerBox: "",
  515. isNoHomeWork: false,
  516. answer: [
  517. { name: "A.1568" },
  518. { name: "B.720" },
  519. { name: "C.1728" },
  520. { name: "D.480" },
  521. ],
  522. steps: 0,
  523. isBlock: 0,
  524. isNext: false,
  525. isAnswer: false,
  526. upload: [
  527. {
  528. upImg: [],
  529. upVedio: [],
  530. upIntro: "",
  531. },
  532. ],
  533. noneBtnImg: false,
  534. proVisible: false,
  535. progress: 0,
  536. typeC: [],
  537. toolCount: 0,
  538. tools: [
  539. "",
  540. "",
  541. { tools: [9] }, //选择题
  542. { tools: [10] }, //倒计时
  543. { tools: [11] }, //问答题
  544. { tools: [11] }, //问答题
  545. { tools: [3, 1] }, //思维导图/电子白板
  546. { tools: [12] }, //选人回答
  547. { tools: [10, 13] }, //倒计时、分小组
  548. { tools: [3, 1, 7] }, //思维导图/电子白板/思维网格
  549. { tools: [14] }, //查看作业
  550. { tools: [14] }, //查看作业
  551. "", //查看作业
  552. //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价
  553. ],
  554. rateList: {
  555. ca: 0,
  556. sia: 0,
  557. content: "",
  558. },
  559. };
  560. },
  561. methods: {
  562. change(val) {
  563. console.log(val);
  564. },
  565. goTo(path) {
  566. this.$router.push(path);
  567. },
  568. tableRowClassName({ row, rowIndex }) {
  569. if ((rowIndex + 1) % 2 === 0) {
  570. return "even_row";
  571. } else {
  572. return "";
  573. }
  574. },
  575. jump(cid) {
  576. window.parent.postMessage({ cid: cid, type: "1" }, "*");
  577. },
  578. handleCurrentChange(val) {
  579. // console.log(`当前页: ${val}`);
  580. this.page = val;
  581. },
  582. init() {},
  583. handleClose(done) {
  584. done();
  585. },
  586. handleRemove(file, fileList) {
  587. console.log(file, fileList);
  588. },
  589. onExceed() {
  590. this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
  591. },
  592. //uuid生成
  593. guid() {
  594. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
  595. var r = (Math.random() * 16) | 0,
  596. v = c == "x" ? r : (r & 0x3) | 0x8;
  597. return v.toString(16);
  598. });
  599. },
  600. time() {
  601. if (!this.now) {
  602. this.now = new Date().getTime();
  603. return true;
  604. } else {
  605. let time = new Date().getTime();
  606. if (time - this.now > 3000) {
  607. this.now = time;
  608. return true;
  609. } else {
  610. return false;
  611. }
  612. }
  613. },
  614. // answerWork() {
  615. // this.steps++;
  616. // },
  617. addTool(t) {
  618. if (t == 1) {
  619. window.parent.postMessage({ tools: "1" }, "*");
  620. } else if (t == 3) {
  621. window.parent.postMessage({ tools: "3" }, "*");
  622. } else if (t == 7) {
  623. window.parent.postMessage({ tools: "7" }, "*");
  624. }
  625. },
  626. nextTool() {
  627. if (this.howTools < this.toolsList[0].tools.length - 1) {
  628. this.howTools++;
  629. if (this.howTools == this.toolsList[0].tools.length - 1) {
  630. this.isNext = true;
  631. }
  632. } else if (this.howTools == this.toolsList[0].tools.length - 1) {
  633. if (this.isNext == true) {
  634. this.howTools = this.howTools - 1;
  635. this.isNext = false;
  636. }
  637. }
  638. // if (this.toolCount < 2) {
  639. // this.toolCount++;
  640. // } else {
  641. // this.toolCount = 0;
  642. // }
  643. },
  644. answerQue() {
  645. this.dialogVisible = true;
  646. },
  647. isChooseActive(t) {
  648. if (this.isAnswer == true) {
  649. return;
  650. } else {
  651. if (this.typeC.length == 0) {
  652. this.typeC.push(t);
  653. } else {
  654. if (this.typeC.indexOf(t) != -1) {
  655. this.typeC.splice(this.typeC.indexOf(t), 1);
  656. } else {
  657. this.typeC.push(t);
  658. }
  659. }
  660. }
  661. },
  662. showMember(i) {
  663. if (this.typeC.length > 0) {
  664. // this.steps = 2;
  665. this.isAnswer = true;
  666. } else {
  667. this.$message.error("至少选择一个答案!");
  668. }
  669. },
  670. clean(type) {
  671. if (type == 1) {
  672. this.upload[0].upImg.splice(0, 1);
  673. } else if (type == 2) {
  674. this.upload[0].upVedio.splice(0, 1);
  675. }
  676. },
  677. addImg(e) {
  678. var el = e.currentTarget;
  679. el.getElementsByTagName("input")[0].click();
  680. },
  681. imgChange(file, fileList, type) {
  682. if (type == 1) {
  683. var _tmp = this.upload[0].upImg;
  684. } else if (type == 2) {
  685. var _tmp = this.upload[0].upVedio;
  686. }
  687. this.noneBtnImg = _tmp.length >= 1;
  688. },
  689. beforeUpload1(event, type) {
  690. var file = event.target.files[0];
  691. var credentials = {
  692. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  693. secretAccessKey: "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",
  694. }; //秘钥形式的登录上传
  695. window.AWS.config.update(credentials);
  696. window.AWS.config.region = "cn-northwest-1"; //设置区域
  697. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  698. var _this = this;
  699. _this.progress = 0;
  700. _this.proVisible = true;
  701. if (file) {
  702. var params = {
  703. Key:
  704. file.name.split(".")[0] +
  705. new Date().getTime() +
  706. "." +
  707. file.name.split(".")[1],
  708. ContentType: file.type,
  709. Body: file,
  710. "Access-Control-Allow-Credentials": "*",
  711. ACL: "public-read",
  712. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  713. var options = {
  714. partSize: 2048 * 1024 * 1024,
  715. queueSize: 2,
  716. leavePartsOnError: true,
  717. };
  718. bucket
  719. .upload(params, options)
  720. .on("httpUploadProgress", function (evt) {
  721. //这里可以写进度条
  722. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  723. _this.progress = parseInt((evt.loaded * 80) / evt.total);
  724. })
  725. .send(function (err, data) {
  726. _this.progress = 100;
  727. setTimeout(() => {
  728. _this.proVisible = false;
  729. }, 1000);
  730. if (err) {
  731. var a = _this.$refs.upload1.uploadFiles;
  732. a.splice(a.length - 1, a.length);
  733. _this.$message.error("上传失败");
  734. } else {
  735. if (type == 1) {
  736. _this.upload[0].upImg.push({
  737. name: file.name,
  738. url: data.Location,
  739. uid: file.uid,
  740. });
  741. _this.imgChange(null, null, type);
  742. } else if (type == 2) {
  743. _this.upload[0].upVedio.push({
  744. name: file.name,
  745. url: data.Location,
  746. uid: file.uid,
  747. });
  748. _this.imgChange(null, null, type);
  749. }
  750. console.log(data.Location);
  751. }
  752. });
  753. }
  754. },
  755. addWork() {
  756. if (this.upload[0].upImg.length == 0) {
  757. this.$message.error("请上传图片");
  758. return;
  759. }
  760. // else if (this.upload[0].upVedio.length == 0) {
  761. // this.$message.error("请上传视频");
  762. // return;
  763. // }
  764. else if (this.upload[0].upIntro == "") {
  765. this.$message.error("请填写简要描述");
  766. return;
  767. }
  768. if (this.isNoHomeWork == true) {
  769. this.$confirm(
  770. "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
  771. "提示",
  772. {
  773. confirmButtonText: "确定",
  774. cancelButtonText: "取消",
  775. type: "warning",
  776. }
  777. )
  778. .then(() => {
  779. this.addSWork();
  780. })
  781. .catch(() => {});
  782. } else {
  783. this.addSWork();
  784. }
  785. },
  786. addSWork() {
  787. let params = {
  788. uid: this.userid,
  789. cid: this.cid,
  790. upload: JSON.stringify(this.upload),
  791. };
  792. this.ajax
  793. .get(this.$store.state.api + "insertSWork", params)
  794. .then((res) => {
  795. this.isNoHomeWork = true;
  796. this.dialogVisible = true;
  797. this.selectSWork(); // this.upload = res.data[0][0].upload;
  798. })
  799. .catch((err) => {
  800. this.$message.error("提交失败");
  801. console.error(err);
  802. });
  803. },
  804. selectSWork() {
  805. let params = {
  806. uid: this.userid,
  807. cid: this.cid,
  808. };
  809. this.ajax
  810. .get(this.$store.state.api + "selectSWork", params)
  811. .then((res) => {
  812. if (res.data[0].length > 0) {
  813. this.isNoHomeWork = true;
  814. }
  815. })
  816. .catch((err) => {
  817. this.$message.error("查询失败");
  818. console.error(err);
  819. });
  820. },
  821. search() {},
  822. howPage(page) {
  823. if (page == this.pageTotal) {
  824. this.isBlock = 3;
  825. } else {
  826. if (this.ppage < 3) {
  827. this.isBlock = 0;
  828. }
  829. if (this.ppage == 3) {
  830. this.isBlock = 1;
  831. }
  832. if (this.ppage > 3) {
  833. this.isBlock = 2;
  834. }
  835. this.howTools = 0;
  836. if (this.toolsList.length > 0) {
  837. this.toolsList = [];
  838. this.toolsList.push({ tools: this.tools[page - 1].tools });
  839. } else {
  840. this.toolsList.push({ tools: this.tools[page - 1].tools });
  841. }
  842. if (this.toolsList[0].tools[0] == 14) {
  843. this.isBlock = 0;
  844. }
  845. }
  846. },
  847. setPage() {
  848. this.ajax
  849. .get(this.$store.state.api + "selectPptPage", "")
  850. .then((res) => {
  851. if (res.data[0].length > 0) {
  852. if (this.ppage == res.data[0][0].page) {
  853. return;
  854. } else {
  855. this.ppage = res.data[0][0].page;
  856. console.log(1);
  857. // this.isBlock = 1;
  858. this.howPage(this.ppage);
  859. // if (this.ppage == 3) {
  860. // this.isBlock = 1;
  861. // } else if (this.ppage == 4) {
  862. // this.howPage(this.ppage);
  863. // } else if (this.ppage == 5) {
  864. // this.howPage(this.ppage);
  865. // } else if (this.ppage == 6) {
  866. // this.howPage(this.ppage);
  867. // } else if (this.ppage == 7) {
  868. // this.howPage(this.ppage);
  869. // } else if (this.ppage == 9) {
  870. // this.howPage(this.ppage);
  871. // } else if (this.ppage == 10) {
  872. // this.howPage(this.ppage);
  873. // }
  874. }
  875. }
  876. })
  877. .catch((err) => {
  878. this.$message.error("查询失败");
  879. console.error(err);
  880. });
  881. },
  882. getPageTotal(total) {
  883. this.pageTotal = total;
  884. },
  885. fullTools() {
  886. this.full = !this.full;
  887. },
  888. },
  889. beforeDestroy() {
  890. clearInterval(this.timer);
  891. this.timer = null;
  892. },
  893. created() {
  894. this.selectSWork();
  895. let _this = this;
  896. this.timer = setInterval(() => {
  897. _this.setPage();
  898. }, 1000);
  899. },
  900. };
  901. </script>
  902. <style scoped>
  903. .dialog_diy >>> .el-dialog__header {
  904. background: #3d67bc !important;
  905. padding: 15px 20px;
  906. }
  907. .dialog_diy >>> .el-dialog__title {
  908. color: #fff;
  909. }
  910. .dialog_diy >>> .el-dialog__headerbtn {
  911. top: 9px;
  912. }
  913. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
  914. color: #fff;
  915. }
  916. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
  917. color: #fff;
  918. }
  919. .blackBottom {
  920. background: rgb(0, 0, 0);
  921. height: 45px;
  922. width: 100%;
  923. display: flex;
  924. flex-direction: row;
  925. flex-wrap: nowrap;
  926. align-items: center;
  927. justify-content: space-between;
  928. }
  929. .imgMiddle {
  930. width: 100%;
  931. }
  932. .imgMiddle > img,
  933. .imghalf > img,
  934. .szt > img,
  935. .uploadImg > img,
  936. .uploadVedio > img,
  937. .uploadImgPic > img,
  938. .logoLive > img,
  939. .close > img,
  940. .deleteWord > img {
  941. width: 100%;
  942. height: 100%;
  943. }
  944. .deleteWord {
  945. width: 22px !important;
  946. height: 22px;
  947. position: absolute;
  948. right: -5px;
  949. top: -5px;
  950. cursor: pointer;
  951. }
  952. .blackBottomB {
  953. position: absolute;
  954. bottom: 0px;
  955. left: 0px;
  956. display: flex;
  957. flex-direction: row;
  958. flex-wrap: wrap;
  959. align-content: center;
  960. justify-content: flex-start;
  961. align-items: center;
  962. background: rgb(0, 0, 0);
  963. height: 45px;
  964. width: 100%;
  965. }
  966. .blackBottomB > div:nth-child(1) {
  967. margin-left: 10px !important;
  968. }
  969. .blackButton {
  970. color: #fff;
  971. background: #066ebe;
  972. width: 100px;
  973. height: 30px;
  974. line-height: 30px;
  975. text-align: center;
  976. margin: 0 25px;
  977. border-radius: 5px;
  978. font-size: 15px;
  979. cursor: pointer;
  980. }
  981. .isNoOther {
  982. width: 100%;
  983. display: flex;
  984. height: calc(100% - 90px);
  985. }
  986. .imghalf {
  987. width: 60% !important;
  988. }
  989. .answerBox {
  990. padding: 25px;
  991. overflow: auto;
  992. height: 70%;
  993. box-sizing: border-box;
  994. }
  995. .answerTimuBox {
  996. display: flex;
  997. flex-direction: row;
  998. flex-wrap: nowrap;
  999. align-items: center;
  1000. justify-content: space-between;
  1001. padding-bottom: 15px;
  1002. }
  1003. .memberBox {
  1004. display: flex;
  1005. flex-direction: row;
  1006. flex-wrap: wrap;
  1007. align-items: center;
  1008. }
  1009. .memberBox > div {
  1010. background: rgb(240, 185, 204);
  1011. width: 120px;
  1012. color: #fff;
  1013. height: 40px;
  1014. text-align: center;
  1015. line-height: 40px;
  1016. border-radius: 5px;
  1017. margin: 0 15px 15px 0;
  1018. cursor: pointer;
  1019. }
  1020. .viewSta {
  1021. background: rgb(97, 97, 97);
  1022. color: #bebebe;
  1023. margin: 20% auto 20px;
  1024. width: 300px;
  1025. height: 40px;
  1026. text-align: center;
  1027. line-height: 40px;
  1028. border-radius: 5px;
  1029. cursor: pointer;
  1030. }
  1031. .szt {
  1032. width: 450px;
  1033. margin: 20px auto;
  1034. }
  1035. .sztFooter {
  1036. padding: 20px 10px 50px 0;
  1037. display: flex;
  1038. flex-direction: row;
  1039. flex-wrap: nowrap;
  1040. justify-content: flex-end;
  1041. align-items: center;
  1042. }
  1043. .timuButton {
  1044. background: #649ef2;
  1045. width: 75px;
  1046. height: 27px;
  1047. line-height: 27px;
  1048. text-align: center;
  1049. border-radius: 5px;
  1050. color: #fff;
  1051. margin-right: 20px;
  1052. display: inline-block;
  1053. }
  1054. .anserBoxCss {
  1055. margin: 30px 0 20px 0;
  1056. }
  1057. .anserBoxCss >>> .el-radio__label {
  1058. font-size: 18px;
  1059. }
  1060. .anserBoxCss >>> .el-radio__inner {
  1061. border-radius: 0px !important;
  1062. }
  1063. .nextStepOne {
  1064. background: #6b92c9;
  1065. color: #fff;
  1066. width: 110px;
  1067. text-align: center;
  1068. height: 35px;
  1069. line-height: 35px;
  1070. font-size: 14px;
  1071. border-radius: 5px;
  1072. position: absolute;
  1073. bottom: 50px;
  1074. left: 40%;
  1075. cursor: pointer;
  1076. }
  1077. .toolList {
  1078. display: flex;
  1079. flex-direction: row;
  1080. flex-wrap: wrap;
  1081. justify-content: flex-start;
  1082. align-items: center;
  1083. }
  1084. .tools {
  1085. display: flex;
  1086. flex-direction: column;
  1087. align-items: center;
  1088. margin-right: 20px;
  1089. }
  1090. .tools > div:nth-child(1) {
  1091. width: 60px;
  1092. }
  1093. .tools > div:nth-child(1) > img {
  1094. width: 100%;
  1095. height: 100%;
  1096. }
  1097. .uploadImg {
  1098. width: 100px;
  1099. margin: 10px 0 0 15px;
  1100. cursor: pointer;
  1101. }
  1102. .upImg {
  1103. display: flex;
  1104. flex-direction: column;
  1105. flex-wrap: nowrap;
  1106. align-items: center;
  1107. justify-content: center;
  1108. color: rgb(182, 182, 182);
  1109. font-size: 20px;
  1110. }
  1111. .binfo_input {
  1112. font: inherit;
  1113. color: currentColor;
  1114. width: 100%;
  1115. margin: 0;
  1116. padding: 15px 14px;
  1117. display: block;
  1118. min-width: 0;
  1119. outline: none;
  1120. box-sizing: content-box;
  1121. background: none;
  1122. -webkit-tap-highlight-color: transparent;
  1123. border: 1px solid rgba(0, 0, 0, 0.23);
  1124. border-radius: 4px;
  1125. box-sizing: border-box;
  1126. resize: none;
  1127. }
  1128. .binfo_input:focus-visible {
  1129. border: 1px solid rgba(61, 103, 188);
  1130. }
  1131. .hengCss {
  1132. display: flex;
  1133. flex-direction: row;
  1134. flex-wrap: wrap;
  1135. align-items: center;
  1136. padding: 5px 0 0 20px;
  1137. }
  1138. .uploadImgPic {
  1139. width: 100px;
  1140. height: 100px;
  1141. position: relative;
  1142. margin: 0 20px 0 0;
  1143. }
  1144. .uploadImgPic > div {
  1145. width: 100px;
  1146. white-space: nowrap;
  1147. overflow: hidden;
  1148. text-overflow: ellipsis;
  1149. }
  1150. .mask {
  1151. background-color: rgba(0, 0, 0, 0);
  1152. position: fixed;
  1153. top: 0;
  1154. left: 0;
  1155. width: 100%;
  1156. height: 100%;
  1157. z-index: 20000;
  1158. display: flex;
  1159. align-items: center;
  1160. justify-content: center;
  1161. }
  1162. .progressBox {
  1163. width: 500px;
  1164. height: 180px;
  1165. background: #fff;
  1166. border-radius: 10px;
  1167. box-shadow: 0 0 6px 1px #bfbfbf;
  1168. display: flex;
  1169. align-items: center;
  1170. justify-content: center;
  1171. flex-direction: column;
  1172. }
  1173. .progressBox .lbox {
  1174. height: 100px;
  1175. font-size: 19px;
  1176. display: flex;
  1177. align-items: center;
  1178. }
  1179. .progressBox .lbox img {
  1180. width: 40px;
  1181. margin-right: 20px;
  1182. }
  1183. .progressBox >>> .el-progress-bar__outer {
  1184. background-color: #d1dfff !important;
  1185. }
  1186. .progressBox .lbox {
  1187. height: 100px;
  1188. font-size: 19px;
  1189. display: flex;
  1190. align-items: center;
  1191. }
  1192. .progressBox .lbox img {
  1193. width: 40px;
  1194. margin-right: 20px;
  1195. }
  1196. .logoLive {
  1197. width: 35px;
  1198. }
  1199. .choose_style {
  1200. display: flex;
  1201. justify-content: center;
  1202. align-items: center;
  1203. width: 100%;
  1204. margin: 10px 0 30px;
  1205. }
  1206. .choose_style span {
  1207. background: #f8f9ff;
  1208. color: #677fff;
  1209. border: 1px solid #95b5ff;
  1210. padding: 15px 20px;
  1211. font-size: 25px;
  1212. border-radius: 18px;
  1213. cursor: pointer;
  1214. }
  1215. .choose_style span + span {
  1216. margin-left: 25px;
  1217. }
  1218. .isChoose {
  1219. color: #fff !important;
  1220. background: #5e78fa !important;
  1221. }
  1222. .close {
  1223. position: absolute;
  1224. right: 10px;
  1225. top: 10px;
  1226. width: 20px;
  1227. cursor: pointer;
  1228. }
  1229. .score_box {
  1230. font-size: 14px;
  1231. }
  1232. .score_box >>> .el-rate {
  1233. margin: 10px 0 20px 0;
  1234. }
  1235. .score_box >>> .el-rate__icon {
  1236. font-size: 23px;
  1237. }
  1238. .bz >>> .el-textarea__inner {
  1239. width: 40%;
  1240. border: 1px solid;
  1241. border-radius: 0px;
  1242. }
  1243. .tools_title {
  1244. background: #000;
  1245. position: absolute;
  1246. width: 100%;
  1247. top: 0;
  1248. left: 0;
  1249. display: flex;
  1250. align-items: center;
  1251. height: 40px;
  1252. justify-content: space-between;
  1253. padding: 0 15px;
  1254. box-sizing: border-box;
  1255. }
  1256. .tools_title span {
  1257. color: #fff;
  1258. }
  1259. .tools_title div {
  1260. display: flex;
  1261. align-items: center;
  1262. }
  1263. .full,
  1264. .closeImg {
  1265. height: 22px;
  1266. cursor: pointer;
  1267. }
  1268. .tools_title img,
  1269. img {
  1270. margin-left: 10px;
  1271. }
  1272. .tools_box {
  1273. width: 38.5%;
  1274. max-width: 38.5%;
  1275. overflow: auto;
  1276. background: rgb(255, 255, 255);
  1277. height: 91.5%;
  1278. position: relative;
  1279. margin: 10px 15px;
  1280. }
  1281. .tools_child_box {
  1282. width: 100%;
  1283. height: calc(90% - 40px);
  1284. padding-top: 40px;
  1285. }
  1286. .fullStyle {
  1287. width: 100% !important;
  1288. max-width: 100% !important;
  1289. }
  1290. </style>