detail.vue 21 KB

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