detail.vue 22 KB

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