index.vue 30 KB

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