LessonDetails.vue 11 KB

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