detail.vue 22 KB

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