deviceControl.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  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('dtu_update')">升级</view>
  28. <view class="device-detail-btn" @click="setDeviceContorl('dtu_reboot')">重启</view>
  29. <!-- <view class="device-detail-btn" @click="showMqttConfig">MQTT配置</view> -->
  30. </view>
  31. </view>
  32. <view class="device-detail-item">
  33. <text class="device-detail-label">板子设置</text>
  34. <view class="device-detail-btn-container">
  35. <!-- <view class="device-detail-btn">查看原始IMEI</view> -->
  36. <view class="device-detail-btn" @click="showMqttConfig('imei')">更改IMEI</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 force-btn" @click="setDeviceContorl('takephoto')">拍照</view>
  43. <view class="device-detail-btn force-btn" @click="setDeviceContorl('update')">升级</view>
  44. <view class="device-detail-btn force-btn" @click="setDeviceContorl('reboot')">重启</view>
  45. <view class="device-detail-btn force-btn" @click="setDeviceContorl('open_shake')">震动开启</view>
  46. <view class="device-detail-btn force-btn" @click="setDeviceContorl('close_shake')">震动关闭</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="device-detail-content" style="padding-bottom: 50rpx" v-if="activeTab === 'viewImage'">
  51. <view class="device-detail-viewImage">
  52. <text class="device-detail-label">设备开关:</text>
  53. <u-switch :value="equipContrlForm.ds == '1'" @input="setDs" size="40" active-color="#0BBC58"></u-switch>
  54. </view>
  55. <!-- <view class="device-detail-viewImage">
  56. <text class="device-detail-label">拍照像素设置:</text>
  57. </view>
  58. <u-radio-group v-model="equipContrlForm.xssz" @change="radioGroupChange" active-color="#0BBC58">
  59. <u-radio
  60. :name="1"
  61. >高
  62. </u-radio>
  63. <u-radio
  64. :name="2"
  65. >中
  66. </u-radio>
  67. <u-radio
  68. :name="3"
  69. >低
  70. </u-radio>
  71. </u-radio-group> -->
  72. <view class="device-detail-viewImage">
  73. <text class="device-detail-label">定时模式</text>
  74. </view>
  75. <u-radio-group v-model="equipContrlForm.ts" @change="radioGroupChange" active-color="#0BBC58">
  76. <u-radio
  77. :name="0"
  78. >光控
  79. </u-radio>
  80. <u-radio
  81. :name="1"
  82. >时控
  83. </u-radio>
  84. </u-radio-group>
  85. <view class="device-detail-viewImage">
  86. <text class="device-detail-label">定时时长(h){{ equipContrlForm.tt }}</text>
  87. </view>
  88. <!-- <view class="slider-container">
  89. <view class="slider-min-value">0</view>
  90. <u-slider v-model="equipContrlForm.tt" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  91. <view class="slider-max-value">100</view>
  92. </view> -->
  93. <view class="slider-container">
  94. <view class="slider-min-value">1</view>
  95. <view
  96. class="custom-progress"
  97. @touchstart.stop="onSliderTouchStart($event, 'tt', 1, 10)"
  98. @touchmove.stop.prevent="onSliderTouchMove($event, 1, 10)"
  99. @touchend.stop="onSliderTouchEnd"
  100. @tap.stop="onSliderTap($event, 'tt', 1, 10)"
  101. >
  102. <view class="progress-track">
  103. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.tt, 1, 10) + '%' }"></view>
  104. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.tt, 1, 10) + '%' }"></view>
  105. </view>
  106. </view>
  107. <view class="slider-max-value">10</view>
  108. </view>
  109. <view class="device-detail-viewImage">
  110. <text class="device-detail-label">落虫时间(min){{ equipContrlForm.collt }}</text>
  111. </view>
  112. <!-- <view class="slider-container">
  113. <view class="slider-min-value">0</view>
  114. <u-slider v-model="equipContrlForm.collt" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  115. <view class="slider-max-value">100</view>
  116. </view> -->
  117. <view class="slider-container">
  118. <view class="slider-min-value">1</view>
  119. <view
  120. class="custom-progress"
  121. @touchstart.stop="onSliderTouchStart($event, 'collt', 1, 20)"
  122. @touchmove.stop.prevent="onSliderTouchMove($event, 1, 20)"
  123. @touchend.stop="onSliderTouchEnd"
  124. @tap.stop="onSliderTap($event, 'collt', 1, 20)"
  125. >
  126. <view class="progress-track">
  127. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.collt, 1, 20) + '%' }"></view>
  128. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.collt, 1, 20) + '%' }"></view>
  129. </view>
  130. </view>
  131. <view class="slider-max-value">20</view>
  132. </view>
  133. <view class="device-detail-viewImage">
  134. <text class="device-detail-label">加热时间(min){{ equipContrlForm.htim }}</text>
  135. </view>
  136. <!-- <view class="slider-container">
  137. <view class="slider-min-value">0</view>
  138. <u-slider v-model="equipContrlForm.htim" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  139. <view class="slider-max-value">100</view>
  140. </view> -->
  141. <view class="slider-container">
  142. <view class="slider-min-value">1</view>
  143. <view
  144. class="custom-progress"
  145. @touchstart.stop="onSliderTouchStart($event, 'htim', 1, 20)"
  146. @touchmove.stop.prevent="onSliderTouchMove($event, 1, 20)"
  147. @touchend.stop="onSliderTouchEnd"
  148. @tap.stop="onSliderTap($event, 'htim', 1, 20)"
  149. >
  150. <view class="progress-track">
  151. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.htim, 1, 20) + '%' }"></view>
  152. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.htim, 1, 20) + '%' }"></view>
  153. </view>
  154. </view>
  155. <view class="slider-max-value">20</view>
  156. </view>
  157. <view class="device-detail-viewImage">
  158. <text class="device-detail-label">加热温度(℃){{ equipContrlForm.hst }}</text>
  159. </view>
  160. <!-- <view class="slider-container">
  161. <view class="slider-min-value">0</view>
  162. <u-slider v-model="equipContrlForm.hst" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  163. <view class="slider-max-value">100</view>
  164. </view> -->
  165. <view class="slider-container">
  166. <view class="slider-min-value">75</view>
  167. <view
  168. class="custom-progress"
  169. @touchstart.stop="onSliderTouchStart($event, 'hst', 75, 120)"
  170. @touchmove.stop.prevent="onSliderTouchMove($event, 75, 120)"
  171. @touchend.stop="onSliderTouchEnd"
  172. @tap.stop="onSliderTap($event, 'hst', 75, 120)"
  173. >
  174. <view class="progress-track">
  175. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.hst, 75, 120) + '%' }"></view>
  176. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.hst, 75, 120) + '%' }"></view>
  177. </view>
  178. </view>
  179. <view class="slider-max-value">120</view>
  180. </view>
  181. <view class="device-detail-viewImage">
  182. <text class="device-detail-label">高温保护阀值(℃){{ equipContrlForm.tph }}</text>
  183. </view>
  184. <!-- <view class="slider-container">
  185. <view class="slider-min-value">0</view>
  186. <u-slider v-model="equipContrlForm.tph" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  187. <view class="slider-max-value">100</view>
  188. </view> -->
  189. <view class="slider-container">
  190. <view class="slider-min-value">50</view>
  191. <view
  192. class="custom-progress"
  193. @touchstart.stop="onSliderTouchStart($event, 'tph', 50, 70)"
  194. @touchmove.stop.prevent="onSliderTouchMove($event, 50, 70)"
  195. @touchend.stop="onSliderTouchEnd"
  196. @tap.stop="onSliderTap($event, 'tph', 50, 70)"
  197. >
  198. <view class="progress-track">
  199. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.tph, 50, 70) + '%' }"></view>
  200. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.tph, 50, 70) + '%' }"></view>
  201. </view>
  202. </view>
  203. <view class="slider-max-value">70</view>
  204. </view>
  205. <view class="device-detail-viewImage">
  206. <text class="device-detail-label">低温保护阀值(℃){{ equipContrlForm.tpl }}</text>
  207. </view>
  208. <!-- <view class="slider-container">
  209. <view class="slider-min-value">0</view>
  210. <u-slider v-model="equipContrlForm.tpl" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  211. <view class="slider-max-value">100</view>
  212. </view> -->
  213. <view class="slider-container">
  214. <view class="slider-min-value">-30</view>
  215. <view
  216. class="custom-progress"
  217. @touchstart.stop="onSliderTouchStart($event, 'tpl', -30, 20)"
  218. @touchmove.stop.prevent="onSliderTouchMove($event, -30, 20)"
  219. @touchend.stop="onSliderTouchEnd"
  220. @tap.stop="onSliderTap($event, 'tpl', -30, 20)"
  221. >
  222. <view class="progress-track">
  223. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.tpl, -30, 20) + '%' }"></view>
  224. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.tpl, -30, 20) + '%' }"></view>
  225. </view>
  226. </view>
  227. <view class="slider-max-value">20</view>
  228. </view>
  229. <view class="device-detail-viewImage">
  230. <text class="device-detail-label">数据上传间隔(min){{ equipContrlForm.datt }}</text>
  231. </view>
  232. <!-- <view class="slider-container">
  233. <view class="slider-min-value">0</view>
  234. <u-slider v-model="equipContrlForm.datt" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  235. <view class="slider-max-value">100</view>
  236. </view> -->
  237. <view class="slider-container">
  238. <view class="slider-min-value">10</view>
  239. <view
  240. class="custom-progress"
  241. @touchstart.stop="onSliderTouchStart($event, 'datt', 10, 60)"
  242. @touchmove.stop.prevent="onSliderTouchMove($event, 10, 60)"
  243. @touchend.stop="onSliderTouchEnd"
  244. @tap.stop="onSliderTap($event, 'datt', 10, 60)"
  245. >
  246. <view class="progress-track">
  247. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.datt, 10, 60) + '%' }"></view>
  248. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.datt, 10, 60) + '%' }"></view>
  249. </view>
  250. </view>
  251. <view class="slider-max-value">60</view>
  252. </view>
  253. </view>
  254. </view>
  255. <view class="device-detail-btn-footer" v-if="activeTab === 'viewImage'">
  256. <view class="device-detail-btn" @click="saveSettings">保存</view>
  257. </view>
  258. <u-popup v-model="show" mode="bottom">
  259. <view class="device-detail-content" style="height: 50vh">
  260. <view class="device-detail-item">
  261. <text class="device-detail-label">请输入imei</text>
  262. <u-input v-model="equipContrlForm.imei" placeholder="请输入imei"></u-input>
  263. </view>
  264. </view>
  265. <view class="device-detail-btn-footer">
  266. <view class="device-detail-btn" @click="setDeviceContorl('imei')">保存</view>
  267. </view>
  268. </u-popup>
  269. </view>
  270. </template>
  271. <script>
  272. export default {
  273. data(){
  274. return {
  275. value: 10,
  276. imageList: [],
  277. equipContrlForm: {},
  278. device_model: '',
  279. time: '',
  280. activeTab: 'pestAnalysis',
  281. title: '设置控制',
  282. myuser_type: false,
  283. deviceType: '',
  284. location: '',
  285. d_id: '',
  286. show: false,
  287. checked: false
  288. }
  289. },
  290. onLoad(options){
  291. this.d_id = options.d_id
  292. this.device_model = options.device_model || ''
  293. this.getControlDeviceConfigInfo()
  294. uni.getStorage({
  295. key:"myuser_type",
  296. success:(res)=>{
  297. if(Number(res.data) == 1){
  298. this.myuser_type = true
  299. this.activeTab = 'pestAnalysis'
  300. }else{
  301. this.activeTab = 'viewImage'
  302. }
  303. }
  304. })
  305. },
  306. methods: {
  307. getProgressWidth(value, min, max) {
  308. if (max === min) return 0
  309. return ((value - min) / (max - min)) * 100
  310. },
  311. onSliderTouchStart(e, field, min, max) {
  312. this.sliderField = field
  313. this.sliderMin = min
  314. this.sliderMax = max
  315. const query = uni.createSelectorQuery().in(this)
  316. query.select('.custom-progress').boundingClientRect(rect => {
  317. this.sliderRect = rect
  318. }).exec()
  319. this.updateSliderValue(e.touches[0].clientX, field, min, max)
  320. },
  321. onSliderTouchMove(e, min, max) {
  322. if (!this.sliderField || !this.sliderRect) return
  323. this.updateSliderValue(e.touches[0].clientX, this.sliderField, min, max)
  324. },
  325. onSliderTouchEnd() {
  326. this.sliderField = ''
  327. },
  328. onSliderTap(e, field, min, max) {
  329. const query = uni.createSelectorQuery().in(this)
  330. query.select('.custom-progress').boundingClientRect(rect => {
  331. this.sliderRect = rect
  332. this.updateSliderValue(e.detail.x + rect.left, field, min, max)
  333. }).exec()
  334. },
  335. updateSliderValue(clientX, field, min, max) {
  336. if (!this.sliderRect) return
  337. let ratio = (clientX - this.sliderRect.left) / this.sliderRect.width
  338. ratio = Math.max(0, Math.min(1, ratio))
  339. const value = Math.round(min + ratio * (max - min))
  340. this.$set(this.equipContrlForm, field, value)
  341. },
  342. // u-switch 的 v-model 只会写入布尔值(active-value/inactive-value 仅作用于 change 事件),
  343. // 这里手动映射回后端约定的 '1'/'0' 字符串
  344. setDs(val) {
  345. this.$set(this.equipContrlForm, 'ds', val ? '1' : '0')
  346. },
  347. handleBack() {
  348. uni.navigateBack({
  349. delta: 1
  350. });
  351. },
  352. handleTabClick(tab) {
  353. this.activeTab = tab;
  354. },
  355. showMqttConfig(){
  356. this.show = true;
  357. },
  358. closeMqttConfig(){
  359. this.show = false;
  360. },
  361. async setDeviceContorl(type){
  362. const data = {
  363. device_type_id: 3,
  364. d_id: this.d_id,
  365. cmd: type,
  366. }
  367. if(type === 'imei'){
  368. data.imei = this.equipContrlForm.imei
  369. }else{
  370. delete data.imei
  371. }
  372. this.$myRequest({
  373. url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
  374. method: 'POST',
  375. data
  376. }).then(res => {
  377. this.closeMqttConfig()
  378. if (res) {
  379. uni.showToast({
  380. title: '设备控制修改成功!',
  381. icon: 'success',
  382. });
  383. } else {
  384. uni.showToast({
  385. title: '设备控制修改失败',
  386. icon: 'error',
  387. });
  388. }
  389. });
  390. },
  391. saveSettings(){
  392. let newForm = Object.assign({}, this.equipContrlForm) // 深拷贝
  393. newForm.st = newForm.st + ''
  394. newForm.et = newForm.et + ''
  395. newForm.st && newForm.st.slice(0, 2).charAt(0) != '0'
  396. ? newForm.st.slice(0, 2)
  397. : newForm.st.slice(1, 2)
  398. newForm.et =
  399. newForm.et && newForm.et.slice(0, 2).charAt(0) != '0'
  400. ? newForm.et.slice(0, 2)
  401. : newForm.et.slice(1, 2)
  402. for (let k in newForm) {
  403. if (typeof newForm[k] === 'number') {
  404. newForm[k] = newForm[k] + ''
  405. }
  406. }
  407. newForm.st = newForm.st.replace(':00', '')
  408. this.$myRequest({
  409. url: '/api/api_gateway?method=forecast.send_control.device_control',
  410. method: 'POST',
  411. data: {
  412. device_type_id: 3,
  413. device_model: this.device_model,
  414. d_id: this.d_id,
  415. config: JSON.stringify(newForm)
  416. }
  417. }).then(res => {
  418. if (res) {
  419. // 设备控制修改成功
  420. uni.showToast({
  421. title: '设备控制修改成功!',
  422. icon: 'success',
  423. });
  424. } else {
  425. uni.showToast({
  426. title: '设备控制修改失败',
  427. icon: 'error',
  428. });
  429. }
  430. })
  431. },
  432. async getControlDeviceConfigInfo(){
  433. const res = await this.$myRequest({
  434. url: '/api/api_gateway?method=forecast.send_control.device_control_info',
  435. method: 'POST',
  436. data: {
  437. d_id: this.d_id,
  438. cmd:'paramconf'
  439. },
  440. });
  441. this.equipContrlForm = res
  442. },
  443. }
  444. }
  445. </script>
  446. <style scoped lang="scss">
  447. .device-detail {
  448. display: flex;
  449. width: 100%;
  450. height: calc(100vh - 112rpx);
  451. padding-top: 112rpx;
  452. flex-direction: column;
  453. align-items: center;
  454. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  455. .device-detail__header {
  456. width: 100%;
  457. font-size: 28rpx;
  458. color: #999;
  459. color: #042118;
  460. font-family: 'Source Han Sans CN VF';
  461. font-weight: 700;
  462. position: relative;
  463. text-align: center;
  464. .arrow-left {
  465. position: absolute;
  466. left: 32rpx;
  467. margin-right: 12rpx;
  468. }
  469. }
  470. .device-detail__body {
  471. width: calc(100% - 64rpx);
  472. margin: 0 auto;
  473. border-radius: 16rpx;
  474. overflow-x: hidden;
  475. overflow-y: auto;
  476. // 隐藏滚动条
  477. -ms-overflow-style: none;
  478. scrollbar-width: none;
  479. }
  480. .tabs {
  481. margin: 24rpx 0;
  482. border-radius: 16rpx;
  483. padding: 16rpx 0;
  484. padding-top: 0;
  485. .tab-container{
  486. display: flex;
  487. width: 100%;
  488. height: 88rpx;
  489. line-height: 88rpx;
  490. text-align: center;
  491. font-size: 28rpx;
  492. font-weight: 700;
  493. color: #042118;
  494. font-family: 'Source Han Sans CN VF';
  495. }
  496. .tab-item {
  497. margin-right: 40rpx;
  498. color:#999999;
  499. }
  500. .active{
  501. position: relative;
  502. color: #303133;
  503. text-align: center;
  504. font-family: "Source Han Sans CN VF";
  505. font-size: 28rpx;
  506. font-weight: 700;
  507. &::after {
  508. content: '';
  509. position: absolute;
  510. bottom: 10rpx;
  511. left: 50%;
  512. transform: translateX(-50%);
  513. width: 100%;
  514. height: 36rpx;
  515. border-bottom: 6rpx solid #303133;
  516. }
  517. }
  518. }
  519. .device-detail-content{
  520. display: flex;
  521. padding: 24rpx 32rpx;
  522. flex-direction: column;
  523. align-items: flex-start;
  524. gap: 20rpx;
  525. border-radius: 16rpx;
  526. background: #FFF;
  527. .device-detail-item{
  528. .device-detail-label{
  529. color: #303133;
  530. font-family: "Source Han Sans CN VF";
  531. font-size: 28rpx;
  532. font-weight: 400;
  533. }
  534. .device-detail-btn-container{
  535. display: flex;
  536. gap: 24rpx;
  537. margin-top: 12rpx;
  538. }
  539. .device-detail-btn{
  540. display: flex;
  541. padding: 10rpx 16rpx;
  542. justify-content: center;
  543. align-items: center;
  544. gap: 16rpx;
  545. border-radius: 16rpx;
  546. background: #0BBC58;
  547. color: #ffffff;
  548. font-family: "Source Han Sans CN VF";
  549. font-size: 24rpx;
  550. font-weight: 400;
  551. }
  552. .force-btn{
  553. background: #FB4E52;
  554. }
  555. }
  556. .device-detail-viewImage{
  557. width: 100%;
  558. display: flex;
  559. justify-content: space-between;
  560. align-items: center;
  561. padding-bottom: 20rpx;
  562. }
  563. }
  564. .slider-container{
  565. position: relative;
  566. margin-bottom: 20rpx;
  567. .slider-min-value{
  568. position: absolute;
  569. left: 0;
  570. top: -50rpx;
  571. }
  572. .slider{
  573. width: 600rpx;
  574. }
  575. .slider-max-value{
  576. position: absolute;
  577. right: 0;
  578. top: -50rpx;
  579. }
  580. }
  581. .custom-progress{
  582. width: 600rpx;
  583. padding: 0;
  584. .progress-track{
  585. position: relative;
  586. height: 12rpx;
  587. background-color: #ebedf0;
  588. border-radius: 6rpx;
  589. }
  590. .progress-fill{
  591. position: absolute;
  592. left: 0;
  593. top: 0;
  594. height: 100%;
  595. background-color: #0BBC58;
  596. border-radius: 6rpx;
  597. transition: width 0.2s;
  598. }
  599. .progress-thumb{
  600. position: absolute;
  601. top: 50%;
  602. width: 28rpx;
  603. height: 28rpx;
  604. margin-left: -14rpx;
  605. margin-top: -14rpx;
  606. border-radius: 50%;
  607. background-color: #fff;
  608. box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  609. transition: left 0.2s;
  610. }
  611. }
  612. .device-detail-btn-footer{
  613. position: fixed;
  614. bottom: 0;
  615. left: 0;
  616. width: 100%;
  617. height: 112rpx;
  618. line-height: 112rpx;
  619. text-align: center;
  620. font-size: 28rpx;
  621. font-weight: 700;
  622. color: #042118;
  623. font-family: 'Source Han Sans CN VF';
  624. background: #ffffff;
  625. display: flex;
  626. justify-content: center;
  627. align-items: center;
  628. .device-detail-btn{
  629. display: flex;
  630. height: 80rpx;
  631. width: 90%;
  632. margin: 0 auto;
  633. padding: 0rpx 20rpx;
  634. justify-content: center;
  635. align-items: center;
  636. gap: 8rpx;
  637. border-radius: 16rpx;
  638. background:#0BBC58;
  639. color: #ffffff;
  640. text-align: center;
  641. font-family: "Source Han Sans CN VF";
  642. font-size: 14px;
  643. font-style: normal;
  644. font-weight: 500;
  645. }
  646. }
  647. }
  648. </style>