deviceControl.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  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. {{ title }}
  11. </view>
  12. <view class="device-detail__body">
  13. <view class="tabs">
  14. <view class="tab-container">
  15. <view class="tab-item" v-if="myuser_type" :class="activeTab === 'pestAnalysis'?'active':''" @click="handleTabClick('pestAnalysis')">
  16. 管理员
  17. </view>
  18. <view class="tab-item" :class="activeTab === 'viewImage'?'active':''" @click="handleTabClick('viewImage')">
  19. 设置
  20. </view>
  21. </view>
  22. </view>
  23. <view class="device-detail-content" v-if="activeTab === 'pestAnalysis'">
  24. <view class="device-detail-item">
  25. <text class="device-detail-label">联网模块</text>
  26. <view class="device-detail-btn-container">
  27. <view class="device-detail-btn" @click="setDeviceContorl('update_stm32')">主板升级</view>
  28. <view class="device-detail-btn" @click="setDeviceContorl('update')">物联网模块升级</view>
  29. <view class="device-detail-btn" @click="setDeviceContorl('reboot')">重启</view>
  30. <view class="device-detail-btn" @click="setDeviceContorl('test')">一键测试</view>
  31. <view class="device-detail-btn" @click="setDeviceContorl('yfwlw')">平台切换</view>
  32. <view class="device-detail-btn" @click="setDeviceContorl('paramconf1')">标配物联网</view>
  33. <view class="device-detail-btn" @click="setDeviceContorl('paramconf2')">物联网自清虫</view>
  34. <view class="device-detail-btn" @click="setDeviceContorl('paramconf3')">物联网光控</view>
  35. <view class="device-detail-btn" @click="setDeviceContorl('paramconf4')">物联网光控自清虫</view>
  36. <!-- <view class="device-detail-btn" @click="showMqttConfig">MQTT配置</view> -->
  37. </view>
  38. </view>
  39. <!-- <view class="device-detail-item">
  40. <text class="device-detail-label">板子设置</text>
  41. <view class="device-detail-btn-container">
  42. <view class="device-detail-btn" @click="showMqttConfig('imei')">更改IMEI</view>
  43. </view>
  44. </view>
  45. <view class="device-detail-item">
  46. <text class="device-detail-label">强制操作</text>
  47. <view class="device-detail-btn-container">
  48. <view class="device-detail-btn force-btn" @click="setDeviceContorl('takephoto')">拍照</view>
  49. <view class="device-detail-btn force-btn" @click="setDeviceContorl('update')">升级</view>
  50. <view class="device-detail-btn force-btn" @click="setDeviceContorl('reboot')">重启</view>
  51. <view class="device-detail-btn force-btn" @click="setDeviceContorl('autotakephoto')">对焦拍照</view>
  52. <view class="device-detail-btn force-btn" @click="setDeviceContorl('turn')">转仓</view>
  53. </view>
  54. </view> -->
  55. </view>
  56. <view class="device-detail-content" style="padding-bottom: 50rpx" v-if="activeTab === 'viewImage'">
  57. <!-- <view class="device-detail-viewImage">
  58. <text class="device-detail-label" style="margin-left: 10rpx">
  59. 设备编号
  60. </text>
  61. <view class="clear-btn">{{ equipContrlForm.imei || '-' }}</view>
  62. </view>
  63. <view class="device-detail-viewImage">
  64. <text class="device-detail-label" style="margin-left: 10rpx">
  65. 设备名称
  66. </text>
  67. <view class="clear-btn">{{ equipContrlForm.device_name || '-' }}</view>
  68. </view> -->
  69. <view class="device-detail-viewImage">
  70. <text class="device-detail-label" style="margin-left: 10rpx">
  71. 主板版本号
  72. </text>
  73. <view class="clear-btn">{{ equipContrlForm.stm8vs || '-' }}</view>
  74. </view>
  75. <view class="device-detail-viewImage">
  76. <text class="device-detail-label" style="margin-left: 10rpx">
  77. 联网版本号
  78. </text>
  79. <view class="clear-btn">{{ equipContrlForm.dver || '-' }}</view>
  80. </view>
  81. <view class="device-detail-viewImage">
  82. <text class="device-detail-label" style="margin-left: 10rpx">
  83. 设备开关
  84. </text>
  85. <u-switch
  86. v-model="equipContrlForm.ds"
  87. size="32"
  88. :active-value="1"
  89. :inactive-value="0"
  90. active-color="#0bbc58"
  91. style="position:absolute;right:0"
  92. ></u-switch>
  93. </view>
  94. <view class="device-detail-viewImage">
  95. <text class="device-detail-label" style="margin-left: 10rpx">
  96. 定时模式
  97. </text>
  98. <view class="clear-btn" @click="timeSet('ts')">{{ equipContrlForm.ts === '0' ? '光控' : '时控' }}</view>
  99. </view>
  100. <view class="device-detail-viewImage" v-if="equipContrlForm.ts !== '1'">
  101. <u-icon name="clock" color="#0bbc58" size="46"></u-icon>
  102. <text class="device-detail-label" style="margin-left: 10rpx">
  103. 定时时长(h)
  104. </text>
  105. <view class="clear-btn" @click="timeSetLang('tt')">{{ equipContrlForm.tt == '0'?'常亮':equipContrlForm.tt || '-' }}</view>
  106. </view>
  107. <view v-if="equipContrlForm.ts === '1'">
  108. <text class="device-detail-label" style="margin-left: 10rpx">
  109. 开始结束时间
  110. </text>
  111. </view>
  112. <view class="time-container" v-if="equipContrlForm.ts === '1'">
  113. <view class="start-time" @click="showPickerHandler('start_time')">{{start_time_label || '开始时间'}}</view>-
  114. <view class="end-time" @click="showPickerHandler('end_time')">{{end_time_label || '结束时间'}}
  115. </view><u-icon name="clock" color="#4E5969" size="26" style="padding-right: 20rpx"></u-icon>
  116. </view>
  117. <view class="device-detail-viewImage">
  118. <text class="device-detail-label">数据间隔(min)
  119. {{ equipContrlForm.dattim }}</text>
  120. </view>
  121. <!-- <view class="slider-container">
  122. <view class="slider-min-value">50</view>
  123. <u-slider :value="equipContrlForm.dattim" @input="e => equipContrlForm.dattim = e" class="slider" :min="10" :max="120" active-color="#0bbc58"></u-slider>
  124. <view class="slider-max-value">70</view>
  125. </view> -->
  126. <view class="slider-container">
  127. <view class="slider-min-value">10</view>
  128. <view
  129. class="custom-progress"
  130. @touchstart.stop="onSliderTouchStart($event, 'dattim', 10, 120)"
  131. @touchmove.stop.prevent="onSliderTouchMove($event, 10, 120)"
  132. @touchend.stop="onSliderTouchEnd"
  133. @tap.stop="onSliderTap($event, 'dattim', 10, 120)"
  134. >
  135. <view class="progress-track">
  136. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.dattim, 10, 120) + '%' }"></view>
  137. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.dattim, 10, 120) + '%' }"></view>
  138. </view>
  139. </view>
  140. <view class="slider-max-value">120</view>
  141. </view>
  142. <view class="device-detail-viewImage">
  143. <text class="device-detail-label">清虫间隔(min)
  144. {{ equipContrlForm.clt }}</text>
  145. </view>
  146. <!-- <view class="slider-container">
  147. <view class="slider-min-value">-30</view>
  148. <u-slider :value="equipContrlForm.clt" @input="e => equipContrlForm.clt = e" class="slider" :min="10" :max="120" active-color="#0bbc58"></u-slider>
  149. <view class="slider-max-value">20</view>
  150. </view> -->
  151. <view class="slider-container">
  152. <view class="slider-min-value">10</view>
  153. <view
  154. class="custom-progress"
  155. @touchstart.stop="onSliderTouchStart($event, 'clt', 10, 120)"
  156. @touchmove.stop.prevent="onSliderTouchMove($event, 10, 120)"
  157. @touchend.stop="onSliderTouchEnd"
  158. @tap.stop="onSliderTap($event, 'clt', 10, 120)"
  159. >
  160. <view class="progress-track">
  161. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.clt, 10, 120) + '%' }"></view>
  162. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.clt, 10, 120) + '%' }"></view>
  163. </view>
  164. </view>
  165. <view class="slider-max-value">120</view>
  166. </view>
  167. </view>
  168. </view>
  169. <view class="device-detail-btn-footer" v-if="activeTab === 'viewImage'">
  170. <view class="device-detail-btn" @click="saveSettings">保存</view>
  171. </view>
  172. <u-popup v-model="show" mode="bottom">
  173. <view class="device-detail-content" style="height: 50vh">
  174. <view class="device-detail-item">
  175. <text class="device-detail-label">请输入imei</text>
  176. <u-input v-model="equipContrlForm.imei" placeholder="请输入imei"></u-input>
  177. </view>
  178. </view>
  179. <view class="device-detail-btn-footer">
  180. <view class="device-detail-btn" @click="setDeviceContorl('imei')">保存</view>
  181. </view>
  182. </u-popup>
  183. <u-select v-model="showPicker" :list="timeList" @confirm="confirmPicker"></u-select>
  184. <u-select v-model="showTimePicker" :list="list" @confirm="confirmTimePicker"></u-select>
  185. <u-select v-model="showTimeLangPicker" :list="list2" @confirm="confirmTimeLangPicker"></u-select>
  186. </view>
  187. </template>
  188. <script>
  189. export default {
  190. data(){
  191. return {
  192. showPicker: false,
  193. value: 10,
  194. timeList: [],
  195. imageList: [],
  196. start_time_label: '',
  197. end_time_label: '',
  198. start_time: '',
  199. end_time: '',
  200. list: [{
  201. value: '0',
  202. label: '光控'
  203. },
  204. {
  205. value: '1',
  206. label: '时控'
  207. }],
  208. list2: [{
  209. value: '0',
  210. label: '常亮'
  211. },
  212. {
  213. value: '1',
  214. label: '1'
  215. },
  216. {
  217. value: '2',
  218. label: '2'
  219. },
  220. {
  221. value: '3',
  222. label: '3'
  223. },
  224. {
  225. value: '4',
  226. label: '4'
  227. },
  228. {
  229. value: '5',
  230. label: '5'
  231. },
  232. {
  233. value: '6',
  234. label: '6'
  235. },
  236. {
  237. value: '7',
  238. label: '7'
  239. }],
  240. coll_time:[{
  241. start_time: '',
  242. start_time_label: '',
  243. end_time: '',
  244. end_time_label: '',
  245. }],
  246. equipContrlForm: {
  247. },
  248. time: '',
  249. activeTab: 'pestAnalysis',
  250. title: '设置控制',
  251. deviceType: '',
  252. location: '',
  253. d_id: '',
  254. show: false,
  255. checked: false,
  256. showTimePicker: false,
  257. showTimeLangPicker: false,
  258. currentIndex: -1,
  259. myuser_type: false,
  260. currentType: ''
  261. }
  262. },
  263. onLoad(options){
  264. this.d_id = options.d_id;
  265. this.getControlDeviceConfigInfo();
  266. this.timeList = [];
  267. for(let i = 0;i<24;i++){
  268. this.timeList.push({
  269. value:i,
  270. label:i < 10 ? '0' + i + ':00' : i + ':00'
  271. })
  272. }
  273. uni.getStorage({
  274. key:"myuser_type",
  275. success:(res)=>{
  276. if(Number(res.data) == 1){
  277. this.myuser_type = true
  278. this.activeTab = 'pestAnalysis'
  279. }else{
  280. this.activeTab = 'viewImage'
  281. }
  282. }
  283. })
  284. },
  285. methods: {
  286. getProgressWidth(value, min, max) {
  287. if (max === min) return 0
  288. return ((value - min) / (max - min)) * 100
  289. },
  290. onSliderTouchStart(e, field, min, max) {
  291. this.sliderField = field
  292. this.sliderMin = min
  293. this.sliderMax = max
  294. const query = uni.createSelectorQuery().in(this)
  295. query.select('.custom-progress').boundingClientRect(rect => {
  296. this.sliderRect = rect
  297. }).exec()
  298. this.updateSliderValue(e.touches[0].clientX, field, min, max)
  299. },
  300. onSliderTouchMove(e, min, max) {
  301. if (!this.sliderField || !this.sliderRect) return
  302. this.updateSliderValue(e.touches[0].clientX, this.sliderField, min, max)
  303. },
  304. onSliderTouchEnd() {
  305. this.sliderField = ''
  306. },
  307. onSliderTap(e, field, min, max) {
  308. const query = uni.createSelectorQuery().in(this)
  309. query.select('.custom-progress').boundingClientRect(rect => {
  310. this.sliderRect = rect
  311. this.updateSliderValue(e.detail.x + rect.left, field, min, max)
  312. }).exec()
  313. },
  314. updateSliderValue(clientX, field, min, max) {
  315. if (!this.sliderRect) return
  316. let ratio = (clientX - this.sliderRect.left) / this.sliderRect.width
  317. ratio = Math.max(0, Math.min(1, ratio))
  318. const value = Math.round(min + ratio * (max - min))
  319. this.$set(this.equipContrlForm, field, value)
  320. },
  321. confirmTimePicker(e){
  322. const value = e[0].value;
  323. this.equipContrlForm.ts = value;
  324. },
  325. confirmTimeLangPicker(e){
  326. const value = e[0].value;
  327. this.equipContrlForm.tt = value;
  328. },
  329. timeSet(){
  330. this.showTimePicker = true;
  331. },
  332. timeSetLang(type){
  333. this.showTimeLangPicker = true;
  334. },
  335. clearTime(){
  336. this.coll_time.forEach(item => {
  337. item.start_time = '';
  338. item.start_time_label = '';
  339. item.end_time = '';
  340. item.end_time_label = '';
  341. })
  342. },
  343. confirmPicker(e){
  344. const value = e[0].value;
  345. const label = e[0].label;
  346. if(this.currentType == 'start_time'){
  347. this.start_time_label = label
  348. this.start_time = value
  349. }else{
  350. this.end_time_label = label
  351. this.end_time = value
  352. }
  353. },
  354. showPickerHandler(type){
  355. this.currentType = type
  356. this.showPicker = true;
  357. },
  358. closePicker(){
  359. this.showPicker = false;
  360. this.currentType = ''
  361. this.currentIndex = -1
  362. },
  363. handleBack() {
  364. uni.navigateBack({
  365. delta: 1
  366. });
  367. },
  368. handleTabClick(tab) {
  369. this.activeTab = tab;
  370. },
  371. showMqttConfig(){
  372. this.show = true;
  373. },
  374. closeMqttConfig(){
  375. this.show = false;
  376. },
  377. async setDeviceContorl(cmd){
  378. this.$myRequest({
  379. url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
  380. method: 'POST',
  381. data: {
  382. device_type_id: 2,
  383. d_id: this.d_id,
  384. cmd
  385. }
  386. }).then(res => {
  387. this.closeMqttConfig()
  388. if (res) {
  389. uni.showToast({
  390. title: '设备控制修改成功!',
  391. icon: 'success',
  392. });
  393. } else {
  394. uni.showToast({
  395. title: '设备控制修改失败',
  396. icon: 'error',
  397. });
  398. }
  399. });
  400. },
  401. saveSettings(){
  402. let newForm = Object.assign({}, this.equipContrlForm) // 深拷贝
  403. newForm.ds = newForm.ds ? 1 : 0
  404. newForm.st = this.start_time
  405. newForm.et = this.end_time
  406. this.$myRequest({
  407. url: '/api/api_gateway?method=forecast.send_control.device_control',
  408. method: 'POST',
  409. data: {
  410. device_type_id: 2,
  411. d_id: this.d_id,
  412. config: JSON.stringify(newForm)
  413. }
  414. }).then(res => {
  415. if (res) {
  416. // 设备控制修改成功
  417. uni.showToast({
  418. title: '设备控制修改成功!',
  419. icon: 'success',
  420. });
  421. } else {
  422. uni.showToast({
  423. title: '设备控制修改失败',
  424. icon: 'error',
  425. });
  426. }
  427. })
  428. },
  429. async getControlDeviceConfigInfo(){
  430. const res = await this.$myRequest({
  431. url: '/api/api_gateway?method=forecast.send_control.device_control_info',
  432. method: 'POST',
  433. data: {
  434. d_id: this.d_id,
  435. cmd:'paramconf'
  436. },
  437. });
  438. this.equipContrlForm = {
  439. st: res.st,
  440. et: res.et,
  441. ds: res.ds,
  442. ts: res.ts,
  443. tt: res.tt,
  444. dver: res.dver,
  445. dattim: res.dat_f,
  446. clt: res.clt_t,
  447. stm8vs: res.stm8vs
  448. };
  449. this.start_time = res?.st || ''
  450. this.end_time = res?.et || ''
  451. this.start_time_label = this.start_time >= 10 ? this.start_time + ':00' : '0' + this.start_time + ':00'
  452. this.end_time_label = this.end_time >= 10 ? this.end_time + ':00' : '0' + this.end_time + ':00'
  453. // const coll_time = res?.coll_time || [];
  454. // for(let i = 0;i< coll_time.length;i++){
  455. // const coll_item = coll_time[i];
  456. // const start_time = coll_item.split('-')[0];
  457. // const end_time = coll_item.split('-')[1];
  458. // this.coll_time[i]['start_time'] = start_time;
  459. // this.coll_time[i]['end_time'] = end_time;
  460. // this.coll_time[i]['start_time_label'] = start_time >= 10 ? start_time + ':00' : '0' + start_time + ':00';
  461. // this.coll_time[i]['end_time_label'] = end_time >= 10 ? end_time + ':00' : '0' + end_time + ':00';
  462. // }
  463. // 确保值是数字类型,并且使用默认值时也要在合理范围内
  464. },
  465. }
  466. }
  467. </script>
  468. <style scoped lang="scss">
  469. .device-detail {
  470. display: flex;
  471. width: 100%;
  472. height: calc(100vh - 112rpx);
  473. padding-top: 112rpx;
  474. flex-direction: column;
  475. align-items: center;
  476. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  477. .device-detail__header {
  478. width: 100%;
  479. font-size: 28rpx;
  480. color: #999;
  481. color: #042118;
  482. font-family: 'Source Han Sans CN VF';
  483. font-weight: 700;
  484. position: relative;
  485. text-align: center;
  486. .arrow-left {
  487. position: absolute;
  488. left: 32rpx;
  489. margin-right: 12rpx;
  490. }
  491. }
  492. .time-container{
  493. display: flex;
  494. justify-content: center;
  495. align-items: center;
  496. color: #999999;
  497. border-radius: 8rpx;
  498. background:#F6F8FC;
  499. gap: 12rpx;
  500. .start-time{
  501. width: 250rpx;
  502. height: 50rpx;
  503. line-height: 50rpx;
  504. text-align: left;
  505. font-size: 24rpx;
  506. color: #999999;
  507. font-family: 'Source Han Sans CN VF';
  508. border-radius: 16rpx;
  509. padding: 0 24rpx;
  510. }
  511. .end-time{
  512. width: 200rpx;
  513. height: 50rpx;
  514. line-height: 50rpx;
  515. text-align: left;
  516. font-size: 24rpx;
  517. color: #999999;
  518. font-family: 'Source Han Sans CN VF';
  519. border-radius: 16rpx;
  520. padding: 0 24rpx;
  521. }
  522. }
  523. .device-detail__body {
  524. width: calc(100% - 64rpx);
  525. margin: 0 auto;
  526. border-radius: 16rpx;
  527. overflow-x: hidden;
  528. overflow-y: auto;
  529. // 隐藏滚动条
  530. -ms-overflow-style: none;
  531. scrollbar-width: none;
  532. }
  533. .tabs {
  534. margin: 24rpx 0;
  535. border-radius: 16rpx;
  536. padding: 16rpx 0;
  537. padding-top: 0;
  538. .tab-container{
  539. display: flex;
  540. width: 100%;
  541. height: 88rpx;
  542. line-height: 88rpx;
  543. text-align: center;
  544. font-size: 28rpx;
  545. color: #042118;
  546. font-family: 'Source Han Sans CN VF';
  547. }
  548. .tab-item {
  549. margin-right: 40rpx;
  550. color:#999999;
  551. }
  552. .active{
  553. position: relative;
  554. color: #0bbc58;
  555. text-align: center;
  556. font-family: "Source Han Sans CN VF";
  557. font-size: 28rpx;
  558. font-weight: 700;
  559. &::after {
  560. content: '';
  561. position: absolute;
  562. bottom: 10rpx;
  563. left: 50%;
  564. transform: translateX(-50%);
  565. width: 100%;
  566. height: 36rpx;
  567. border-bottom: 6rpx solid #0bbc58;
  568. }
  569. }
  570. }
  571. .device-detail-content{
  572. display: flex;
  573. padding: 24rpx;
  574. flex-direction: column;
  575. align-items: flex-start;
  576. gap: 20rpx;
  577. border-radius: 16rpx;
  578. background: #FFF;
  579. .device-detail-item{
  580. .device-detail-label{
  581. color: #303133;
  582. font-family: "Source Han Sans CN VF";
  583. font-size: 28rpx;
  584. font-weight: 400;
  585. }
  586. .device-detail-btn-container{
  587. display: grid;
  588. grid-template-columns: repeat(3, 1fr);
  589. gap: 24rpx;
  590. margin-top: 12rpx;
  591. }
  592. .device-detail-btn{
  593. display: flex;
  594. padding: 10rpx;
  595. justify-content: center;
  596. align-items: center;
  597. gap: 16rpx;
  598. border-radius: 16rpx;
  599. background: #0bbc58;
  600. color: #ffffff;
  601. font-family: "Source Han Sans CN VF";
  602. font-size: 24rpx;
  603. font-weight: 400;
  604. }
  605. .force-btn{
  606. background: #FB4E52;
  607. }
  608. }
  609. .device-detail-viewImage{
  610. width: 100%;
  611. display: flex;
  612. align-items: center;
  613. padding-bottom: 20rpx;
  614. position: relative;
  615. .clear-btn{
  616. position: absolute;
  617. right: 0rpx;
  618. border-radius: 8rpx;
  619. padding: 4rpx 12rpx;
  620. font-size: 26rpx;
  621. font-family: 'Source Han Sans CN VF';
  622. font-weight: 400;
  623. }
  624. }
  625. }
  626. .slider-container{
  627. position: relative;
  628. margin-bottom: 20rpx;
  629. .slider-min-value{
  630. position: absolute;
  631. left: 0;
  632. top: -50rpx;
  633. }
  634. .slider{
  635. width: 600rpx;
  636. }
  637. .slider-max-value{
  638. position: absolute;
  639. right: 0;
  640. top: -50rpx;
  641. }
  642. }
  643. .custom-progress{
  644. width: 600rpx;
  645. padding: 0;
  646. .progress-track{
  647. position: relative;
  648. height: 12rpx;
  649. background-color: #ebedf0;
  650. border-radius: 6rpx;
  651. }
  652. .progress-fill{
  653. position: absolute;
  654. left: 0;
  655. top: 0;
  656. height: 100%;
  657. background-color: #0BBC58;
  658. border-radius: 6rpx;
  659. transition: width 0.2s;
  660. }
  661. .progress-thumb{
  662. position: absolute;
  663. top: 50%;
  664. width: 28rpx;
  665. height: 28rpx;
  666. margin-left: -14rpx;
  667. margin-top: -14rpx;
  668. border-radius: 50%;
  669. background-color: #fff;
  670. box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  671. transition: left 0.2s;
  672. }
  673. }
  674. .device-detail-btn-footer{
  675. position: fixed;
  676. bottom: 0;
  677. left: 0;
  678. width: 100%;
  679. height: 112rpx;
  680. line-height: 112rpx;
  681. text-align: center;
  682. font-size: 28rpx;
  683. font-weight: 700;
  684. color: #042118;
  685. font-family: 'Source Han Sans CN VF';
  686. background: #ffffff;
  687. display: flex;
  688. justify-content: center;
  689. align-items: center;
  690. .device-detail-btn{
  691. display: flex;
  692. height: 80rpx;
  693. width: 90%;
  694. margin: 0 auto;
  695. padding: 0rpx 20rpx;
  696. justify-content: center;
  697. align-items: center;
  698. gap: 8rpx;
  699. border-radius: 16rpx;
  700. background:#0bbc58;
  701. color: #ffffff;
  702. text-align: center;
  703. font-family: "Source Han Sans CN VF";
  704. font-size: 14px;
  705. font-style: normal;
  706. font-weight: 500;
  707. }
  708. }
  709. }
  710. </style>