LessonDetails.vue 12 KB

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