homepageL.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <div class="allPage">
  3. <div class="packageL">
  4. <topPage @cutUrl="cutUrl" ref="topPageRef"></topPage>
  5. <botPage :hotApp="hotApp" ref="botPageRef"></botPage>
  6. </div>
  7. </div>
  8. </template>
  9. <script>
  10. import topPage from '../components/topPage'
  11. import botPage from '../components/botPage'
  12. import { mapGetters } from 'vuex';
  13. import { API_CONFIG } from "@/common/apiConfig";
  14. export default {
  15. props:['urlAddress'],
  16. computed: {
  17. ...mapGetters(['userinfo','userinfo2']),
  18. roleUser(){
  19. return this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&& this.userinfo2 !== "" ? this.userinfo2 : this.userinfo
  20. }
  21. },
  22. components:{
  23. topPage,
  24. botPage
  25. },
  26. data() {
  27. return {
  28. // CocoFlowList:[],
  29. hotApp:[],
  30. }
  31. },
  32. methods: {
  33. // 获取后台管理设置常见应用
  34. getadmincocoFlow(){
  35. this.$refs.topPageRef.getAdmincocoFlow()
  36. },
  37. // 查询首页应用
  38. getData(){
  39. // 获取已添加cocoFlow应用
  40. this.$refs.topPageRef.getData()
  41. let params = [
  42. {
  43. functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称
  44. uid: this.roleUser.userid,
  45. cn: this.roleUser.schoolArea ? this.roleUser.schoolArea : this.roleUser.orgArea,
  46. },
  47. ];
  48. // 发起请求
  49. this.$ajax
  50. .post(API_CONFIG.baseUrl, params)
  51. .then((res) => {
  52. console.log(res);
  53. let data = res.data
  54. // this.CocoFlowList = data[0]
  55. this.hotApp = [data[1],data[2],data[3],data[4],]
  56. })
  57. .catch((err) => {
  58. console.error("请求失败,错误信息:", err);
  59. });
  60. },
  61. cutUrl(val){
  62. this.$emit('AddAppJson',val)
  63. },
  64. },
  65. }
  66. </script>
  67. <style scoped>
  68. .allPage{
  69. width: 100%;
  70. justify-content: center;
  71. height: 100%;
  72. overflow: auto;
  73. }
  74. .packageL{
  75. padding: 10px 81px;
  76. box-sizing: border-box;
  77. margin: auto;
  78. padding-bottom: 100px;
  79. /* max-width: 1280px; */
  80. }
  81. /* 整个滚动条轨道 */
  82. ::-webkit-scrollbar {
  83. width: 10px; /* 垂直滚动条宽度 */
  84. height: 10px; /* 水平滚动条高度 */
  85. }
  86. /* 滚动条轨道背景 */
  87. ::-webkit-scrollbar-track {
  88. background: #f1f1f1;
  89. border-radius: 5px;
  90. }
  91. /* 滚动条滑块 */
  92. ::-webkit-scrollbar-thumb {
  93. background: #888;
  94. border-radius: 5px;
  95. }
  96. /* 鼠标悬停时的滑块 */
  97. ::-webkit-scrollbar-thumb:hover {
  98. background: #555;
  99. }
  100. </style>