index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <template>
  2. <view>
  3. <div class="managementBody" v-show="userType == 2">
  4. <image
  5. src="https://www.idea-co-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. >3</span
  20. ></span
  21. >
  22. </div>
  23. <img
  24. src="https://www.idea-co-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. >12</span
  40. ></span
  41. >
  42. </div>
  43. <img
  44. src="https://www.idea-co-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 } from "@/js_sdk/http";
  75. import EnterpriseSide from "./components/enterpriseSide.vue";
  76. export default {
  77. components: { EnterpriseSide },
  78. data() {
  79. return {
  80. userType: false,
  81. mapList: [
  82. // {
  83. // label: "智慧党建",
  84. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  85. // path: "/pages/subPackages/buildmap/index",
  86. // },
  87. // {
  88. // label: "经发填报",
  89. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  90. // path: "/pages/subPackages/companyHouse/companyHouse",
  91. // },
  92. {
  93. label: "企业库",
  94. url: "https://www.idea-co-sf.com/gardenProduct/image/qyk.png",
  95. path: "/pages/subPackages/companyHouse/companyHouse",
  96. },
  97. {
  98. label: "走访上报",
  99. url: "https://www.idea-co-sf.com/gardenProduct/image/zfsb.png",
  100. path: "/pages/subPackages/companyreport/companyreport",
  101. },
  102. {
  103. label: "会议室审核",
  104. url: "https://www.idea-co-sf.com/gardenProduct/image/tupian1.png",
  105. },
  106. // {
  107. // label: "上市跟进",
  108. // url: https://www.idea-co-sf.com/gardenProduct/image/ssgj.png"),
  109. // },
  110. {
  111. label: "招商管理",
  112. url: "https://www.idea-co-sf.com/gardenProduct/image/zsgl.png",
  113. path: "/pages/subPackages/merchants/merchants",
  114. },
  115. // {
  116. // label: "活动发布",
  117. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/3@2x.png",
  118. // path: "/pages/subPackages/eventRelease/index",
  119. // },
  120. // {
  121. // label: "安全管理自检",
  122. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/8@2x.png",
  123. // path: "/pages/subPackages/secureselftest2/index",
  124. // },
  125. // {
  126. // label: "安全管理统计",
  127. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/8@2x.png",
  128. // path: "/pages/subPackages/secureselftest/index",
  129. // },
  130. // {
  131. // label: "安全自检计划",
  132. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/9@2x.png",
  133. // path: "/pages/subPackages/secureselfplan/index",
  134. // },
  135. {
  136. label: "报修派单",
  137. url: "https://www.idea-co-sf.com/gardenProduct/image/bxpd.png",
  138. path: "/pages/subPackages/repairDispatch-app/index",
  139. },
  140. {
  141. label: "报修处理",
  142. url: "https://www.idea-co-sf.com/gardenProduct/image/bxcl.png",
  143. path: "/pages/subPackages/repairprocessing-app/index",
  144. },
  145. {
  146. label: "房间管理",
  147. url: "https://www.idea-co-sf.com/gardenProduct/image/fjgl.png",
  148. // path: "/pages/subPackages/repairprocessing-app/index",
  149. },
  150. {
  151. label: "园区通知",
  152. url: "https://www.idea-co-sf.com/gardenProduct/image/tzfb.png",
  153. // path: "",
  154. },
  155. {
  156. label: "物业通知",
  157. url: "https://www.idea-co-sf.com/gardenProduct/image/tupian2.png",
  158. // path: "",
  159. },
  160. {
  161. label: "活动发布",
  162. url: "https://www.idea-co-sf.com/gardenProduct/image/hdfb.png",
  163. path: "/pages/subPackages/activityPromulgate/list",
  164. },
  165. // {
  166. // label: "周边发布",
  167. // url: https://www.idea-co-sf.com/gardenProduct/image/zbfb.png"),
  168. // path: "/pages/subPackages/repairprocessing-app/index",
  169. // },
  170. // {
  171. // label: "整改填报",
  172. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/15@2x.png",
  173. // path: "/pages/subPackages/modifyReport/index",
  174. // },
  175. // {
  176. // label: "整改派单",
  177. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/14@2x.png",
  178. // path: "/pages/subPackages/modifySend/index",
  179. // },
  180. // {
  181. // label: "整改处理",
  182. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/13@2x.png",
  183. // path: "/pages/subPackages/modifyHandle/index",
  184. // },
  185. // {
  186. // label: "活动核销",
  187. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  188. // path: "/pages/subPackages/activity/index",
  189. // },
  190. // {
  191. // label: "可视化大屏",
  192. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  193. // path: "/pages/subPackages/bigscreen/bigscreen",
  194. // },
  195. // {
  196. // label: "场馆审核",
  197. // url: "https://hswkxc.idea-sf.com/fileService/static/slices/1@2x.png",
  198. // path: "/pages/subPackages/venueRoom/meetingroom",
  199. // },
  200. ],
  201. };
  202. },
  203. onShareAppMessage() {},
  204. mounted() {
  205. // demo();
  206. },
  207. onShow() {
  208. this.getUserPower();
  209. },
  210. onLoad(e) {
  211. // uni.$on("userType", (userType) => {
  212. // if (userType === "OK") {
  213. // this.userType = !this.userType;
  214. // }
  215. // });
  216. },
  217. methods: {
  218. toMsgPage(e) {
  219. uni.navigateTo({
  220. url: e,
  221. fail: (fail) => {},
  222. });
  223. },
  224. // getUserLocalStorageInfo
  225. async getUserPower() {
  226. let that = this;
  227. console.log('getUserLocalStorageInfo',getUserLocalStorageInfo());
  228. that.userType = getUserLocalStorageInfo().userType;
  229. if (that.userType == 3) {
  230. uni.showModal({
  231. title: "提示",
  232. cancelText: "暂不",
  233. confirmText: "去切换",
  234. content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
  235. success: function (res) {
  236. if (res.confirm) {
  237. uni.navigateTo({
  238. url: "/pages/login2/login",
  239. success: function (e) {
  240. // uni.$emit('userType', 'OK')
  241. },
  242. });
  243. } else if (res.cancel) {
  244. console.log("用户点击取消");
  245. }
  246. },
  247. });
  248. }
  249. // if (getUserLocalStorageInfo().user.id == 1) return;
  250. // let newList = [];
  251. // let { data } = await getUserPower(getUserLocalStorageInfo().user.id);
  252. // for (let i = 0; i < that.mapList.length; i++) {
  253. // let index = data.findIndex((e) => e == that.mapList[i].label);
  254. // if (index != -1) {
  255. // newList.push(that.mapList[i]);
  256. // }
  257. // }
  258. // that.mapList = newList;
  259. },
  260. jumpPage(path) {
  261. uni.navigateTo({
  262. url: path,
  263. fail: (fail) => {},
  264. });
  265. },
  266. },
  267. };
  268. </script>
  269. <style lang="scss">
  270. page {
  271. background: white;
  272. }
  273. .managementBody {
  274. padding: 4vw;
  275. }
  276. .banner {
  277. width: 92vw;
  278. height: 250rpx;
  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: #18172a;
  293. text-align: center;
  294. margin-top: 8rpx;
  295. }
  296. .mapIcon {
  297. width: 65rpx;
  298. height: 80rpx;
  299. //background: linear-gradient(141deg, #89BCFF 0%, #2782FA 100%);
  300. display: block;
  301. margin: auto;
  302. }
  303. .map {
  304. //position: absolute;
  305. z-index: 2;
  306. width: calc(100% - 24rpx);
  307. //height: 770rpx;
  308. border-radius: 48rpx 48rpx 0rpx 0rpx;
  309. background: white;
  310. //margin-top: 402rpx;
  311. padding: 24rpx 12rpx;
  312. overflow-y: auto;
  313. }
  314. .needBox {
  315. display: flex;
  316. align-items: center;
  317. justify-content: space-between;
  318. margin: 2vw 0;
  319. .needLeft {
  320. display: flex;
  321. justify-content: space-around;
  322. background: rgba(238, 244, 255, 1);
  323. border-radius: 8rpx;
  324. align-items: center;
  325. width: 45vw;
  326. height: 23vw;
  327. }
  328. .needRight {
  329. display: flex;
  330. justify-content: space-around;
  331. background: #def6f8;
  332. border-radius: 8rpx;
  333. align-items: center;
  334. width: 45vw;
  335. height: 23vw;
  336. }
  337. .needLeftLeft {
  338. display: flex;
  339. flex-direction: column;
  340. }
  341. .needImg {
  342. width: 100rpx;
  343. height: 100rpx;
  344. }
  345. }
  346. .titleTips {
  347. display: flex;
  348. align-items: center;
  349. font-size: 4.7vw;
  350. font-weight: 600;
  351. color: #18172a;
  352. margin: 4vw 0 2vw 0;
  353. .myLine {
  354. width: 13rpx;
  355. height: 40rpx;
  356. background: linear-gradient(180deg, #509fff 0%, #034df7 100%);
  357. margin-right: 20rpx;
  358. }
  359. }
  360. </style>