recomLeft.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <div class="left fl">
  3. <dl class="chapter bgf">
  4. <dt>当前课程</dt>
  5. <dd>
  6. <Timeline>
  7. <TimelineItem color="#2db7f5">
  8. <p class="time">教材:</p>
  9. <p class="content">初中历史与社会人教课</p>
  10. </TimelineItem>
  11. <TimelineItem color="#2db7f5">
  12. <p class="time">章节:第一章</p>
  13. <p class="content">人在社会中生活</p>
  14. </TimelineItem>
  15. <TimelineItem color="#2db7f5">
  16. <p class="time" style="font-weight: bold;" >课文:第一课 </p>
  17. <p class="content" style="font-weight: bold;">我的家在哪里</p>
  18. </TimelineItem>
  19. </Timeline>
  20. </dd>
  21. <!--<dd><Icon type="ios-browsers-outline"style="font-size: 16px;" /> 初中历史与社会人教课标版</dd>-->
  22. <!--<dd><Icon type="ios-browsers-outline"style="font-size: 16px;" /> 第一单元 人在社会中生活</dd>-->
  23. <!--<dd class="nowText"><Icon type="ios-list-box-outline" style="font-size: 16px;"/> 第二课 我的家在哪里</dd>-->
  24. <dd>
  25. <Button @click="value2 = true" type="info" long>选择章节 <Icon type="ios-arrow-dropright" style="font-size: 16px;"/></Button>
  26. </dd>
  27. </dl>
  28. <Drawer placement="left" :closable="false" v-model="value2" width="300">
  29. <div class="modalSel">
  30. <h4>选择教材:</h4>
  31. <Select v-model="select">
  32. <Option value="sel1" >初中历史与社会人教课标版</Option>
  33. <Option value="sel2">思想政治人教标本七年级上册</Option>
  34. <Option value="sel3">地理人教科标板七年级上册</Option>
  35. <Option value="sel4">地理人教科标板七年级上册</Option>
  36. <Option value="sel5">音地理人教科标板七年级上册</Option>
  37. <Option value="sel6">地理人教科标板七年级上册</Option>
  38. </Select>
  39. </div>
  40. <Tree :data="data5" :render="renderContent"></Tree>
  41. <Button type="primary" long>添加教材</Button>
  42. </Drawer>
  43. <dl class="work bgf">
  44. <dt>我的工作</dt>
  45. <dd><a href="/teachSource" class="active"><i class="icon"></i>教材资源</a></dd>
  46. <dd><a href="/teachCheck"><i class="icon"></i>在线检测</a></dd>
  47. <dd><a href="/teachPreclass"><i class="icon"></i>课前导学</a></dd>
  48. <dd><a href="/teachPrelesson"><i class="icon"></i>同步备课</a></dd>
  49. <dd><a href="/teachTask"><i class="icon"></i>课后作业</a></dd>
  50. </dl>
  51. <div class="sourceRecom bgf">
  52. <h3>推荐资源 <span class="fr refresh">换一批</span></h3>
  53. <ul>
  54. <li class="word">
  55. <a href="">
  56. <p>当我们的手中只剩下一片树叶.docx</p>
  57. <p>
  58. <Rate allow-half v-model="valueText" disabled></Rate>
  59. </p>
  60. </a>
  61. </li>
  62. <li class="word">
  63. <a href="">
  64. <p>当我们的手中只剩下一片树叶.docx</p>
  65. <p>
  66. <Rate allow-half v-model="valueText" disabled></Rate>
  67. </p>
  68. </a>
  69. </li>
  70. <li class="ppt">
  71. <a href="">
  72. <p>当我们的手中只剩下一片树叶.ppt</p>
  73. <p>
  74. <Rate allow-half v-model="valueText" disabled></Rate>
  75. </p>
  76. </a>
  77. </li>
  78. <li class="video">
  79. <a href="">
  80. <p>当我们的手中只剩下一片树叶.mp4</p>
  81. <p>
  82. <Rate allow-half v-model="valueText" disabled></Rate>
  83. </p>
  84. </a>
  85. </li>
  86. <li class="word">
  87. <a href="">
  88. <p>当我们的手中只剩下一片树叶.docx</p>
  89. <p>
  90. <Rate allow-half v-model="valueText" disabled></Rate>
  91. </p>
  92. </a>
  93. </li>
  94. </ul>
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. export default {
  100. data () {
  101. return {
  102. select:'sel1',
  103. valueText:5,
  104. value2: false,
  105. data5: [
  106. // {
  107. // title:'致同学们',
  108. // expand: true,
  109. // },
  110. {
  111. title: '第一单元 人在社会中生活',
  112. expand: true,
  113. children: [
  114. {
  115. title: '第一课 我的家在哪里',
  116. expand: true
  117. },
  118. {
  119. title: '第二课 乡村与城市',
  120. expand: true
  121. },
  122. {
  123. title: '综合探究一 从地图上获取信息',
  124. expand: true
  125. }
  126. ]
  127. },
  128. {
  129. title: '第二单元 人类共同生活的世界',
  130. expand: false,
  131. children: [
  132. {
  133. title: '第一课 大洲和大洋',
  134. expand: true
  135. },
  136. {
  137. title: '第二课 自然环境',
  138. expand: true
  139. },
  140. {
  141. title: '第三课 世界大家庭',
  142. expand: true
  143. },
  144. {
  145. title: '综合探究二 从地球仪上看世界',
  146. expand: true
  147. }
  148. ]
  149. },
  150. {
  151. title: '第三单元 各具特色的区域生活',
  152. expand: false,
  153. children: [
  154. {
  155. title: '第一课 家住平原',
  156. expand: true
  157. },
  158. {
  159. title: '第二课 与山为邻',
  160. expand: true
  161. }, {
  162. title: '第三课 傍水而居',
  163. expand: true
  164. }, {
  165. title: '第四课 草原人家',
  166. expand: true
  167. }, {
  168. title: '第五课 干旱的宝地',
  169. expand: true
  170. }, {
  171. title: '综合探究三 如何认识区域',
  172. expand: true
  173. },
  174. ]
  175. },
  176. {
  177. title: '第四单元 文明中心——城市',
  178. expand: false,
  179. children: [
  180. {
  181. title: '第一课 美国政治的心脏:华盛顿',
  182. expand: true
  183. },
  184. {
  185. title: '第二课 文化艺术之都:巴黎',
  186. expand: true
  187. },
  188. {
  189. title: '第三课 IT新城:班加罗尔',
  190. expand: true
  191. },
  192. {
  193. title: '第四课 汽车城:蔚山',
  194. expand: true
  195. },
  196. {
  197. title: '第五课 城市规划的典范:巴西利亚',
  198. expand: true
  199. },
  200. {
  201. title: '综合探究 如何认识城市',
  202. expand: true
  203. }
  204. ]
  205. }
  206. ],
  207. buttonProps: {
  208. type: 'default',
  209. size: 'small',
  210. }
  211. }
  212. },
  213. methods: {
  214. renderContent (h, { root, node, data }) {
  215. return h('span', {//二级
  216. style: {
  217. display: 'inline-block',
  218. width: '100%',
  219. cursor:'pointer'
  220. },
  221. on: {
  222. click: () => { this.titleClick(root, node, data) }
  223. }
  224. }, [
  225. h('span', [
  226. h('Icon', {
  227. props: {
  228. type: 'ios-paper-outline'
  229. },
  230. style: {
  231. marginRight: '8px'
  232. }
  233. }),
  234. h('span', data.title)
  235. ]),
  236. ]);
  237. },
  238. append (data) {
  239. const children = data.children || [];
  240. children.push({
  241. title: 'appended node',
  242. expand: true
  243. });
  244. this.$set(data, 'children', children);
  245. },
  246. remove (root, node, data) {
  247. const parentKey = root.find(el => el === node).parent;
  248. const parent = root.find(el => el.nodeKey === parentKey).node;
  249. const index = parent.children.indexOf(data);
  250. parent.children.splice(index, 1);
  251. },
  252. titleClick(root, node, data,event){
  253. data.expand = !data.expand
  254. }
  255. }
  256. }
  257. </script>