index.vue 5.2 KB

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