detail.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <template>
  2. <view class="device-detail" v-show="!loading">
  3. <view class="device-detail__header">
  4. <u-icon
  5. size="36"
  6. class="arrow-left"
  7. name="arrow-left"
  8. @click="handleBack"
  9. ></u-icon>
  10. {{ deviceInfo.name }}
  11. </view>
  12. <view class="operation" @click.stop="isShowOperation = !isShowOperation">操作</view>
  13. <view class="operation-container" v-if="isShowOperation" @click="closeOperationHandler">
  14. <view class="operation-background"></view>
  15. <view class="operation-content">
  16. <!-- <view class="operation-item" v-if="isShowPhoto" @click="handlePhotoClick">
  17. <image :src="photoIcon" class="operation-icon"></image>
  18. 拍照
  19. </view> -->
  20. <!-- <view class="operation-item" @click="handleServiceClick">
  21. <image :src="serviceIcon" class="operation-icon"></image>
  22. 维修
  23. </view> -->
  24. <view class="operation-item" @click="handleSettingClick">
  25. <image :src="settingIcon" class="operation-icon"></image>
  26. 设置
  27. </view>
  28. <view class="operation-item" @click="handleSimClick">
  29. <image :src="simIcon" class="operation-icon"></image>
  30. SIM卡
  31. </view>
  32. <view class="operation-item" @click="modification">
  33. <image :src="editIcon" class="operation-icon"></image>
  34. 修改
  35. </view>
  36. </view>
  37. </view>
  38. <view class="device-detail__body">
  39. <DeviceCard
  40. :dataSource="deviceInfo"
  41. :collectTime="time"
  42. :title="deviceInfo.name"
  43. :deviceType="deviceType"
  44. />
  45. <view class="tabs">
  46. <view class="tab-container" v-if="isShowTab && camera_id">
  47. <!-- <view class="tab-item" :class="activeTab === 'viewImage'?'active':''" @click="handleTabClick('viewImage')">
  48. 查看图片
  49. </view> -->
  50. <view class="tab-item deviceData active" @click="handleTabClick('deviceData')">
  51. 设备数据
  52. </view>
  53. <view class="tab-item" @click="handleTabClick('videoMonitor')">
  54. 视频监控
  55. </view>
  56. </view>
  57. <view class="select-timer-container">
  58. <view class="select-year">
  59. <view class="select-year-item" @click="showPicker = true">
  60. {{ currentYear }}
  61. <u-icon name="arrow-down" size="18" class="arrow-down"></u-icon>
  62. </view>
  63. </view>
  64. <view class="tabs-timer-container" @click="showCalendar">
  65. <view class="tabs-timer-item">
  66. {{startDate}}
  67. </view>
  68. 至
  69. <view class="tabs-timer-item">
  70. {{endDate}}
  71. </view>
  72. <u-icon name="calendar" size="36" class="calendar-icon"></u-icon>
  73. </view>
  74. </view>
  75. </view>
  76. <view v-if="activeTab === 'viewImage'">
  77. <photoImage
  78. :images="imageList"
  79. :pestList="pestList"
  80. :disableShow="disableShow"
  81. @changeTab="changeTab"
  82. :currentYear="currentYear"
  83. :deviceInfo="deviceInfo"
  84. />
  85. </view>
  86. <view v-if="activeTab === 'deviceData'">
  87. <DeviceData
  88. :deviceStatic="deviceStatic"
  89. :deviceInfo="deviceInfo"
  90. :devImg="devImg"
  91. :polylineList="polylineList"
  92. :deviceHistoryList="deviceHistoryList"
  93. :totalPage="totalPage"
  94. :currentPage="page"
  95. :page_size="page_size"
  96. @prevPage="prevPage"
  97. @nextPage="nextPage"
  98. />
  99. </view>
  100. </view>
  101. <u-calendar v-model="show" :mode="mode" range-color="#999" btn-type="success" active-bg-color="#0bbc58" range-bg-color="rgba(11,188,88,0.13)" @change="handleChange" :max-date="maxDate" :min-date="minDate"></u-calendar>
  102. <u-picker v-model="showPicker" mode="selector" :range="selectorRange" range-key="id" :default-selector="[0]" @confirm="confirmHandler"></u-picker>
  103. </view>
  104. </template>
  105. <script>
  106. import DeviceCard from './components/DeviceCard.vue';
  107. import PestDiscern from './components/pestDiscern.vue';
  108. import PestEchart from './components/pestEchart.vue';
  109. import PestArchive from './components/pestArchive.vue';
  110. import photoImage from './components/photoImage.vue';
  111. import DeviceData from './components/deviceData.vue';
  112. export default {
  113. components: {
  114. DeviceCard,
  115. PestDiscern,
  116. PestEchart,
  117. PestArchive,
  118. photoImage,
  119. DeviceData,
  120. },
  121. data(){
  122. return {
  123. videoUrl: 'https://wx.hnyfwlw.com/wexin/h52.html?device_id=GF2820249-1&accessToken=X9ounKAN5BxIa3QqMk99EY+2sAeOEjrGKd3A4/IJHC8=',
  124. isShowTab: false,
  125. showPicker: false,
  126. disableShow: false,
  127. isShowOperation: false,
  128. photoIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoIcon.png',
  129. editIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/editIcon.png',
  130. serviceIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/serviceIcon.png',
  131. simIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/simIcon.png',
  132. settingIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/settingIcon.png',
  133. totalPage: 0,
  134. currentYear: new Date().getFullYear(),
  135. selectorRange: [],
  136. loading: false,
  137. maxDate: this.formatDate(new Date()),
  138. minDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
  139. show: false,
  140. showSim: false,
  141. // 当前日期向前推30天 格式2026-01-01 月份和日期小于10的时候前面加个0
  142. startDate: this.formatDate(new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)),
  143. endDate: this.formatDate(new Date()),
  144. mode: 'range',
  145. imageList: [],
  146. pest_order: {},
  147. deviceInfo: {},
  148. pestInfo: {},
  149. time: '',
  150. activeTab: 'deviceData',
  151. deviceType: '',
  152. location: '',
  153. total: 0,
  154. day: [],
  155. devImg: 'scd',
  156. pest: [],
  157. page: 1,
  158. is_pest: '',
  159. page_size: 24,
  160. pestList: [],
  161. pest_names: '',
  162. pests: [],
  163. polylineList: [],
  164. isShowPhoto: false,
  165. deviceHistoryList: [],
  166. deviceStatic: {},
  167. accessToken: '',
  168. camera_id: ''
  169. }
  170. },
  171. onLoad(options){
  172. this.deviceInfo = JSON.parse(options.info);
  173. this.accessToken = uni.getStorageSync('session_key')
  174. this.getDeviceCameraData()
  175. const newVal = this.deviceInfo;
  176. if (newVal.device_model == '102'){
  177. this.isShowPhoto = true
  178. this.devImg = 'jgscd'
  179. } else if(newVal.device_model == '0'){
  180. this.devImg = 'scd'
  181. } else{
  182. this.devImg = 'fxscd'
  183. this.isShowPhoto = true
  184. }
  185. // this.getPestAnalysis();
  186. this.isShow();
  187. const currentYear = new Date().getFullYear();
  188. this.selectorRange = [];
  189. for(let i = 0; i < 50; i++){
  190. const item = {
  191. label: currentYear - i,
  192. id: currentYear - i
  193. }
  194. this.selectorRange.push(item);
  195. }
  196. },
  197. methods: {
  198. handleSimClick(){
  199. // this.showSim = true;
  200. //`/pages/deviceDetails/weatherStation/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}`
  201. uni.navigateTo({
  202. url:
  203. '/pages/deviceDetails/weatherStation/simDetail?deviceInfo=' +
  204. encodeURIComponent(JSON.stringify(this.deviceInfo))
  205. });
  206. },
  207. modification() {
  208. uni.navigateTo({
  209. url:
  210. '/pages/equipList2/seabox/modification?data=' +
  211. JSON.stringify(this.deviceInfo) +
  212. '&id=' +
  213. this.deviceInfo.type,
  214. });
  215. },
  216. async handlePhotoClick(){
  217. const res = await this.$myRequest({
  218. url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
  219. method: 'POST',
  220. data: {
  221. device_type_id: this.deviceInfo.type,
  222. d_id: this.deviceInfo.d_id,
  223. cmd: 'takephoto',
  224. },
  225. });
  226. if(res){
  227. this.$u.toast('拍照成功')
  228. }
  229. },
  230. handleServiceClick(){
  231. uni.navigateTo({
  232. url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
  233. })
  234. },
  235. handleSettingClick(){
  236. uni.navigateTo({
  237. url: '/pages/scd/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id,
  238. });
  239. },
  240. closeOperationHandler(){
  241. this.isShowOperation = false;
  242. },
  243. isShow(){
  244. // disable == 0 或者 device_model == 15 表示不可以查看
  245. if(!this.deviceInfo.d_id){
  246. return false;
  247. }
  248. let showStatus = true;
  249. if(this.deviceInfo.device_model == 15 || this.deviceInfo.device_model == 12){
  250. showStatus = false;
  251. }
  252. if(showStatus){
  253. this.activeTab = 'deviceData';
  254. }else{
  255. this.activeTab = 'deviceData';
  256. }
  257. this.initAction();
  258. this.isShowTab = showStatus;
  259. if(this.deviceInfo.disable == 0){
  260. this.disableShow = false;
  261. if(showStatus){
  262. this.activeTab = 'deviceData';
  263. this.handleTabClick('deviceData');
  264. }
  265. }else{
  266. this.disableShow = true;
  267. }
  268. },
  269. prevPage(e){
  270. if(e == 1){
  271. return
  272. }
  273. this.page = e-=1;
  274. this.getDeviceHistoryData();
  275. },
  276. nextPage(e){
  277. if(e * this.page_size >= this.totalPage){
  278. return
  279. }
  280. this.page = e+=1;
  281. this.getDeviceHistoryData();
  282. },
  283. changeTab(pestList){
  284. let pest_names = pestList.map(item => item.pest_name);
  285. this.pest_names = pest_names.join(',');
  286. this.initImageList();
  287. },
  288. confirmHandler(e){
  289. this.currentYear = this.selectorRange[e].id;
  290. if(this.currentYear == new Date().getFullYear()){
  291. // 结束日期为this.endDate的月份和日期加上选择的年份
  292. const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
  293. this.endDate = this.formatDate(new Date(timeDate));
  294. // 开始日期为结束日期前30天
  295. this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
  296. this.maxDate = this.formatDate(new Date());
  297. this.minDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
  298. }else{
  299. // 结束日期为this.endDate的月份和日期加上选择的年份
  300. const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
  301. this.endDate = this.formatDate(new Date(timeDate));
  302. // 开始日期为结束日期前30天
  303. this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
  304. this.maxDate = this.formatDate(new Date(this.currentYear, 11, 31));
  305. this.minDate = this.formatDate(new Date(this.currentYear, 0, 1));
  306. }
  307. this.initAction();
  308. this.showPicker = false;
  309. },
  310. getInfo(info){
  311. this.pestInfo = info;
  312. },
  313. // 格式化日期为YYYY-MM-DD格式,月份和日期小于10时前面加0
  314. formatDate(date) {
  315. const year = date.getFullYear();
  316. const month = String(date.getMonth() + 1).padStart(2, '0');
  317. const day = String(date.getDate()).padStart(2, '0');
  318. return `${year}-${month}-${day}`;
  319. },
  320. formatTime(date){
  321. const time = new Date(date).getTime() / 1000;
  322. return time.toFixed(0);
  323. },
  324. handleChange(e){
  325. this.startDate = e.startDate;
  326. this.endDate = e.endDate;
  327. this.initAction();
  328. },
  329. showCalendar(){
  330. this.show = true;
  331. },
  332. handleBack() {
  333. uni.navigateBack({
  334. delta: 1
  335. });
  336. },
  337. initAction(){
  338. this.pest_order = {}
  339. if(this.activeTab === 'deviceData'){
  340. // this.getDeviceData();
  341. this.getPolylineData();
  342. this.getDeviceHistoryData();
  343. }
  344. },
  345. handleTabClick(tab) {
  346. if(tab === 'videoMonitor'){
  347. // uni.navigateTo({
  348. // url:
  349. // '/pages/scd/videoMonitor?videoUrl=' + this.videoUrl
  350. // });
  351. uni.navigateTo({
  352. url: '/pages/webview?device_id=' +
  353. this.camera_id +
  354. '&accessToken=' +
  355. this.accessToken,
  356. });
  357. }else{
  358. this.initAction();
  359. }
  360. },
  361. async getDeviceCameraData(){
  362. const res = await this.$myRequest({
  363. url: '/api/api_gateway?method=forecast.send_control.get_binding_camera_info',
  364. method: 'POST',
  365. data: {
  366. device_id: this.deviceInfo.id,
  367. },
  368. });
  369. this.camera_id = res?.camera_id || ''
  370. },
  371. async getDeviceData(){
  372. const res = await this.$myRequest({
  373. url: '/api/api_gateway?method=forecast.worm_lamp.device_status_data',
  374. method: 'POST',
  375. data: {
  376. device_id: this.deviceInfo.id,
  377. },
  378. });
  379. this.deviceStatic = res;
  380. },
  381. async initImageList(){
  382. const res = await this.$myRequest({
  383. url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
  384. method: 'POST',
  385. data: {
  386. page:this.page,
  387. page_number:this.page_size,
  388. device_id: this.deviceInfo.id,
  389. ret:'list',
  390. time_begin: this.formatTime(this.formatDate(new Date(this.startDate)) + ' 00:00:00'),// 格式化开始时间YYYY-MM-DD HH:MM:SS
  391. time_end: this.formatTime(this.formatDate(new Date(this.endDate)) + ' 23:59:59'),// 格式化结束时间YYYY-MM-DD HH:MM:SS
  392. },
  393. });
  394. const data = res?.data || [];
  395. this.imageList = data
  396. },
  397. async initPest(){
  398. const res = await this.$myRequest({
  399. url: '/api/api_gateway?method=forecast.new_cbd.pest_type_list',
  400. method: 'POST',
  401. data:{
  402. page:1,
  403. page_size:999999,
  404. device_id: this.deviceInfo.id,
  405. identify_model: 'B',
  406. time_begin: this.formatTime(this.formatDate(new Date(this.startDate)) + ' 00:00:00'),// 格式化开始时间YYYY-MM-DD HH:MM:SS
  407. time_end: this.formatTime(this.formatDate(new Date(this.endDate)) + ' 23:59:59'),// 格式化结束时间YYYY-MM-DD HH:MM:SS
  408. },
  409. });
  410. const data = res?.data || [];
  411. this.pestList = data
  412. },
  413. async getPolylineData(){
  414. this.loading = true;
  415. const res = await this.$myRequest({
  416. url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
  417. method: 'POST',
  418. data: {
  419. device_type_id: this.deviceInfo.type_id,
  420. d_id: this.deviceInfo.d_id,
  421. start_time: new Date(this.startDate).getTime()/1000,// 转成毫秒
  422. end_time: new Date(this.endDate).getTime()/1000,// 转成毫秒
  423. },
  424. });
  425. this.loading = false;
  426. const data = res || [];
  427. this.polylineList = data
  428. },
  429. async getDeviceHistoryData(){
  430. const res = await this.$myRequest({
  431. url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
  432. method: 'POST',
  433. data: {
  434. device_type_id: this.deviceInfo.type_id,
  435. device_id: this.deviceInfo.id,
  436. start_time: new Date(this.startDate).getTime()/1000,
  437. end_time: new Date(this.endDate).getTime()/1000,
  438. page: this.page,
  439. page_size: this.page_size,
  440. },
  441. });
  442. const data = res?.data || [];
  443. this.totalPage = res.counts;
  444. this.deviceHistoryList = data
  445. },
  446. async getPestAnalysis(){
  447. const res = await this.$myRequest({
  448. url: '/api/api_gateway?method=forecast.cbd_analysis.analysis_pest_result',
  449. method: 'POST',
  450. data: {
  451. d_id: this.deviceInfo.d_id,
  452. start: this.startDate,
  453. end: this.endDate,
  454. model: 'B'
  455. },
  456. });
  457. const pest_order = res?.pest_order;
  458. this.getInfo({});
  459. let total = 0;
  460. this.pests = [];
  461. for(let key in pest_order){
  462. total += pest_order[key] || 0;
  463. this.pests.push({
  464. name: key,
  465. percent: (pest_order[key] / total) * 100
  466. })
  467. }
  468. this.pest_order = pest_order;
  469. this.day = res?.day || [];
  470. const pest = res?.pest || [];
  471. this.pest = pest;
  472. // pest.forEach(p =>{
  473. // for(let i = 0;i< p.length;i++){
  474. // this.pest.push(p[i]);
  475. // }
  476. // })
  477. this.total = total;
  478. }
  479. }
  480. }
  481. </script>
  482. <style scoped lang="scss">
  483. ::v-deep .u-calendar__action{
  484. display:flex;
  485. justify-content: space-between;
  486. }
  487. ::v-deep .u-hover-class{
  488. .u-calendar__content__item__inner{
  489. color:#aaa !important;
  490. }
  491. }
  492. .operation-container{
  493. position: fixed;
  494. right: 0;
  495. top: 0;
  496. width: 100%;
  497. height: 100%;
  498. z-index: 99;
  499. }
  500. .operation{
  501. position: fixed;
  502. top: 260rpx;
  503. right: 0;
  504. z-index: 999;
  505. width:48rpx;
  506. height: 100rpx;
  507. line-height: 50rpx;
  508. border-radius: 8px 0 0 8px;
  509. border-top: 4rpx solid #FFF;
  510. border-bottom: 4rpx solid #FFF;
  511. border-left: 4rpx solid #FFF;
  512. background: #dddfe6a3;
  513. color: #515153;
  514. text-align: center;
  515. font-family: "Source Han Sans CN VF";
  516. font-size: 24rpx;
  517. font-weight: 500;
  518. writing-mode: vertical-rl;
  519. }
  520. .operation-background{
  521. position: fixed;
  522. right: 0;
  523. top: 0;
  524. width: 100%;
  525. height: 100%;
  526. z-index: 998;
  527. background: #00000040;
  528. }
  529. .operation-content{
  530. position: fixed;
  531. top: 240rpx;
  532. right: 80rpx;
  533. height: 126rpx;
  534. display: flex;
  535. padding: 16rpx 32rpx;
  536. align-items: center;
  537. gap: 64rpx;
  538. z-index: 999;
  539. border-radius: 32rpx;
  540. border: 2rpx solid #FFF;
  541. background: #FFF;
  542. backdrop-filter: blur(8rpx);
  543. .operation-item{
  544. display: flex;
  545. flex-direction: column;
  546. align-items: center;
  547. justify-content: center;
  548. color: #333333;
  549. text-align: center;
  550. font-family: "Source Han Sans CN VF";
  551. font-size: 24rpx;
  552. font-weight: 400;
  553. }
  554. .operation-icon{
  555. width: 58rpx;
  556. height: 58rpx;
  557. }
  558. }
  559. .device-detail {
  560. display: flex;
  561. width: 100%;
  562. height: calc(100vh - 112rpx);
  563. padding-top: 112rpx;
  564. flex-direction: column;
  565. align-items: center;
  566. overflow-y: scroll;
  567. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  568. .device-detail__header {
  569. width: 100%;
  570. font-size: 28rpx;
  571. color: #999;
  572. color: #042118;
  573. font-family: 'Source Han Sans CN VF';
  574. font-weight: 700;
  575. position: relative;
  576. text-align: center;
  577. .arrow-left {
  578. position: absolute;
  579. left: 32rpx;
  580. margin-right: 12rpx;
  581. }
  582. }
  583. .device-detail__body {
  584. width: calc(100% - 64rpx);
  585. margin: 0 auto;
  586. border-radius: 16rpx;
  587. overflow-x: hidden;
  588. overflow-y: auto;
  589. // 隐藏滚动条
  590. -ms-overflow-style: none;
  591. scrollbar-width: none;
  592. }
  593. .tab-content{
  594. width: 100%;
  595. padding-bottom: 32rpx;
  596. }
  597. .tabs {
  598. background: #ffffff;
  599. margin: 24rpx 0;
  600. border-radius: 16rpx;
  601. padding: 16rpx 0;
  602. padding-top: 0;
  603. .tab-container{
  604. display: flex;
  605. width: 100%;
  606. height: 88rpx;
  607. line-height: 88rpx;
  608. text-align: center;
  609. font-size: 28rpx;
  610. font-weight: 700;
  611. color: #042118;
  612. font-family: 'Source Han Sans CN VF';
  613. }
  614. .select-timer-container{
  615. display:flex;
  616. align-items: center;
  617. padding-left: 32rpx;
  618. .select-year{
  619. width: 110rpx;
  620. text-align: center;
  621. height: 64rpx;
  622. border-radius: 32rpx;
  623. font-family: 'Source Han Sans CN VF';
  624. line-height: 64rpx;
  625. background: #F1F4F8;
  626. padding: 0 32rpx;
  627. .select-year-item{
  628. color: #656565;
  629. font-size: 24rpx;
  630. display: flex;
  631. align-items: center;
  632. justify-content: space-around;
  633. }
  634. }
  635. }
  636. .tabs-timer-container{
  637. display: flex;
  638. align-items: center;
  639. width: calc(100% - 256rpx);
  640. height: 64rpx;
  641. line-height: 64rpx;
  642. text-align: center;
  643. font-size: 24rpx;
  644. font-weight: 500;
  645. font-family: 'Source Han Sans CN VF';
  646. border-radius: 32rpx;
  647. background: #F1F4F8;
  648. padding: 0 32rpx;
  649. color: #656565;
  650. margin: 16rpx;
  651. position: relative;
  652. .tabs-timer-item{
  653. width: 42%;
  654. color: #656565;
  655. text-align: center;
  656. font-family: "Source Han Sans CN VF";
  657. font-size: 24rpx;
  658. font-weight: 400;
  659. }
  660. .calendar-icon{
  661. margin-left: 24rpx;
  662. }
  663. }
  664. .tab-item {
  665. flex: 1;
  666. color: #999999;
  667. text-align: center;
  668. font-family: "Source Han Sans CN VF";
  669. font-size: 28rpx;
  670. font-weight: 400;
  671. }
  672. .active{
  673. position: relative;
  674. color: #303133;
  675. text-align: center;
  676. font-family: "Source Han Sans CN VF";
  677. font-size: 28rpx;
  678. font-weight: 700;
  679. &::after {
  680. content: '';
  681. position: absolute;
  682. bottom: 0;
  683. left: 50%;
  684. -webkit-transform: translateX(-50%);
  685. transform: translateX(-50%);
  686. width: 36rpx;
  687. height: 36rpx;
  688. border: 6rpx solid #0bbc58;
  689. border-radius: 50%;
  690. border-color: transparent;
  691. border-bottom-color: #0bbc58;
  692. }
  693. }
  694. }
  695. }
  696. </style>