detail.vue 24 KB

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