worksDetail.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279
  1. <template>
  2. <div class="pb_content" style="background: unset">
  3. <div
  4. class="pb_content_body"
  5. style="
  6. background: #fff;
  7. padding: 0px 25px;
  8. box-sizing: border-box;
  9. border-radius: 5px;
  10. "
  11. >
  12. <div class="pb_head">
  13. <span>评价管理</span>
  14. <!-- <span>备注:教师可以根据课程、班级条件筛选学生并查看该学生信息</span> -->
  15. </div>
  16. <div class="student_head">
  17. <div style="padding: 10px 0px 20px 0">
  18. <el-breadcrumb separator-class="el-icon-arrow-right">
  19. <el-breadcrumb-item
  20. :to="{ path: '/works?userid=' + userid + '&oid=' + oid }"
  21. >评价管理</el-breadcrumb-item
  22. >
  23. <el-breadcrumb-item>作业管理</el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. <div class="student_search">
  27. <div>项目筛选</div>
  28. <!-- <el-select
  29. v-model="subject"
  30. placeholder="请选择课程"
  31. @change="searchWork"
  32. >
  33. <el-option label="所有课程" value=""></el-option>
  34. <el-option
  35. v-for="(item, index) in subjectJuri"
  36. :key="index"
  37. :label="item.name"
  38. :value="item.id"
  39. ></el-option>
  40. </el-select> -->
  41. <el-select
  42. v-model="sClass"
  43. placeholder="请选择班级"
  44. @change="searchWork"
  45. >
  46. <el-option label="所有班级" value=""></el-option>
  47. <el-option
  48. v-for="(item, index) in grade"
  49. :key="index"
  50. :label="item.name"
  51. :value="item.id"
  52. ></el-option>
  53. </el-select>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="pb_content_body">
  58. <div class="student_table">
  59. <el-table
  60. ref="table"
  61. :data="tableData"
  62. border
  63. :height="tableHeight"
  64. :fit="true"
  65. v-loading="isLoading"
  66. style="width: 100%"
  67. :header-cell-style="{ background: '#f1f1f1' }"
  68. :row-class-name="tableRowClassName"
  69. stripe
  70. >
  71. <el-table-column
  72. prop="sName"
  73. label="姓名"
  74. min-width="15"
  75. align="center"
  76. ></el-table-column>
  77. <el-table-column
  78. prop="class"
  79. label="班级"
  80. min-width="20"
  81. align="center"
  82. ></el-table-column>
  83. <el-table-column
  84. prop="course"
  85. label="项目"
  86. min-width="20"
  87. align="center"
  88. ></el-table-column>
  89. <el-table-column
  90. prop="time"
  91. label="时间"
  92. min-width="15"
  93. align="center"
  94. ></el-table-column>
  95. <el-table-column label="操作" min-width="30">
  96. <template slot-scope="scope">
  97. <el-button
  98. type="primary"
  99. size="small"
  100. @click="lookWork(scope.row.id, scope.row.userid)"
  101. >查看作业</el-button
  102. >
  103. <el-button
  104. class="de_button"
  105. type="primary"
  106. size="small"
  107. @click="deleteWork(scope.row.id)"
  108. >删除</el-button
  109. >
  110. </template>
  111. </el-table-column>
  112. </el-table>
  113. <el-dialog
  114. :visible.sync="dialogVisible3"
  115. :append-to-body="true"
  116. :before-close="handleClose"
  117. class="add_work"
  118. >
  119. <div class="zyBox">
  120. <div class="left">
  121. <div class="courseTitle">
  122. {{
  123. chapInfo[publicIndex] != null &&
  124. chapInfo[publicIndex].dyName != null &&
  125. chapInfo[publicIndex].dyName != ""
  126. ? chapInfo[publicIndex].dyName
  127. : "暂无内容"
  128. }}
  129. </div>
  130. <div class="bigImg" v-if="tType == 0">
  131. <video-player
  132. class="video-player vjs-custom-skin"
  133. ref="videoPlayer"
  134. :playsinline="true"
  135. :options="playerO"
  136. @play="onPlayerPlay($event)"
  137. style="width: 100%; height: 100%"
  138. ></video-player>
  139. </div>
  140. <div class="bigImg" v-else>
  141. <img
  142. :src="
  143. thumbnail.length > 0 && thumbnail[1].length > 0
  144. ? thumbnail[1][0].url
  145. : ''
  146. "
  147. alt=""
  148. />
  149. </div>
  150. <div class="thumbnail">
  151. <div
  152. style="background: #a3d4ff"
  153. :class="tType == 0 ? 'isClick' : ''"
  154. >
  155. <img
  156. src="../../assets/icon/spIcon.png"
  157. alt=""
  158. @click="tType = 0"
  159. />
  160. </div>
  161. <div :class="tType == 1 ? 'isClick' : ''">
  162. <img
  163. :src="
  164. thumbnail.length > 0 && thumbnail[1].length > 0
  165. ? thumbnail[1][0].url
  166. : ''
  167. "
  168. alt=""
  169. @click="tType = 1"
  170. />
  171. </div>
  172. </div>
  173. <div style="margin: 5px 10px">{{ sInfo.course }}</div>
  174. <div class="student_Answer">
  175. <div class="toux">
  176. <img :src="sInfo.tx != null ? sInfo.tx : tx" alt="" />
  177. </div>
  178. <div class="nav">
  179. <div class="studentName">{{ sInfo.sName }}</div>
  180. <div class="studentAnswer">
  181. {{
  182. chapInfo[publicIndex] != null &&
  183. chapInfo[publicIndex].content != null &&
  184. chapInfo[publicIndex].content != ""
  185. ? chapInfo[publicIndex].content
  186. : "暂无内容"
  187. }}
  188. <!-- 雨荒深院菊,霜倒半池莲.唐杜甫《宿赞公房》 -->
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="right">
  194. <div class="comment">
  195. <div class="comment_title">
  196. 评论<span>({{ this.commentCount }})</span>
  197. </div>
  198. <div class="other_Answer">暂无学生评论</div>
  199. <!-- <div class="other_Answer">
  200. <div class="toux">
  201. <img src="../../assets/portal.png" alt="" />
  202. </div>
  203. <div class="nav">
  204. <div class="nameAndTime">
  205. <div class="otherName">{{ this.commentName }}</div>
  206. <div class="time">{{ this.commentTime }}</div>
  207. </div>
  208. <div class="otherAnswer">{{ this.commentAnswer }}</div>
  209. </div>
  210. </div> -->
  211. </div>
  212. <div
  213. class="lastTop"
  214. style="
  215. width: 100%;
  216. padding: 5px 0px 0px;
  217. box-sizing: border-box;
  218. height: 225px;
  219. margin-top: 10px;
  220. box-shadow: none;
  221. "
  222. >
  223. <div class="moreSay">更多评价</div>
  224. <div class="more_say_input">
  225. <el-input
  226. type="textarea"
  227. placeholder="还有要说的吗..."
  228. :rows="8"
  229. resize="none"
  230. v-model="rateList.content"
  231. :readonly="
  232. rateParams[5] != '' && rateParams[5] != undefined
  233. "
  234. style="background: #fafafa"
  235. ></el-input>
  236. </div>
  237. </div>
  238. </div>
  239. <div style="width: 290px">
  240. <div
  241. class="sd_score"
  242. style="box-sizing: border-box; width: 100%; box-shadow: none"
  243. >
  244. <div class="score_box">
  245. <span>意识能力</span
  246. ><el-rate
  247. v-model="rateList.ca"
  248. :disabled="
  249. rateParams[5] != '' && rateParams[5] != undefined
  250. "
  251. ></el-rate>
  252. </div>
  253. <div class="score_box">
  254. <span>科学探究能力</span
  255. ><el-rate
  256. v-model="rateList.sia"
  257. :disabled="
  258. rateParams[5] != '' && rateParams[5] != undefined
  259. "
  260. ></el-rate>
  261. </div>
  262. <div class="score_box">
  263. <span>实践创新能力</span
  264. ><el-rate
  265. v-model="rateList.eta"
  266. :disabled="
  267. rateParams[5] != '' && rateParams[5] != undefined
  268. "
  269. ></el-rate>
  270. </div>
  271. <div class="score_box">
  272. <span>学习反思能力</span
  273. ><el-rate
  274. v-model="rateList.pia"
  275. :disabled="
  276. rateParams[5] != '' && rateParams[5] != undefined
  277. "
  278. ></el-rate>
  279. </div>
  280. <div class="score_box">
  281. <span>工程思维能力</span
  282. ><el-rate
  283. v-model="rateList.lra"
  284. :disabled="
  285. rateParams[5] != '' && rateParams[5] != undefined
  286. "
  287. ></el-rate>
  288. </div>
  289. </div>
  290. <div class="data_body">
  291. <div class="title">
  292. <span>量规评分</span>
  293. </div>
  294. <div style="width: 100%">
  295. <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
  296. <div
  297. id="charts_canvas"
  298. class="echart"
  299. style="width: 100%; height: 100%; margin: 0 0 0 1rem"
  300. ></div>
  301. </div>
  302. </div>
  303. </div>
  304. <!-- <div class="rbButtom" @click="giveScore">评分</div> -->
  305. <div class="rbButtom" @click="updateWorks">评分</div>
  306. </div>
  307. </el-dialog>
  308. <el-dialog
  309. :visible.sync="dialogVisible2"
  310. :append-to-body="true"
  311. width="700px"
  312. :before-close="handleClose"
  313. class="add_work talkScore"
  314. >
  315. <div slot="title" class="header-title">
  316. <!-- <div class="logoImg">
  317. <img src="../../assets/logo.png" alt="" />
  318. </div> -->
  319. <div class="title_add_student">"评分"</div>
  320. </div>
  321. <div class="firstTop">
  322. <div class="score_top">
  323. <div class="userTou">
  324. <img :src="sInfo.tx != null ? sInfo.tx : tx" alt="" />
  325. </div>
  326. <div class="score_user_name">{{ sInfo.sName }}</div>
  327. </div>
  328. <div class="course_top">
  329. <div>课程名称</div>
  330. <div>
  331. {{
  332. chapInfo[publicIndex] != null
  333. ? chapInfo[publicIndex].dyName
  334. : "暂无课程"
  335. }}
  336. </div>
  337. </div>
  338. </div>
  339. <div class="sd_score">
  340. <div class="score_box">
  341. <span>意识能力</span
  342. ><el-rate
  343. v-model="rateList.ca"
  344. :disabled="rateParams[5] != '' && rateParams[5] != undefined"
  345. ></el-rate>
  346. </div>
  347. <div class="score_box">
  348. <span>科学探究能力</span
  349. ><el-rate
  350. v-model="rateList.sia"
  351. :disabled="rateParams[5] != '' && rateParams[5] != undefined"
  352. ></el-rate>
  353. </div>
  354. <div class="score_box">
  355. <span>实践创新能力</span
  356. ><el-rate
  357. v-model="rateList.eta"
  358. :disabled="rateParams[5] != '' && rateParams[5] != undefined"
  359. ></el-rate>
  360. </div>
  361. <div class="score_box">
  362. <span>学习反思能力</span
  363. ><el-rate
  364. v-model="rateList.pia"
  365. :disabled="rateParams[5] != '' && rateParams[5] != undefined"
  366. ></el-rate>
  367. </div>
  368. <div class="score_box">
  369. <span>工程思维能力</span
  370. ><el-rate
  371. v-model="rateList.lra"
  372. :disabled="rateParams[5] != '' && rateParams[5] != undefined"
  373. ></el-rate>
  374. </div>
  375. </div>
  376. <div class="lastTop">
  377. <div class="moreSay">更多评价</div>
  378. <div class="more_say_input">
  379. <el-input
  380. type="textarea"
  381. placeholder="还有要说的吗..."
  382. :rows="3"
  383. resize="none"
  384. v-model="rateList.content"
  385. :readonly="rateParams[5] != '' && rateParams[5] != undefined"
  386. style="background: #fafafa"
  387. ></el-input>
  388. </div>
  389. </div>
  390. <div class="assess_right" @click="updateWorks" v-if="!uploadBoolean">
  391. 提交
  392. </div>
  393. <div class="assess_right" @click="updateWorks" v-else>提交</div>
  394. </el-dialog>
  395. </div>
  396. <div class="student_page">
  397. <el-pagination
  398. background
  399. layout="prev, pager, next"
  400. :page-size="10"
  401. :total="total"
  402. v-if="page"
  403. @current-change="handleCurrentChange"
  404. >
  405. </el-pagination>
  406. </div>
  407. </div>
  408. <el-dialog :visible.sync="pictureDialog" size="tiny">
  409. <img width="100%" :src="dialogImageUrl" alt="" />
  410. </el-dialog>
  411. </div>
  412. </template>
  413. <script>
  414. export default {
  415. data() {
  416. return {
  417. tableHeight: "500px",
  418. isLoading: false,
  419. id: this.$route.query.cid,
  420. userid: this.$route.query.userid,
  421. oid: this.$route.query.oid,
  422. formLabelWidth: "100px",
  423. dialogImageUrl: "",
  424. pictureDialog: false,
  425. dialogVisible: false,
  426. dialogVisible1: false,
  427. dialogVisible2: false,
  428. dialogVisible3: false,
  429. courseByUser: "诗词中的植物",
  430. userName: "林点",
  431. answerName: "宿赞公房",
  432. studentAnswer: "雨荒深院菊,霜倒半池莲.唐杜甫《宿赞公房》",
  433. commentCount: 0,
  434. publicIndex: 0,
  435. playerOptions: {
  436. playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
  437. autoplay: false, //如果true,浏览器准备好时开始回放。
  438. muted: false, // 默认情况下将会消除任何音频。
  439. loop: false, // 导致视频一结束就重新开始。
  440. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  441. language: "zh-CN",
  442. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  443. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  444. sources: [
  445. {
  446. type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 || "video/ogg"|| "video/webm"
  447. src: "", //url地址require("../../assets/media/aaa.mp4")
  448. },
  449. ],
  450. // poster: require("../../assets/tu31.png"), //你的封面地址
  451. // poster: dataRes.imgUrl, //你的封面地址
  452. notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
  453. controlBar: {
  454. timeDivider: true, //当前时间和持续时间的分隔符
  455. durationDisplay: true, //显示持续时间
  456. remainingTimeDisplay: false, //是否显示剩余时间功能
  457. fullscreenToggle: true, //全屏按钮
  458. },
  459. },
  460. playerO: {},
  461. commentName: "谭子松",
  462. commentTime: "2021/2/5",
  463. commentAnswer:
  464. "作为家长我很高兴看到孩子的进步,希望这个进步只是一个开始,在新学期能够继续延续,这样才能不负老师的期望",
  465. tableData: [],
  466. uploadBoolean: false,
  467. studentMessage: [],
  468. subject: "",
  469. sClass: "",
  470. subjectJuri: [],
  471. projectJuri: [],
  472. grade: [],
  473. mr: require("../../assets/icon/wheel.png"),
  474. tx: require("../../assets/portal.png"),
  475. projectchoose: "",
  476. scopeId: "",
  477. thumbnail: [],
  478. rateList: {
  479. ca: 0,
  480. sia: 0,
  481. eta: 0,
  482. pia: 0,
  483. lra: 0,
  484. content: "",
  485. },
  486. rateParams: [],
  487. page: 1,
  488. total: 0,
  489. worksDetail: [],
  490. suserId: "",
  491. sInfo: {},
  492. chapInfo: [],
  493. vedio: [],
  494. file: [],
  495. tType: 0,
  496. chartObj: null,
  497. ooption: [
  498. { value: 0, name: "意识能力" },
  499. { value: 0, name: "科学探究能力" },
  500. { value: 0, name: "实践创新能力" },
  501. { value: 0, name: "学习房媳能力" },
  502. { value: 0, name: "工程思维能力" },
  503. ],
  504. option: {
  505. tooltip: {
  506. trigger: "item",
  507. },
  508. series: [
  509. {
  510. name: "量规评分",
  511. type: "pie",
  512. radius: "70%",
  513. center: ["50%", "50%"],
  514. data: [
  515. { value: 0, name: "意识能力" },
  516. { value: 0, name: "科学探究能力" },
  517. { value: 0, name: "实践创新能力" },
  518. { value: 0, name: "学习房媳能力" },
  519. { value: 0, name: "工程思维能力" },
  520. ],
  521. itemStyle: {
  522. emphasis: {
  523. shadowBlur: 10,
  524. shadowOffsetX: 0,
  525. shadowColor: "rgba(0, 0, 0, 0.5)",
  526. },
  527. normal: {
  528. label: {
  529. show: true,
  530. formatter: "{d}%",
  531. inside: true,
  532. position: "inner",
  533. },
  534. labelLine: { show: false },
  535. },
  536. },
  537. },
  538. ],
  539. },
  540. };
  541. },
  542. mounted() {
  543. this.$nextTick(function () {
  544. this.tableHeight =
  545. window.innerHeight - this.$refs.table.$el.offsetTop - 200;
  546. if (this.tableHeight <= 530) {
  547. this.tableHeight = 530;
  548. }
  549. // 监听窗口大小变化
  550. let self = this;
  551. window.onresize = function () {
  552. self.tableHeight =
  553. window.innerHeight - self.$refs.table.$el.offsetTop - 200;
  554. if (self.tableHeight <= 530) {
  555. self.tableHeight = 530;
  556. }
  557. };
  558. });
  559. },
  560. methods: {
  561. tableRowClassName({ row, rowIndex }) {
  562. if ((rowIndex + 1) % 2 === 0) {
  563. return "even_row";
  564. } else {
  565. return "";
  566. }
  567. },
  568. handleClose(done) {
  569. done();
  570. },
  571. tableRowClassName({ row, rowIndex }) {
  572. if ((rowIndex + 1) % 2 === 0) {
  573. return "even_row";
  574. } else {
  575. return "";
  576. }
  577. },
  578. handleCurrentChange(val) {
  579. this.page = val;
  580. this.getWorks();
  581. },
  582. lookWork(id, uid) {
  583. this.scopeId = id;
  584. let params = {
  585. uid: uid,
  586. cid: this.id,
  587. };
  588. this.ajax
  589. .get(this.$store.state.api + "selectWorksDetail", params)
  590. .then((res) => {
  591. this.sInfo = res.data[0][0];
  592. this.chapInfo = JSON.parse(res.data[0][0].chapters);
  593. var worksDetail = res.data[1];
  594. this.chapInfo.filter((value, index, array) => {
  595. for (var i = 0; i < worksDetail.length; i++) {
  596. if (index == worksDetail[i].stage) {
  597. var c = JSON.parse(worksDetail[i].content)[0];
  598. var d =
  599. worksDetail[i].rate != null && worksDetail[i].rate != ""
  600. ? JSON.parse(worksDetail[i].rate)
  601. : { ca: 0, sia: 0, eta: 0, pia: 0, lra: 0, content: "" };
  602. var e =
  603. worksDetail[i].rate != null && worksDetail[i].rate != ""
  604. ? 0
  605. : 1;
  606. value.rateWrong = e;
  607. value.content = c.content;
  608. value.rate = d;
  609. value.cover = c.cover;
  610. value.upVedio = c.upVedio;
  611. this.thumbnail.push(value.upVedio);
  612. this.thumbnail.push(value.cover);
  613. break;
  614. }
  615. }
  616. });
  617. this.courseDetail = res.data[0][0];
  618. this.playerOptions.sources[0].src =
  619. this.chapInfo[this.publicIndex].upVedio.length > 0
  620. ? this.chapInfo[this.publicIndex].upVedio[0].url
  621. : require("../../assets/icon/kc1.png");
  622. console.log(this.playerOptions.sources[0].src);
  623. this.playerO = this.playerOptions;
  624. // this.dialogVisible = true;
  625. this.rateList = this.chapInfo[this.publicIndex].rate;
  626. this.dialogVisible3 = true;
  627. this.ooption[0].value = this.rateList.ca;
  628. this.ooption[1].value = this.rateList.sia;
  629. this.ooption[2].value = this.rateList.eta;
  630. this.ooption[3].value = this.rateList.pia;
  631. this.ooption[4].value = this.rateList.lra;
  632. if (this.chartObj) {
  633. this.option.series[0].data = this.ooption;
  634. this.chartObj.setOption(this.option);
  635. } else {
  636. this.setChart(this.ooption);
  637. }
  638. })
  639. .catch((err) => {
  640. console.error(err);
  641. });
  642. },
  643. setChart(option) {
  644. let _this = this;
  645. // 雷达图显示的标签
  646. let newPromise = new Promise((resolve) => {
  647. resolve();
  648. });
  649. //然后异步执行echarts的初始化函数
  650. newPromise.then(() => {
  651. console.log(_this.option);
  652. const chartObj = _this.$echarts.init(
  653. //劳动课程
  654. // _this.$el.querySelector("#charts_canvas")
  655. document.getElementById("charts_canvas")
  656. );
  657. _this.option.series[0].data = option;
  658. // 初始化雷达图
  659. _this.chartObj = chartObj;
  660. _this.chartObj.setOption(_this.option);
  661. });
  662. },
  663. // doingAssess(index) {
  664. // this.publicIndex = index;
  665. // this.playerOptions.sources[0].src =
  666. // this.chapInfo[this.publicIndex].upVedio.length > 0
  667. // ? this.chapInfo[this.publicIndex].upVedio[0].url
  668. // : require("../../assets/icon/kc1.png");
  669. // console.log(this.playerOptions.sources[0].src);
  670. // this.playerO = this.playerOptions;
  671. // this.dialogVisible1 = true;
  672. // },
  673. giveScore() {
  674. this.rateList = this.chapInfo[this.publicIndex].rate;
  675. this.dialogVisible2 = true;
  676. },
  677. //获取班级列表
  678. getClass() {
  679. this.isLoading = true;
  680. let params = {
  681. oid: this.oid,
  682. };
  683. this.ajax
  684. .get(this.$store.state.api + "selectClassBySchool", params)
  685. .then((res) => {
  686. this.isLoading = false;
  687. this.grade = res.data[0];
  688. })
  689. .catch((err) => {
  690. this.isLoading = false;
  691. console.error(err);
  692. });
  693. },
  694. //获取分组分类
  695. getGroup() {
  696. let params = {};
  697. this.ajax
  698. .get(this.$store.state.api + "getGroup", params)
  699. .then((res) => {
  700. this.subjectJuri = res.data[0];
  701. this.projectJuri = res.data[0];
  702. })
  703. .catch((err) => {
  704. console.error(err);
  705. });
  706. },
  707. searchWork() {
  708. this.page = 1;
  709. this.getWorks();
  710. },
  711. //获取作业
  712. getWorks() {
  713. this.isLoading = true;
  714. var mr = this.mr;
  715. let params = {
  716. cn: this.sClass,
  717. cid: this.id,
  718. page: this.page,
  719. };
  720. this.ajax
  721. .get(this.$store.state.api + "getWorks", params)
  722. .then((res) => {
  723. this.isLoading = false;
  724. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  725. this.tableData = res.data[0];
  726. })
  727. .catch((err) => {
  728. this.isLoading = false;
  729. console.error(err);
  730. });
  731. },
  732. getCourseDetail() {
  733. const loading = this.$loading.service({
  734. background: "rgba(255, 255, 255, 0.7)",
  735. target: document.querySelector(".student_table"),
  736. });
  737. let params = {
  738. courseId: this.id,
  739. };
  740. this.ajax
  741. .get(this.$store.state.api + "selectCourseDetail", params)
  742. .then((res) => {
  743. loading.close();
  744. this.chapInfo = JSON.parse(res.data[0][0].chapters);
  745. // element.imgUrl = JSON.parse(element.chapters).poster;
  746. })
  747. .catch((err) => {
  748. loading.close();
  749. console.error(err);
  750. });
  751. },
  752. handlePictureCardPreview(url) {
  753. this.dialogImageUrl = url;
  754. this.pictureDialog = true;
  755. },
  756. updateWorks() {
  757. let params = {
  758. rate: this.rateList,
  759. tuid: this.userid,
  760. id: this.scopeId,
  761. };
  762. this.ajax
  763. .get(this.$store.state.api + "updateWorks", params)
  764. .then((res) => {
  765. this.$message({
  766. message: "评价成功",
  767. type: "success",
  768. });
  769. this.ooption[0].value = this.rateList.ca;
  770. this.ooption[1].value = this.rateList.sia;
  771. this.ooption[2].value = this.rateList.eta;
  772. this.ooption[3].value = this.rateList.pia;
  773. this.ooption[4].value = this.rateList.lra;
  774. if (this.chartObj) {
  775. this.option.series[0].data = this.ooption;
  776. this.chartObj.setOption(this.option);
  777. } else {
  778. this.setChart(this.ooption);
  779. }
  780. // this.uploadBoolean = false;
  781. // this.dialogVisible2 = false;
  782. })
  783. .catch((err) => {
  784. this.$message.error("评价失败");
  785. console.error(err);
  786. });
  787. },
  788. switchVideo(media, index) {
  789. this.playerO = {};
  790. this.playerOptions.poster = "";
  791. this.playerOptions.sources[0].src = media;
  792. this.playerO = this.playerOptions;
  793. },
  794. onPlayerPlay() {},
  795. },
  796. created() {
  797. this.page = 1;
  798. this.getClass();
  799. this.getGroup();
  800. this.getWorks();
  801. // this.getCourseDetail();
  802. },
  803. };
  804. </script>
  805. <style scoped>
  806. .pb_head > span:nth-child(2) {
  807. font-size: 16px;
  808. margin-left: 80px;
  809. color: #ab582f;
  810. }
  811. .pb_head {
  812. margin: 0 !important;
  813. width: 100% !important;
  814. }
  815. .student_page {
  816. margin-top: 10px;
  817. }
  818. .student_head {
  819. margin-top: 10px;
  820. padding-bottom: 15px;
  821. }
  822. .student_search {
  823. display: flex;
  824. }
  825. .student_search > div:nth-child(1) {
  826. line-height: 35px;
  827. font-size: 14px;
  828. }
  829. .student_search >>> .el-input__inner {
  830. width: 190px;
  831. height: 35px;
  832. margin-left: 10px;
  833. }
  834. .student_table >>> .el-table--border td {
  835. border-right: 0px !important;
  836. }
  837. .add_work >>> .el-dialog__header {
  838. padding: 20px 20px 10px;
  839. text-align: center;
  840. background: #32455b;
  841. }
  842. .add_work >>> .el-dialog__title {
  843. font-size: 14px !important;
  844. color: #fff !important;
  845. }
  846. .add_work >>> .el-dialog__headerbtn {
  847. font-size: 20px !important;
  848. top: 5px !important;
  849. right: 8px !important;
  850. }
  851. .add_work >>> .el-form-item__label {
  852. margin-left: 65px;
  853. }
  854. .add_work >>> .el-form-item {
  855. display: flex;
  856. }
  857. .add_work >>> .el-form-item__content {
  858. margin: 0 !important;
  859. }
  860. .add_work >>> .el-dialog__footer {
  861. text-align: center !important;
  862. }
  863. .add_work >>> .el-dialog {
  864. min-width: 650px !important;
  865. width: 1080px;
  866. }
  867. .add_work >>> .el-dialog__body {
  868. background: #ededed;
  869. }
  870. .header-title {
  871. display: flex;
  872. }
  873. .logoImg {
  874. width: 30px;
  875. }
  876. .logoImg > img {
  877. width: 100%;
  878. height: 100%;
  879. }
  880. .title_add_student {
  881. margin: 0 auto;
  882. color: #fff;
  883. }
  884. .top {
  885. display: flex;
  886. justify-content: space-between;
  887. padding-bottom: 10px;
  888. border-bottom: 2px solid #eee;
  889. }
  890. .top > div:nth-child(1) {
  891. font-size: 18px;
  892. }
  893. .top > div:nth-child(2) {
  894. font-size: 14px;
  895. line-height: 28px;
  896. }
  897. .first {
  898. margin-top: 25px;
  899. border-bottom: 1px solid #c5c5c5;
  900. }
  901. .one_top {
  902. display: flex;
  903. justify-content: space-between;
  904. }
  905. .one_top > div:nth-child(1) {
  906. color: #2490bf;
  907. font-size: 16px;
  908. }
  909. .one_top > button {
  910. width: 100px;
  911. background: #24a0a4;
  912. height: 30px;
  913. color: #e0e0e0;
  914. font-size: 13px;
  915. padding: 0 !important;
  916. }
  917. .work_Img {
  918. width: 150px;
  919. margin: 10px 0;
  920. }
  921. .assess_Img {
  922. width: 400px;
  923. margin: 0 auto;
  924. padding: 15px 0;
  925. }
  926. .work_Img > img,
  927. .assess_Img > img {
  928. width: 100%;
  929. height: 100%;
  930. }
  931. .work_input {
  932. border: 1px solid;
  933. width: 135px;
  934. height: 20px;
  935. line-height: 20px;
  936. font-size: 13px;
  937. padding: 5px;
  938. }
  939. .poetry {
  940. margin: 10px 0 15px 0;
  941. }
  942. .assess {
  943. background: #169bd5 !important;
  944. }
  945. .assess_top {
  946. border-bottom: 2px solid #eee;
  947. padding-bottom: 10px;
  948. }
  949. .assess_top > div:nth-child(1) {
  950. color: #2490bf;
  951. font-size: 16px;
  952. }
  953. .student_Answer {
  954. display: flex;
  955. margin: 5px 10px;
  956. padding-bottom: 25px;
  957. }
  958. .workName {
  959. font-size: 18px;
  960. font-weight: bold;
  961. margin: 5px 10px;
  962. }
  963. .toux {
  964. width: 35px;
  965. margin: auto 0;
  966. height: 35px;
  967. }
  968. .toux > img {
  969. width: 100%;
  970. height: 100%;
  971. }
  972. .nav {
  973. display: flex;
  974. flex-wrap: wrap;
  975. margin-top: 10px;
  976. flex-direction: column;
  977. }
  978. .studentName {
  979. margin-left: 10px;
  980. font-size: 13px;
  981. }
  982. .studentAnswer {
  983. font-size: 12px;
  984. margin: 5px 0 0 10px;
  985. }
  986. .comment {
  987. /* margin: 20px 0 0 10px;
  988. overflow: auto;
  989. height: 75%;
  990. max-height: 330px; */
  991. overflow: auto;
  992. height: 330px;
  993. background: #fff;
  994. border-radius: 5px;
  995. padding: 10px;
  996. box-sizing: border-box;
  997. }
  998. .comment > .comment_title {
  999. font-size: 18px;
  1000. }
  1001. .comment > .comment_title > span {
  1002. font-size: 14px;
  1003. }
  1004. .other_Answer {
  1005. display: flex;
  1006. margin: 5px 10px;
  1007. border-bottom: 1px solid #ccc;
  1008. padding-bottom: 15px;
  1009. }
  1010. .nav {
  1011. margin-left: 5px;
  1012. width: 80%;
  1013. }
  1014. .nameAndTime {
  1015. display: flex;
  1016. }
  1017. .otherName {
  1018. font-weight: bold;
  1019. margin-left: 10px;
  1020. font-size: 13px;
  1021. }
  1022. .time {
  1023. margin-left: 25px;
  1024. font-size: 12px;
  1025. margin-top: 3px;
  1026. }
  1027. .otherAnswer {
  1028. width: 80%;
  1029. word-wrap: break-word;
  1030. word-break: break-all;
  1031. overflow: hidden;
  1032. font-size: 12px;
  1033. margin: 5px 0 0 10px;
  1034. }
  1035. .doingAssess {
  1036. margin: 0 auto;
  1037. width: 300px;
  1038. background: #169bd5;
  1039. height: 35px;
  1040. line-height: 35px;
  1041. border-radius: 3px;
  1042. font-size: 13px;
  1043. text-align: center;
  1044. color: #fff;
  1045. margin-top: 30px;
  1046. cursor: pointer;
  1047. }
  1048. .score_top {
  1049. display: flex;
  1050. margin-bottom: 10px;
  1051. }
  1052. .userTou {
  1053. width: 50px;
  1054. }
  1055. .userTou > img {
  1056. width: 100%;
  1057. height: 100%;
  1058. }
  1059. .score_user_name {
  1060. line-height: 53px;
  1061. margin-left: 15px;
  1062. }
  1063. .course_top {
  1064. display: flex;
  1065. align-items: center;
  1066. }
  1067. .course_top > div:nth-child(1) {
  1068. line-height: 25px;
  1069. }
  1070. .course_top > div:nth-child(2) {
  1071. border: 1px solid #ccc;
  1072. width: 250px;
  1073. text-align: center;
  1074. height: 25px;
  1075. line-height: 25px;
  1076. margin-left: 30px;
  1077. }
  1078. .sd_score {
  1079. font-size: 15px;
  1080. background: #fff;
  1081. padding: 18px 25px 1px;
  1082. margin-bottom: 15px;
  1083. border-radius: 5px;
  1084. width: 90%;
  1085. box-shadow: 2px 2px 5px #909090;
  1086. }
  1087. .sd_score .score_box {
  1088. display: flex;
  1089. align-items: center;
  1090. margin-bottom: 18px;
  1091. }
  1092. .sd_score span {
  1093. width: 100px;
  1094. text-align: justify;
  1095. text-align-last: justify;
  1096. display: block;
  1097. margin-right: 20px;
  1098. }
  1099. .moreSay {
  1100. margin: 0px 0 5px 20px;
  1101. }
  1102. .more_say_input {
  1103. margin-left: 20px;
  1104. width: 80%;
  1105. }
  1106. .more_say_input >>> .el-input__inner {
  1107. height: 75px;
  1108. font-size: 13px;
  1109. padding: 0 0 0 10px;
  1110. }
  1111. .assess_right {
  1112. width: 200px;
  1113. background: #82b0ee;
  1114. color: #fff;
  1115. text-align: center;
  1116. height: 30px;
  1117. line-height: 30px;
  1118. border-radius: 5px;
  1119. margin: 0 auto;
  1120. margin-top: 20px;
  1121. font-size: 13px;
  1122. cursor: pointer;
  1123. }
  1124. .student_page {
  1125. margin-top: 10px;
  1126. }
  1127. .display {
  1128. display: none;
  1129. }
  1130. .firstTop {
  1131. background: #fff;
  1132. display: flex;
  1133. margin-bottom: 15px;
  1134. flex-direction: column;
  1135. align-items: flex-start;
  1136. height: 90px;
  1137. padding: 10px 25px;
  1138. border-radius: 5px;
  1139. width: 90%;
  1140. box-shadow: 2px 2px 5px #909090;
  1141. }
  1142. .talkScore >>> .el-dialog__body {
  1143. background: #efefef;
  1144. margin: 0 !important;
  1145. }
  1146. .lastTop {
  1147. background: #fff;
  1148. border-radius: 5px;
  1149. width: 98%;
  1150. height: 120px;
  1151. box-shadow: 2px 2px 5px #909090;
  1152. }
  1153. .left,
  1154. .right {
  1155. background: #fff;
  1156. border-radius: 5px;
  1157. padding: 10px;
  1158. box-sizing: border-box;
  1159. }
  1160. .left {
  1161. /* width: 60%;
  1162. margin-right: 10px;
  1163. min-width: 350px;
  1164. min-height: 425px; */
  1165. margin-right: 10px;
  1166. width: 450px;
  1167. min-height: 425px;
  1168. }
  1169. .right {
  1170. /* width: 40%;
  1171. height: 75%;
  1172. min-width: 230px;
  1173. min-height: 370px; */
  1174. width: 25%;
  1175. margin-right: 10px;
  1176. background: none;
  1177. padding: 0;
  1178. }
  1179. .courseTitle {
  1180. font-size: 19px;
  1181. font-weight: 600;
  1182. }
  1183. .bigImg {
  1184. margin-top: 10px;
  1185. height: 300px;
  1186. }
  1187. .bigImg > img,
  1188. .thumbnail > div > img {
  1189. width: 100%;
  1190. height: 100%;
  1191. object-fit: contain;
  1192. }
  1193. .thumbnail {
  1194. display: flex;
  1195. flex-direction: row;
  1196. justify-content: flex-start;
  1197. margin: 10px 0;
  1198. }
  1199. .isClick {
  1200. border: 3px solid #5f89d4;
  1201. border-radius: 5px;
  1202. }
  1203. .thumbnail > div {
  1204. width: 80px;
  1205. margin-right: 5px;
  1206. cursor: pointer;
  1207. }
  1208. .zyBox {
  1209. display: flex;
  1210. width: 100%;
  1211. position: relative;
  1212. min-width: 585px;
  1213. min-height: 425px;
  1214. }
  1215. .rbButtom {
  1216. position: absolute;
  1217. bottom: 0;
  1218. right: 0;
  1219. background: #06a7ff;
  1220. width: 150px;
  1221. height: 30px;
  1222. border-radius: 5px;
  1223. text-align: center;
  1224. color: #fff;
  1225. line-height: 30px;
  1226. font-size: 14px;
  1227. cursor: pointer;
  1228. right: 27px;
  1229. }
  1230. .bigImg >>> .vjs-tech,
  1231. .bigImg >>> .video-js {
  1232. height: 300px !important;
  1233. }
  1234. .el-table >>> .even_row {
  1235. background-color: #f1f1f1;
  1236. }
  1237. .data_body {
  1238. height: 292px;
  1239. display: flex;
  1240. position: relative;
  1241. border-radius: 5px;
  1242. /* border: 1px solid #eee; */
  1243. /* margin: 10px auto; */
  1244. box-sizing: border-box;
  1245. padding: 10px;
  1246. width: 100%;
  1247. background: #fff;
  1248. }
  1249. .data_body .title {
  1250. position: absolute;
  1251. top: 10px;
  1252. left: 10px;
  1253. }
  1254. </style>