detail.vue 20 KB

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