index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <template>
  2. <div>
  3. <div class="managementBody" v-show="userType == 2">
  4. <image
  5. src="https://www.idea-sf.com/gardenProduct/image/banner.png"
  6. class="banner"
  7. ></image>
  8. <div class="needBox">
  9. <div class="needLeft" @click="toMsgPage('/pages/subPackages/todo/index')">
  10. <div
  11. class="needLeftLeft"
  12. >
  13. <span style="color: #18172a; font-size: 4.5vw; margin-bottom: 1vw"
  14. >我的待办</span
  15. >
  16. <span style="color: #666666; font-size: 3.5vw"
  17. >需处理待办<span
  18. style="color: #0365f9; font-weight: 600; margin-left: 0.5vw"
  19. >{{ handleSize }}</span
  20. ></span
  21. >
  22. </div>
  23. <img
  24. src="https://www.idea-sf.com/gardenProduct/image/dbImage.png"
  25. class="needImg"
  26. />
  27. </div>
  28. <div
  29. class="needRight"
  30. @tap.stop="toMsgPage('/pages/subPackages/toread/index')"
  31. >
  32. <div class="needLeftLeft">
  33. <span style="color: #18172a; font-size: 4.5vw; margin-bottom: 1vw"
  34. >我的待阅</span
  35. >
  36. <span style="color: #666666; font-size: 3.5vw"
  37. >需处理待阅<span
  38. style="color: #22b565; font-weight: 600; margin-left: 0.5vw"
  39. >{{ readSize }}</span
  40. ></span
  41. >
  42. </div>
  43. <img
  44. src="https://www.idea-sf.com/gardenProduct/image/dyImage.png"
  45. class="needImg"
  46. />
  47. </div>
  48. </div>
  49. <div class="titleTips">
  50. <div class="myLine"></div>
  51. <div>服务入口</div>
  52. </div>
  53. <div class="map">
  54. <div
  55. class="mapdom"
  56. style="float: left"
  57. v-for="(item, index) in mapList"
  58. :key="index"
  59. @click="jumpPage(item.path)"
  60. >
  61. <img class="mapIcon" :src="item.url" />
  62. <div class="maptxt">{{ item.label }}</div>
  63. </div>
  64. </div>
  65. </div>
  66. <!-- 企业端页面-->
  67. <div class="enterpriseBody" v-show="userType == 1 || userType == 3">
  68. <enterprise-side ref="enterpriseSide"></enterprise-side>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. // import {demo} from "@/js_sdk/http"
  74. import { getUserPower, getUserLocalStorageInfo, getReadSizeByTypes } from "@/js_sdk/http";
  75. import EnterpriseSide from "./components/enterpriseSide.vue";
  76. import {getHandleSizeTypes} from "../../js_sdk/http";
  77. export default {
  78. components: { EnterpriseSide },
  79. data() {
  80. return {
  81. readSize: 0,
  82. handleSize: 0,
  83. userType: false,
  84. mapList: [
  85. // {
  86. // label: "智慧党建",
  87. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  88. // path: "/pages/subPackages/buildmap/index",
  89. // },
  90. // {
  91. // label: "经发填报",
  92. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  93. // path: "/pages/subPackages/companyHouse/companyHouse",
  94. // },
  95. {
  96. label: "企业库",
  97. url: "https://www.idea-sf.com/gardenProduct/image/qyk.png",
  98. path: "/pages/subPackages/companyHouse/companyHouse",
  99. },
  100. {
  101. label: "走访上报",
  102. url: "https://www.idea-sf.com/gardenProduct/image/zfsb.png",
  103. path: "/pages/subPackages/companyreport/companyreport",
  104. },
  105. {
  106. label: "资源预约",
  107. url: "https://www.idea-sf.com/gardenProduct/image/tupian1.png",
  108. path: "/pages/subPackages/resourceReservation_manage/index",
  109. },
  110. // {
  111. // label: "上市跟进",
  112. // url: https://www.idea-sf.com/gardenProduct/image/ssgj.png"),
  113. // },
  114. {
  115. label: "招商管理",
  116. url: "https://www.idea-sf.com/gardenProduct/image/zsgl.png",
  117. path: "/pages/subPackages/merchants/merchants",
  118. },
  119. // {
  120. // label: "活动发布",
  121. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/3@2x.png",
  122. // path: "/pages/subPackages/eventRelease/index",
  123. // },
  124. // {
  125. // label: "安全管理自检",
  126. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/8@2x.png",
  127. // path: "/pages/subPackages/secureselftest2/index",
  128. // },
  129. // {
  130. // label: "安全管理统计",
  131. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/8@2x.png",
  132. // path: "/pages/subPackages/secureselftest/index",
  133. // },
  134. // {
  135. // label: "安全自检计划",
  136. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/9@2x.png",
  137. // path: "/pages/subPackages/secureselfplan/index",
  138. // },
  139. {
  140. label: "报修受理",
  141. url: "https://www.idea-sf.com/gardenProduct/image/bxpd.png",
  142. path: "/pages/subPackages/todo/repairAcceptance",
  143. },
  144. // {
  145. // label: "报修处理",
  146. // url: "https://www.idea-sf.com/gardenProduct/image/bxcl.png",
  147. // path: "/pages/subPackages/todo/repairAcceptance",
  148. // },
  149. {
  150. label: "房间管理",
  151. url: "https://www.idea-sf.com/gardenProduct/image/fjgl.png",
  152. path: "/pages/subPackages/propertyManagement/maintenance",
  153. },
  154. // {
  155. // label: "园区通知",
  156. // url: "https://www.idea-sf.com/gardenProduct/image/tzfb.png",
  157. // // path: "",
  158. // },
  159. {
  160. label: "物业通知",
  161. url: "https://www.idea-sf.com/gardenProduct/image/tupian2.png",
  162. path: "/pages/subPackages/propertyNotice_manage/index?type=2",
  163. },
  164. {
  165. label: "园区通知",
  166. url: "https://www.idea-sf.com/gardenProduct/image/tupian2.png",
  167. path: "/pages/subPackages/propertyNotice_manage/index?type=1",
  168. },
  169. {
  170. label: "活动发布",
  171. url: "https://www.idea-sf.com/gardenProduct/image/hdfb.png",
  172. path: "/pages/subPackages/activityPromulgate/list",
  173. },
  174. {
  175. label: "周边发布",
  176. url: "https://www.idea-sf.com/gardenProduct/image/zbfb.png",
  177. path: "/pages/subPackages/surroundingReleases/index",
  178. },
  179. // {
  180. // label: "整改填报",
  181. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/15@2x.png",
  182. // path: "/pages/subPackages/modifyReport/index",
  183. // },
  184. // {
  185. // label: "整改派单",
  186. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/14@2x.png",
  187. // path: "/pages/subPackages/modifySend/index",
  188. // },
  189. // {
  190. // label: "整改处理",
  191. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/13@2x.png",
  192. // path: "/pages/subPackages/modifyHandle/index",
  193. // },
  194. // {
  195. // label: "活动核销",
  196. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  197. // path: "/pages/subPackages/activity/index",
  198. // },
  199. // {
  200. // label: "可视化大屏",
  201. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  202. // path: "/pages/subPackages/bigscreen/bigscreen",
  203. // },
  204. // {
  205. // label: "场馆审核",
  206. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  207. // path: "/pages/subPackages/venueRoom/meetingroom",
  208. // },
  209. ],
  210. };
  211. },
  212. onShareAppMessage() {},
  213. mounted() {
  214. // demo();
  215. },
  216. onShow() {
  217. this.getUserPower();
  218. this.getReadSize()
  219. this.getHandleSize()
  220. },
  221. onPullDownRefresh(){
  222. if(this.userType==2){
  223. this.getUserPower();
  224. this.getReadSize()
  225. this.getHandleSize()
  226. }else{
  227. this.$refs.enterpriseSide.refreshPage()
  228. }
  229. },
  230. onLoad(e) {
  231. // uni.$on("userType", (userType) => {
  232. // if (userType === "OK") {
  233. // this.userType = !this.userType;
  234. // }
  235. // });
  236. },
  237. methods: {
  238. getReadSize(){
  239. const data = {
  240. userId: getUserLocalStorageInfo().userId,
  241. types: '1'
  242. }
  243. getReadSizeByTypes(data).then(res=>{
  244. this.readSize = res
  245. })
  246. },
  247. getHandleSize(){
  248. const data = {
  249. userId: getUserLocalStorageInfo().userId,
  250. types: '0,1,8,9,10,11'
  251. }
  252. getHandleSizeTypes(data).then(res=>{
  253. this.handleSize = res
  254. })
  255. },
  256. toMsgPage(e) {
  257. uni.navigateTo({
  258. url: e,
  259. fail: (fail) => {},
  260. });
  261. },
  262. // getUserLocalStorageInfo
  263. async getUserPower() {
  264. let that = this;
  265. console.log('getUserLocalStorageInfo',getUserLocalStorageInfo());
  266. that.userType = getUserLocalStorageInfo().userType;
  267. if (that.userType == 3) {
  268. uni.showModal({
  269. title: "提示",
  270. cancelText: "暂不",
  271. confirmText: "去切换",
  272. content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
  273. success: function (res) {
  274. if (res.confirm) {
  275. uni.navigateTo({
  276. url: "/pages/login2/login",
  277. success: function (e) {
  278. // uni.$emit('userType', 'OK')
  279. },
  280. });
  281. } else if (res.cancel) {
  282. console.log("用户点击取消");
  283. }
  284. },
  285. });
  286. }
  287. // if (getUserLocalStorageInfo().user.id == 1) return;
  288. // let newList = [];
  289. // let { data } = await getUserPower(getUserLocalStorageInfo().user.id);
  290. // for (let i = 0; i < that.mapList.length; i++) {
  291. // let index = data.findIndex((e) => e == that.mapList[i].label);
  292. // if (index != -1) {
  293. // newList.push(that.mapList[i]);
  294. // }
  295. // }
  296. // that.mapList = newList;
  297. },
  298. jumpPage(path) {
  299. uni.navigateTo({
  300. url: path,
  301. fail: (fail) => {},
  302. });
  303. },
  304. },
  305. };
  306. </script>
  307. <style lang="scss">
  308. page {
  309. background: white;
  310. }
  311. .managementBody {
  312. padding: 4vw;
  313. }
  314. .banner {
  315. width: 92vw;
  316. height: 250rpx;
  317. //position: absolute;
  318. z-index: 1;
  319. }
  320. .mapdom {
  321. width: 25%;
  322. height: 184rpx;
  323. }
  324. .maptxt {
  325. width: 100%;
  326. height: 34rpx;
  327. font-size: 24rpx;
  328. font-family: PingFang SC-Medium, PingFang SC;
  329. font-weight: 500;
  330. color: #18172a;
  331. text-align: center;
  332. margin-top: 8rpx;
  333. }
  334. .mapIcon {
  335. width: 65rpx;
  336. height: 80rpx;
  337. //background: linear-gradient(141deg, #89BCFF 0%, #2782FA 100%);
  338. display: block;
  339. margin: auto;
  340. }
  341. .map {
  342. //position: absolute;
  343. z-index: 2;
  344. width: calc(100% - 24rpx);
  345. //height: 770rpx;
  346. border-radius: 48rpx 48rpx 0rpx 0rpx;
  347. background: white;
  348. //margin-top: 402rpx;
  349. padding: 24rpx 12rpx;
  350. overflow-y: auto;
  351. }
  352. .needBox {
  353. display: flex;
  354. align-items: center;
  355. justify-content: space-between;
  356. margin: 2vw 0;
  357. .needLeft {
  358. display: flex;
  359. justify-content: space-around;
  360. background: rgba(238, 244, 255, 1);
  361. border-radius: 8rpx;
  362. align-items: center;
  363. width: 45vw;
  364. height: 23vw;
  365. }
  366. .needRight {
  367. display: flex;
  368. justify-content: space-around;
  369. background: #def6f8;
  370. border-radius: 8rpx;
  371. align-items: center;
  372. width: 45vw;
  373. height: 23vw;
  374. }
  375. .needLeftLeft {
  376. display: flex;
  377. flex-direction: column;
  378. }
  379. .needImg {
  380. width: 100rpx;
  381. height: 100rpx;
  382. }
  383. }
  384. .titleTips {
  385. display: flex;
  386. align-items: center;
  387. font-size: 4.7vw;
  388. font-weight: 600;
  389. color: #18172a;
  390. margin: 4vw 0 2vw 0;
  391. .myLine {
  392. width: 13rpx;
  393. height: 40rpx;
  394. background: linear-gradient(180deg, #509fff 0%, #034df7 100%);
  395. margin-right: 20rpx;
  396. }
  397. }
  398. </style>