index.vue 8.6 KB

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