detail.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <template>
  2. <view class="device-detail">
  3. <view class="device-detail__header">
  4. <u-icon
  5. size="36"
  6. class="arrow-left"
  7. name="arrow-left"
  8. @click="handleBack"
  9. ></u-icon>
  10. {{ deviceInfo.name }}
  11. </view>
  12. <view class="operation" @click.stop="isShowOperation = !isShowOperation">操作</view>
  13. <view class="operation-container" v-if="isShowOperation" @click="closeOperationHandler">
  14. <view class="operation-background"></view>
  15. <view class="operation-content">
  16. <view class="operation-item" v-if="isShowPhoto" @click="handlePhotoClick">
  17. <image :src="photoIcon" class="operation-icon"></image>
  18. 拍照
  19. </view>
  20. <view class="operation-item" @click="handleServiceClick">
  21. <image :src="serviceIcon" class="operation-icon"></image>
  22. 维修
  23. </view>
  24. <view class="operation-item" @click="handleSettingClick">
  25. <image :src="settingIcon" class="operation-icon"></image>
  26. 设置
  27. </view>
  28. <view class="operation-item" @click="handleSimClick">
  29. <image :src="simIcon" class="operation-icon"></image>
  30. SIM卡
  31. </view>
  32. <view class="operation-item" @click="modification">
  33. <image :src="editIcon" class="operation-icon"></image>
  34. 修改
  35. </view>
  36. </view>
  37. </view>
  38. <view class="device-detail__body">
  39. <DeviceCard
  40. :dataSource="deviceInfo"
  41. :collectTime="time"
  42. :title="deviceInfo.name"
  43. :deviceType="deviceType"
  44. />
  45. <view class="tabs">
  46. <view class="tab-container" v-if="isShowTab">
  47. <view class="tab-item" :class="activeTab === 'pestAnalysis'?'active':''" @click="handleTabClick('pestAnalysis')" v-if="disableShow">
  48. 害虫分析
  49. </view>
  50. <view class="tab-item" :class="activeTab === 'viewImage'?'active':''" @click="handleTabClick('viewImage')">
  51. 查看图片
  52. </view>
  53. <view class="tab-item" :class="activeTab === 'deviceData'?'active':''" @click="handleTabClick('deviceData')">
  54. 设备数据
  55. </view>
  56. </view>
  57. <view class="select-timer-container">
  58. <view class="select-year">
  59. <view class="select-year-item" @click="showPicker = true">
  60. {{ currentYear }}
  61. <u-icon name="arrow-down" size="18" class="arrow-down"></u-icon>
  62. </view>
  63. </view>
  64. <view class="tabs-timer-container" @click="showCalendar">
  65. <view class="tabs-timer-item">
  66. {{startDate}}
  67. </view>
  68. <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-if="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-if="activeTab === 'deviceData'">
  106. <DeviceData
  107. :deviceStatic="deviceStatic"
  108. :deviceInfo="deviceInfo"
  109. :polylineList="polylineList"
  110. :deviceHistoryList="deviceHistoryList"
  111. :totalPage="totalPage"
  112. :currentPage="page"
  113. :page_size="page_size"
  114. @prevPage="prevPage"
  115. @nextPage="nextPage"
  116. />
  117. </view>
  118. </view>
  119. <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>
  120. <u-picker v-model="showPicker" mode="selector" :range="selectorRange" range-key="id" :default-selector="[0]" @confirm="confirmHandler"></u-picker>
  121. </view>
  122. </template>
  123. <script>
  124. import DeviceCard from './components/DeviceCard.vue';
  125. import PestDiscern from './components/pestDiscern.vue';
  126. import PestEchart from './components/pestEchart.vue';
  127. import PestArchive from './components/pestArchive.vue';
  128. import photoImage from './components/photoImage.vue';
  129. import DeviceData from './components/deviceData.vue';
  130. import photoIcon from './assets/photoIcon.png';
  131. import editIcon from './assets/editIcon.png';
  132. import serviceIcon from './assets/serviceIcon.png';
  133. import simIcon from './assets/simIcon.png';
  134. import settingIcon from './assets/settingIcon.png';
  135. export default {
  136. components: {
  137. DeviceCard,
  138. PestDiscern,
  139. PestEchart,
  140. PestArchive,
  141. photoImage,
  142. DeviceData,
  143. },
  144. data(){
  145. return {
  146. isShowTab:false,
  147. showPicker: false,
  148. disableShow: false,
  149. isShowOperation: false,
  150. photoIcon,
  151. editIcon,
  152. serviceIcon,
  153. simIcon,
  154. settingIcon,
  155. totalPage:0,
  156. currentYear: new Date().getFullYear(),
  157. selectorRange: [],
  158. maxDate: this.formatDate(new Date()),
  159. minDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
  160. show: false,
  161. showSim: false,
  162. // 当前日期向前推30天 格式2026-01-01 月份和日期小于10的时候前面加个0
  163. startDate: this.formatDate(new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)),
  164. endDate: this.formatDate(new Date()),
  165. mode: 'range',
  166. imageList: [],
  167. pest_order:{},
  168. deviceInfo: {},
  169. pestInfo: {},
  170. time: '',
  171. activeTab: 'pestAnalysis',
  172. deviceType: '',
  173. location: '',
  174. total: 0,
  175. day: [],
  176. pest: [],
  177. page:1,
  178. is_pest:'',
  179. page_size:24,
  180. pestList:[],
  181. pest_names:'',
  182. pests:[],
  183. polylineList:[],
  184. isShowPhoto:false,
  185. deviceHistoryList:[],
  186. deviceStatic:{}
  187. }
  188. },
  189. onLoad(options){
  190. this.deviceInfo = JSON.parse(options.info);
  191. const newVal = this.deviceInfo;
  192. if (newVal.device_model == '11'){
  193. this.isShowPhoto = true
  194. } else if(newVal.device_model == '12'){
  195. this.isShowPhoto = false
  196. } else if(newVal.device_model == '13'){
  197. this.isShowPhoto = true
  198. } else if(newVal.device_model == '14'){
  199. this.isShowPhoto = true
  200. } else if(newVal.device_model == '15'){
  201. this.isShowPhoto = false
  202. } else{
  203. this.isShowPhoto = true
  204. }
  205. this.getPestAnalysis();
  206. this.isShow();
  207. const currentYear = new Date().getFullYear();
  208. this.selectorRange = [];
  209. for(let i = 0;i<50;i++){
  210. const item = {
  211. label: currentYear - i,
  212. id: currentYear - i
  213. }
  214. this.selectorRange.push(item);
  215. }
  216. },
  217. methods: {
  218. handleSimClick(){
  219. // this.showSim = true;
  220. //`/pages/deviceDetails/weatherStation/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}`
  221. uni.navigateTo({
  222. url:
  223. '/pages/deviceDetails/weatherStation/simDetail?deviceInfo=' +
  224. encodeURIComponent(JSON.stringify(this.deviceInfo))
  225. });
  226. },
  227. modification() {
  228. uni.navigateTo({
  229. url:
  230. '/pages/equipList2/seabox/modification?data=' +
  231. JSON.stringify(this.deviceInfo) +
  232. '&id=' +
  233. this.deviceInfo.type,
  234. });
  235. },
  236. async handlePhotoClick(){
  237. const res = await this.$myRequest({
  238. url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
  239. method: 'POST',
  240. data: {
  241. device_type_id: this.deviceInfo.type,
  242. d_id: this.deviceInfo.d_id,
  243. cmd: 'takephoto',
  244. },
  245. });
  246. if(res){
  247. this.$u.toast('拍照成功')
  248. }
  249. },
  250. handleServiceClick(){
  251. uni.navigateTo({
  252. url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
  253. })
  254. },
  255. handleSettingClick(){
  256. uni.navigateTo({
  257. url: '/pages/cbd/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id,
  258. });
  259. },
  260. closeOperationHandler(){
  261. this.isShowOperation = false;
  262. },
  263. isShow(){
  264. // disable == 0 或者 device_model == 15 表示不可以查看
  265. if(!this.deviceInfo.d_id){
  266. return false;
  267. }
  268. let showStatus = true;
  269. if(this.deviceInfo.device_model == 15 || this.deviceInfo.device_model == 12){
  270. showStatus = false;
  271. }
  272. if(showStatus){
  273. this.activeTab = 'pestAnalysis';
  274. }else{
  275. this.activeTab = 'deviceData';
  276. }
  277. this.initAction();
  278. this.isShowTab = showStatus;
  279. if(this.deviceInfo.disable == 0){
  280. this.disableShow = false;
  281. if(showStatus){
  282. this.activeTab = 'viewImage';
  283. this.handleTabClick('viewImage');
  284. }
  285. }else{
  286. this.disableShow = true;
  287. }
  288. },
  289. prevPage(e){
  290. if(e == 1){
  291. return
  292. }
  293. this.page = e;
  294. this.getDeviceHistoryData();
  295. },
  296. nextPage(e){
  297. if(e * this.page_size >= this.totalPage){
  298. return
  299. }
  300. this.page = e;
  301. this.getDeviceHistoryData();
  302. },
  303. changeTab(pestList){
  304. let pest_names = pestList.map(item => item.pest_name);
  305. this.pest_names = pest_names.join(',');
  306. this.initImageList();
  307. },
  308. confirmHandler(e){
  309. this.currentYear = this.selectorRange[e].id;
  310. if(this.currentYear == new Date().getFullYear()){
  311. // 结束日期为this.endDate的月份和日期加上选择的年份
  312. const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
  313. this.endDate = this.formatDate(new Date(timeDate));
  314. // 开始日期为结束日期前30天
  315. this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
  316. this.maxDate = this.formatDate(new Date());
  317. this.minDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
  318. }else{
  319. // 结束日期为this.endDate的月份和日期加上选择的年份
  320. const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
  321. this.endDate = this.formatDate(new Date(timeDate));
  322. // 开始日期为结束日期前30天
  323. this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
  324. this.maxDate = this.formatDate(new Date(this.currentYear, 11, 31));
  325. this.minDate = this.formatDate(new Date(this.currentYear, 0, 1));
  326. }
  327. this.initAction();
  328. this.showPicker = false;
  329. },
  330. getInfo(info){
  331. this.pestInfo = info;
  332. },
  333. // 格式化日期为YYYY-MM-DD格式,月份和日期小于10时前面加0
  334. formatDate(date) {
  335. const year = date.getFullYear();
  336. const month = String(date.getMonth() + 1).padStart(2, '0');
  337. const day = String(date.getDate()).padStart(2, '0');
  338. return `${year}-${month}-${day}`;
  339. },
  340. handleChange(e){
  341. this.startDate = e.startDate;
  342. this.endDate = e.endDate;
  343. this.initAction();
  344. },
  345. showCalendar(){
  346. this.show = true;
  347. },
  348. handleBack() {
  349. uni.navigateBack({
  350. delta: 1
  351. });
  352. },
  353. initAction(){
  354. this.pest_order = {}
  355. if(this.activeTab === 'pestAnalysis'){
  356. this.getPestAnalysis();
  357. }else if(this.activeTab === 'viewImage'){
  358. this.initPest();
  359. this.initImageList();
  360. }else if(this.activeTab === 'deviceData'){
  361. this.getDeviceData();
  362. this.getPolylineData();
  363. this.getDeviceHistoryData();
  364. }
  365. },
  366. handleTabClick(tab) {
  367. this.activeTab = tab;
  368. this.initAction();
  369. },
  370. async getDeviceData(){
  371. const res = await this.$myRequest({
  372. url: '/api/api_gateway?method=forecast.worm_lamp.device_status_data',
  373. method: 'POST',
  374. data: {
  375. device_id: this.deviceInfo.id,
  376. },
  377. });
  378. this.deviceStatic = res;
  379. },
  380. async initImageList(){
  381. const res = await this.$myRequest({
  382. url: '/api/api_gateway?method=forecast.new_cbd.photo_list',
  383. method: 'POST',
  384. data: {
  385. page:this.page,
  386. page_size:this.page_size,
  387. device_id: this.deviceInfo.id,
  388. is_pest: this.is_pest,
  389. identify_model: 'B',
  390. pest_names: this.pest_names,
  391. time_begin: this.formatDate(new Date(this.startDate)) + ' 00:00:00',// 格式化开始时间YYYY-MM-DD HH:MM:SS
  392. time_end: 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.formatDate(new Date(this.startDate)) + ' 00:00:00',// 格式化开始时间YYYY-MM-DD HH:MM:SS
  408. time_end: 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. const res = await this.$myRequest({
  416. url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
  417. method: 'POST',
  418. data: {
  419. device_type_id: this.deviceInfo.type_id,
  420. d_id: this.deviceInfo.d_id,
  421. start_time: new Date(this.startDate).getTime()/1000,// 转成毫秒
  422. end_time: new Date(this.endDate).getTime()/1000,// 转成毫秒
  423. },
  424. });
  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).getTime()/1000,
  436. end_time: new Date(this.endDate).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>