detail.vue 22 KB

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