Index.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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 " :class="item.select?'m_act_font':''" v-for="(item,index) in menu" :key="index" @click="checkMenu(item)">
  13. <view :class="item.select?'m_act':''">
  14. </view>
  15. <view class="m_menu_item_icon">
  16. <icon type="" class="font_family" :class="item.select?(item.icon+' m_act1'):item.icon"></icon>
  17. </view>
  18. <view class="m_menu_item_name" v-text="item.title"></view>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- <view class="m_right">
  23. <view class="m_right_hander">
  24. <button size="mini" class="m_btn_red">添加用户</button>
  25. </view>
  26. <view class="m_right_container">
  27. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  28. <thead class="m-table-hander">
  29. <tr>
  30. <th>用户名</th>
  31. <th>班级</th>
  32. <th>学号</th>
  33. <th>电话</th>
  34. <th>ilab账户</th>
  35. <th>注册时间</th>
  36. <th>分数</th>
  37. <th>修改信息</th>
  38. <th>删除</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <tr>
  43. <th style="color: #EA252C;">张小旭</th>
  44. <th>26</th>
  45. <th>CMII09</th>
  46. <th>26</th>
  47. <th>15038728747</th>
  48. <th>2021-01-01</th>
  49. <th>90</th>
  50. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  51. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  52. </tr>
  53. <tr>
  54. <th style="color: #EA252C;">张小旭</th>
  55. <th>26</th>
  56. <th>CMII09</th>
  57. <th>26</th>
  58. <th>15038728747</th>
  59. <th>2021-01-01</th>
  60. <th>90</th>
  61. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  62. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  63. </tr>
  64. <tr>
  65. <th style="color: #EA252C;">张小旭</th>
  66. <th>26</th>
  67. <th>CMII09</th>
  68. <th>26</th>
  69. <th>15038728747</th>
  70. <th>2021-01-01</th>
  71. <th>90</th>
  72. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  73. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  74. </tr>
  75. <tr>
  76. <th style="color: #EA252C;">张小旭</th>
  77. <th>26</th>
  78. <th>CMII09</th>
  79. <th>26</th>
  80. <th>15038728747</th>
  81. <th>2021-01-01</th>
  82. <th>90</th>
  83. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  84. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  85. </tr>
  86. <tr>
  87. <th style="color: #EA252C;">张小旭</th>
  88. <th>26</th>
  89. <th>CMII09</th>
  90. <th>26</th>
  91. <th>15038728747</th>
  92. <th>2021-01-01</th>
  93. <th>90</th>
  94. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  95. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  96. </tr>
  97. <tr>
  98. <th style="color: #EA252C;">张小旭</th>
  99. <th>26</th>
  100. <th>CMII09</th>
  101. <th>26</th>
  102. <th>15038728747</th>
  103. <th>2021-01-01</th>
  104. <th>90</th>
  105. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  106. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  107. </tr>
  108. <tr>
  109. <th style="color: #EA252C;">张小旭</th>
  110. <th>26</th>
  111. <th>CMII09</th>
  112. <th>26</th>
  113. <th>15038728747</th>
  114. <th>2021-01-01</th>
  115. <th>90</th>
  116. <th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
  117. <th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
  118. </tr>
  119. </tbody>
  120. </table>
  121. </view>
  122. <view class="m_right_footer">
  123. <view class="m_paging">
  124. <text class="m_paging_item m_paging_upper">上一页</text>
  125. <text class="m_paging_item" v-for="i in 8" @click="paging(i)" :class="i==index?'p_act':''">
  126. {{i}}
  127. </text>
  128. <text class="m_paging_item m_paging_lower">下一页</text>
  129. </view>
  130. </view>
  131. </view>-->
  132. <user ref="user" v-if="routerIndex==1"></user>
  133. <zc ref="zc" v-if="routerIndex==2"></zc>
  134. </view>
  135. </template>
  136. <script>
  137. import user from "./user.vue"
  138. import zc from "./zc.vue"
  139. export default {
  140. name: "manager",
  141. props: [],
  142. data() {
  143. return {
  144. routerIndex: 1,
  145. name: '张林老师',
  146. position: '计算机系',
  147. menu: [{
  148. id: 1,
  149. icon: "icon-bianzu",
  150. select: true,
  151. title: '用户'
  152. }, {
  153. id: 2,
  154. icon: "icon-xingzhuang21",
  155. select: false,
  156. title: '资产'
  157. }, {
  158. id: 3,
  159. icon: "icon-bianzubeifen20",
  160. select: false,
  161. title: '项目'
  162. }]
  163. }
  164. },
  165. components: {
  166. user,
  167. zc
  168. },
  169. created() {
  170. },
  171. methods: {
  172. checkMenu(obj) {
  173. this.menu.forEach(p => p.select = false);
  174. obj.select = true;
  175. this.routerIndex = obj.id;
  176. },
  177. }
  178. }
  179. </script>
  180. <style scoped lang="scss">
  181. @import '../../assets/icon/iconfont.css';
  182. .m_container {
  183. display: flex;
  184. justify-content: space-between;
  185. width: 100%;
  186. height: 100%;
  187. .m_left {
  188. width: 500rpx;
  189. background-color: #fff;
  190. border-right: 10rpx solid #ECECEC;
  191. border-top: 5rpx solid #ECECEC;
  192. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  193. .m_hander {
  194. text-align: center;
  195. background-color: #fff;
  196. height: 600rpx;
  197. position: relative;
  198. // margin: 5rpx 10rpx 10rpx 0;
  199. border-bottom: 8rpx solid #ECECEC;
  200. .m_teacher {
  201. position: absolute;
  202. top: 50%;
  203. left: 50%;
  204. transform: translate(-50%, -50%);
  205. }
  206. .m_teacher_name {
  207. font-size: 1.1rem;
  208. font-weight: 600;
  209. padding: 30rpx 0;
  210. font-family: MicrosoftYaHei;
  211. }
  212. .m_head_portrait {
  213. width: 250rpx;
  214. height: 250rpx;
  215. color: #555555;
  216. }
  217. }
  218. }
  219. // .m_right {
  220. // width: 100%;
  221. // margin-top: 5rpx;
  222. // padding: 0 150rpx;
  223. // background-color: #fff;
  224. // box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  225. // .m_right_hander {
  226. // text-align: right;
  227. // height: 250rpx;
  228. // position: relative;
  229. // .m_btn_red {
  230. // position: absolute;
  231. // height: 80rpx;
  232. // line-height: 80rpx;
  233. // padding: 0 40rpx;
  234. // right: 0;
  235. // top: 50%;
  236. // transform: translateY(-50%);
  237. // background: #EA252C;
  238. // color: #fff;
  239. // }
  240. // }
  241. // }
  242. .m_menu-icon {
  243. width: 24rpx;
  244. height: 24rpx;
  245. }
  246. .m_menu {
  247. background-color: #fff;
  248. .m_menu-item {
  249. position: relative;
  250. display: flex;
  251. padding: 20rpx 0;
  252. line-height: 90rpx;
  253. font-weight: 500;
  254. border-bottom: 1px solid #DDDDDD;
  255. .m_menu_item_icon {
  256. width: 100rpx;
  257. text-align: right;
  258. margin-right: 15rpx;
  259. }
  260. .m_menu_item_name {
  261. margin-left: 10rpx;
  262. font-weight: 600;
  263. }
  264. .m_act {
  265. background: #FF0019;
  266. width: 8rpx;
  267. border-radius: 0px 200rpx 200rpx 0px;
  268. position: absolute;
  269. height: 90rpx;
  270. top: 20rpx;
  271. left: 0;
  272. }
  273. }
  274. }
  275. .m_act_font .m_menu_item_name {
  276. color: #FF0019;
  277. }
  278. }
  279. // tbody tr {
  280. // border-top: 2rpx solid #DDDDDD !important;
  281. // }
  282. // tbody tr th {
  283. // font-weight: 400 !important;
  284. // height: 140rpx;
  285. // line-height: 140rpx;
  286. // }
  287. // tbody tr:hover {
  288. // // color: #fff;
  289. // background: #FDEBEC;
  290. // // opacity: 0.08;
  291. // }
  292. // .m-table-hander {
  293. // background-color: #FFF8F7;
  294. // height: 140rpx;
  295. // line-height: 140rpx;
  296. // font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  297. // font-weight: bold;
  298. // }
  299. // .m_edit {
  300. // position: absolute;
  301. // top: 50%;
  302. // left: 50%;
  303. // transform: translate(-50%, -50%);
  304. // background: rgb(67, 127, 250);
  305. // color: rgb(255, 255, 255);
  306. // min-width: 130rpx;
  307. // }
  308. // .m_delete {
  309. // position: absolute;
  310. // top: 50%;
  311. // left: 50%;
  312. // min-width: 130rpx;
  313. // transform: translate(-50%, -50%);
  314. // background: rgb(234, 37, 44);
  315. // color: rgb(255, 255, 255);
  316. // }
  317. // .m_right_footer {
  318. // margin-top: 80rpx;
  319. // }
  320. // .m_paging {
  321. // text-align: right;
  322. // .m_paging_item {
  323. // padding: 10rpx 18rpx;
  324. // border: 1rpx solid #DDDDDD;
  325. // border-radius: 8rpx;
  326. // margin-right: 10rpx;
  327. // }
  328. // .p_act {
  329. // background: #EA252C;
  330. // color: #fff;
  331. // border: inherit;
  332. // }
  333. // }
  334. // .m_paging_item:hover {
  335. // background: #EA252C;
  336. // color: #fff;
  337. // border: inherit;
  338. // }
  339. .m_act1 {
  340. color: #FF0019;
  341. }
  342. </style>