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