LessonDetails.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. <template>
  2. <div id="app">
  3. <div class="banner">
  4. <img src="../../assets/image/banner_header.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. export default {
  91. components: {
  92. },
  93. data() {
  94. return {
  95. reviewAcList: [],
  96. attachmentsList: [],
  97. commentList: [],
  98. rowKey:0,
  99. activityInfo: {}
  100. }
  101. },
  102. created() {
  103. this.rowKey = sessionStorage.getItem('_lesson_rowKey');
  104. this.attachmentsList = lessonInfo[this.rowKey].attachments;
  105. this.activityInfo = lessonInfo[this.rowKey].data;
  106. this.commentList = lessonInfo[this.rowKey].commentList;
  107. },
  108. methods: {
  109. gotoVideo() {
  110. this.$router.push(
  111. {
  112. path:'commentVideo'
  113. }
  114. );
  115. },
  116. },
  117. mounted() {
  118. let myChart = this.$echarts.init(document.getElementById('views'));
  119. let schoolList = lessonInfo[this.rowKey ].views.map(a => a.schoolName);
  120. let viewsList = lessonInfo[this.rowKey ].views.map(a => a.viewCount);
  121. let option = {
  122. color: ['#ff8745'],
  123. tooltip: {
  124. trigger: 'axis',
  125. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  126. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  127. }
  128. },
  129. xAxis: {
  130. data: schoolList,
  131. axisLabel: {
  132. interval: 0,
  133. rotate: 40,
  134. formatter: function (value) {
  135. return (value.length > 6 ? (value.slice(0,6)+"...") : value )
  136. },
  137. },
  138. splitLine: { // gird 区域中的分割线
  139. show: false, // 是否显示
  140. lineStyle: {
  141. color: '#666',
  142. width: 0,
  143. type: 'dashed'
  144. }
  145. },
  146. },
  147. grid: {
  148. left: '3%',
  149. right: '4%',
  150. bottom: '3%',
  151. height: '400px',
  152. containLabel: true
  153. },
  154. yAxis: {
  155. name: "点击量",
  156. splitLine: { // gird 区域中的分割线
  157. show: false, // 是否显示
  158. lineStyle: {
  159. color: '#666',
  160. width: 1,
  161. type: 'dashed'
  162. }
  163. },
  164. },
  165. series: [{
  166. name: '点击量',
  167. type: 'bar',
  168. barWidth: 20,//柱图宽度
  169. data: viewsList
  170. }]
  171. };
  172. myChart.setOption(option);
  173. let comments = this.$echarts.init(document.getElementById('comments'));
  174. let commentList = lessonInfo[this.rowKey ].schoolComments.map(a => a.commentCount);
  175. let commentsOption = {
  176. color: ['#ff8745'],
  177. tooltip: {
  178. trigger: 'axis',
  179. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  180. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  181. }
  182. },
  183. xAxis: {
  184. data: schoolList,
  185. axisLabel: {
  186. interval: 0,
  187. rotate: 40,
  188. formatter: function (value) {
  189. return (value.length > 6 ? (value.slice(0,6)+"...") : value )
  190. },
  191. },
  192. },
  193. grid: {
  194. left: '3%',
  195. right: '4%',
  196. bottom: '3%',
  197. height:'400px',
  198. containLabel: true
  199. },
  200. yAxis: {
  201. name: "评论数",
  202. splitLine: { // gird 区域中的分割线
  203. show: false, // 是否显示
  204. lineStyle: {
  205. color: '#666',
  206. width: 1,
  207. type: 'dashed'
  208. }
  209. },
  210. },
  211. series: [{
  212. name: '评论数',
  213. type: 'bar',
  214. barWidth: 20,//柱图宽度
  215. data: commentList
  216. }]
  217. };
  218. comments.setOption(commentsOption);
  219. }
  220. }
  221. </script>
  222. <style scoped>
  223. html, body, #app {
  224. height: 100% !important;
  225. user-select: none;
  226. }
  227. .main-content {
  228. background: rgb(248,248,248) !important;
  229. }
  230. .center-row {
  231. display: flex;
  232. flex-direction: row;
  233. }
  234. .center-col {
  235. display: flex;
  236. flex-direction: column;
  237. }
  238. .banner {
  239. width: 100%;
  240. margin-top: 80px;
  241. }
  242. .banner img {
  243. width: 100%;
  244. min-width: 1280px;
  245. }
  246. .details-container {
  247. position: relative;
  248. width: 1200px;
  249. margin: 80px auto;
  250. margin-top: -50px;
  251. z-index: 999;
  252. display: flex;
  253. flex-direction: column;
  254. }
  255. .details-container .activity-brief {
  256. width: 100%;
  257. background: #fff;
  258. border-top-left-radius: 8px;
  259. border-top-right-radius: 8px;
  260. }
  261. .details-container .activity-brief .activity-brief-left {
  262. width: 30%;
  263. height: 100%;
  264. padding: 30px 20px 0 20px;
  265. }
  266. .details-container .activity-brief .activity-brief-right {
  267. width: 70%;
  268. height: 100%;
  269. padding: 20px;
  270. }
  271. .details-container .activity-brief-title {
  272. font-size: 26px;
  273. font-weight: bolder;
  274. color: #333;
  275. padding: 5px 20px;
  276. margin-left: 10px;
  277. border-bottom: 1px solid #f6f6f6;
  278. }
  279. .details-container .activity-brief-title .status {
  280. display: inline-block;
  281. margin-left: 10px;
  282. font-size: 14px;
  283. color: #fff;
  284. padding: 1px 6px;
  285. vertical-align: top;
  286. margin-top: 6px;
  287. background-color: #53c766;
  288. border-radius: 3px;
  289. }
  290. .details-container .activity-brief-title .ivu-btn {
  291. width: 120px;
  292. height: 38px;
  293. margin-left: 20px;
  294. margin-bottom: 10px;
  295. }
  296. .details-container .brief-info-left {
  297. width: 50%;
  298. }
  299. .details-container .brief-info-left .items {
  300. margin: 5px;
  301. }
  302. .details-container .brief-info-left .items .item {
  303. font-size: 14px;
  304. color: #666;
  305. }
  306. .details-container .brief-info-left .items .item2 {
  307. font-size: 20px;
  308. color: #ffa853;
  309. }
  310. .details-container .brief-info-left .items .tips {
  311. font-size: 14px;
  312. color: #bbb;
  313. }
  314. .details-container .activity-details {
  315. width: 100%;
  316. margin-top: 20px;
  317. }
  318. .details-container .activity-details .details-left {
  319. width: 30%;
  320. height: 100%;
  321. }
  322. .details-container .activity-details .details-right {
  323. width: 70%;
  324. height: 100%;
  325. margin-left: 20px;
  326. }
  327. .details-container .activity-details .details-right .title-tip {
  328. margin-top: 20px;
  329. }
  330. .details-container .title-tip {
  331. padding: 20px;
  332. background: #fff;
  333. }
  334. .details-container .review-attachment {
  335. padding: 20px;
  336. margin-top: 20px;
  337. background: #fff;
  338. }
  339. .details-container .title {
  340. color: #33aafe;
  341. font-size: 16px;
  342. padding-bottom: 15px;
  343. border-bottom: 1px solid #f6f6f6;
  344. }
  345. .details-container .title span {
  346. color: #ccc;
  347. font-size: 14px;
  348. margin-left: 8px;
  349. }
  350. .details-container .title-tip .content {
  351. color: #999;
  352. font-size: 14px;
  353. margin-top: 15px;
  354. }
  355. .details-container .details-left .review-attachment .attach {
  356. height: 40px;
  357. line-height: 40px;
  358. padding-left: 40px;
  359. margin-bottom: 14px;
  360. margin-top: 10px;
  361. }
  362. .details-container .details-left .review-attachment .attach a {
  363. display: inline-block;
  364. text-decoration: none;
  365. font-size: 13px;
  366. color: #555;
  367. overflow: hidden;
  368. text-overflow: ellipsis;
  369. white-space: nowrap;
  370. width: 160px;
  371. text-decoration: underline;
  372. }
  373. .details-container .details-left .review-attachment .attachicon-2 {
  374. background: url("http://hystkj-oss.oss-cn-shenzhen.aliyuncs.com/icon.png") no-repeat;
  375. }
  376. .details-container .comment-item {
  377. line-height: 40px;
  378. color: #333;
  379. font-weight:bold;
  380. border-bottom: 1px solid #f6f6f6;
  381. }
  382. .img-box {
  383. background:url(../../assets/image/lessonCover.png);
  384. height: 210px
  385. }
  386. .img-box .lesson-image {
  387. display:flex;
  388. flex-direction:column;
  389. justify-content:center;
  390. align-items:center;
  391. color:#fff;
  392. font-weight:bold;
  393. }
  394. .img-box .state {
  395. padding: 5px 8px;
  396. line-height: 20px;
  397. position: relative;
  398. left: 0;
  399. top: 3px;
  400. z-index: 1;
  401. background-color: #13ce66;
  402. color: #fff
  403. }
  404. </style>