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