Index.vue 7.0 KB

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