index.vue 5.4 KB

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