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