enterpriseSide.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  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">{{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.getLocation({
  270. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  271. success: function (res) {
  272. const latitude = res.latitude;
  273. const longitude = res.longitude;
  274. uni.openLocation({
  275. latitude: this.selectGroup.latitude,
  276. longitude: this.selectGroup.longitude,
  277. success: function () {
  278. console.log('success');
  279. }
  280. });
  281. }
  282. });
  283. },
  284. getNotice(){
  285. newNotice().then(res=>{
  286. if (res.code=='409'){
  287. uni.clearStorageSync();
  288. uni.reLaunch({
  289. url: "/pages/login/login",
  290. });
  291. }
  292. if (res.data){
  293. const newNotice = res.data
  294. newNotice.forEach(e=>{
  295. e.time = this.showtime(e.releaseTime)
  296. })
  297. this.noticeList.push(...res.data)
  298. }
  299. })
  300. },
  301. showtime(time) {
  302. const date =
  303. typeof time === 'number'
  304. ? new Date(time)
  305. : new Date((time || '').replace(/-/g, '/'))
  306. const diff = (new Date().getTime() - date.getTime()) / 1000
  307. const dayDiff = Math.floor(diff / 86400)
  308. const isValidDate =
  309. Object.prototype.toString.call(date) === '[object Date]' &&
  310. !isNaN(date.getTime())
  311. if (!isValidDate) {
  312. window.console.error('不是有效日期格式')
  313. }
  314. const formatDate = function(date) {
  315. const today = new Date(date)
  316. const year = today.getFullYear()
  317. const month = ('0' + (today.getMonth() + 1)).slice(-2)
  318. const day = ('0' + today.getDate()).slice(-2)
  319. const hour = today.getHours()
  320. const minute = today.getMinutes()
  321. const second = today.getSeconds()
  322. return `${year}-${month}-${day} ${hour}:${minute}:${second}`
  323. }
  324. if (isNaN(dayDiff) || dayDiff < 0) {
  325. return formatDate(date)
  326. }
  327. return (
  328. (dayDiff === 0 &&
  329. ((diff < 60 && '刚刚') ||
  330. (diff < 120 && '1分钟前') ||
  331. (diff < 3600 && Math.floor(diff / 60) + '分钟前') ||
  332. (diff < 7200 && '1小时前') ||
  333. (diff < 86400 && Math.floor(diff / 3600) + '小时前'))) ||
  334. (dayDiff === 1 && '昨天') ||
  335. (dayDiff < 7 && dayDiff + '天前') ||
  336. (dayDiff < 31 && Math.ceil(dayDiff / 7) + '周前') ||
  337. (dayDiff >= 31 && Math.ceil((dayDiff - 30) / 31) + '月前')
  338. )
  339. },
  340. toServiceEva(){
  341. uni.navigateTo({
  342. url:"/pages/subPackages/serviceEvaluation/index",
  343. })
  344. },
  345. toNotice(item) {
  346. // 跳转传参
  347. uni.navigateTo({
  348. url:"/pages/subPackages/propertyNotice/index?type=" + item.type,
  349. })
  350. },
  351. bindPickerChange(e) {
  352. this.selectGroup = this.array[e.detail.value];
  353. wx.setStorageSync("selectGroup", JSON.stringify(this.array[e.detail.value]));
  354. },
  355. jumpPage(path, isMustCompany) {
  356. console.log(path);
  357. if (isMustCompany && getUserLocalStorageInfo().userType == 3) {
  358. uni.showModal({
  359. title: "提示",
  360. cancelText: "暂不",
  361. confirmText: "去切换",
  362. content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
  363. success: function (res) {
  364. if (res.confirm) {
  365. uni.navigateTo({
  366. url: "/pages/login2/login",
  367. success: function (e) {
  368. // uni.$emit('userType', 'OK')
  369. },
  370. });
  371. } else if (res.cancel) {
  372. console.log("用户点击取消");
  373. }
  374. },
  375. });
  376. } else {
  377. uni.navigateTo({
  378. url: path,
  379. fail: (fail) => {
  380. console.log(fail);
  381. },
  382. });
  383. }
  384. },
  385. clickTab(item) {
  386. // this.selectTab = item.name;
  387. if (item.name==='周边'){
  388. uni.navigateTo({
  389. url:'/pages/subPackages/peripheralService/index'
  390. })
  391. }else if(item.name==='房源'){
  392. uni.navigateTo({
  393. url:'/pages/subPackages/housingResources/index'
  394. })
  395. }
  396. },
  397. },
  398. };
  399. </script>
  400. <style lang="scss">
  401. .enterpriseSide {
  402. background: #f5f7fa;
  403. .searchTop {
  404. //margin: 24rpx;
  405. background: white;
  406. position: relative;
  407. display: flex;
  408. align-items: center;
  409. .searchArea {
  410. position: relative;
  411. width: 532rpx;
  412. height: 64rpx;
  413. background: #f5f7fa;
  414. border-radius: 32rpx;
  415. padding-left: 68rpx;
  416. font-size: 28rpx;
  417. }
  418. .locationIcon {
  419. position: absolute;
  420. width: 28rpx;
  421. height: 28rpx;
  422. left: 24rpx;
  423. z-index: 10;
  424. }
  425. .dhIcon {
  426. width: 48rpx;
  427. height: 48rpx;
  428. margin-left: 16rpx;
  429. }
  430. .vector {
  431. position: absolute;
  432. width: 16rpx;
  433. height: 8rpx;
  434. left: 552rpx;
  435. }
  436. }
  437. .parkBgBox {
  438. position: relative;
  439. background-repeat: no-repeat;
  440. background-size: 100%;
  441. width: 702rpx;
  442. height: 320rpx;
  443. margin-top: 24rpx;
  444. .parkNameBox {
  445. position: absolute;
  446. box-sizing: border-box;
  447. width: 100%;
  448. height: 64rpx;
  449. background: rgba(3, 19, 41, 0.6);
  450. display: flex;
  451. align-items: center;
  452. padding-left: 24rpx;
  453. bottom: 0;
  454. color: white;
  455. font-size: 28rpx;
  456. border-radius: 0 0 16rpx 16rpx;
  457. z-index: 1000;
  458. }
  459. }
  460. .map2 {
  461. box-sizing: border-box;
  462. //position: absolute;
  463. z-index: 2;
  464. width: 100%;
  465. //height: 770rpx;
  466. //border-radius: 48rpx 48rpx 0rpx 0rpx;
  467. background: white;
  468. //margin-top: 402rpx;
  469. padding: 36rpx 0 0 0;
  470. overflow-y: auto;
  471. display: grid;
  472. grid-template-columns: repeat(5, 1fr);
  473. }
  474. .mapIcon2 {
  475. width: 92rpx;
  476. height: 92rpx;
  477. display: block;
  478. margin: auto;
  479. }
  480. .mapdom2 {
  481. height: 184rpx;
  482. }
  483. .noticeBody {
  484. padding: 24rpx 28rpx;
  485. background: white;
  486. display: flex;
  487. align-items: center;
  488. margin: 24rpx 0;
  489. .tongzhiImg {
  490. width: 86rpx;
  491. height: 96rpx;
  492. }
  493. .columLine {
  494. width: 2rpx;
  495. height: 80rpx;
  496. background: #e7eaf0;
  497. margin: 0 16rpx;
  498. }
  499. .noticeBox {
  500. display: flex;
  501. flex-direction: column;
  502. .noticeItem {
  503. display: flex;
  504. align-items: center;
  505. margin: 8rpx 0;
  506. .noticeTag {
  507. width: 56rpx;
  508. height: 30rpx;
  509. background: #ffffff;
  510. border-radius: 4rpx 4rpx 4rpx 4rpx;
  511. border: 2rpx solid #0365f9;
  512. color: #0365f9;
  513. font-size: 22rpx;
  514. text-align: center;
  515. display: flex;
  516. align-items: center;
  517. justify-content: center;
  518. }
  519. .noticeInfo {
  520. width: 326rpx;
  521. font-size: 24rpx;
  522. color: #18172a;
  523. overflow: hidden;
  524. white-space: nowrap;
  525. text-overflow: ellipsis;
  526. margin: 0 24rpx;
  527. }
  528. .noticeTime {
  529. color: #666666;
  530. font-size: 24rpx;
  531. }
  532. }
  533. }
  534. }
  535. .parkDynamic {
  536. width: 100%;
  537. background: white;
  538. padding: 24rpx;
  539. box-sizing: border-box;
  540. .parkDynamicTab {
  541. display: flex;
  542. padding: 26px 0;
  543. .tabItem {
  544. color: #666666;
  545. font-size: 28rpx;
  546. margin: 0 32rpx;
  547. }
  548. .selectTabItem {
  549. color: #18172a;
  550. border-bottom: 6rpx solid #034df7;
  551. }
  552. }
  553. }
  554. .serviceEvaluation {
  555. width: 100%;
  556. background: white;
  557. padding: 24rpx;
  558. box-sizing: border-box;
  559. margin-top: 24rpx;
  560. .wyInfo {
  561. display: flex;
  562. align-items: center;
  563. justify-content: space-between;
  564. .wyName {
  565. display: flex;
  566. align-items: center;
  567. font-size: 36rpx;
  568. color: rgba(24, 23, 42, 1);
  569. margin: 38rpx 8rpx 24rpx 8rpx;
  570. .wyhead {
  571. width: 88rpx;
  572. height: 88rpx;
  573. margin-right: 24rpx;
  574. }
  575. }
  576. }
  577. .evaluationBox {
  578. width: 702rpx;
  579. height: 196rpx;
  580. //margin: 24rpx;
  581. padding: 42rpx 0 42rpx 48rpx;
  582. background: #f5f7fa;
  583. border-radius: 8rpx;
  584. box-sizing: border-box;
  585. .evaluationBoxName {
  586. font-size: 28rpx;
  587. color: #18172a;
  588. margin-bottom: 32rpx;
  589. }
  590. }
  591. }
  592. .contactInfo {
  593. display: flex;
  594. justify-content: space-between;
  595. align-items: center;
  596. padding: 30rpx 48rpx;
  597. box-sizing: border-box;
  598. background: white;
  599. margin: 4rpx 0 74rpx 0;
  600. .infoBox {
  601. display: flex;
  602. flex-direction: column;
  603. .infoTitle {
  604. color: #666666;
  605. font-size: 28rpx;
  606. margin-bottom: 16rpx;
  607. }
  608. .phoneNumber {
  609. color: #18172a;
  610. font-size: 40rpx;
  611. font-weight: 600;
  612. }
  613. }
  614. .phoneCall {
  615. width: 88rpx;
  616. height: 88rpx;
  617. }
  618. }
  619. .columLineBlue {
  620. width: 10rpx;
  621. height: 32rpx;
  622. background: linear-gradient(180deg, #509fff 0%, #034df7 100%);
  623. border-radius: 1px 1px 1px 1px;
  624. margin-right: 16rpx;
  625. }
  626. .titleName {
  627. color: #18172a;
  628. font-size: 36rpx;
  629. font-weight: 500;
  630. }
  631. .parkDynamicTitle {
  632. display: flex;
  633. align-items: center;
  634. }
  635. .swiperImg{
  636. width: 702rpx;
  637. height: 320rpx;
  638. }
  639. }
  640. </style>