LessonDetails.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <template>
  2. <div id="app">
  3. <div class="banner">
  4. <img src="../../assets/image/gxq_banner.png" />
  5. </div>
  6. <div class="details-container">
  7. <div class="activity-brief center-row">
  8. <div class="activity-brief-left">
  9. <!--<img :src="getThumb(rowKey)" width="100%" />-->
  10. <div class="img-box">
  11. <span class="state" style="background: rgb(130, 147, 166); visibility: visible;">{{activityInfo.activityStatusTip}}</span>
  12. <!--<img :src="getThumb(item.rowKey)" alt="">-->
  13. <div class="lesson-image">
  14. <p style="font-size:24px">高新区智慧课堂优秀课例</p>
  15. <p style="font-size:16px;margin:5px 0">{{activityInfo.parentGradeName}}</p>
  16. <p style="font-size:28px;">《 {{activityInfo.parentProjectName}} 》</p>
  17. <p style="font-size:16px;margin-top:8px;">{{activityInfo.schoolName}} {{activityInfo.speaker}}教师 执教</p>
  18. <p style="font-size:16px;margin-top:8px;">授课平台:{{activityInfo.parentTeachePlateName}}</p>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="activity-brief-right">
  23. <div class="activity-brief-title">
  24. <span>{{activityInfo.name}}</span>
  25. <span class="status" style="background: #999;">{{activityInfo.activityStatusTip}}</span>
  26. <Button type="primary" size="large" @click="gotoVideo">进入点播</Button>
  27. </div>
  28. <div class="activity-brief-info center-row">
  29. <div class="brief-info-left">
  30. <div class="items"><p class="item">主讲单位:<span style="font-weight:bold;color:#000">{{activityInfo.ownUnit}}</span></p></div>
  31. <div class="items"><p class="item">主讲人:<span style="font-weight:bold;color:#000">{{activityInfo.speaker}}</span></p></div>
  32. <div class="items"><p class="item">学校:<span style="font-weight:bold;color:#000">{{activityInfo.schoolName}}</span></p></div>
  33. <div class="items"><p class="item">年级:<span style="font-weight:bold;color:#000">{{activityInfo.parentGradeName}}</span></p></div>
  34. <div class="items"><p class="item">学科:<span style="font-weight:bold;color:#000">{{activityInfo.parentCategoryName}}</span></p></div>
  35. <div class="items"><p class="item">课题:<span style="font-weight:bold;color:#000">{{activityInfo.parentProjectName}}</span></p></div>
  36. </div>
  37. <div class="brief-info-left">
  38. <div class="items"><p class="item">活动时间:<span style="font-weight:bold;color:#000">{{activityInfo.timeRangeTip}}</span></p></div>
  39. <div class="items"><p class="item">授课平台:<span style="font-weight:bold;color:#000">{{activityInfo.parentTeachePlateName}}</span></p></div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="activity-details center-row">
  45. <div class="details-left center-col">
  46. <div class="title-tip">
  47. <p class="title">观课用户<span>VIEW CLASS USER</span></p>
  48. <div class="content">
  49. <!--<p style="margin:15px">专家:刘斌</p>-->
  50. <p style="margin:15px">成员:公开参与</p>
  51. </div>
  52. </div>
  53. <div class="review-attachment">
  54. <p class="title">资源下载<span>ATTACHMENT</span></p>
  55. <div class="content">
  56. <div class="attach attachicon-2" v-for="(item,index) in attachmentsList" :key="index">
  57. <a :href="item.fileNameUri" :download="item.fileName" :title="item.fileName">{{item.fileName}}</a>
  58. <span style="float: right; font-size: 13px;">&nbsp;{{item.fileSizeTip}}</span>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="details-right center-col">
  64. <div class="description title-tip" style="margin-top:0">
  65. <p class="title">
  66. 观课统计
  67. <span>VIEW CLASS STATISTICS</span>
  68. </p>
  69. <div class="content">
  70. <div id="views" style="width:100%; height:500px;"></div>
  71. <div id="comments" style="width:100%; height:500px;"></div>
  72. </div>
  73. </div>
  74. <div class="guide title-tip">
  75. <p class="title">
  76. 观点评论
  77. <span>REVIEW</span>
  78. </p>
  79. <div class="content">
  80. <p class="comment-item" v-for="item in commentList"><span style="color:#666">{{item.employeeName}}</span> : {{item.content}}</p>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </template>
  88. <script>
  89. import lessonInfo from '@/static/lessonDetails.json'
  90. import { setTimeout } from 'core-js';
  91. export default {
  92. components: {
  93. },
  94. data() {
  95. return {
  96. reviewAcList: [],
  97. isLoading: true,
  98. attachmentsList: [],
  99. commentList: [],
  100. rowKey:0,
  101. activityInfo: {}
  102. }
  103. },
  104. created() {
  105. this.$Spin.show();
  106. this.rowKey = sessionStorage.getItem('_lesson_rowKey');
  107. this.attachmentsList = lessonInfo[this.rowKey].attachments;
  108. this.activityInfo = lessonInfo[this.rowKey].data;
  109. this.commentList = lessonInfo[this.rowKey].commentList;
  110. },
  111. methods: {
  112. gotoVideo() {
  113. this.$router.push(
  114. {
  115. path:'commentVideo'
  116. }
  117. );
  118. },
  119. },
  120. mounted() {
  121. setTimeout(() => {
  122. this.$Spin.hide();
  123. }, 500);
  124. let myChart = this.$echarts.init(document.getElementById('views'));
  125. let schoolList = lessonInfo[this.rowKey ].views.map(a => a.schoolName);
  126. let viewsList = lessonInfo[this.rowKey ].views.map(a => a.viewCount);
  127. let option = {
  128. color: ['#ff8745'],
  129. tooltip: {
  130. trigger: 'axis',
  131. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  132. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  133. }
  134. },
  135. xAxis: {
  136. data: schoolList,
  137. axisLabel: {
  138. interval: 0,
  139. rotate: 40,
  140. formatter: function (value) {
  141. return (value.length > 6 ? (value.slice(0,6)+"...") : value )
  142. },
  143. },
  144. splitLine: { // gird 区域中的分割线
  145. show: false, // 是否显示
  146. lineStyle: {
  147. color: '#666',
  148. width: 0,
  149. type: 'dashed'
  150. }
  151. },
  152. },
  153. grid: {
  154. left: '3%',
  155. right: '4%',
  156. bottom: '3%',
  157. height: '400px',
  158. containLabel: true
  159. },
  160. yAxis: {
  161. name: "点击量",
  162. splitLine: { // gird 区域中的分割线
  163. show: false, // 是否显示
  164. lineStyle: {
  165. color: '#666',
  166. width: 1,
  167. type: 'dashed'
  168. }
  169. },
  170. },
  171. series: [{
  172. name: '点击量',
  173. type: 'bar',
  174. barWidth: 20,//柱图宽度
  175. data: viewsList
  176. }]
  177. };
  178. let comments = this.$echarts.init(document.getElementById('comments'));
  179. let commentList = lessonInfo[this.rowKey ].schoolComments.map(a => a.commentCount);
  180. let commentsOption = {
  181. color: ['#ff8745'],
  182. tooltip: {
  183. trigger: 'axis',
  184. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  185. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  186. }
  187. },
  188. xAxis: {
  189. data: schoolList,
  190. axisLabel: {
  191. interval: 0,
  192. rotate: 40,
  193. formatter: function (value) {
  194. return (value.length > 6 ? (value.slice(0,6)+"...") : value )
  195. },
  196. },
  197. },
  198. grid: {
  199. left: '3%',
  200. right: '4%',
  201. bottom: '3%',
  202. height:'400px',
  203. containLabel: true
  204. },
  205. yAxis: {
  206. name: "评论数",
  207. splitLine: { // gird 区域中的分割线
  208. show: false, // 是否显示
  209. lineStyle: {
  210. color: '#666',
  211. width: 1,
  212. type: 'dashed'
  213. }
  214. },
  215. },
  216. series: [{
  217. name: '评论数',
  218. type: 'bar',
  219. barWidth: 20,//柱图宽度
  220. data: commentList
  221. }]
  222. };
  223. setTimeout(() => {
  224. myChart.setOption(option);
  225. comments.setOption(commentsOption);
  226. }, 1500);
  227. }
  228. }
  229. </script>
  230. <style scoped>
  231. html, body, #app {
  232. height: 100% !important;
  233. user-select: none;
  234. }
  235. .main-content {
  236. background: rgb(248,248,248) !important;
  237. }
  238. .center-row {
  239. display: flex;
  240. flex-direction: row;
  241. }
  242. .center-col {
  243. display: flex;
  244. flex-direction: column;
  245. }
  246. .banner {
  247. width: 100%;
  248. margin-top: 80px;
  249. }
  250. .banner img {
  251. width: 100%;
  252. min-width: 1280px;
  253. }
  254. .details-container {
  255. position: relative;
  256. width: 1200px;
  257. margin: 80px auto;
  258. margin-top: -50px;
  259. z-index: 999;
  260. display: flex;
  261. flex-direction: column;
  262. }
  263. .details-container .activity-brief {
  264. width: 100%;
  265. background: #fff;
  266. border-top-left-radius: 8px;
  267. border-top-right-radius: 8px;
  268. }
  269. .details-container .activity-brief .activity-brief-left {
  270. width: 30%;
  271. height: 100%;
  272. padding: 30px 20px 0 20px;
  273. }
  274. .details-container .activity-brief .activity-brief-right {
  275. width: 70%;
  276. height: 100%;
  277. padding: 20px;
  278. }
  279. .details-container .activity-brief-title {
  280. font-size: 26px;
  281. font-weight: bolder;
  282. color: #333;
  283. padding: 5px 20px;
  284. margin-left: 10px;
  285. border-bottom: 1px solid #f6f6f6;
  286. }
  287. .details-container .activity-brief-title .status {
  288. display: inline-block;
  289. margin-left: 10px;
  290. font-size: 14px;
  291. color: #fff;
  292. padding: 1px 6px;
  293. vertical-align: top;
  294. margin-top: 6px;
  295. background-color: #53c766;
  296. border-radius: 3px;
  297. }
  298. .details-container .activity-brief-title .ivu-btn {
  299. width: 120px;
  300. height: 38px;
  301. margin-left: 20px;
  302. margin-bottom: 10px;
  303. }
  304. .details-container .brief-info-left {
  305. width: 50%;
  306. }
  307. .details-container .brief-info-left .items {
  308. margin: 5px;
  309. }
  310. .details-container .brief-info-left .items .item {
  311. font-size: 14px;
  312. color: #666;
  313. }
  314. .details-container .brief-info-left .items .item2 {
  315. font-size: 20px;
  316. color: #ffa853;
  317. }
  318. .details-container .brief-info-left .items .tips {
  319. font-size: 14px;
  320. color: #bbb;
  321. }
  322. .details-container .activity-details {
  323. width: 100%;
  324. margin-top: 20px;
  325. }
  326. .details-container .activity-details .details-left {
  327. width: 30%;
  328. height: 100%;
  329. }
  330. .details-container .activity-details .details-right {
  331. width: 70%;
  332. height: 100%;
  333. margin-left: 20px;
  334. }
  335. .details-container .activity-details .details-right .title-tip {
  336. margin-top: 20px;
  337. }
  338. .details-container .title-tip {
  339. padding: 20px;
  340. background: #fff;
  341. }
  342. .details-container .review-attachment {
  343. padding: 20px;
  344. margin-top: 20px;
  345. background: #fff;
  346. }
  347. .details-container .title {
  348. color: #33aafe;
  349. font-size: 16px;
  350. padding-bottom: 15px;
  351. border-bottom: 1px solid #f6f6f6;
  352. }
  353. .details-container .title span {
  354. color: #ccc;
  355. font-size: 14px;
  356. margin-left: 8px;
  357. }
  358. .details-container .title-tip .content {
  359. color: #999;
  360. font-size: 14px;
  361. margin-top: 15px;
  362. }
  363. .details-container .details-left .review-attachment .attach {
  364. height: 40px;
  365. line-height: 40px;
  366. padding-left: 40px;
  367. margin-bottom: 14px;
  368. margin-top: 10px;
  369. }
  370. .details-container .details-left .review-attachment .attach a {
  371. display: inline-block;
  372. text-decoration: none;
  373. font-size: 13px;
  374. color: #555;
  375. overflow: hidden;
  376. text-overflow: ellipsis;
  377. white-space: nowrap;
  378. width: 160px;
  379. text-decoration: underline;
  380. }
  381. .details-container .details-left .review-attachment .attachicon-2 {
  382. background: url("http://hystkj-oss.oss-cn-shenzhen.aliyuncs.com/icon.png") no-repeat;
  383. }
  384. .details-container .comment-item {
  385. line-height: 40px;
  386. color: #333;
  387. font-weight:bold;
  388. border-bottom: 1px solid #f6f6f6;
  389. }
  390. .img-box {
  391. background:url(../../assets/image/lessonCover.png);
  392. height: 210px
  393. }
  394. .img-box .lesson-image {
  395. display:flex;
  396. flex-direction:column;
  397. justify-content:center;
  398. align-items:center;
  399. color:#fff;
  400. font-weight:bold;
  401. }
  402. .img-box .state {
  403. padding: 5px 8px;
  404. line-height: 20px;
  405. position: relative;
  406. left: 0;
  407. top: 3px;
  408. z-index: 1;
  409. background-color: #13ce66;
  410. color: #fff
  411. }
  412. </style>