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