Index.vue 6.7 KB

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