Index.vue 6.7 KB

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