LessonDetails.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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="'http://ttkt.sxedu.org:70'+activityInfo.coverUri" />
  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. import { setTimeout } from 'core-js';
  81. export default {
  82. components: {
  83. },
  84. data() {
  85. return {
  86. reviewAcList: [],
  87. attachmentsList: [],
  88. commentList:[],
  89. activityInfo: {}
  90. }
  91. },
  92. created() {
  93. this.attachmentsList = lessonInfo.attachments;
  94. this.activityInfo = lessonInfo.data;
  95. this.commentList = lessonInfo.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.views.map(a => a.schoolName);
  109. let viewsList = lessonInfo.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. 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. setTimeout(function () {
  207. myChart.setOption(option);
  208. comments.setOption(commentsOption);
  209. }, 1000);
  210. }
  211. }
  212. </script>
  213. <style scoped>
  214. html, body, #app {
  215. height: 100% !important;
  216. user-select: none;
  217. }
  218. .main-content {
  219. background: rgb(248,248,248) !important;
  220. }
  221. .center-row {
  222. display: flex;
  223. flex-direction: row;
  224. }
  225. .center-col {
  226. display: flex;
  227. flex-direction: column;
  228. }
  229. .banner {
  230. width: 100%;
  231. margin-top: 80px;
  232. }
  233. .banner img {
  234. width: 100%;
  235. min-width: 1280px;
  236. }
  237. .details-container {
  238. position: relative;
  239. width: 1200px;
  240. margin: 80px auto;
  241. margin-top: -50px;
  242. z-index: 999;
  243. display: flex;
  244. flex-direction: column;
  245. }
  246. .details-container .activity-brief {
  247. width: 100%;
  248. background: #fff;
  249. border-top-left-radius: 8px;
  250. border-top-right-radius: 8px;
  251. }
  252. .details-container .activity-brief .activity-brief-left {
  253. width: 30%;
  254. height: 100%;
  255. padding: 40px 20px 0 20px;
  256. }
  257. .details-container .activity-brief .activity-brief-right {
  258. width: 70%;
  259. height: 100%;
  260. padding: 20px;
  261. }
  262. .details-container .activity-brief-title {
  263. font-size: 26px;
  264. font-weight: bolder;
  265. color: #333;
  266. padding: 5px 20px;
  267. margin-left: 10px;
  268. border-bottom: 1px solid #f6f6f6;
  269. }
  270. .details-container .activity-brief-title .status {
  271. display: inline-block;
  272. margin-left: 10px;
  273. font-size: 14px;
  274. color: #fff;
  275. padding: 1px 6px;
  276. vertical-align: top;
  277. margin-top: 6px;
  278. background-color: #53c766;
  279. border-radius: 3px;
  280. }
  281. .details-container .activity-brief-title .ivu-btn {
  282. width: 120px;
  283. height: 38px;
  284. margin-left: 20px;
  285. margin-bottom: 10px;
  286. }
  287. .details-container .brief-info-left {
  288. width: 50%;
  289. }
  290. .details-container .brief-info-left .items {
  291. margin: 5px;
  292. }
  293. .details-container .brief-info-left .items .item {
  294. font-size: 14px;
  295. color: #666;
  296. }
  297. .details-container .brief-info-left .items .item2 {
  298. font-size: 20px;
  299. color: #ffa853;
  300. }
  301. .details-container .brief-info-left .items .tips {
  302. font-size: 14px;
  303. color: #bbb;
  304. }
  305. .details-container .activity-details {
  306. width: 100%;
  307. margin-top: 20px;
  308. }
  309. .details-container .activity-details .details-left {
  310. width: 30%;
  311. height: 100%;
  312. }
  313. .details-container .activity-details .details-right {
  314. width: 70%;
  315. height: 100%;
  316. margin-left: 20px;
  317. }
  318. .details-container .activity-details .details-right .title-tip {
  319. margin-top: 20px;
  320. }
  321. .details-container .title-tip {
  322. padding: 20px;
  323. background: #fff;
  324. }
  325. .details-container .review-attachment {
  326. padding: 20px;
  327. margin-top: 20px;
  328. background: #fff;
  329. }
  330. .details-container .title {
  331. color: #33aafe;
  332. font-size: 16px;
  333. padding-bottom: 15px;
  334. border-bottom: 1px solid #f6f6f6;
  335. }
  336. .details-container .title span {
  337. color: #ccc;
  338. font-size: 14px;
  339. margin-left: 8px;
  340. }
  341. .details-container .title-tip .content {
  342. color: #999;
  343. font-size: 14px;
  344. margin-top: 15px;
  345. }
  346. .details-container .details-left .review-attachment .attach {
  347. height: 40px;
  348. line-height: 40px;
  349. padding-left: 40px;
  350. margin-bottom: 14px;
  351. margin-top: 10px;
  352. }
  353. .details-container .details-left .review-attachment .attach a {
  354. display: inline-block;
  355. text-decoration: none;
  356. font-size: 13px;
  357. color: #555;
  358. overflow: hidden;
  359. text-overflow: ellipsis;
  360. white-space: nowrap;
  361. width: 160px;
  362. text-decoration: underline;
  363. }
  364. .details-container .details-left .review-attachment .attachicon-2 {
  365. background: url("http://hystkj-oss.oss-cn-shenzhen.aliyuncs.com/icon.png") no-repeat;
  366. }
  367. .details-container .comment-item {
  368. line-height: 40px;
  369. color: #333;
  370. font-weight:bold;
  371. border-bottom: 1px solid #f6f6f6;
  372. }
  373. </style>