enterpriseSide.vue 18 KB

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