index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <template>
  2. <view>
  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></enterprise-side>
  69. </div>
  70. </view>
  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. onLoad(e) {
  222. // uni.$on("userType", (userType) => {
  223. // if (userType === "OK") {
  224. // this.userType = !this.userType;
  225. // }
  226. // });
  227. },
  228. methods: {
  229. getReadSize(){
  230. const data = {
  231. userId: getUserLocalStorageInfo().userId,
  232. types: '1'
  233. }
  234. getReadSizeByTypes(data).then(res=>{
  235. this.readSize = res
  236. })
  237. },
  238. getHandleSize(){
  239. const data = {
  240. userId: getUserLocalStorageInfo().userId,
  241. types: '0,1,8,9,10,11'
  242. }
  243. getHandleSizeTypes(data).then(res=>{
  244. this.handleSize = res
  245. })
  246. },
  247. toMsgPage(e) {
  248. uni.navigateTo({
  249. url: e,
  250. fail: (fail) => {},
  251. });
  252. },
  253. // getUserLocalStorageInfo
  254. async getUserPower() {
  255. let that = this;
  256. console.log('getUserLocalStorageInfo',getUserLocalStorageInfo());
  257. that.userType = getUserLocalStorageInfo().userType;
  258. if (that.userType == 3) {
  259. uni.showModal({
  260. title: "提示",
  261. cancelText: "暂不",
  262. confirmText: "去切换",
  263. content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
  264. success: function (res) {
  265. if (res.confirm) {
  266. uni.navigateTo({
  267. url: "/pages/login2/login",
  268. success: function (e) {
  269. // uni.$emit('userType', 'OK')
  270. },
  271. });
  272. } else if (res.cancel) {
  273. console.log("用户点击取消");
  274. }
  275. },
  276. });
  277. }
  278. // if (getUserLocalStorageInfo().user.id == 1) return;
  279. // let newList = [];
  280. // let { data } = await getUserPower(getUserLocalStorageInfo().user.id);
  281. // for (let i = 0; i < that.mapList.length; i++) {
  282. // let index = data.findIndex((e) => e == that.mapList[i].label);
  283. // if (index != -1) {
  284. // newList.push(that.mapList[i]);
  285. // }
  286. // }
  287. // that.mapList = newList;
  288. },
  289. jumpPage(path) {
  290. uni.navigateTo({
  291. url: path,
  292. fail: (fail) => {},
  293. });
  294. },
  295. },
  296. };
  297. </script>
  298. <style lang="scss">
  299. page {
  300. background: white;
  301. }
  302. .managementBody {
  303. padding: 4vw;
  304. }
  305. .banner {
  306. width: 92vw;
  307. height: 250rpx;
  308. //position: absolute;
  309. z-index: 1;
  310. }
  311. .mapdom {
  312. width: 25%;
  313. height: 184rpx;
  314. }
  315. .maptxt {
  316. width: 100%;
  317. height: 34rpx;
  318. font-size: 24rpx;
  319. font-family: PingFang SC-Medium, PingFang SC;
  320. font-weight: 500;
  321. color: #18172a;
  322. text-align: center;
  323. margin-top: 8rpx;
  324. }
  325. .mapIcon {
  326. width: 65rpx;
  327. height: 80rpx;
  328. //background: linear-gradient(141deg, #89BCFF 0%, #2782FA 100%);
  329. display: block;
  330. margin: auto;
  331. }
  332. .map {
  333. //position: absolute;
  334. z-index: 2;
  335. width: calc(100% - 24rpx);
  336. //height: 770rpx;
  337. border-radius: 48rpx 48rpx 0rpx 0rpx;
  338. background: white;
  339. //margin-top: 402rpx;
  340. padding: 24rpx 12rpx;
  341. overflow-y: auto;
  342. }
  343. .needBox {
  344. display: flex;
  345. align-items: center;
  346. justify-content: space-between;
  347. margin: 2vw 0;
  348. .needLeft {
  349. display: flex;
  350. justify-content: space-around;
  351. background: rgba(238, 244, 255, 1);
  352. border-radius: 8rpx;
  353. align-items: center;
  354. width: 45vw;
  355. height: 23vw;
  356. }
  357. .needRight {
  358. display: flex;
  359. justify-content: space-around;
  360. background: #def6f8;
  361. border-radius: 8rpx;
  362. align-items: center;
  363. width: 45vw;
  364. height: 23vw;
  365. }
  366. .needLeftLeft {
  367. display: flex;
  368. flex-direction: column;
  369. }
  370. .needImg {
  371. width: 100rpx;
  372. height: 100rpx;
  373. }
  374. }
  375. .titleTips {
  376. display: flex;
  377. align-items: center;
  378. font-size: 4.7vw;
  379. font-weight: 600;
  380. color: #18172a;
  381. margin: 4vw 0 2vw 0;
  382. .myLine {
  383. width: 13rpx;
  384. height: 40rpx;
  385. background: linear-gradient(180deg, #509fff 0%, #034df7 100%);
  386. margin-right: 20rpx;
  387. }
  388. }
  389. </style>