index.vue 20 KB

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