detail.vue 21 KB

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