index.vue 7.9 KB

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