Index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  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.index = 1;
  96. this.name=mydata_userInfo.Name;
  97. this.position=userController.userInfo.Profession;
  98. },
  99. viewProject(obj, aIndex) {
  100. // this.checkMenu({id:4}, 1);
  101. this.index = 4;
  102. this.$refs.project.viewProject(obj, aIndex);
  103. },
  104. onBackToProjectList(){
  105. this.index = 1;
  106. this.$refs.vtable.getList();
  107. }
  108. }
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. @import '../../assets/icon/iconfont.css';
  113. .m_menu_right {
  114. position: absolute;
  115. right: 50rpx;
  116. top: 50%;
  117. transform: translateY(-50%);
  118. font-size: 30rpx;
  119. }
  120. .m_menu-item_data:hover {
  121. background: #EA252C;
  122. color: #fff;
  123. .m_menu_item_name {
  124. color: #fff;
  125. }
  126. }
  127. .m_menu-item-checked {}
  128. .m_container {
  129. display: flex;
  130. justify-content: space-between;
  131. width: 100%;
  132. height: 100%;
  133. .m_left {
  134. width: 500rpx;
  135. background-color: #fff;
  136. border-right: 10rpx solid #ECECEC;
  137. border-top: 5rpx solid #ECECEC;
  138. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  139. .m_hander {
  140. text-align: center;
  141. background-color: #fff;
  142. height: 600rpx;
  143. position: relative;
  144. // margin: 5rpx 10rpx 10rpx 0;
  145. border-bottom: 8rpx solid #ECECEC;
  146. .m_teacher {
  147. position: absolute;
  148. top: 50%;
  149. left: 50%;
  150. transform: translate(-50%, -50%);
  151. }
  152. .m_teacher_name {
  153. font-size: 1.1rem;
  154. font-weight: 600;
  155. padding: 30rpx 0;
  156. font-family: MicrosoftYaHei;
  157. }
  158. .m_head_portrait {
  159. width: 250rpx;
  160. height: 250rpx;
  161. color: #555555;
  162. }
  163. }
  164. }
  165. .m_right {
  166. width: 100%;
  167. margin-top: 5rpx;
  168. // padding: 0 150rpx;
  169. background-color: #fff;
  170. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  171. .m_right_hander {
  172. text-align: right;
  173. height: 250rpx;
  174. position: relative;
  175. .m_btn_red {
  176. position: absolute;
  177. height: 80rpx;
  178. line-height: 80rpx;
  179. padding: 0 40rpx;
  180. right: 0;
  181. top: 50%;
  182. transform: translateY(-50%);
  183. background: #EA252C;
  184. color: #fff;
  185. }
  186. }
  187. }
  188. .m_menu-icon {
  189. width: 24rpx;
  190. height: 24rpx;
  191. }
  192. .m_menu {
  193. background-color: #fff;
  194. .m_menu-item {
  195. position: relative;
  196. display: flex;
  197. padding: 20rpx 0;
  198. line-height: 90rpx;
  199. font-weight: 500;
  200. border-bottom: 1px solid #DDDDDD;
  201. .m_menu_item_icon {
  202. width: 100rpx;
  203. text-align: right;
  204. margin-right: 15rpx;
  205. }
  206. .m_menu_item_name {
  207. margin-left: 10rpx;
  208. font-weight: 600;
  209. }
  210. .m_act {
  211. background: #FF0019;
  212. width: 8rpx;
  213. border-radius: 0px 200rpx 200rpx 0px;
  214. position: absolute;
  215. height: 90rpx;
  216. top: 20rpx;
  217. left: 0;
  218. }
  219. }
  220. }
  221. .m_act_font {
  222. // color: #FF0019;
  223. }
  224. }
  225. tbody tr {
  226. border-top: 2rpx solid #DDDDDD !important;
  227. }
  228. tbody tr th {
  229. font-weight: 400 !important;
  230. height: 140rpx;
  231. line-height: 140rpx;
  232. }
  233. tbody tr:hover {
  234. // color: #fff;
  235. background: #FDEBEC;
  236. // opacity: 0.08;
  237. }
  238. .m-table-hander {
  239. background-color: #FFF8F7;
  240. height: 140rpx;
  241. line-height: 140rpx;
  242. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  243. font-weight: bold;
  244. }
  245. .m_edit {
  246. position: absolute;
  247. top: 50%;
  248. left: 50%;
  249. transform: translate(-50%, -50%);
  250. background: rgb(67, 127, 250);
  251. color: rgb(255, 255, 255);
  252. min-width: 130rpx;
  253. }
  254. .m_delete {
  255. position: absolute;
  256. top: 50%;
  257. left: 50%;
  258. min-width: 130rpx;
  259. transform: translate(-50%, -50%);
  260. background: rgb(234, 37, 44);
  261. color: rgb(255, 255, 255);
  262. }
  263. .m_right_footer {
  264. margin-top: 80rpx;
  265. }
  266. .m_paging {
  267. text-align: right;
  268. .m_paging_item {
  269. padding: 10rpx 18rpx;
  270. border: 1rpx solid #DDDDDD;
  271. border-radius: 8rpx;
  272. margin-right: 10rpx;
  273. }
  274. .p_act {
  275. background: #EA252C;
  276. color: #fff;
  277. border: inherit;
  278. }
  279. }
  280. .m_paging_item:hover {
  281. background: #EA252C;
  282. color: #fff;
  283. border: inherit;
  284. }
  285. .m_act1 {
  286. color: #FF0019;
  287. }
  288. .m_act11 {
  289. // color: #FF0019;
  290. transform: rotate(90deg);
  291. transition: all 500ms ease;
  292. }
  293. .s_logo {
  294. width: 100%;
  295. height: 1000rpx;
  296. }
  297. .s_content_container {
  298. padding: 0 206rpx;
  299. .s_title {
  300. font-weight: bold;
  301. text-align: center;
  302. line-height: 200rpx;
  303. font-size: 45rpx;
  304. }
  305. .s_content {
  306. font-weight: 500;
  307. font-size: 40rpx;
  308. line-height: 70rpx;
  309. }
  310. }
  311. .m_btn_download {
  312. height: 80rpx;
  313. line-height: 80rpx;
  314. padding: 0 70rpx;
  315. background: #EA252C;
  316. color: #fff;
  317. font-family: MicrosoftYaHei;
  318. }
  319. .m_menu-item-checked .m_menu_item_name {
  320. line-height: 70rpx;
  321. text-align: center;
  322. }
  323. .m_menu-item-checked .cact {
  324. color: #EA252C;
  325. }
  326. .user-left-avatar img {
  327. width: px2vw(120);
  328. margin-top: px2vw(74);
  329. }
  330. </style>