detail.vue 21 KB

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