index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view>
  3. <image src="../../static/index/banner.png" class="banner"></image>
  4. <div class="map">
  5. <div
  6. class="mapdom"
  7. style="float: left"
  8. v-for="(item, index) in mapList"
  9. :key="index"
  10. @click="jumpPage(item.path)"
  11. >
  12. <img class="mapIcon" :src="item.url" />
  13. <div class="maptxt">{{ item.label }}</div>
  14. </div>
  15. </div>
  16. </view>
  17. </template>
  18. <script>
  19. // import {demo} from "@/js_sdk/http"
  20. import { getUserPower, getUserLocalStorageInfo } from "@/js_sdk/http";
  21. export default {
  22. data() {
  23. return {
  24. mapList: [
  25. // {
  26. // label: "经发填报",
  27. // url: "https://pgy.idea-sf.com/fileService/static/slices/1@2x.png",
  28. // path: "/pages/subPackages/companyHouse/companyHouse",
  29. // },
  30. {
  31. label: "企业库",
  32. url: "https://pgy.idea-sf.com/fileService/static/slices/2@2x.png",
  33. path: "/pages/subPackages/companyHouse/companyHouse",
  34. },
  35. {
  36. label: "走访上报",
  37. url: "https://pgy.idea-sf.com/fileService/static/slices/3@2x.png",
  38. path: "/pages/subPackages/companyreport/companyreport",
  39. },
  40. // {
  41. // label: "上市跟进",
  42. // url: "https://pgy.idea-sf.com/fileService/static/slices/4@2x.png",
  43. // },
  44. {
  45. label: "招商管理",
  46. url: "https://pgy.idea-sf.com/fileService/static/slices/5@2x.png",
  47. path: "/pages/subPackages/merchants/merchants",
  48. },
  49. // {
  50. // label: "我的待办",
  51. // url: "https://pgy.idea-sf.com/fileService/static/slices/7@2x.png",
  52. // path: "/pages/subPackages/todo/index",
  53. // },
  54. {
  55. label: "我的待阅",
  56. url: "https://pgy.idea-sf.com/fileService/static/slices/6@2x.png",
  57. path: "/pages/subPackages/toread/index",
  58. },
  59. // {
  60. // label: "会议室审核",
  61. // url: "https://pgy.idea-sf.com/fileService/static/slices/12@2x.png",
  62. // path: "/pages/subPackages/meetingroom/meetingroom",
  63. // },
  64. // {
  65. // label: "安全自检管理",
  66. // url: "https://pgy.idea-sf.com/fileService/static/slices/8@2x.png",
  67. // path: "/pages/subPackages/secureselftest/index",
  68. // },
  69. // {
  70. // label: "安全自检计划",
  71. // url: "https://pgy.idea-sf.com/fileService/static/slices/9@2x.png",
  72. // path: "/pages/subPackages/secureselfplan/index",
  73. // },
  74. // {
  75. // label: "报修派单",
  76. // url: "https://pgy.idea-sf.com/fileService/static/slices/11@2x.png",
  77. // path: "/pages/subPackages/repairDispatch-app/index",
  78. // },
  79. // {
  80. // label: "报修处理",
  81. // url: "https://pgy.idea-sf.com/fileService/static/slices/10@2x.png",
  82. // path: "/pages/subPackages/repairprocessing-app/index",
  83. // },
  84. // {
  85. // label: "整改填报",
  86. // url: "https://pgy.idea-sf.com/fileService/static/slices/15@2x.png",
  87. // path: "/pages/subPackages/modifyReport/index",
  88. // },
  89. // {
  90. // label: "整改派单",
  91. // url: "https://pgy.idea-sf.com/fileService/static/slices/14@2x.png",
  92. // path: "/pages/subPackages/modifySend/index",
  93. // },
  94. // {
  95. // label: "整改处理",
  96. // url: "https://pgy.idea-sf.com/fileService/static/slices/13@2x.png",
  97. // path: "/pages/subPackages/modifyHandle/index",
  98. // },
  99. // {
  100. // label: "活动核销",
  101. // url: "https://pgy.idea-sf.com/fileService/static/slices/1@2x.png",
  102. // path: "/pages/subPackages/activity/index",
  103. // },
  104. ],
  105. };
  106. },
  107. onShareAppMessage() {},
  108. mounted() {
  109. // demo();
  110. },
  111. onLoad() {
  112. this.getUserPower();
  113. },
  114. methods: {
  115. // getUserLocalStorageInfo
  116. async getUserPower() {
  117. if (getUserLocalStorageInfo().user.id == 1) return;
  118. let that = this;
  119. let newList = [];
  120. let { data } = await getUserPower(getUserLocalStorageInfo().user.id);
  121. for (let i = 0; i < that.mapList.length; i++) {
  122. let index = data.findIndex((e) => e == that.mapList[i].label);
  123. if (index != -1) {
  124. newList.push(that.mapList[i]);
  125. }
  126. }
  127. that.mapList = newList;
  128. },
  129. jumpPage(path) {
  130. uni.navigateTo({
  131. url: path,
  132. fail: (fail) => {},
  133. });
  134. },
  135. },
  136. };
  137. </script>
  138. <style lang="scss">
  139. page {
  140. background: white;
  141. }
  142. .banner {
  143. width: 100%;
  144. height: 450rpx;
  145. position: absolute;
  146. z-index: 1;
  147. }
  148. .mapdom {
  149. width: 25%;
  150. height: 184rpx;
  151. }
  152. .maptxt {
  153. width: 100%;
  154. height: 34rpx;
  155. font-size: 24rpx;
  156. font-family: PingFang SC-Medium, PingFang SC;
  157. font-weight: 500;
  158. color: #333333;
  159. text-align: center;
  160. }
  161. .mapIcon {
  162. width: 160rpx;
  163. height: 160rpx;
  164. //background: linear-gradient(141deg, #89BCFF 0%, #2782FA 100%);
  165. display: block;
  166. margin: auto;
  167. }
  168. .map {
  169. position: absolute;
  170. z-index: 2;
  171. width: calc(100% - 64rpx);
  172. height: 450rpx;
  173. border-radius: 48rpx 48rpx 0rpx 0rpx;
  174. background: white;
  175. margin-top: 402rpx;
  176. padding: 48rpx 32rpx;
  177. }
  178. </style>