index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <template>
  2. <view class="content">
  3. <view class="">
  4. <!-- 头部 -->
  5. <u-navbar :border-bottom="false" :background="background" :is-back="false" title=" ">
  6. <view class="slot-wrap">
  7. <view class="padding-left-20 flex" >
  8. <u-icon size="34" name="map-fill" color="#FFFFFF"></u-icon>
  9. <text class="text-cut-1 text-white" style="font-size: 32rpx;padding: 0 10rpx;">{{gander?gander:'暂无园区信息'}}</text>
  10. </view>
  11. </view>
  12. </u-navbar>
  13. <!-- banner -->
  14. <swiper class="screen-swiper square-dot " :indicator-dots="true" :circular="true"
  15. :autoplay="true" interval="5000" duration="500">
  16. <swiper-item v-for="(item,index) in bannerList" :key="index">
  17. <image :src="item.banners" mode="aspectFill" ></image>
  18. </swiper-item>
  19. </swiper>
  20. <!-- 公告 -->
  21. <view v-if="!$isEmpty(noticeList)" class="">
  22. <view class="bg-white" style="height: 10rpx;"></view>
  23. <hotConsult @onTap="jump('/pages/index/notice/notice')" @detailTap="goNoticeDetail" :swiperTexts="noticeList"></hotConsult>
  24. </view>
  25. <!-- 园区信息 -->
  26. <view class="bg-white" v-if="loginType=='agency'">
  27. <view class="flex" style="padding: 30rpx; ">
  28. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  29. <text class="text-lg text-black">园区信息</text>
  30. </view>
  31. <view class="cu-list grid col-4 no-border" :key="index">
  32. <view class="cu-item" @click="jump(item.url)" v-for="(item,index) in statistical" :key="index">
  33. <view class="grid-icon" >
  34. <image style="width: 70rpx;height: 70rpx;" :src="item.icon"/>
  35. </view>
  36. <text style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
  37. <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 园区服务 -->
  42. <view class="bg-white">
  43. <view class="flex" style="padding: 30rpx; ">
  44. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  45. <text class="text-lg text-black">园区服务</text>
  46. </view>
  47. <view class="cu-list grid col-4 no-border">
  48. <view class="cu-item" v-if="item.show" @click="jump(item.url)" v-for="(item,index) in elements" :key="index">
  49. <view class="grid-icon" >
  50. <image style="width: 70rpx;height: 70rpx;" :src="item.icon"/>
  51. </view>
  52. <text style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
  53. <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
  54. </view>
  55. </view>
  56. <!-- <view class="nav-list padding-top-30" >
  57. <view
  58. v-if="item.show"
  59. hover-class="none"
  60. @click="jump(item.url)"
  61. class="nav-li light" :style="{backgroundColor:item.color}"
  62. v-for="(item,index) in elements" :key="index">
  63. <view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
  64. <view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}{{item.show}}</view>
  65. <image :src="item.icon" mode=""></image>
  66. <u-badge :is-center="true" type="error" :count="item.count"></u-badge>
  67. </view>
  68. </view> -->
  69. </view>
  70. <view class="bg-white" v-if="loginType!='staff'">
  71. <view class="flex" style="padding: 30rpx; ">
  72. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  73. <text class="text-lg">消防服务</text>
  74. </view>
  75. <view class="cu-list grid col-4 no-border">
  76. <view class="cu-item" @click="jump(item.url)" v-for="(item,index) in fireList" :key="index">
  77. <view class="grid-icon" >
  78. <image style="width: 70rpx;height: 70rpx;" :src="item.icon"/>
  79. </view>
  80. <text style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
  81. <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
  82. </view>
  83. </view>
  84. <!-- <view class="nav-list padding-top-30" >
  85. <view hover-class="none"
  86. @click="jump(item.url)"
  87. class="nav-li light" :style="{backgroundColor:item.color}"
  88. v-for="(item,index) in fireList" :key="index">
  89. <view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
  90. <view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
  91. <image :src="item.icon" mode=""></image>
  92. </view>
  93. </view> -->
  94. </view>
  95. <view class="bg-white padding-bottom-20" v-if="newsList.length>0">
  96. <view class="flex justify-between" style="padding: 30rpx;">
  97. <view class="flex">
  98. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  99. <text class="text-lg text-black">园区动态</text>
  100. </view>
  101. <view @click="jump('/pages/news/list')" style="padding-top: 6rpx;font-size: 26rpx;color: #676767;">
  102. <text style="font-size: 24rpx;color: #676767;margin-top: 5rpx;">查看更多</text>
  103. <text class="cuIcon-right "></text>
  104. </view>
  105. </view>
  106. <infomation :newList="newsList"></infomation>
  107. </view>
  108. <u-action-sheet @click="ganderChange" :list="ganderArray" v-model="ganderShow"></u-action-sheet>
  109. </view>
  110. <u-tabbar
  111. :icon-size="tabbar.iconSize"
  112. :active-color="tabbar.activeColor"
  113. :mid-button-size="tabbar.MinButtonSize"
  114. :list="tabbar.list" :mid-button="true">
  115. </u-tabbar>
  116. </view>
  117. </template>
  118. <script>
  119. import {tabbar} from "@/assets/js/tabbar.js"
  120. import hotConsult from "@/components/hot-consult/hot-consult.vue"
  121. import infomation from "@/components/infomation/infomation.vue"
  122. import setting from "@/assets/http/setting.js"
  123. let plugin = requirePlugin("subway");
  124. export default {
  125. components:{
  126. hotConsult,infomation
  127. },
  128. data() {
  129. return {
  130. background:{
  131. backgroundColor:'#5064eb'
  132. },
  133. //登陆类型
  134. loginType:this.$cache.get('loginType') || '',
  135. //tabbar
  136. tabbar:tabbar,
  137. //园区 label
  138. ganderShow:false,
  139. //园区列表
  140. ganderArray:[],
  141. gander:'',
  142. //banner
  143. bannerList:setting.indexBanner,
  144. // 公告
  145. noticeList:[],
  146. //消防服务
  147. fireList:[],
  148. //园区服务
  149. elements: [],
  150. //园区统计
  151. statistical:[],
  152. //园区动态
  153. newsList:[],
  154. //是否为党员
  155. isPartMember:false,
  156. //该人员是否能打卡
  157. canPunch:false
  158. };
  159. },
  160. onShow() {
  161. if (this.loginType!=this.$loginType.STAFF) {
  162. this.fetchWaitAuditNum()
  163. this.fetchWaitAuditGuestNum()
  164. }
  165. },
  166. // onReady() {
  167. // if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
  168. // let tmp=this.$u.deepClone(tabbar)
  169. // tmp.list.splice(1,1)
  170. // this.tabbar=tmp
  171. // }else{
  172. // this.tabbar=tabbar
  173. // }
  174. // },
  175. onLoad() {
  176. //判断员工是否为党员
  177. this.checkIsPartMember()
  178. //加载静态数据
  179. this.fetchStaticData()
  180. //加载用户数据
  181. this.fetchUserInfo()
  182. //加载园区动态
  183. this.fetchNewsList()
  184. //加载通知公告
  185. this.fetchNoticeList()
  186. //缓存字段值
  187. // this.cacheDict()
  188. //获取该员工的打卡规则
  189. if (this.$cache.get('loginType')==this.$loginType.STAFF) {
  190. this.getRules()
  191. }
  192. },
  193. methods:{
  194. getRules(){
  195. let params={
  196. personType:0,
  197. personId:this.$cache.get('userId')
  198. }
  199. this.$api.punch.getRule(params).then(res=>{
  200. if (res.data) {
  201. this.$u.vuex('vuex_punch_rules',res.data)
  202. this.canPunch=true
  203. }else{
  204. this.canPunch=false
  205. }
  206. }).catch(err=>{
  207. this.canPunch=false
  208. })
  209. },
  210. async checkIsPartMember(){
  211. if (this.$cache.get('loginType')==this.$loginType.STAFF) {
  212. let id=this.$cache.get('userId')
  213. let res=await this.$api.party.isPartyMember({id})
  214. this.isPartMember=!this.$isEmpty(res.data)
  215. this.$u.vuex('vuex_party_person',res.data)
  216. }
  217. },
  218. fetchBanner(){
  219. let params={
  220. // tenantId:this.$cache.get('agencyTenantId')
  221. }
  222. this.$api.banner.page(params).then(res=>{
  223. if (!this.$isEmpty(res.data.records)) {
  224. this.bannerList=res.data.records
  225. }
  226. })
  227. },
  228. /**
  229. * 获取园区动态
  230. */
  231. fetchNewsList(){
  232. let params={
  233. size:5,
  234. agencyId:this.$cache.get('agencyId').toString()
  235. }
  236. this.$api.CMS.page(params).then(res=>{
  237. console.log("newList:"+JSON.stringify(res))
  238. this.newsList=res.data.records
  239. })
  240. },
  241. /**
  242. * 加载用户数据
  243. */
  244. fetchUserInfo(){
  245. if (this.loginType==this.$loginType.STAFF) {
  246. //员工
  247. let phone=this.$cache.get('phone')
  248. this.$api.enterprisestaff.page({phone:phone,auditStatus:1}).then(res=>{
  249. let userInfo=res.data.records[0]
  250. getApp().globalData.userInfo=userInfo
  251. this.$u.vuex('vuex_userInfo',userInfo)
  252. this.$cache.put("residentialId",userInfo.residentialId)
  253. this.gander=userInfo.enterpriseName
  254. })
  255. }else if (this.loginType==this.$loginType.ENTERPRISE) {
  256. let creditCode=this.$cache.get('creditCode')
  257. this.$api.enterprise.detail({creditCode}).then(res=>{
  258. this.gander=res.data.enterpriseName
  259. getApp().globalData.userInfo=res.data
  260. this.$u.vuex('vuex_userInfo',res.data)
  261. this.$cache.put('enterpriseName',res.data.enterpriseName)
  262. this.$cache.put("residentialId",res.data.residentialId)
  263. })
  264. }else if (this.loginType==this.$loginType.AGENCY) {
  265. this.gander=this.$cache.get('agency')
  266. }
  267. },
  268. /**
  269. * 加载待审核员工的数量
  270. */
  271. fetchWaitAuditNum(){
  272. let that=this
  273. let params={
  274. size:200,
  275. auditStatus:0
  276. }
  277. if (this.loginType==this.$loginType.ENTERPRISE) {
  278. params.enterpriseId=this.$cache.get('enterpriseId')
  279. }
  280. if (this.loginType==this.$loginType.AGENCY) {
  281. params.agencyId=this.$cache.get('agencyId')
  282. }
  283. this.$api.enterprisestaff.page(params).then(res=>{
  284. this.elements.forEach(item=>{
  285. if (item.url=='/pages/index/staffAudit/list') {
  286. item.count=res.data.total
  287. }
  288. })
  289. })
  290. },
  291. fetchWaitAuditGuestNum(){
  292. let params={
  293. checkState:0
  294. }
  295. //企业
  296. if (this.loginType==this.$loginType.ENTERPRISE) {
  297. params.enterpriseId=this.$cache.get('enterpriseId')
  298. }
  299. //园区
  300. if (this.loginType==this.$loginType.AGENCY) {
  301. params.agencyId=this.$cache.get('agencyId')
  302. }
  303. this.$api.guest.page(params).then(res=>{
  304. this.elements.forEach(item=>{
  305. if (item.url=='/pages/guest/records/records') {
  306. item.count=res.data.total
  307. }
  308. })
  309. })
  310. },
  311. /**
  312. * @param {Object} index更改园区
  313. */
  314. ganderChange(index){
  315. this.gander=this.ganderArray[index].text
  316. },
  317. /**
  318. * 跳转
  319. * @param {Object} url
  320. */
  321. jump(url){
  322. if (url=='/party/pages/home/home') {
  323. //智慧党建
  324. if (!this.isPartMember) {
  325. url='/party/pages/empty/empty'
  326. }
  327. }
  328. //打卡
  329. if (url=='/punch/pages/index/index') {
  330. if (this.canPunch) {
  331. uni.navigateTo({
  332. url
  333. })
  334. return
  335. }
  336. this.$dialog.showModal('您还未绑定打卡规则,请联系企业负责人',false)
  337. return
  338. }
  339. //地铁图
  340. if (url=='subway') {
  341. let key='WAGBZ-EFIKU-2W2VF-4UX5F-ATB3F-HKBFU'
  342. let referer='新邻园区'
  343. uni.navigateTo({
  344. url: 'plugin://subway/index?key=' + key + '&referer=' + referer
  345. })
  346. return
  347. }
  348. if (!this.$isEmpty(url)) {
  349. uni.navigateTo({
  350. url:url,
  351. fail(err) {
  352. console.log(err);
  353. }
  354. })
  355. }
  356. },
  357. /**
  358. * 加载通知列表
  359. */
  360. fetchNoticeList(){
  361. let params={
  362. agencyId:this.$cache.get('agencyId')
  363. }
  364. this.$api.notice.page(params).then(res=>{
  365. this.noticeList=res.data.records
  366. })
  367. },
  368. /**
  369. * 跳转到通知详情
  370. */
  371. goNoticeDetail(item){
  372. console.log(item);
  373. getApp().globalData.noticeDetail=item
  374. uni.navigateTo({
  375. url:"/pages/index/notice/detail",
  376. })
  377. },
  378. //缓存字典的值
  379. async cacheDict(){
  380. let dictCacheData=this.$cache.get('dict')
  381. if (dictCacheData&&
  382. dictCacheData.carTypeList&&
  383. dictCacheData.carPropertiesList&&
  384. dictCacheData.fuelCategoryList&&
  385. dictCacheData.partyMeetingClass&&
  386. dictCacheData.partyInfoClass) {
  387. return
  388. }
  389. //有效时间
  390. let validTime=1*24*60*60*3
  391. //车辆类型
  392. let carTypeList=[]
  393. //车辆性质
  394. let carPropertiesList=[]
  395. //燃油类别
  396. let fuelCategoryList=[]
  397. //三会一课
  398. let partyMeetingClass=[]
  399. //党内资讯
  400. let partyInfoClass=[]
  401. // 请求字典begin
  402. let res1=await this.$api.dict({code:'car_type'})
  403. res1.data.forEach((item)=>{
  404. let tmp={
  405. value:item.dictKey,
  406. label:item.dictValue
  407. }
  408. carTypeList.push(tmp)
  409. })
  410. let res2=await this.$api.dict({code:'car_properties'})
  411. res2.data.forEach((item)=>{
  412. let tmp={
  413. value:item.dictKey,
  414. label:item.dictValue
  415. }
  416. carPropertiesList.push(tmp)
  417. })
  418. let res3=await this.$api.dict({code:'fuel_category'})
  419. res3.data.forEach((item)=>{
  420. let tmp={
  421. value:item.dictKey,
  422. label:item.dictValue
  423. }
  424. fuelCategoryList.push(tmp)
  425. })
  426. //三会一课分类
  427. let res4=await this.$api.dict({code:'party_meeting_class'})
  428. res4.data.forEach((item)=>{
  429. let tmp={
  430. value:item.dictKey,
  431. label:item.dictValue
  432. }
  433. partyMeetingClass.push(tmp)
  434. })
  435. //党内资讯
  436. let res5=await this.$api.dict({code:'party_new_class'})
  437. res5.data.forEach((item)=>{
  438. let tmp={
  439. value:item.dictKey,
  440. label:item.dictValue
  441. }
  442. partyInfoClass.push(tmp)
  443. })
  444. // 请求字典end
  445. //缓存字典的值begin
  446. let dict={
  447. carTypeList,
  448. carPropertiesList,
  449. fuelCategoryList,
  450. partyMeetingClass,
  451. partyInfoClass
  452. }
  453. this.$cache.put('dict',dict,validTime)
  454. //缓存字典的值end
  455. },
  456. /**
  457. * 加载静态数据
  458. */
  459. fetchStaticData(){
  460. this.statistical=[
  461. {
  462. title: '园区信息',
  463. name: 'Campus information',
  464. color: '#e3f5ff',
  465. icon:'../../static/icon/yuanqu.png',
  466. url:'/pages/agency/agency',
  467. count:0,
  468. },
  469. {
  470. title: '数据统计',
  471. icon:'../../static/icon/data-service.png',
  472. url:'/pages/agency/agency?current=1',
  473. },
  474. {
  475. title: '消防统计',
  476. icon:'../../static/icon/fire-service.png',
  477. url:'/pages/agency/agency?current=2',
  478. },
  479. ]
  480. this.elements=[
  481. {
  482. title: '园区企业',
  483. name: 'My business',
  484. color: '#e3f5ff',
  485. icon:'../../static/icon/qiyegl.png',
  486. url:'/pages/enterprise/enterprise',
  487. count:0,
  488. show:this.loginType==this.$loginType.AGENCY
  489. },
  490. {
  491. title: '我的企业',
  492. name: 'My business',
  493. color: '#e3f5ff',
  494. icon:'../../static/icon/yuanqu.png',
  495. url:'/pages/company/company',
  496. count:0,
  497. show:this.loginType!=this.$loginType.AGENCY
  498. },
  499. {
  500. title: '我的资料',
  501. name: 'My profile',
  502. color: '#ecf3f9',
  503. icon:'../../static/icon/info.png',
  504. url:'/pages/index/myinfo/myinfo',
  505. count:0,
  506. show:this.loginType==this.$loginType.STAFF
  507. },
  508. {
  509. title: '员工审核',
  510. name: 'Staff certification',
  511. color: '#eaebf9',
  512. icon:'../../static/icon/info.png',
  513. url:'/pages/index/staffAudit/list',
  514. count:0,
  515. show:this.loginType!=this.$loginType.STAFF
  516. },
  517. {
  518. title: '访客审核',
  519. icon:'../../static/icon/guest-gl.png',
  520. url:'/pages/guest/records/records',
  521. count:0,
  522. show:this.loginType!=this.$loginType.STAFF
  523. },
  524. {
  525. title: '我的测温',
  526. name: 'My temperature',
  527. color: '#e5eef9',
  528. icon:'../../static/icon/cewen.png',
  529. url:'/pages/index/staff-temperature/list',
  530. count:0,
  531. show:this.loginType==this.$loginType.STAFF
  532. },
  533. {
  534. title: '测温记录',
  535. name: 'Staff temperature',
  536. color: '#e5eef9',
  537. icon:'../../static/icon/cewen.png',
  538. url:'/pages/index/staff-temperature/list',
  539. count:0,
  540. show:this.loginType!=this.$loginType.STAFF
  541. },
  542. {
  543. title: '通行记录',
  544. name: 'Access records',
  545. color: '#e9f9f3',
  546. icon:'../../static/icon/jilu.png',
  547. url:'/pages/index/access-record/access-record',
  548. count:0,
  549. show:true
  550. },
  551. {
  552. title: this.loginType==this.$loginType.STAFF?'我的车辆':'车辆管理',
  553. name: 'Notice managerment',
  554. color: '#eaebf9',
  555. icon:'../../static/icon/car.png',
  556. url:this.loginType==this.$loginType.STAFF?'/pages/index/car/my-car/my-car':'/pages/index/car/car-manager/car-manager',
  557. count:0,
  558. show:true
  559. },
  560. {
  561. title: '车辆记录',
  562. name: 'The vehicle record',
  563. color: '#fcf5f3',
  564. icon:'../../static/icon/car-records.png',
  565. url:'/pages/index/car/list',
  566. count:0,
  567. show:this.loginType==this.$loginType.AGENCY
  568. },
  569. {
  570. title: '企业项目',
  571. icon:'../../static/icon/project1.png',
  572. url:'/pages/management/product/product',
  573. count:0,
  574. show:this.loginType==this.$loginType.ENTERPRISE
  575. },
  576. {
  577. title: '打卡',
  578. icon:'../../static/icon/dk1.png',
  579. url:'/punch/pages/index/index',
  580. count:0,
  581. show:false
  582. // show:this.loginType==this.$loginType.STAFF
  583. },
  584. {
  585. title: '智慧党建',
  586. icon:'../../static/icon/dang.png',
  587. url:'/party/pages/home/home',
  588. count:0,
  589. show:false
  590. // show:this.loginType==this.$loginType.STAFF
  591. },
  592. {
  593. title: '视频监控',
  594. icon:'../../static/icon/live.png',
  595. url:'/pages/live/live',
  596. count:0,
  597. show:false
  598. // show:this.loginType==this.$loginType.AGENCY
  599. },
  600. {
  601. title: '地铁图',
  602. icon:'../../static/icon/subway.png',
  603. url:'subway',
  604. count:0,
  605. show:false
  606. // show:this.loginType==this.$loginType.STAFF
  607. },
  608. {
  609. title: '公告管理',
  610. name: 'Notice managerment',
  611. color: '#eaebf9',
  612. icon:'../../static/icon/tongzhi.png',
  613. url:'/pages/index/notice/list',
  614. count:0,
  615. show:this.loginType==this.$loginType.AGENCY
  616. },
  617. ]
  618. this.fireList=[
  619. {
  620. title: '烟感报警',
  621. name: 'Smoke alarm',
  622. color: '#e5eef9',
  623. icon:'../../static/icon/yangan.png',
  624. url:"/pages/index/fire/list/list?fireType=0"
  625. },
  626. {
  627. title: '消防水压',
  628. name: 'Fire water pressure',
  629. color: '#e9f9f3',
  630. icon: '../../static/icon/xiaofang.png',
  631. url:"/pages/index/fire/list/list?fireType=2"
  632. },
  633. {
  634. title: '燃气告警',
  635. name: 'Gas alarm',
  636. color: '#ffefef',
  637. icon: '../../static/icon/ranqi.png',
  638. url:"/pages/index/fire/list/list?fireType=1"
  639. },
  640. {
  641. title: '电表设备',
  642. name: 'Metering equipment',
  643. color: '#e3f5ff',
  644. icon:'../../static/icon/dianbiao.png',
  645. // icon: '../../static/index/fire/dianbiao.png',
  646. url:"/pages/index/fire/list/list?fireType=3"
  647. },
  648. ]
  649. }
  650. }
  651. };
  652. </script>
  653. <style lang="scss" scoped>
  654. page,.content{
  655. background-color: #FFFFFF;
  656. min-height: 100vh;
  657. }
  658. //四宫格 begin
  659. .nav-list {
  660. display: flex;
  661. flex-wrap: wrap;
  662. justify-content: flex-start;
  663. }
  664. .nav-li {
  665. padding: 30upx 30rpx;
  666. border-radius: 12upx;
  667. width: 44%;
  668. margin: 10rpx 2% 10upx;
  669. background-size: cover;
  670. background-position: center;
  671. position: relative;
  672. z-index: 1;
  673. }
  674. .nav-li::after {
  675. content: "";
  676. position: absolute;
  677. z-index: -1;
  678. background-color: inherit;
  679. width: 100%;
  680. height: 100%;
  681. left: 0;
  682. bottom: -10%;
  683. border-radius: 10upx;
  684. opacity: 0.2;
  685. transform: scale(0.9, 0.9);
  686. }
  687. .nav-li.cur {
  688. color: #fff;
  689. background: rgb(94, 185, 94);
  690. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  691. }
  692. .nav-title {
  693. font-size: 32upx;
  694. font-weight: 300;
  695. }
  696. .nav-title::first-letter {
  697. font-size: 40upx;
  698. margin-right: 4upx;
  699. }
  700. .nav-name {
  701. font-size: 28upx;
  702. text-transform: Capitalize;
  703. margin-top: 20upx;
  704. position: relative;
  705. }
  706. .nav-name::before {
  707. content: "";
  708. position: absolute;
  709. display: block;
  710. width: 40upx;
  711. height: 6upx;
  712. background: #fff;
  713. bottom: 0;
  714. right: 0;
  715. opacity: 0.5;
  716. }
  717. .nav-name::after {
  718. content: "";
  719. position: absolute;
  720. display: block;
  721. width: 100upx;
  722. height: 1px;
  723. background: #fff;
  724. bottom: 0;
  725. right: 40upx;
  726. opacity: 0.3;
  727. }
  728. .nav-name::first-letter {
  729. font-weight: bold;
  730. font-size: 36upx;
  731. margin-right: 1px;
  732. }
  733. .nav-li image {
  734. position: absolute;
  735. right: 30upx;
  736. top: 22upx;
  737. width: 66upx;
  738. height: 66upx;
  739. }
  740. //四宫格 end
  741. </style>