Index.vue 7.4 KB

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