enterpriseSide.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <template>
  2. <div class="enterpriseSide">
  3. <div style="padding: 0 24rpx; background: white">
  4. <div class="searchTop">
  5. <image :src="locationIcon" class="locationIcon"></image>
  6. <picker @change="bindPickerChange" :value="index" :range="array" range-key="groupName">
  7. <input v-model="selectGroup.groupName" class="searchArea" disabled />
  8. </picker>
  9. <image :src="dhIcon" class="dhIcon" @tap="toMap"></image>
  10. <image :src="vector" class="vector"></image>
  11. </div>
  12. <div class="parkBgBox">
  13. <swiper :indicator-dots="false" circular style="height: 320rpx;position: relative" @change="changeImg" autoplay>
  14. <swiper-item v-for="item in envList">
  15. <img :src="item.url" class="swiperImg"/>
  16. <div class="parkNameBox">{{item.activityName}}</div>
  17. </swiper-item>
  18. </swiper>
  19. </div>
  20. <div class="map2">
  21. <div
  22. class="mapdom2"
  23. style="float: left"
  24. v-for="(item, index) in mapList"
  25. :key="index"
  26. @click="jumpPage(item.path, item.isMustCompany)"
  27. >
  28. <img class="mapIcon2" :src="item.url" />
  29. <div class="maptxt">{{ item.label }}</div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="noticeBody">
  34. <image :src="tongzhi" class="tongzhiImg"></image>
  35. <div class="columLine"></div>
  36. <div class="noticeBox">
  37. <div class="noticeItem" v-for="item in noticeList" @click="toNotice(item)">
  38. <div class="noticeTag">{{item.type=='1'?'园区':'物业'}}</div>
  39. <div class="noticeInfo">{{item.title}}</div>
  40. <div class="noticeTime">{{item.time}}</div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="parkDynamic">
  45. <div class="parkDynamicTitle">
  46. <div class="columLineBlue"></div>
  47. <div class="titleName">园区动态</div>
  48. </div>
  49. <div class="parkDynamicTab">
  50. <div
  51. v-for="(item, index) in tabList"
  52. :key="index"
  53. class="tabItem"
  54. :class="selectTab === item.name ? 'selectTabItem' : ''"
  55. @click="clickTab(item)"
  56. >
  57. {{ item.name }}
  58. </div>
  59. </div>
  60. <activity v-show="selectTab === '活动'" :faMsg="faMsg"></activity>
  61. <dynamic v-show="selectTab === '动态'"></dynamic>
  62. </div>
  63. <div class="serviceEvaluation">
  64. <div class="parkDynamicTitle">
  65. <div class="columLineBlue"></div>
  66. <div class="titleName">服务评价</div>
  67. </div>
  68. <div class="wyInfo">
  69. <div class="wyName">
  70. <image :src="wyhead" class="wyhead"></image>
  71. <span>XXXX物业</span>
  72. </div>
  73. <span style="color: #666666; font-size: 28rpx">好评率:100%</span>
  74. </div>
  75. <div class="evaluationBox" @tap="toServiceEva">
  76. <div class="evaluationBoxName">点击笑脸给出您对园区服务的评价</div>
  77. <van-rate
  78. :value="value"
  79. :size="32"
  80. color="#ffd21e"
  81. :void-icon="voidMyIcon"
  82. :icon="myIcon"
  83. gutter="32rpx"
  84. void-color="#eee"
  85. bind:change="onChange"
  86. />
  87. </div>
  88. </div>
  89. <div class="contactInfo">
  90. <div class="infoBox">
  91. <span class="infoTitle">客服电话(24小时)</span>
  92. <span class="phoneNumber">0510-680**808</span>
  93. </div>
  94. <image :src="phoneCall" class="phoneCall"></image>
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. import vanRate from "../../../wxcomponents/weapp/dist/rate/index";
  100. import dynamic from "./dynamic.vue";
  101. import Activity from "./activity.vue";
  102. import { getUserPower, getUserLocalStorageInfo, newNotice,getUserMainHouseKeeper, activityList, ParkInfoControllerListAll} from "@/js_sdk/http";
  103. export default {
  104. components: {
  105. Activity,
  106. vanRate,
  107. dynamic,
  108. },
  109. name: "enterpriseSide",
  110. data() {
  111. return {
  112. selectGroup:{},
  113. noticeList:[],
  114. faMsg:'home',
  115. locationIcon:
  116. "https://www.idea-co-sf.com/gardenProduct/image/locationIcon.png",
  117. dhIcon: "https://www.idea-co-sf.com/gardenProduct/image/dhIcon.png",
  118. vector: "https://www.idea-co-sf.com/gardenProduct/image/Vector.png",
  119. tongzhi: "https://www.idea-co-sf.com/gardenProduct/image/tongzhi.png",
  120. wyhead: "https://www.idea-co-sf.com/gardenProduct/image/wyHead.png",
  121. myIcon: "https://www.idea-co-sf.com/gardenProduct/image/icon.png",
  122. voidMyIcon: "https://www.idea-co-sf.com/gardenProduct/image/voidIcon.png",
  123. phoneCall: "https://www.idea-co-sf.com/gardenProduct/image/phoneCall.png",
  124. value: "5",
  125. searchArea: "当前园区名称",
  126. index: 0,
  127. array: [],
  128. // parkBg: "https://www.idea-co-sf.com/gardenProduct/image/parkBg.png",
  129. envList:[
  130. // {url:"https://www.idea-co-sf.com/gardenProduct/image/parkBg.png"},
  131. // {url:"https://www.idea-co-sf.com/gardenProduct/image/parkBg.png"}
  132. ],
  133. tabList: [
  134. { name: "活动" },
  135. { name: "周边" },
  136. { name: "房源" },
  137. { name: "动态" },
  138. ],
  139. selectTab: "活动",
  140. pages:{
  141. pageSize:10000,
  142. pageNum:1,
  143. statusStr:'1,2'
  144. },
  145. mapList: [
  146. {
  147. label: "待办提醒",
  148. url: "https://www.idea-co-sf.com/gardenProduct/image/dbtxIcon.png",
  149. // path: "/pages/subPackages/companyHouse/companyHouse",
  150. },
  151. {
  152. label: "企业账单",
  153. url: "https://www.idea-co-sf.com/gardenProduct/image/qyzdIcon.png",
  154. path: "/pages/subPackages/enterPriseBill/index",
  155. isMustCompany: true,
  156. },
  157. {
  158. label: "经发填报",
  159. url: "https://www.idea-co-sf.com/gardenProduct/image/jftbIcon.png",
  160. path: "/pages/subPackages/economicDevelopmentReport/economic",
  161. isMustCompany: true,
  162. },
  163. {
  164. label: "园区周边",
  165. url: "https://www.idea-co-sf.com/gardenProduct/image/yqzb.png",
  166. path: "/pages/subPackages/peripheralService/index",
  167. },
  168. {
  169. label: "报事报修",
  170. url: "https://www.idea-co-sf.com/gardenProduct/image/bsbxIcon.png",
  171. path: "/pages/subPackages/reportRepair/index",
  172. isMustCompany: true,
  173. },
  174. {
  175. label: "活动报名",
  176. url: "https://www.idea-co-sf.com/gardenProduct/image/hdbmIcon.png",
  177. path: "/pages/subPackages/parkActivity/index",
  178. // isMustCompany: true,
  179. },
  180. {
  181. label: "入驻申请",
  182. url: "https://www.idea-co-sf.com/gardenProduct/image/rzsqIcon.png",
  183. path: "/pages/subPackages/companyHouse/companyHouse",
  184. },
  185. {
  186. label: "退租申请",
  187. url: "https://www.idea-co-sf.com/gardenProduct/image/tzsqIcon.png",
  188. path: "/pages/subPackages/companyHouse/companyHouse",
  189. isMustCompany: true,
  190. },
  191. {
  192. label: "关于园区",
  193. url: "https://www.idea-co-sf.com/gardenProduct/image/gyyqIcon.png",
  194. path: "/pages/subPackages/aboutThePark/index",
  195. },
  196. {
  197. label: "产业政策",
  198. url: "https://www.idea-co-sf.com/gardenProduct/image/cyzcIcon.png",
  199. path: "/pages/subPackages/industrialPolicy/index",
  200. },
  201. {
  202. label: "资源预约",
  203. url: "https://www.idea-co-sf.com/gardenProduct/image/zyyyIcon.png",
  204. path: "/pages/subPackages/resourceReservation_manage/index",
  205. },
  206. ],
  207. };
  208. },
  209. mounted() {
  210. this.getNotice()
  211. this.getActiveList()
  212. this.getParkList()
  213. // this.getHouseKeeper()
  214. },
  215. methods: {
  216. changeImg(index){
  217. // this.current = index.detail.current+1
  218. },
  219. getParkList(){
  220. ParkInfoControllerListAll().then(res=>{
  221. this.array = res
  222. if (uni.getStorageSync('selectGroup')){
  223. this.selectGroup = JSON.parse(uni.getStorageSync('selectGroup'))
  224. }else{
  225. this.selectGroup = res[0]
  226. wx.setStorageSync("selectGroup", JSON.stringify(res[0]));
  227. }
  228. })
  229. },
  230. getActiveList(){
  231. activityList(this.pages).then(res=>{
  232. if (res.data.total > 0){
  233. res.data.rows.forEach(item=>{
  234. this.envList.push({...item,imgUrl:JSON.parse(item.annex)[0].url})
  235. })
  236. }
  237. console.log('this.envList',this.envList)
  238. })
  239. },
  240. //获取管家
  241. getHouseKeeper(){
  242. let reqData = {
  243. userId : getUserLocalStorageInfo().userId
  244. }
  245. getUserMainHouseKeeper(reqData).then((res) => {
  246. if (res.key == '200') {
  247. // console.log('res.data:开始')
  248. // console.log(res.data)
  249. // console.log('res.data:结束')
  250. if (res.data != null) {
  251. this.houseKeeper = res.data
  252. }
  253. }
  254. });
  255. },
  256. toMap(){
  257. uni.getLocation({
  258. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  259. success: function (res) {
  260. const latitude = res.latitude;
  261. const longitude = res.longitude;
  262. uni.openLocation({
  263. latitude: this.selectGroup.latitude,
  264. longitude: this.selectGroup.longitude,
  265. success: function () {
  266. console.log('success');
  267. }
  268. });
  269. }
  270. });
  271. },
  272. getNotice(){
  273. newNotice().then(res=>{
  274. if (res.code=='409'){
  275. uni.clearStorageSync();
  276. uni.reLaunch({
  277. url: "/pages/login/login",
  278. });
  279. }
  280. if (res.data){
  281. const newNotice = res.data
  282. newNotice.forEach(e=>{
  283. e.time = this.showtime(e.releaseTime)
  284. })
  285. this.noticeList.push(...res.data)
  286. }
  287. })
  288. },
  289. showtime(time) {
  290. const date =
  291. typeof time === 'number'
  292. ? new Date(time)
  293. : new Date((time || '').replace(/-/g, '/'))
  294. const diff = (new Date().getTime() - date.getTime()) / 1000
  295. const dayDiff = Math.floor(diff / 86400)
  296. const isValidDate =
  297. Object.prototype.toString.call(date) === '[object Date]' &&
  298. !isNaN(date.getTime())
  299. if (!isValidDate) {
  300. window.console.error('不是有效日期格式')
  301. }
  302. const formatDate = function(date) {
  303. const today = new Date(date)
  304. const year = today.getFullYear()
  305. const month = ('0' + (today.getMonth() + 1)).slice(-2)
  306. const day = ('0' + today.getDate()).slice(-2)
  307. const hour = today.getHours()
  308. const minute = today.getMinutes()
  309. const second = today.getSeconds()
  310. return `${year}-${month}-${day} ${hour}:${minute}:${second}`
  311. }
  312. if (isNaN(dayDiff) || dayDiff < 0) {
  313. return formatDate(date)
  314. }
  315. return (
  316. (dayDiff === 0 &&
  317. ((diff < 60 && '刚刚') ||
  318. (diff < 120 && '1分钟前') ||
  319. (diff < 3600 && Math.floor(diff / 60) + '分钟前') ||
  320. (diff < 7200 && '1小时前') ||
  321. (diff < 86400 && Math.floor(diff / 3600) + '小时前'))) ||
  322. (dayDiff === 1 && '昨天') ||
  323. (dayDiff < 7 && dayDiff + '天前') ||
  324. (dayDiff < 31 && Math.ceil(dayDiff / 7) + '周前') ||
  325. (dayDiff >= 31 && Math.ceil((dayDiff - 30) / 31) + '月前')
  326. )
  327. },
  328. toServiceEva(){
  329. uni.navigateTo({
  330. url:"/pages/subPackages/serviceEvaluation/index",
  331. })
  332. },
  333. toNotice(item) {
  334. // 跳转传参
  335. uni.navigateTo({
  336. url:"/pages/subPackages/propertyNotice/index?type=" + item.type,
  337. })
  338. },
  339. bindPickerChange(e) {
  340. this.selectGroup = this.array[e.detail.value];
  341. wx.setStorageSync("selectGroup", JSON.stringify(this.array[e.detail.value]));
  342. },
  343. jumpPage(path, isMustCompany) {
  344. console.log(path);
  345. if (isMustCompany && getUserLocalStorageInfo().userType == 3) {
  346. uni.showModal({
  347. title: "提示",
  348. cancelText: "暂不",
  349. confirmText: "去切换",
  350. content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
  351. success: function (res) {
  352. if (res.confirm) {
  353. uni.navigateTo({
  354. url: "/pages/login2/login",
  355. success: function (e) {
  356. // uni.$emit('userType', 'OK')
  357. },
  358. });
  359. } else if (res.cancel) {
  360. console.log("用户点击取消");
  361. }
  362. },
  363. });
  364. } else {
  365. uni.navigateTo({
  366. url: path,
  367. fail: (fail) => {
  368. console.log(fail);
  369. },
  370. });
  371. }
  372. },
  373. clickTab(item) {
  374. // this.selectTab = item.name;
  375. if (item.name==='周边'){
  376. uni.navigateTo({
  377. url:'/pages/subPackages/peripheralService/index'
  378. })
  379. }else if(item.name==='房源'){
  380. uni.navigateTo({
  381. url:'/pages/subPackages/housingResources/index'
  382. })
  383. }
  384. },
  385. },
  386. };
  387. </script>
  388. <style lang="scss">
  389. .enterpriseSide {
  390. background: #f5f7fa;
  391. .searchTop {
  392. //margin: 24rpx;
  393. background: white;
  394. position: relative;
  395. display: flex;
  396. align-items: center;
  397. .searchArea {
  398. position: relative;
  399. width: 532rpx;
  400. height: 64rpx;
  401. background: #f5f7fa;
  402. border-radius: 32rpx;
  403. padding-left: 68rpx;
  404. font-size: 28rpx;
  405. }
  406. .locationIcon {
  407. position: absolute;
  408. width: 28rpx;
  409. height: 28rpx;
  410. left: 24rpx;
  411. z-index: 10;
  412. }
  413. .dhIcon {
  414. width: 48rpx;
  415. height: 48rpx;
  416. margin-left: 16rpx;
  417. }
  418. .vector {
  419. position: absolute;
  420. width: 16rpx;
  421. height: 8rpx;
  422. left: 552rpx;
  423. }
  424. }
  425. .parkBgBox {
  426. position: relative;
  427. background-repeat: no-repeat;
  428. background-size: 100%;
  429. width: 702rpx;
  430. height: 320rpx;
  431. margin-top: 24rpx;
  432. .parkNameBox {
  433. position: absolute;
  434. box-sizing: border-box;
  435. width: 100%;
  436. height: 64rpx;
  437. background: rgba(3, 19, 41, 0.6);
  438. display: flex;
  439. align-items: center;
  440. padding-left: 24rpx;
  441. bottom: 0;
  442. color: white;
  443. font-size: 28rpx;
  444. border-radius: 0 0 16rpx 16rpx;
  445. z-index: 1000;
  446. }
  447. }
  448. .map2 {
  449. box-sizing: border-box;
  450. //position: absolute;
  451. z-index: 2;
  452. width: 100%;
  453. //height: 770rpx;
  454. //border-radius: 48rpx 48rpx 0rpx 0rpx;
  455. background: white;
  456. //margin-top: 402rpx;
  457. padding: 36rpx 0 0 0;
  458. overflow-y: auto;
  459. display: grid;
  460. grid-template-columns: repeat(5, 1fr);
  461. }
  462. .mapIcon2 {
  463. width: 92rpx;
  464. height: 92rpx;
  465. display: block;
  466. margin: auto;
  467. }
  468. .mapdom2 {
  469. height: 184rpx;
  470. }
  471. .noticeBody {
  472. padding: 24rpx 28rpx;
  473. background: white;
  474. display: flex;
  475. align-items: center;
  476. margin: 24rpx 0;
  477. .tongzhiImg {
  478. width: 86rpx;
  479. height: 96rpx;
  480. }
  481. .columLine {
  482. width: 2rpx;
  483. height: 80rpx;
  484. background: #e7eaf0;
  485. margin: 0 16rpx;
  486. }
  487. .noticeBox {
  488. display: flex;
  489. flex-direction: column;
  490. .noticeItem {
  491. display: flex;
  492. align-items: center;
  493. margin: 8rpx 0;
  494. .noticeTag {
  495. width: 56rpx;
  496. height: 30rpx;
  497. background: #ffffff;
  498. border-radius: 4rpx 4rpx 4rpx 4rpx;
  499. border: 2rpx solid #0365f9;
  500. color: #0365f9;
  501. font-size: 22rpx;
  502. text-align: center;
  503. display: flex;
  504. align-items: center;
  505. justify-content: center;
  506. }
  507. .noticeInfo {
  508. width: 326rpx;
  509. font-size: 24rpx;
  510. color: #18172a;
  511. overflow: hidden;
  512. white-space: nowrap;
  513. text-overflow: ellipsis;
  514. margin: 0 24rpx;
  515. }
  516. .noticeTime {
  517. color: #666666;
  518. font-size: 24rpx;
  519. }
  520. }
  521. }
  522. }
  523. .parkDynamic {
  524. width: 100%;
  525. background: white;
  526. padding: 24rpx;
  527. box-sizing: border-box;
  528. .parkDynamicTab {
  529. display: flex;
  530. padding: 26px 0;
  531. .tabItem {
  532. color: #666666;
  533. font-size: 28rpx;
  534. margin: 0 32rpx;
  535. }
  536. .selectTabItem {
  537. color: #18172a;
  538. border-bottom: 6rpx solid #034df7;
  539. }
  540. }
  541. }
  542. .serviceEvaluation {
  543. width: 100%;
  544. background: white;
  545. padding: 24rpx;
  546. box-sizing: border-box;
  547. margin-top: 24rpx;
  548. .wyInfo {
  549. display: flex;
  550. align-items: center;
  551. justify-content: space-between;
  552. .wyName {
  553. display: flex;
  554. align-items: center;
  555. font-size: 36rpx;
  556. color: rgba(24, 23, 42, 1);
  557. margin: 38rpx 8rpx 24rpx 8rpx;
  558. .wyhead {
  559. width: 88rpx;
  560. height: 88rpx;
  561. margin-right: 24rpx;
  562. }
  563. }
  564. }
  565. .evaluationBox {
  566. width: 702rpx;
  567. height: 196rpx;
  568. //margin: 24rpx;
  569. padding: 42rpx 0 42rpx 48rpx;
  570. background: #f5f7fa;
  571. border-radius: 8rpx;
  572. box-sizing: border-box;
  573. .evaluationBoxName {
  574. font-size: 28rpx;
  575. color: #18172a;
  576. margin-bottom: 32rpx;
  577. }
  578. }
  579. }
  580. .contactInfo {
  581. display: flex;
  582. justify-content: space-between;
  583. align-items: center;
  584. padding: 30rpx 48rpx;
  585. box-sizing: border-box;
  586. background: white;
  587. margin: 4rpx 0 74rpx 0;
  588. .infoBox {
  589. display: flex;
  590. flex-direction: column;
  591. .infoTitle {
  592. color: #666666;
  593. font-size: 28rpx;
  594. margin-bottom: 16rpx;
  595. }
  596. .phoneNumber {
  597. color: #18172a;
  598. font-size: 40rpx;
  599. font-weight: 600;
  600. }
  601. }
  602. .phoneCall {
  603. width: 88rpx;
  604. height: 88rpx;
  605. }
  606. }
  607. .columLineBlue {
  608. width: 10rpx;
  609. height: 32rpx;
  610. background: linear-gradient(180deg, #509fff 0%, #034df7 100%);
  611. border-radius: 1px 1px 1px 1px;
  612. margin-right: 16rpx;
  613. }
  614. .titleName {
  615. color: #18172a;
  616. font-size: 36rpx;
  617. font-weight: 500;
  618. }
  619. .parkDynamicTitle {
  620. display: flex;
  621. align-items: center;
  622. }
  623. .swiperImg{
  624. width: 702rpx;
  625. height: 320rpx;
  626. }
  627. }
  628. </style>