index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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; position: relative"
  8. v-for="(item, index) in mapList"
  9. :key="index"
  10. @click="jumpPage(item.path)"
  11. >
  12. <div class="jiaobiao" v-if="item.label == '会议室审核' && MeetingNum">
  13. {{ MeetingNum }}
  14. </div>
  15. <div class="jiaobiao" v-if="item.label == '场馆审核' && MeetingNum">
  16. {{ VenueNum }}
  17. </div>
  18. <img class="mapIcon" :src="item.url" />
  19. <div class="maptxt">{{ item.label }}</div>
  20. </div>
  21. </div>
  22. </view>
  23. </template>
  24. <script>
  25. // import {demo} from "@/js_sdk/http"
  26. import {
  27. getUserPower,
  28. getUserLocalStorageInfo,
  29. getVenueAppointListAppCount,
  30. getMeetingAppointListAppCount,
  31. } from "@/js_sdk/http";
  32. export default {
  33. data() {
  34. return {
  35. mapList: [
  36. {
  37. label: "智慧党建",
  38. url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  39. path: "/pages/subPackages/buildmap/index",
  40. },
  41. // {
  42. // label: "经发填报",
  43. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  44. // path: "/pages/subPackages/companyHouse/companyHouse",
  45. // },
  46. {
  47. label: "企业库",
  48. url: "https://hswkxc.idea-sf.com/fileService/static/slices/2@2x.png",
  49. path: "/pages/subPackages/companyHouse/companyHouse",
  50. },
  51. // {
  52. // label: "走访上报",
  53. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/3@2x.png",
  54. // path: "/pages/subPackages/companyreport/companyreport",
  55. // },
  56. // {
  57. // label: "上市跟进",
  58. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/4@2x.png",
  59. // },
  60. {
  61. label: "招商管理",
  62. url: "https://hswkxc.idea-sf.com/fileService/static/slices/5@2x.png",
  63. path: "/pages/subPackages/merchants/merchants",
  64. },
  65. {
  66. label: "我的待办",
  67. url: "https://hswkxc.idea-sf.com/fileService/static/slices/7@2x.png",
  68. path: "/pages/subPackages/todo/index",
  69. },
  70. {
  71. label: "我的待阅",
  72. url: "https://hswkxc.idea-sf.com/fileService/static/slices/6@2x.png",
  73. path: "/pages/subPackages/toread/index",
  74. },
  75. // {
  76. // label: "会议室审核",
  77. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/12@2x.png",
  78. // path: "/pages/subPackages/meetingroom/meetingroom",
  79. // },
  80. {
  81. label: "安全管理自检",
  82. url: "https://hswkxc.idea-sf.com/fileService/static/slices/8@2x.png",
  83. path: "/pages/subPackages/secureselftest2/index",
  84. },
  85. {
  86. label: "安全管理统计",
  87. url: "https://hswkxc.idea-sf.com/fileService/static/slices/8@2x.png",
  88. path: "/pages/subPackages/secureselftest/index",
  89. },
  90. {
  91. label: "安全自检计划",
  92. url: "https://hswkxc.idea-sf.com/fileService/static/slices/9@2x.png",
  93. path: "/pages/subPackages/secureselfplan/index",
  94. },
  95. {
  96. label: "政企服务",
  97. url: "https://hswkxc.idea-sf.com/fileService/static/slices/11@2x.png",
  98. path: "/pages/subPackages/repairDispatch-app/index",
  99. },
  100. {
  101. label: "服务派单",
  102. url: "https://hswkxc.idea-sf.com/fileService/static/slices/11@2x.png",
  103. path: "/pages/subPackages/repairDispatch-serve/index",
  104. },
  105. {
  106. label: "服务处理",
  107. url: "https://hswkxc.idea-sf.com/fileService/static/slices/10@2x.png",
  108. path: "/pages/subPackages/repairprocessing-app/index",
  109. },
  110. {
  111. label: "案卷填报",
  112. url: "https://hswkxc.idea-sf.com/fileService/static/slices/15@2x.png",
  113. path: "/pages/subPackages/modifyReport/index",
  114. },
  115. {
  116. label: "案卷派单",
  117. url: "https://hswkxc.idea-sf.com/fileService/static/slices/14@2x.png",
  118. path: "/pages/subPackages/modifySend/index",
  119. },
  120. {
  121. label: "案卷处理",
  122. url: "https://hswkxc.idea-sf.com/fileService/static/slices/13@2x.png",
  123. path: "/pages/subPackages/modifyHandle/index",
  124. },
  125. {
  126. label: "活动核销",
  127. url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  128. path: "/pages/subPackages/activity/index",
  129. },
  130. {
  131. label: "可视化大屏",
  132. url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  133. path: "/pages/subPackages/bigscreen/bigscreen",
  134. },
  135. {
  136. label: "场馆审核",
  137. url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  138. path: "/pages/subPackages/venueRoom/meetingroom",
  139. },
  140. {
  141. label: "园区活动",
  142. url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  143. path: "/pages/subPackages/parkActivities/index",
  144. },
  145. {
  146. label: "通知公告",
  147. url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  148. path: "/pages/subPackages/announcement/index",
  149. },
  150. ],
  151. MeetingNum: 0,
  152. VenueNum: 0,
  153. };
  154. },
  155. onShareAppMessage() {},
  156. mounted() {
  157. // demo();
  158. },
  159. onLoad() {
  160. this.getUserPower();
  161. this.getVenueAppointListAppCount();
  162. this.getMeetingAppointListAppCount();
  163. },
  164. onShow() {
  165. this.getVenueAppointListAppCount();
  166. this.getMeetingAppointListAppCount();
  167. },
  168. methods: {
  169. async getVenueAppointListAppCount() {
  170. let data = await getVenueAppointListAppCount();
  171. this.VenueNum = data.data;
  172. console.log(data);
  173. },
  174. async getMeetingAppointListAppCount() {
  175. let data = await getMeetingAppointListAppCount();
  176. this.MeetingNum = data.data;
  177. console.log(data);
  178. },
  179. // getUserLocalStorageInfo
  180. async getUserPower() {
  181. if (getUserLocalStorageInfo().user.id == 1) return;
  182. let that = this;
  183. let newList = [];
  184. let { data } = await getUserPower(getUserLocalStorageInfo().user.id);
  185. for (let i = 0; i < that.mapList.length; i++) {
  186. let index = data.findIndex((e) => e == that.mapList[i].label);
  187. if (index != -1) {
  188. newList.push(that.mapList[i]);
  189. }
  190. }
  191. that.mapList = newList;
  192. },
  193. jumpPage(path) {
  194. uni.navigateTo({
  195. url: path,
  196. fail: (fail) => {},
  197. });
  198. },
  199. },
  200. };
  201. </script>
  202. <style lang="scss">
  203. page {
  204. background: white;
  205. }
  206. .jiaobiao {
  207. position: absolute;
  208. top: 10rpx;
  209. right: 30rpx;
  210. border-radius: 50%;
  211. background: red;
  212. font-size: 24rpx;
  213. height: 30rpx;
  214. width: 30rpx;
  215. text-align: center;
  216. line-height: 24rpx;
  217. color: white;
  218. line-height: 30rpx;
  219. }
  220. .banner {
  221. width: 100%;
  222. height: 450rpx;
  223. position: absolute;
  224. z-index: 1;
  225. }
  226. .mapdom {
  227. width: 25%;
  228. height: 184rpx;
  229. }
  230. .maptxt {
  231. width: 100%;
  232. height: 34rpx;
  233. font-size: 24rpx;
  234. font-family: PingFang SC-Medium, PingFang SC;
  235. font-weight: 500;
  236. color: #333333;
  237. text-align: center;
  238. }
  239. .mapIcon {
  240. width: 160rpx;
  241. height: 160rpx;
  242. //background: linear-gradient(141deg, #89BCFF 0%, #2782FA 100%);
  243. display: block;
  244. margin: auto;
  245. }
  246. .map {
  247. position: absolute;
  248. z-index: 2;
  249. width: calc(100% - 64rpx);
  250. height: 770rpx;
  251. border-radius: 48rpx 48rpx 0rpx 0rpx;
  252. background: white;
  253. margin-top: 402rpx;
  254. padding: 48rpx 32rpx;
  255. overflow-y: auto;
  256. }
  257. </style>