Index.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  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-show="routerDataIndex==1"></user>
  133. <assets ref="assets" v-show="routerDataIndex==2"></assets>
  134. <project ref="project" v-show="routerDataIndex==3"></project>
  135. </view>
  136. </template>
  137. <script>
  138. import user from "./user.vue"
  139. import assets from "./assets.vue"
  140. import project from "./project.vue"
  141. export default {
  142. name: "manager_index",
  143. props: [],
  144. data() {
  145. return {
  146. routerDataIndex: 1,
  147. name: '张林老师',
  148. position: '计算机系',
  149. menu: [{
  150. id: 1,
  151. icon: "icon-bianzu",
  152. select: true,
  153. title: '用户'
  154. }, {
  155. id: 2,
  156. icon: "icon-xingzhuang21",
  157. select: false,
  158. title: '资产'
  159. }, {
  160. id: 3,
  161. icon: "icon-bianzubeifen20",
  162. select: false,
  163. title: '项目'
  164. }]
  165. }
  166. },
  167. components: {
  168. user,
  169. assets,
  170. project
  171. },
  172. created() {
  173. },
  174. methods: {
  175. checkMenu(obj) {
  176. this.menu.forEach(p => {
  177. if (p.id == obj.id) {
  178. p.select = true;
  179. this.routerDataIndex = obj.id;
  180. } else {
  181. p.select = false;
  182. }
  183. });
  184. },
  185. }
  186. }
  187. </script>
  188. <style scoped lang="scss">
  189. @import '../../assets/icon/iconfont.css';
  190. .m_container {
  191. display: flex;
  192. justify-content: space-between;
  193. width: 100%;
  194. height: 100%;
  195. .m_left {
  196. width: 500rpx;
  197. background-color: #fff;
  198. border-right: 10rpx solid #ECECEC;
  199. border-top: 5rpx solid #ECECEC;
  200. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  201. .m_hander {
  202. text-align: center;
  203. background-color: #fff;
  204. height: 600rpx;
  205. position: relative;
  206. // margin: 5rpx 10rpx 10rpx 0;
  207. border-bottom: 8rpx solid #ECECEC;
  208. .m_teacher {
  209. position: absolute;
  210. top: 50%;
  211. left: 50%;
  212. transform: translate(-50%, -50%);
  213. }
  214. .m_teacher_name {
  215. font-size: 1.1rem;
  216. font-weight: 600;
  217. padding: 30rpx 0;
  218. font-family: MicrosoftYaHei;
  219. }
  220. .m_head_portrait {
  221. width: 250rpx;
  222. height: 250rpx;
  223. color: #555555;
  224. }
  225. }
  226. }
  227. // .m_right {
  228. // width: 100%;
  229. // margin-top: 5rpx;
  230. // padding: 0 150rpx;
  231. // background-color: #fff;
  232. // box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  233. // .m_right_hander {
  234. // text-align: right;
  235. // height: 250rpx;
  236. // position: relative;
  237. // .m_btn_red {
  238. // position: absolute;
  239. // height: 80rpx;
  240. // line-height: 80rpx;
  241. // padding: 0 40rpx;
  242. // right: 0;
  243. // top: 50%;
  244. // transform: translateY(-50%);
  245. // background: #EA252C;
  246. // color: #fff;
  247. // }
  248. // }
  249. // }
  250. .m_menu-icon {
  251. width: 24rpx;
  252. height: 24rpx;
  253. }
  254. .m_menu {
  255. background-color: #fff;
  256. .m_menu-item {
  257. position: relative;
  258. display: flex;
  259. padding: 20rpx 0;
  260. line-height: 90rpx;
  261. font-weight: 500;
  262. border-bottom: 1px solid #DDDDDD;
  263. .m_menu_item_icon {
  264. width: 100rpx;
  265. text-align: right;
  266. margin-right: 15rpx;
  267. }
  268. .m_menu_item_name {
  269. margin-left: 10rpx;
  270. font-weight: 600;
  271. }
  272. .m_act {
  273. background: #FF0019;
  274. width: 8rpx;
  275. border-radius: 0px 200rpx 200rpx 0px;
  276. position: absolute;
  277. height: 90rpx;
  278. top: 20rpx;
  279. left: 0;
  280. }
  281. }
  282. }
  283. .m_act_font .m_menu_item_name {
  284. color: #FF0019;
  285. }
  286. }
  287. // tbody tr {
  288. // border-top: 2rpx solid #DDDDDD !important;
  289. // }
  290. // tbody tr th {
  291. // font-weight: 400 !important;
  292. // height: 140rpx;
  293. // line-height: 140rpx;
  294. // }
  295. // tbody tr:hover {
  296. // // color: #fff;
  297. // background: #FDEBEC;
  298. // // opacity: 0.08;
  299. // }
  300. // .m-table-hander {
  301. // background-color: #FFF8F7;
  302. // height: 140rpx;
  303. // line-height: 140rpx;
  304. // font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  305. // font-weight: bold;
  306. // }
  307. // .m_edit {
  308. // position: absolute;
  309. // top: 50%;
  310. // left: 50%;
  311. // transform: translate(-50%, -50%);
  312. // background: rgb(67, 127, 250);
  313. // color: rgb(255, 255, 255);
  314. // min-width: 130rpx;
  315. // }
  316. // .m_delete {
  317. // position: absolute;
  318. // top: 50%;
  319. // left: 50%;
  320. // min-width: 130rpx;
  321. // transform: translate(-50%, -50%);
  322. // background: rgb(234, 37, 44);
  323. // color: rgb(255, 255, 255);
  324. // }
  325. // .m_right_footer {
  326. // margin-top: 80rpx;
  327. // }
  328. // .m_paging {
  329. // text-align: right;
  330. // .m_paging_item {
  331. // padding: 10rpx 18rpx;
  332. // border: 1rpx solid #DDDDDD;
  333. // border-radius: 8rpx;
  334. // margin-right: 10rpx;
  335. // }
  336. // .p_act {
  337. // background: #EA252C;
  338. // color: #fff;
  339. // border: inherit;
  340. // }
  341. // }
  342. // .m_paging_item:hover {
  343. // background: #EA252C;
  344. // color: #fff;
  345. // border: inherit;
  346. // }
  347. .m_act1 {
  348. color: #FF0019;
  349. }
  350. </style>