detail.vue 21 KB

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