detail.vue 21 KB

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