index.vue 9.7 KB

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