index.vue 20 KB

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