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