index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <view :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <uni-nav-bar color="#ffffff" leftWidth='400rpx' :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  5. <block slot="left">
  6. <view class="topl flexc">
  7. <image :src="adrimg" ></image>
  8. <view class="over">{{city}}</view>
  9. </view>
  10. </block>
  11. </uni-nav-bar>
  12. </view>
  13. <!-- 主体 -->
  14. <image :src="navbg" class="navbg"></image>
  15. <view class="wymain" >
  16. <view class="adrbox">
  17. <view class="flexc mb14">
  18. <image :src="adraimg" class="adr"></image>
  19. <view class="adrtit">智慧<text>社区</text></view>
  20. </view>
  21. <view class="adrtxt flexc mb4">
  22. <view class="over">嗨~{{nickName}}!</view><text v-if="postGroup">{{postGroup}}</text>
  23. </view>
  24. <view class="adrtip">{{deptName}}</view>
  25. <image :src="adrbgimg" class="adrbgimg"></image>
  26. </view>
  27. <view class="mb22">
  28. <notice :noticelist="noticelist" :autoplay='autoplay' @getNoticeDet="getNoticeDet"></notice>
  29. </view>
  30. <!-- 统计 -->
  31. <view class="contbox">
  32. <view class="cont flexc">
  33. <image :src="conta"></image>
  34. <view>今日数据统计</view>
  35. </view>
  36. <view class="lists">
  37. <view class="list">
  38. <view class="tit">21</view>
  39. <view class="txt">空闲车位</view>
  40. </view>
  41. <view class="list">
  42. <view class="tit">21</view>
  43. <view class="txt">空闲充电桩</view>
  44. </view>
  45. <view class="list">
  46. <view class="tit">21</view>
  47. <view class="txt">进入车辆</view>
  48. </view>
  49. <view class="list">
  50. <view class="tit">21</view>
  51. <view class="txt">离开车辆</view>
  52. </view>
  53. <view class="list">
  54. <view class="tit">21</view>
  55. <view class="txt">外来车辆</view>
  56. </view>
  57. <view class="list">
  58. <view class="tit">21</view>
  59. <view class="txt">违停登记</view>
  60. </view>
  61. <view class="list">
  62. <view class="tit">21</view>
  63. <view class="txt">外来人员</view>
  64. </view>
  65. <view class="list">
  66. <view class="tit">21</view>
  67. <view class="txt">进入人员</view>
  68. </view>
  69. <block v-if="zhanflag">
  70. <view class="list">
  71. <view class="tit ca">21</view>
  72. <view class="txt">已巡更</view>
  73. </view>
  74. <view class="list">
  75. <view class="tit ca">21</view>
  76. <view class="txt">未巡更</view>
  77. </view>
  78. <view class="list">
  79. <view class="tit cb">21</view>
  80. <view class="txt">家政订单</view>
  81. </view>
  82. <view class="list">
  83. <view class="tit cb">21</view>
  84. <view class="txt">完成订单</view>
  85. </view>
  86. <view class="list">
  87. <view class="tit cc">21</view>
  88. <view class="txt">今日报修</view>
  89. </view>
  90. <view class="list">
  91. <view class="tit cc">21</view>
  92. <view class="txt">已派报修</view>
  93. </view>
  94. <view class="list">
  95. <view class="tit cc">21</view>
  96. <view class="txt">投诉建议</view>
  97. </view>
  98. <view class="list">
  99. <view class="tit cc">21</view>
  100. <view class="txt">已回投诉</view>
  101. </view>
  102. </block>
  103. </view>
  104. <view class="upbox" @click="getZhanFn">
  105. <image :src="upimg" :class="zhanflag?'':'zhe'"></image>
  106. <view>{{zhanflag?'收起':'展开'}}</view>
  107. </view>
  108. </view>
  109. <view class="contbox mb16">
  110. <view class="cont flexc mb9">
  111. <image :src="contb"></image>
  112. <view>物业管理</view>
  113. </view>
  114. <view class="lists">
  115. <view class="list bimga" @click="getCarFn">
  116. <view class="imgs"><image :src="htaba" class="imga"></image></view>
  117. <view class="txt">车辆管控</view>
  118. </view>
  119. <view class="list bimga" @click="getCarKuFn">
  120. <view class="imgs"><image :src="htabb" class="imgb"></image></view>
  121. <view class="txt">车库管理</view>
  122. </view>
  123. <view class="list bimga" @click="getCarCheckFn">
  124. <view class="imgs"><image :src="htabc" class="imgc"></image></view>
  125. <view class="txt">外来车辆登记</view>
  126. </view>
  127. <view class="list bimga" @click="getillegalParkFn" v-if="checkPermi(['wuYe:illegalParking:list'])">
  128. <view class="imgs"><image :src="htabd" class="imgd"></image></view>
  129. <view class="txt">违停管理</view>
  130. </view>
  131. <view class="list bimga" @click="getPeopleFn">
  132. <view class="imgs"><image :src="htabe" class="imge"></image></view>
  133. <view class="txt">人员管理</view>
  134. </view>
  135. <view class="list bimga" @click="getComeglFn" v-if="checkPermi(['wuYe:visitorManage:list'])">
  136. <view class="imgs"><image :src="htabf" class="imgf"></image></view>
  137. <view class="txt">来访管理</view>
  138. </view>
  139. <view class="list bimga" @click="getMoneyFn">
  140. <view class="imgs"><image :src="htabg" class="imgd"></image></view>
  141. <view class="txt">物业费管理</view>
  142. </view>
  143. <view class="list bimga" @click="getHouseFn">
  144. <view class="imgs"><image :src="htabh" class="imgd"></image></view>
  145. <view class="txt">房屋管理</view>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="contbox mb16">
  150. <view class="cont flexc mb9">
  151. <image :src="contc"></image>
  152. <view>物业服务</view>
  153. </view>
  154. <view class="lists">
  155. <view class="list bimga" @click="getPatrolFn" v-if="checkPermi(['wuYe:checkPointRecord:list'])">
  156. <view class="imgs"><image :src="htabi" class="imgg"></image></view>
  157. <view class="txt">今日巡更</view>
  158. </view>
  159. <view class="list bimga" @click="getWarrantyFn" v-if="checkPermi(['wuYe:repair:list'])">
  160. <view class="imgs"><image :src="htabj" class="imgb"></image><view class="tips">3</view>
  161. </view>
  162. <view class="txt">物业报修</view>
  163. </view>
  164. <view class="list bimga" @click="getStaffFn" v-if="checkPermi(['wuYe:staffManage:list'])">
  165. <view class="imgs"><image :src="htabk" class="imgb"></image></view>
  166. <view class="txt">员工管理</view>
  167. </view>
  168. <view class="list bimga" @click="getComplaintFn" v-if="checkPermi(['wuYe:suggestion:list'])">
  169. <view class="imgs"><image :src="htabl" class="imga"></image><view class="tips">1</view></view>
  170. <view class="txt">投诉建议</view>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="contbox mb16">
  175. <view class="cont flexc mb9">
  176. <image :src="contd"></image>
  177. <view>社区管理</view>
  178. </view>
  179. <view class="lists">
  180. <view class="list bimga" @click="getNewsdjFn" v-if="checkPermi(['wuYe:partyNews:list'])">
  181. <view class="imgs"><image :src="htabm" class="imgh"></image></view>
  182. <view class="txt">党建信息</view>
  183. </view>
  184. <view class="list bimga" @click="getNewssqFn" v-if="checkPermi(['wuYe:news:list'])">
  185. <view class="imgs"><image :src="htabn" class="imgi"></image><view class="tips">27</view></view>
  186. <view class="txt">社区资讯</view>
  187. </view>
  188. <view class="list bimga" @click="getNewsYgFn" v-if="checkPermi(['wuYe:manual:list'])">
  189. <view class="imgs"><image :src="htabo" class="imgf"></image></view>
  190. <view class="txt">员工培训</view>
  191. </view>
  192. <view class="list bimga" @click="getSqmoneyFn" v-if="checkPermi(['wuYe:assets:list'])">
  193. <view class="imgs"><image :src="htabp" class="imgi"></image></view>
  194. <view class="txt">社区资产</view>
  195. </view>
  196. </view>
  197. </view>
  198. </view>
  199. <loading></loading>
  200. <footers v-if="isfootflag" :footerindex="footerindex"></footers>
  201. </view>
  202. </template>
  203. <script>
  204. import footers from '@/components/footer/footer.vue'
  205. import notice from '@/components/swiper/notice.vue'
  206. import {getUserProfile} from "@/api/system/user.js"
  207. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  208. export default {
  209. components:{footers,notice},
  210. data(){
  211. return{
  212. footerindex:'home',
  213. isfootflag:true,
  214. nvaHeight:44,
  215. // activeColor:'#A7CDF9',
  216. // nactiveColor:'#DADADA',
  217. backgroundColor: "transparent",
  218. navbg:require("@/static/images/navbg.png"),
  219. adrimg:require("@/static/images/home/adr.png"),
  220. adraimg:require("@/static/images/home/adra.png"),
  221. adrbgimg:require("@/static/images/home/adrbg.png"),
  222. conta:require("@/static/images/home/conta.png"),
  223. contb:require("@/static/images/home/contb.png"),
  224. contc:require("@/static/images/home/contc.png"),
  225. contd:require("@/static/images/home/contd.png"),
  226. htaba:require("@/static/images/home/htaba.png"),
  227. htabb:require("@/static/images/home/htabb.png"),
  228. htabc:require("@/static/images/home/htabc.png"),
  229. htabd:require("@/static/images/home/htabd.png"),
  230. htabe:require("@/static/images/home/htabe.png"),
  231. htabf:require("@/static/images/home/htabf.png"),
  232. htabg:require("@/static/images/home/htabg.png"),
  233. htabh:require("@/static/images/home/htabh.png"),
  234. htabi:require("@/static/images/home/htabi.png"),
  235. htabj:require("@/static/images/home/htabj.png"),
  236. htabk:require("@/static/images/home/htabk.png"),
  237. htabl:require("@/static/images/home/htabl.png"),
  238. htabm:require("@/static/images/home/htabm.png"),
  239. htabn:require("@/static/images/home/htabn.png"),
  240. htabo:require("@/static/images/home/htabo.png"),
  241. htabp:require("@/static/images/home/htabp.png"),
  242. upimg:require("@/static/images/home/up.png"),
  243. city:'幸福大街',
  244. deptName:this.$store.state.user.deptName,
  245. nickName:this.$store.state.user.nickName,
  246. postGroup:'',//岗位
  247. autoplay:false,
  248. zhanflag:true,
  249. noticelist:[{noticeTitle:"您有1条报修信息,请及时查看处理!",num:'4'},{noticeTitle:"您有1条报修信息,请及时查看处理!",num:'12'}]
  250. }
  251. },
  252. onPageScroll(e) {
  253. var scrollTop = Number(e.scrollTop);
  254. if (scrollTop > 0) {
  255. this.backgroundColor = '#C3EDFF'
  256. } else {
  257. this.backgroundColor = 'transparent'
  258. }
  259. },
  260. onLoad: function() {
  261. uni.getSystemInfo({
  262. success: (e) => {
  263. this.nvaHeight = Number(e.statusBarHeight)+44;
  264. }
  265. })
  266. },
  267. methods:{
  268. checkPermi, checkRole,
  269. getNoticeDet(){
  270. },
  271. getUser() {
  272. getUserProfile().then(response => {
  273. this.roleGroup = response.roleGroup
  274. this.postGroup = response.postGroup
  275. })
  276. },
  277. getZhanFn(){
  278. this.zhanflag=!this.zhanflag
  279. },
  280. getCarFn(){//车辆管控
  281. this.$tab.navigateTo(`/car/pages/index`)
  282. },
  283. getCarKuFn(){//车库管理
  284. this.$tab.navigateTo(`/car/pages/carku`)
  285. },
  286. getCarCheckFn(){//外来车辆登记
  287. this.$tab.navigateTo(`/car/pages/carcheck`)
  288. },
  289. getillegalParkFn(){//违停管理
  290. this.$tab.navigateTo(`/car/pages/illegalParking`)
  291. },
  292. getPeopleFn(){//人员管理
  293. this.$tab.navigateTo(`/people/pages/people/index`)
  294. },
  295. getComeglFn(){//来访管理
  296. this.$tab.navigateTo(`/people/pages/people/comegl`)
  297. },
  298. getMoneyFn(){//物业费管理
  299. this.$tab.navigateTo(`/work/pages/manage/money`)
  300. },
  301. getPatrolFn(){//今日巡更
  302. this.$tab.navigateTo(`/service/pages/service/patrol`)
  303. },
  304. getWarrantyFn(){//报修管理
  305. this.$tab.navigateTo(`/service/pages/service/warranty`)
  306. },
  307. getStaffFn(){//维修人员管理
  308. this.$tab.navigateTo(`/people/pages/people/staff`)
  309. },
  310. getHouseFn(){//房屋管理
  311. this.$tab.navigateTo(`/work/pages/manage/house`)
  312. },
  313. getComplaintFn(){//投诉建议
  314. this.$tab.navigateTo(`/service/pages/service/complaint`)
  315. },
  316. getNewsdjFn(){//党建资讯
  317. this.$tab.navigateTo(`/manage/pages/community/newsdj`)
  318. },
  319. getNewssqFn(){//党建资讯
  320. this.$tab.navigateTo(`/manage/pages/community/newssq`)
  321. },
  322. getNewsYgFn(){//员工培训
  323. this.$tab.navigateTo(`/manage/pages/community/newsyg`)
  324. },
  325. getSqmoneyFn(){//社区资产
  326. this.$tab.navigateTo(`/manage/pages/community/sqmoney`)
  327. },
  328. }
  329. }
  330. </script>
  331. <style lang="scss" scoped>
  332. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  333. .navbg{width: 100%;height: 782rpx;}
  334. .wymain{z-index: 2;position: relative;padding: 0 24rpx;}
  335. .topl{overflow: hidden;padding-left: 16rpx;
  336. image{width: 18rpx;height: 22rpx;margin-right: 14rpx;flex: 0 0 auto;}
  337. view{font-weight: bold;font-size: 26rpx;color: #272727;}
  338. }
  339. .adrbox{position: relative;padding:8rpx 240rpx 16rpx 36rpx;margin-bottom: 14rpx;
  340. .adr{width: 36rpx;height: 34rpx;margin-right: 14rpx;}
  341. .adrtit{font-size: 17px;color: #272727;font-weight: bold;
  342. text{color: #0256FD;}
  343. }
  344. .adrtxt{font-size: 16px;color: #272727;font-weight: bold;
  345. 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;}
  346. }
  347. .adrtip{font-weight: 500;font-size: 24rpx;color: #828282;}
  348. .adrbgimg{width: 212rpx;height: 236rpx;position: absolute;right: 20rpx;top: -70rpx;}
  349. }
  350. .contbox{
  351. .cont{padding-left: 24rpx;margin-bottom: 12rpx;
  352. image{width: 32rpx;height: 32rpx;margin-right: 16rpx;}
  353. view{font-size: 15px;color: #272727;font-weight: bold;}
  354. }
  355. .lists{
  356. display: flex;align-items: center;flex-wrap: wrap;
  357. .list{padding: 8rpx 0;
  358. width: 25%;display: flex;flex-direction: column;align-items: center;
  359. .tit{font-weight: bold;font-size: 30rpx;color: #3565ED;line-height: 60rpx;font-style: italic;margin-bottom: 8rpx;
  360. &.ca{color: #FF7E00;}
  361. &.cb{color: #28C529;}
  362. &.cc{color: #FF3737;}
  363. }
  364. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  365. &.bimga{padding: 16rpx 0;}
  366. .imgs{display: flex;align-items: center;justify-content: center;width: 48rpx;height: 48rpx;margin-bottom: 18rpx;position: relative;
  367. .imga{width: 48rpx;height: 38rpx;}
  368. .imgb{width: 48rpx;height: 46rpx;}
  369. .imgc{width: 44rpx;height: 48rpx;}
  370. .imgd{width: 48rpx;height: 42rpx;}
  371. .imge{width: 46rpx;height: 46rpx;}
  372. .imgf{width: 48rpx;height: 48rpx;}
  373. .imgg{width: 42rpx;height: 48rpx;}
  374. .imgh{width: 44rpx;height: 44rpx;}
  375. .imgi{width: 48rpx;height: 44rpx;}
  376. .tips{position: absolute;min-width: 20rpx;top: -4rpx;left: 36rpx;box-sizing: border-box;
  377. 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;
  378. }
  379. }
  380. }
  381. }
  382. .upbox{display: flex;align-items: center;justify-content: center;flex-direction: column;margin-top: 8rpx;padding-top: 8rpx;margin-bottom: 6rpx;
  383. image{width: 24rpx;height: 20rpx;margin-bottom: 8rpx;transition: all 0.3s;
  384. &.zhe{transform: rotate(-180deg);}
  385. }
  386. view{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
  387. }
  388. }
  389. </style>