commoand.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <template>
  2. <view class="m_container">
  3. <view class="m_left">
  4. <view class="m_hander">
  5. <view class="m_teacher">
  6. <image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image>
  7. <view class="m_teacher_name" v-text="name"></view>
  8. <view class="m_teacher_position" v-text="position"></view>
  9. </view>
  10. </view>
  11. <view class="m_menu">
  12. <view class="m_menu-item_data " v-for="(item,index) in menu" :key="index" @click="checkMenu(item,0)">
  13. <view class="m_menu-item">
  14. <view :class="item.select&&childrenIndex==-1?'m_act':''"></view>
  15. <view class="m_menu_item_icon">
  16. <span class="font_family " :class="item.select&&childrenIndex==-1? item.icon+' m_act1 ':item.icon"></span>
  17. </view>
  18. <view class="m_menu_item_name" :class="item.select&&childrenIndex==-1?'m_act_font':''">{{item.title}}</view>
  19. <!-- <view class="m_menu_right">
  20. <icon :type="''" class="font_family icon-lujing2 " :class="item.select? 'm_act11':''"></icon>
  21. </view> -->
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <studentInfo ref="info" v-show="index==1"></studentInfo>
  27. <record ref="record" v-show="index==2"></record>
  28. <!-- <teacher ref="teacher" v-show="index==1" @paging="paging"></teacher>
  29. <create ref="create" v-show="index==3"></create>
  30. <vtable ref="table" v-show="index==2"></vtable>
  31. <project ref="project" v-show="index==4"></project>
  32. <location ref="location" v-show="index==2||index==4"></location> -->
  33. </view>
  34. </template>
  35. <script>
  36. import studentInfo from "./StudentInfo.vue"
  37. import record from "./record.vue"
  38. export default {
  39. data() {
  40. return {
  41. index: 1,
  42. childrenIndex: -1,
  43. name: '张林老师',
  44. position: '计算机系',
  45. menu: [{
  46. id: 1,
  47. icon: "icon-bianzu22",
  48. select: true,
  49. title: '个人信息'
  50. }, {
  51. id: 2,
  52. icon: "icon-bianzu22",
  53. select: false,
  54. title: '学习记录',
  55. }]
  56. }
  57. },
  58. components: {
  59. studentInfo,
  60. record
  61. },
  62. methods: {
  63. checkMenu(obj, i) {
  64. this.index = obj.id;
  65. if (i == 0) {
  66. this.index = obj.id;
  67. this.menu.forEach(p => p.select = false);
  68. obj.select = true;
  69. } else {
  70. obj.select = true;
  71. }
  72. },
  73. paging(obj) {
  74. this.index = obj;
  75. },
  76. childrenClick(obj) {
  77. obj.select = true;
  78. }
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. @import '../../assets/icon/iconfont.css';
  84. .m_menu_right {
  85. position: absolute;
  86. right: 50rpx;
  87. top: 50%;
  88. transform: translateY(-50%);
  89. font-size: 30rpx;
  90. }
  91. .m_menu-item_data:hover {
  92. background: #EA252C;
  93. color: #fff;
  94. .m_menu_item_name {
  95. color: #fff;
  96. }
  97. .m_menu_item_icon {
  98. color: #fff;
  99. }
  100. }
  101. .m_menu-item-checked {}
  102. .m_container {
  103. display: flex;
  104. justify-content: space-between;
  105. width: 100%;
  106. height: 100%;
  107. .m_left {
  108. width: 500rpx;
  109. background-color: #fff;
  110. border-right: 10rpx solid #ECECEC;
  111. border-top: 5rpx solid #ECECEC;
  112. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  113. .m_hander {
  114. text-align: center;
  115. background-color: #fff;
  116. height: 600rpx;
  117. position: relative;
  118. // margin: 5rpx 10rpx 10rpx 0;
  119. border-bottom: 8rpx solid #ECECEC;
  120. .m_teacher {
  121. position: absolute;
  122. top: 50%;
  123. left: 50%;
  124. transform: translate(-50%, -50%);
  125. }
  126. .m_teacher_name {
  127. font-size: 1.1rem;
  128. font-weight: 600;
  129. padding: 30rpx 0;
  130. font-family: MicrosoftYaHei;
  131. }
  132. .m_head_portrait {
  133. width: 250rpx;
  134. height: 250rpx;
  135. color: #555555;
  136. }
  137. }
  138. }
  139. .m_right {
  140. width: 100%;
  141. margin-top: 5rpx;
  142. // padding: 0 150rpx;
  143. background-color: #fff;
  144. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  145. .m_right_hander {
  146. text-align: right;
  147. height: 250rpx;
  148. position: relative;
  149. .m_btn_red {
  150. position: absolute;
  151. height: 80rpx;
  152. line-height: 80rpx;
  153. padding: 0 40rpx;
  154. right: 0;
  155. top: 50%;
  156. transform: translateY(-50%);
  157. background: #EA252C;
  158. color: #fff;
  159. }
  160. }
  161. }
  162. .m_menu-icon {
  163. width: 24rpx;
  164. height: 24rpx;
  165. }
  166. .m_menu {
  167. background-color: #fff;
  168. .m_menu-item {
  169. position: relative;
  170. display: flex;
  171. padding: 20rpx 0;
  172. line-height: 90rpx;
  173. font-weight: 500;
  174. border-bottom: 1px solid #DDDDDD;
  175. .m_menu_item_icon {
  176. width: 100rpx;
  177. text-align: right;
  178. margin-right: 15rpx;
  179. }
  180. .m_menu_item_name {
  181. margin-left: 10rpx;
  182. font-weight: 600;
  183. }
  184. .m_act {
  185. background: #FF0019;
  186. width: 8rpx;
  187. border-radius: 0px 200rpx 200rpx 0px;
  188. position: absolute;
  189. height: 90rpx;
  190. top: 20rpx;
  191. left: 0;
  192. }
  193. }
  194. }
  195. .m_act_font {
  196. // color: #FF0019;
  197. }
  198. }
  199. tbody tr {
  200. border-top: 2rpx solid #DDDDDD !important;
  201. }
  202. tbody tr th {
  203. font-weight: 400 !important;
  204. height: 140rpx;
  205. line-height: 140rpx;
  206. }
  207. tbody tr:hover {
  208. // color: #fff;
  209. background: #FDEBEC;
  210. // opacity: 0.08;
  211. }
  212. .m-table-hander {
  213. background-color: #FFF8F7;
  214. height: 140rpx;
  215. line-height: 140rpx;
  216. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  217. font-weight: bold;
  218. }
  219. .m_edit {
  220. position: absolute;
  221. top: 50%;
  222. left: 50%;
  223. transform: translate(-50%, -50%);
  224. background: rgb(67, 127, 250);
  225. color: rgb(255, 255, 255);
  226. min-width: 130rpx;
  227. }
  228. .m_delete {
  229. position: absolute;
  230. top: 50%;
  231. left: 50%;
  232. min-width: 130rpx;
  233. transform: translate(-50%, -50%);
  234. background: rgb(234, 37, 44);
  235. color: rgb(255, 255, 255);
  236. }
  237. .m_right_footer {
  238. margin-top: 80rpx;
  239. }
  240. .m_paging {
  241. text-align: right;
  242. .m_paging_item {
  243. padding: 10rpx 18rpx;
  244. border: 1rpx solid #DDDDDD;
  245. border-radius: 8rpx;
  246. margin-right: 10rpx;
  247. }
  248. .p_act {
  249. background: #EA252C;
  250. color: #fff;
  251. border: inherit;
  252. }
  253. }
  254. .m_paging_item:hover {
  255. background: #EA252C;
  256. color: #fff;
  257. border: inherit;
  258. }
  259. .m_act1 {
  260. color: #FF0019;
  261. }
  262. .m_act11 {
  263. // color: #FF0019;
  264. transform: rotate(90deg);
  265. transition: all 500ms ease;
  266. }
  267. .s_logo {
  268. width: 100%;
  269. height: 1000rpx;
  270. }
  271. .s_content_container {
  272. padding: 0 206rpx;
  273. .s_title {
  274. font-weight: bold;
  275. text-align: center;
  276. line-height: 200rpx;
  277. font-size: 45rpx;
  278. }
  279. .s_content {
  280. font-weight: 500;
  281. font-size: 40rpx;
  282. line-height: 70rpx;
  283. }
  284. }
  285. .m_btn_download {
  286. height: 80rpx;
  287. line-height: 80rpx;
  288. padding: 0 70rpx;
  289. background: #EA252C;
  290. color: #fff;
  291. font-family: MicrosoftYaHei;
  292. }
  293. .m_menu-item-checked .m_menu_item_name {
  294. line-height: 70rpx;
  295. text-align: center;
  296. }
  297. .m_menu-item-checked .cact {
  298. color: #EA252C;
  299. }
  300. </style>