LessonDetails.vue 12 KB

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