index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. <template>
  2. <view :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <uni-nav-bar color="#ffffff" leftWidth='520rpx' :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  5. <block slot="left">
  6. <view class="flexc">
  7. <view class="topl flexc">
  8. <image :src="adrimg" ></image>
  9. <view class="over">{{city}}</view>
  10. </view>
  11. <view style="flex: 0 1 auto;overflow: hidden;">
  12. <picker range-key='dictLabel' :value="voindex" :range="xxList" @change='bindDateChangeb'>
  13. <view class="pay_btn flexcc" >
  14. <view class="tit over">
  15. {{companyName||"请选择物业"}}</view>
  16. <image :src="aupimg" class="rimgs"></image>
  17. </view>
  18. </picker>
  19. </view>
  20. </view>
  21. </block>
  22. </uni-nav-bar>
  23. </view>
  24. <!-- 主体 -->
  25. <image :src="navbg" class="navbg"></image>
  26. <view class="wymain" >
  27. <view class="adrbox">
  28. <view class="flexc mb14">
  29. <image :src="adraimg" class="adr"></image>
  30. <view class="adrtit">智慧<text>社区</text></view>
  31. </view>
  32. <view class="adrtxt flexc mb4">
  33. <view class="over">嗨~{{nickName}}!</view><text v-if="postGroup">{{postGroup}}</text>
  34. </view>
  35. <view class="adrtip">{{deptName}}</view>
  36. <image :src="adrbgimg" class="adrbgimg"></image>
  37. </view>
  38. <view class="mb22">
  39. <notice :noticelist="noticelist" :autoplay='autoplay' @getNoticeDet="getNoticeDet"></notice>
  40. </view>
  41. <!-- 统计 -->
  42. <view class="contbox" v-if="checkPermi(['wuYe:statistics:num:app'])">
  43. <view class="cont flexc">
  44. <image :src="conta"></image>
  45. <view>今日数据统计</view>
  46. </view>
  47. <view class="lists">
  48. <view class="list">
  49. <view class="tit">{{count.kxcw||0}}</view>
  50. <view class="txt">空闲车位</view>
  51. </view>
  52. <view class="list">
  53. <view class="tit">{{count.kxcdz||0}}</view>
  54. <view class="txt">空闲充电桩</view>
  55. </view>
  56. <view class="list">
  57. <view class="tit">{{count.jrcl||0}}</view>
  58. <view class="txt">进入车辆</view>
  59. </view>
  60. <view class="list">
  61. <view class="tit">{{count.lkcl||0}}</view>
  62. <view class="txt">离开车辆</view>
  63. </view>
  64. <view class="list">
  65. <view class="tit">{{count.wlcl||0}}</view>
  66. <view class="txt">外来车辆</view>
  67. </view>
  68. <view class="list">
  69. <view class="tit">{{count.wtdj||0}}</view>
  70. <view class="txt">违停登记</view>
  71. </view>
  72. <view class="list">
  73. <view class="tit">{{count.wlry||0}}</view>
  74. <view class="txt">外来人员</view>
  75. </view>
  76. <view class="list">
  77. <view class="tit">{{count.jrry||0}}</view>
  78. <view class="txt">进入人员</view>
  79. </view>
  80. <block v-if="zhanflag">
  81. <view class="list">
  82. <view class="tit ca">{{count.yxg||0}}</view>
  83. <view class="txt">已巡更</view>
  84. </view>
  85. <view class="list">
  86. <view class="tit ca">{{count.wxg||0}}</view>
  87. <view class="txt">未巡更</view>
  88. </view>
  89. <view class="list">
  90. <view class="tit cb">{{count.jzdd||0}}</view>
  91. <view class="txt">家政订单</view>
  92. </view>
  93. <view class="list">
  94. <view class="tit cb">{{count.wcdd||0}}</view>
  95. <view class="txt">完成订单</view>
  96. </view>
  97. <view class="list">
  98. <view class="tit cc">{{count.jrbx||0}}</view>
  99. <view class="txt">今日报修</view>
  100. </view>
  101. <view class="list">
  102. <view class="tit cc">{{count.ypbx||0}}</view>
  103. <view class="txt">已派报修</view>
  104. </view>
  105. <view class="list">
  106. <view class="tit cc">{{count.tsjy||0}}</view>
  107. <view class="txt">投诉建议</view>
  108. </view>
  109. <view class="list">
  110. <view class="tit cc">{{count.yhjy||0}}</view>
  111. <view class="txt">已回投诉</view>
  112. </view>
  113. </block>
  114. </view>
  115. <view class="upbox" @click="getZhanFn">
  116. <image :src="upimg" :class="zhanflag?'':'zhe'"></image>
  117. <view>{{zhanflag?'收起':'展开'}}</view>
  118. </view>
  119. </view>
  120. <view class="contbox mb16">
  121. <view class="cont flexc mb9">
  122. <image :src="contb"></image>
  123. <view>物业管理</view>
  124. </view>
  125. <view class="lists">
  126. <view class="list bimga" @click="getCarFn">
  127. <view class="imgs"><image :src="htaba" class="imga"></image></view>
  128. <view class="txt">车辆管控</view>
  129. </view>
  130. <view class="list bimga" @click="getCarKuFn">
  131. <view class="imgs"><image :src="htabb" class="imgb"></image></view>
  132. <view class="txt">车库管理</view>
  133. </view>
  134. <view class="list bimga" @click="getCarCheckFn">
  135. <view class="imgs"><image :src="htabc" class="imgc"></image></view>
  136. <view class="txt">外来车辆登记</view>
  137. </view>
  138. <view class="list bimga" @click="getillegalParkFn" v-if="checkPermi(['wuYe:illegalParking:list'])">
  139. <view class="imgs"><image :src="htabd" class="imgd"></image></view>
  140. <view class="txt">违停管理</view>
  141. </view>
  142. <view class="list bimga" @click="getPeopleFn" v-if="checkPermi(['wuYe:residentInfo:list'])">
  143. <view class="imgs"><image :src="htabe" class="imge"></image></view>
  144. <view class="txt">人员管理</view>
  145. </view>
  146. <view class="list bimga" @click="getComeglFn" v-if="checkPermi(['wuYe:visitorManage:list'])">
  147. <view class="imgs"><image :src="htabf" class="imgf"></image></view>
  148. <view class="txt">来访管理</view>
  149. </view>
  150. <view class="list bimga" @click="getMoneyFn" v-if="checkPermi(['wuYe:fee:list'])">
  151. <view class="imgs"><image :src="htabg" class="imgd"></image></view>
  152. <view class="txt">物业费管理</view>
  153. </view>
  154. <view class="list bimga" @click="getHouseFn" v-if="checkPermi(['wuYe:houseInfo:list'])">
  155. <view class="imgs"><image :src="htabh" class="imgd"></image></view>
  156. <view class="txt">房屋管理</view>
  157. </view>
  158. </view>
  159. </view>
  160. <view class="contbox mb16">
  161. <view class="cont flexc mb9">
  162. <image :src="contc"></image>
  163. <view>物业服务</view>
  164. </view>
  165. <view class="lists">
  166. <view class="list bimga" @click="getPatrolFn" v-if="checkPermi(['wuYe:checkPointRecord:list'])">
  167. <view class="imgs"><image :src="htabi" class="imgg"></image></view>
  168. <view class="txt">今日巡更</view>
  169. </view>
  170. <view class="list bimga" @click="getWarrantyFn" v-if="checkPermi(['wuYe:repair:list'])">
  171. <view class="imgs"><image :src="htabj" class="imgb"></image><view class="tips">
  172. <block v-if="countTips.propertyRepair>98">99+</block>
  173. <block v-else>{{countTips.propertyRepair||0}}</block>
  174. </view>
  175. </view>
  176. <view class="txt">物业报修</view>
  177. </view>
  178. <view class="list bimga" @click="getStaffFn" v-if="checkPermi(['wuYe:staffManage:list'])">
  179. <view class="imgs"><image :src="htabk" class="imgb"></image>
  180. <view class="tips">
  181. <block>aa</block>
  182. <!-- <block v-if="countTips.complaintSuggestion>98">99+</block>
  183. <block v-else>{{countTips.complaintSuggestion||0}}</block> -->
  184. </view>
  185. </view>
  186. <view class="txt">员工管理</view>
  187. </view>
  188. <view class="list bimga" @click="getComplaintFn" v-if="checkPermi(['wuYe:suggestion:list'])">
  189. <view class="imgs"><image :src="htabl" class="imga"></image><view class="tips">
  190. <block v-if="countTips.complaintSuggestion>98">99+</block>
  191. <block v-else>{{countTips.complaintSuggestion||0}}</block>
  192. </view></view>
  193. <view class="txt">投诉建议</view>
  194. </view>
  195. </view>
  196. </view>
  197. <view class="contbox mb16">
  198. <view class="cont flexc mb9">
  199. <image :src="contd"></image>
  200. <view>社区管理</view>
  201. </view>
  202. <view class="lists">
  203. <view class="list bimga" @click="getNewsdjFn" v-if="checkPermi(['wuYe:partyNews:list'])">
  204. <view class="imgs"><image :src="htabm" class="imgh"></image></view>
  205. <view class="txt">党建信息</view>
  206. </view>
  207. <view class="list bimga" @click="getNewssqFn" v-if="checkPermi(['wuYe:news:list'])">
  208. <view class="imgs"><image :src="htabn" class="imgi"></image><view class="tips">
  209. <block v-if="countTips.commentInteractionUserCount>98">99+</block>
  210. <block v-else>{{countTips.commentInteractionUserCount||0}}</block>
  211. </view></view>
  212. <view class="txt">社区资讯</view>
  213. </view>
  214. <view class="list bimga" @click="getNewsYgFn" v-if="checkPermi(['wuYe:manual:list'])">
  215. <view class="imgs"><image :src="htabo" class="imgf"></image></view>
  216. <view class="txt">员工培训</view>
  217. </view>
  218. <view class="list bimga" @click="getSqmoneyFn" v-if="checkPermi(['wuYe:assets:list'])">
  219. <view class="imgs"><image :src="htabp" class="imgi"></image></view>
  220. <view class="txt">社区资产</view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <loading></loading>
  226. <pop-up @getClose="getClose" :initFace='initFace' @getXxwsFn="getXxwsFn"></pop-up>
  227. <footers v-if="isfootflag" :footerindex="footerindex"></footers>
  228. </view>
  229. </template>
  230. <script>
  231. import footers from '@/components/footer/footer.vue'
  232. import notice from '@/components/swiper/notice.vue'
  233. import popUp from "@/components/box/popup.vue"
  234. import {getUserProfile} from "@/api/system/user.js"
  235. import {repairList} from "@/api/work/service.js"
  236. import self from '@/utils/location.js';
  237. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  238. import {getCount,getCountTips} from "@/api/work/index.js"
  239. export default {
  240. components:{footers,notice,popUp},
  241. data(){
  242. return{
  243. footerindex:'home',
  244. isfootflag:true,
  245. nvaHeight:44,
  246. // activeColor:'#A7CDF9',
  247. // nactiveColor:'#DADADA',
  248. backgroundColor: "transparent",
  249. navbg:require("@/static/images/navbg.png"),
  250. adrimg:require("@/static/images/home/adr.png"),
  251. adraimg:require("@/static/images/home/adra.png"),
  252. adrbgimg:require("@/static/images/home/adrbg.png"),
  253. conta:require("@/static/images/home/conta.png"),
  254. contb:require("@/static/images/home/contb.png"),
  255. contc:require("@/static/images/home/contc.png"),
  256. contd:require("@/static/images/home/contd.png"),
  257. htaba:require("@/static/images/home/htaba.png"),
  258. htabb:require("@/static/images/home/htabb.png"),
  259. htabc:require("@/static/images/home/htabc.png"),
  260. htabd:require("@/static/images/home/htabd.png"),
  261. htabe:require("@/static/images/home/htabe.png"),
  262. htabf:require("@/static/images/home/htabf.png"),
  263. htabg:require("@/static/images/home/htabg.png"),
  264. htabh:require("@/static/images/home/htabh.png"),
  265. htabi:require("@/static/images/home/htabi.png"),
  266. htabj:require("@/static/images/home/htabj.png"),
  267. htabk:require("@/static/images/home/htabk.png"),
  268. htabl:require("@/static/images/home/htabl.png"),
  269. htabm:require("@/static/images/home/htabm.png"),
  270. htabn:require("@/static/images/home/htabn.png"),
  271. htabo:require("@/static/images/home/htabo.png"),
  272. htabp:require("@/static/images/home/htabp.png"),
  273. upimg:require("@/static/images/home/up.png"),
  274. aupimg: require('@/static/images/aup.png'),
  275. city:'合肥市',
  276. initFace:'N',//initFace Y不需要,N需要人脸认证
  277. deptName:this.$store.state.user.deptName,
  278. nickName:this.$store.state.user.nickName,
  279. postGroup:'',//岗位
  280. autoplay:false,
  281. zhanflag:true,
  282. xxList:[],
  283. companyName:'',
  284. count:"",//统计
  285. countTips:'',//红点
  286. userId:this.$store.state.user.userId,
  287. noticelist:[],
  288. }
  289. },
  290. onPageScroll(e) {
  291. var scrollTop = Number(e.scrollTop);
  292. if (scrollTop > 0) {
  293. this.backgroundColor = '#C3EDFF'
  294. } else {
  295. this.backgroundColor = 'transparent'
  296. }
  297. },
  298. onLoad: function() {
  299. var that=this;
  300. uni.getSystemInfo({
  301. success: (e) => {
  302. this.nvaHeight = Number(e.statusBarHeight)+44;
  303. }
  304. })
  305. if(checkPermi(['wuYe:statistics:num:app'])){
  306. this.getCount()
  307. }
  308. if(checkPermi(['wuYe:statistics:wuYeTips'])){
  309. this.getCountTips()
  310. }
  311. if(checkPermi(['wuYe:repair:list'])){
  312. this.repairList()
  313. }
  314. // #ifndef H5
  315. self.getLocation(function(res){
  316. if(res==-1){
  317. }else{
  318. that.city=res.city;
  319. }
  320. })
  321. // #endif
  322. },
  323. methods:{
  324. checkPermi, checkRole,
  325. getXxwsFn(){
  326. // this.$tab.navigateTo(`/mine/pages/house/addhouse`)
  327. },
  328. getClose(){
  329. this.initFace='Y';
  330. },
  331. bindDateChangeb(e){
  332. var that=this;
  333. var val=e.detail.value;
  334. var id=this.xxList[val].dictValue
  335. this.companyName=this.xxList[val].dictLabel;
  336. // if(id!=this.tenantId){
  337. this.tenantId=id;
  338. var params={
  339. tenantId:id,
  340. clientId:Clientid,
  341. grantType:'password'
  342. }
  343. gettenantCheck(params).then(res=>{
  344. var data=res.data;
  345. // 切换token
  346. this.$store.dispatch('checkToken', data.access_token).then(() => {
  347. that.getClassFn('GetInfo');
  348. // 刷新其余的页面
  349. var newArr=[false,true,true,true,true]
  350. that.$store.dispatch('checkRefresh', newArr).then(() => {
  351. }).catch(() => {
  352. })
  353. }).catch(() => {
  354. })
  355. })
  356. // }
  357. },
  358. getNoticeDet(data){
  359. this.$tab.navigateTo(`/service/pages/service/warrantydetail?id=`+data)
  360. },
  361. repairList(){
  362. var params={
  363. pageSize: 10,
  364. pageNum: 1,
  365. repairStatus: 1,
  366. }
  367. repairList(params).then(res=>{
  368. if(res.code==200){
  369. this.noticelist=res.rows
  370. }
  371. })
  372. },
  373. getCount(){
  374. getCount().then(res => {
  375. if(res.code==200){
  376. this.count=res.data;
  377. }
  378. // this.roleGroup = response.roleGroup
  379. // this.postGroup = response.postGroup
  380. })
  381. },
  382. getCountTips(){
  383. var params={
  384. userId:this.userId
  385. }
  386. getCountTips(params).then(res=>{
  387. if(res.code==200){
  388. this.countTips=res.data;
  389. }
  390. })
  391. },
  392. getUser() {
  393. getUserProfile().then(response => {
  394. this.roleGroup = response.roleGroup
  395. this.postGroup = response.postGroup
  396. })
  397. },
  398. getZhanFn(){
  399. this.zhanflag=!this.zhanflag
  400. },
  401. getCarFn(){//车辆管控
  402. this.$toast("模块建设中~")
  403. // this.$tab.navigateTo(`/car/pages/index`)
  404. },
  405. getCarKuFn(){//车库管理
  406. this.$toast("模块建设中~")
  407. // this.$tab.navigateTo(`/car/pages/carku`)
  408. },
  409. getCarCheckFn(){//外来车辆登记
  410. this.$tab.navigateTo(`/car/pages/carcheck`)
  411. },
  412. getillegalParkFn(){//违停管理
  413. this.$tab.navigateTo(`/car/pages/illegalParking`)
  414. },
  415. getPeopleFn(){//人员管理
  416. this.$tab.navigateTo(`/people/pages/people/index`)
  417. },
  418. getComeglFn(){//来访管理
  419. this.$tab.navigateTo(`/people/pages/people/comegl`)
  420. },
  421. getMoneyFn(){//物业费管理
  422. this.$tab.navigateTo(`/work/pages/manage/money`)
  423. },
  424. getPatrolFn(){//今日巡更
  425. this.$tab.navigateTo(`/service/pages/service/patrol`)
  426. },
  427. getWarrantyFn(){//报修管理
  428. this.$tab.navigateTo(`/service/pages/service/warranty`)
  429. },
  430. getStaffFn(){//维修人员管理
  431. this.$tab.navigateTo(`/people/pages/people/staff`)
  432. },
  433. getHouseFn(){//房屋管理
  434. this.$tab.navigateTo(`/work/pages/manage/house`)
  435. },
  436. getComplaintFn(){//投诉建议
  437. this.$tab.navigateTo(`/service/pages/service/complaint`)
  438. },
  439. getNewsdjFn(){//党建资讯
  440. this.$tab.navigateTo(`/manage/pages/community/newsdj`)
  441. },
  442. getNewssqFn(){//党建资讯
  443. this.$tab.navigateTo(`/manage/pages/community/newssq`)
  444. },
  445. getNewsYgFn(){//员工培训
  446. this.$tab.navigateTo(`/manage/pages/community/newsyg`)
  447. },
  448. getSqmoneyFn(){//社区资产
  449. this.$tab.navigateTo(`/manage/pages/community/sqmoney`)
  450. },
  451. }
  452. }
  453. </script>
  454. <style lang="scss" scoped>
  455. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  456. .navbg{width: 100%;height: 782rpx;}
  457. .wymain{z-index: 2;position: relative;padding: 0 24rpx;}
  458. .topl{overflow: hidden;padding-left: 16rpx;max-width: 200rpx;flex: 0 0 auto;
  459. image{width: 18rpx;height: 22rpx;margin-right: 14rpx;flex: 0 0 auto;}
  460. view{font-weight: bold;font-size: 26rpx;color: #272727;}
  461. }
  462. .adrbox{position: relative;padding:8rpx 240rpx 16rpx 36rpx;margin-bottom: 14rpx;
  463. .adr{width: 36rpx;height: 34rpx;margin-right: 14rpx;}
  464. .adrtit{font-size: 17px;color: #272727;font-weight: bold;
  465. text{color: #0256FD;}
  466. }
  467. .adrtxt{font-size: 16px;color: #272727;font-weight: bold;
  468. text{font-size: 10px;color: #3F7EFD;display: inline-flex;background: rgba(119, 171, 184, 0.3);margin-left: 22rpx;min-width: 66rpx;height: 30rpx;padding: 0 14rpx;box-sizing: border-box;flex: 0 0 auto;border-radius: 8px;align-items: center;justify-content: center;}
  469. }
  470. .adrtip{font-weight: 500;font-size: 24rpx;color: #828282;}
  471. .adrbgimg{width: 212rpx;height: 236rpx;position: absolute;right: 20rpx;top: -70rpx;}
  472. }
  473. .contbox{
  474. .cont{padding-left: 24rpx;margin-bottom: 12rpx;
  475. image{width: 32rpx;height: 32rpx;margin-right: 16rpx;}
  476. view{font-size: 15px;color: #272727;font-weight: bold;}
  477. }
  478. .lists{
  479. display: flex;align-items: center;flex-wrap: wrap;
  480. .list{padding: 8rpx 0;
  481. width: 25%;display: flex;flex-direction: column;align-items: center;
  482. .tit{font-weight: bold;font-size: 30rpx;color: #3565ED;line-height: 60rpx;font-style: italic;margin-bottom: 8rpx;
  483. &.ca{color: #FF7E00;}
  484. &.cb{color: #28C529;}
  485. &.cc{color: #FF3737;}
  486. }
  487. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  488. &.bimga{padding: 16rpx 0;}
  489. .imgs{display: flex;align-items: center;justify-content: center;width: 48rpx;height: 48rpx;margin-bottom: 18rpx;position: relative;
  490. .imga{width: 48rpx;height: 38rpx;}
  491. .imgb{width: 48rpx;height: 46rpx;}
  492. .imgc{width: 44rpx;height: 48rpx;}
  493. .imgd{width: 48rpx;height: 42rpx;}
  494. .imge{width: 46rpx;height: 46rpx;}
  495. .imgf{width: 48rpx;height: 48rpx;}
  496. .imgg{width: 42rpx;height: 48rpx;}
  497. .imgh{width: 44rpx;height: 44rpx;}
  498. .imgi{width: 48rpx;height: 44rpx;}
  499. .tips{position: absolute;min-width: 20rpx;top: -4rpx;left: 36rpx;box-sizing: border-box;
  500. height: 20rpx;padding: 0 4rpx;display: flex;align-items: center;justify-content: center;font-weight: bold;font-size: 16rpx;color: #FCF9F1;background: #D32C26;border-radius: 10rpx;
  501. }
  502. }
  503. }
  504. }
  505. .upbox{display: flex;align-items: center;justify-content: center;flex-direction: column;margin-top: 8rpx;padding-top: 8rpx;margin-bottom: 6rpx;
  506. image{width: 24rpx;height: 20rpx;margin-bottom: 8rpx;transition: all 0.3s;
  507. &.zhe{transform: rotate(-180deg);}
  508. }
  509. view{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
  510. }
  511. }
  512. .pay_btn{min-width: 240rpx;height: 66rpx;flex: 0 1 auto;margin-left: 20rpx;max-width: 320rpx;
  513. .tit{font-size: 26rpx;font-weight: 500;color: #333432;overflow: hidden;}
  514. image{width: 18rpx;height: 10rpx;margin-left: 20rpx;flex:0 0 auto;}
  515. }
  516. </style>