Index.vue 7.5 KB

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