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