index.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630
  1. <template>
  2. <view>
  3. <view class="textbox">
  4. <view class="inputs">
  5. <u-search placeholder="请输入设备名称/编号" v-model="device_id" placeholder-color="#909696" :show-action="false"
  6. search-icon-color="#909696" @input="searchinput">
  7. </u-search>
  8. </view>
  9. <view class="tab">
  10. <view class="tab-content">
  11. <view class="tab-box tab-box-top">
  12. <view v-for="(item,index) in menuList" :key="index" @click="change(index,item)"
  13. v-if="isShow(item)"
  14. :class="['tab-item',current==index?'active':'']">
  15. <image class="img-icon" :src="item.app_menu_icon" mode=""></image>
  16. <view class="text">{{ getSlice(item.purview_name) }}</view>
  17. </view>
  18. </view>
  19. <u-empty v-if="!menuList.length && !loading" :image-size="100" text="暂无设备权限,请联系工作人员添加"></u-empty>
  20. </view>
  21. </view>
  22. <view class="listbox" v-if="menuList.length">
  23. <view class="second-tab">
  24. <view class="tab-box">
  25. <view
  26. v-for="(item,index) in list"
  27. :key="index"
  28. @click="changeDevice(item,index)"
  29. v-show="!item.url"
  30. :class="['tab-item',currents == index?'active':'']"
  31. >
  32. <text>{{item.purview_name}}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="third-tab">
  37. <view
  38. class="third-tab-item"
  39. @click="changeStatus('')"
  40. :class="{'active-tab' : device_status == ''}"
  41. >总计{{ counts }}</view>
  42. <view
  43. class="third-tab-item"
  44. @click="changeStatus('1')"
  45. :class="{'active-tab' : device_status == '1'}"
  46. >在线{{ online_counts }}</view>
  47. <view
  48. class="third-tab-item"
  49. @click="changeStatus('0')"
  50. :class="{'active-tab' : device_status == '0'}"
  51. >离线{{ offline_counts }}</view>
  52. </view>
  53. <scroll-view
  54. :scroll-top="0"
  55. :scroll-y="true"
  56. class="list scroll-Y"
  57. @scrolltoupper="upper"
  58. @scrolltolower="lower"
  59. @scroll="scroll"
  60. >
  61. <view class="list_item" v-for="(item, index) in eqlistdata" :key="index" @click="historys(item)">
  62. <view class="list_item_top">
  63. <view class="p1">
  64. <span class="title">{{ (item.name || '--' )}}</span>
  65. <span class="sub-title" @click.stop="modification(item)">信息修改</span>
  66. </view>
  67. <view class="online-status"
  68. v-if="item.status == 1 || item.is_online" >
  69. <image
  70. :src="$imageURL+'/bigdata_app/newImg/home/online1.png'"
  71. mode=""
  72. ></image>
  73. <text class="status-text-online">在线</text>
  74. </view>
  75. <view
  76. v-else
  77. class="online-status"
  78. >
  79. <image
  80. :src="$imageURL+'/bigdata_app/newImg/home/offline.png'"
  81. mode=""
  82. ></image>
  83. <text class="status-text-offline">离线</text>
  84. </view>
  85. </view>
  86. <view class="list_item_text">
  87. <view v-if="item.imei" class="p1">
  88. <text class="label">IMEI</text>{{ (item.dui || item.imei) }}
  89. </view>
  90. <view class="p1">
  91. <text class="label">设备ID</text>{{ item.only_for_show || item.id || item.device_id }}
  92. </view>
  93. <view class="p1">
  94. <text class="label">上报时间</text>{{ (item.report || item.uptime || item.upload_time) | timeFormat() }}
  95. </view>
  96. <view class="p1" style="display:flex;align-items: center;">
  97. <text class="label">设备位置</text>
  98. <text class="nav-label">{{ (item.address|| '无') }}</text>
  99. </view>
  100. <view class="action-list" style="display:flex;align-items: center;" v-if="type_id == 49">
  101. <view class="action-item">
  102. <image :src="lightning" alt="" class="item-icon">
  103. </image>
  104. <text>{{getcharging_vol(item.sensor_params)}}</text>
  105. </view>
  106. <view class="action-item">
  107. <image :src="getSignal(item.sensor_params)" alt="" class="item-icon">
  108. </image>
  109. <text>{{getrssl(item.sensor_params)}}</text>
  110. </view>
  111. <view class="action-item">
  112. <image :src="battery" alt="" class="item-icon">
  113. </image>
  114. <text>{{getopeningValue(item.sensor_params)}}%</text>
  115. </view>
  116. </view>
  117. <view class="action-container" v-if="type_id == 49">
  118. <view class="action-container-item" :class="n.switchValue?'action-container-container-item-active':''" v-for="(n,key) in getvalve_params(item)" :key="key">
  119. <view class="action-open">
  120. <view class="item-number" :class="{'item-number-active':n.switchValue}">{{n.name}}</view>
  121. <u-switch
  122. :value="n.switchValue"
  123. active-color="#0BBC58"
  124. @click.native="()=>changeSwitchStatus(n.value,n,item)"
  125. size="36"
  126. ></u-switch>
  127. </view>
  128. <view class="action-open-value" @click.stop="editHandle(n.value,n,item)" v-if="n.value != 0">
  129. <image :src="openingDegree" alt="" class="item-icon">
  130. </image>
  131. <text>{{n.value}}%</text>
  132. <u-icon name="edit-pen" color="#0BBC58"></u-icon>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="action-group" v-if="type_id == 49 && myuser_type == 4">
  137. <view class="action-item" @click="toControls(item)">分组控制</view>
  138. </view>
  139. </view>
  140. </view>
  141. </scroll-view>
  142. </view>
  143. </view>
  144. <view class="loading" v-if="loadingtf">
  145. <image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
  146. </view>
  147. <view class="top" v-if="isTop" @click="top">
  148. <image :src="$imageURL+'/bigdata_app' + '/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode=""></image>
  149. </view>
  150. <u-popup v-model="showPopup" mode="bottom">
  151. <u-form :model="form" label-width="160rpx" :label-style="{marginLeft:'20rpx'}">
  152. <u-form-item label="开启状态">
  153. <u-radio-group v-model="value">
  154. <u-radio
  155. v-for="(item, index) in radioList" :key="index"
  156. :name="item.value"
  157. active-color="#0BBC58"
  158. >
  159. {{item.name}}
  160. </u-radio>
  161. </u-radio-group>
  162. </u-form-item>
  163. <u-form-item label="开阀时间" v-if="value == 1">
  164. <view @click="show1 = true" class="hour">{{hour}} 小时</view>
  165. <!-- <view @click="show2 = true" class="minute">{{minute}} 分钟</view> -->
  166. </u-form-item>
  167. <u-form-item label="开度数值">
  168. <view class="slider-container">
  169. <view class="slider-min-value">10</view>
  170. <view
  171. :class="['custom-progress', { dragging: sliderDragging }]"
  172. @touchstart.stop="onSliderTouchStart($event, 'openingValue', 10, 100)"
  173. @touchmove.stop.prevent="onSliderTouchMove($event, 10, 100)"
  174. @touchend.stop="onSliderTouchEnd"
  175. @tap.stop="onSliderTap($event, 'openingValue', 10, 100)"
  176. >
  177. <view class="progress-track">
  178. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.openingValue, 10, 100) + '%' }"></view>
  179. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.openingValue, 10, 100) + '%' }"></view>
  180. </view>
  181. </view>
  182. <view class="slider-max-value">100</view>
  183. </view>
  184. <text style="margin-left: 20rpx">{{equipContrlForm.openingValue}}</text>
  185. </u-form-item>
  186. <u-button type="success" style="width: 94%;margin-left: 3%;margin-bottom: 40rpx" @click="submit">提交</u-button>
  187. </u-form>
  188. </u-popup>
  189. <u-popup v-model="showPopup2" mode="bottom">
  190. <u-form :model="form" label-width="160rpx" :label-style="{marginLeft:'20rpx'}">
  191. <u-form-item label="开度数值">
  192. <view class="slider-container">
  193. <view class="slider-min-value">10</view>
  194. <view
  195. :class="['custom-progress', { dragging: sliderDragging }]"
  196. @touchstart.stop="onSliderTouchStart($event, 'openingValue', 10, 100)"
  197. @touchmove.stop.prevent="onSliderTouchMove($event, 10, 100)"
  198. @touchend.stop="onSliderTouchEnd"
  199. @tap.stop="onSliderTap($event, 'openingValue', 10, 100)"
  200. >
  201. <view class="progress-track">
  202. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.openingValue, 10, 100) + '%' }"></view>
  203. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.openingValue, 10, 100) + '%' }"></view>
  204. </view>
  205. </view>
  206. <view class="slider-max-value">100</view>
  207. </view>
  208. <text style="margin-left: 20rpx">{{equipContrlForm.openingValue}}</text>
  209. </u-form-item>
  210. <u-button type="success" style="width: 94%;margin-left: 3%;margin-bottom: 40rpx" @click="submit2">提交</u-button>
  211. </u-form>
  212. </u-popup>
  213. <u-modal
  214. v-model="show3"
  215. :content="content"
  216. @confirm="confirmClose"
  217. @cancel="cancelClose"
  218. :mask-close-able="true"
  219. :show-cancel-button="true"
  220. ></u-modal>
  221. <u-select v-model="show1" :list="hours" @confirm="changeHour"></u-select>
  222. <u-select v-model="show2" :list="minutes" @confirm="changeMinute"></u-select>
  223. <u-popup v-model="show4" mode="center" width="80%" :mask-close-able="false">
  224. <view class="progress-container">
  225. <u-line-progress :percent="percentage" style="width: 90%;"></u-line-progress>
  226. </view>
  227. </u-popup>
  228. </view>
  229. </template>
  230. <script>
  231. import lightning from '../assets/lightning.png';
  232. import battery from '../assets/battery.png';
  233. import signal0 from '../assets/signal0.png';
  234. import signal1 from '../assets/signal1.png';
  235. import signal2 from '../assets/signal2.png';
  236. import signal3 from '../assets/signal3.png';
  237. import signal4 from '../assets/signal4.png';
  238. import signal5 from '../assets/signal5.png';
  239. import openingDegree from '../assets/openingDegree.png';
  240. import {
  241. Debounce,
  242. Throttle
  243. } from '../../util/anitthro.js';
  244. export default {
  245. data() {
  246. return {
  247. showPopup: false,
  248. showPopup2: false,
  249. show4: false,
  250. percentage: 0,
  251. openingValue: 60,
  252. show1: false,
  253. show2: false,
  254. show3: false,
  255. content:'确认关闭当前阀吗?',
  256. hours: [],
  257. value: 0,
  258. minutes: [],
  259. sensor_params:{},
  260. valve_params:[],
  261. currentRow: {},
  262. lightning,
  263. battery,
  264. radioList:[{
  265. name:'常开',
  266. value:0
  267. },
  268. {
  269. name:'定时',
  270. value:1
  271. }],
  272. form:{},
  273. openingDegree,
  274. signal0,
  275. signal1,
  276. signal2,
  277. signal3,
  278. signal4,
  279. signal5,
  280. list: [],
  281. hour: 1,
  282. minute: 0,
  283. pur_id: '',
  284. loading: false,
  285. currentPur_id:'',
  286. device_status: '',
  287. counts:0,
  288. online_counts:0,
  289. offline_counts:0,
  290. accessToken: '',
  291. current: 0,
  292. currents: 0,
  293. total: 0,
  294. refreshData:'',
  295. page: 1,
  296. size: 10,
  297. eqlistdata: [],
  298. isTop: false,
  299. device_model: '',
  300. infoalter: false, // 权限设置,
  301. type_id: 0, //设备类型,
  302. imgpath: [],
  303. loadingtf: false,
  304. width: 0, //顶部搜索栏宽度
  305. device_id: '', //搜索设备ID
  306. current_device_id: '', //当前设备ID
  307. menuList: [],
  308. sliderRect: {},
  309. sliderDragging: false,
  310. equipContrlForm: {
  311. openingValue: 60,
  312. },
  313. sliderField: '',
  314. sliderMin: 0,
  315. sliderMax: 0,
  316. timer: null,
  317. myuser_type: -1,
  318. valve_param_key: '',
  319. };
  320. },
  321. methods: {
  322. toControls(item){
  323. uni.navigateTo({
  324. url: '/pages/cb/zhamenFirst/controls?id=' + item.id,
  325. });
  326. },
  327. getvalve_params(item){
  328. return item?.valve_params || [];
  329. },
  330. getcharging_vol(item){
  331. return item?.charging_vol || 0;
  332. },
  333. getrssl(item){
  334. return item?.rssl || 0;
  335. },
  336. getopeningValue(item){
  337. return item?.kwh || 0;
  338. },
  339. getRadioValue(){
  340. return this.value;
  341. },
  342. setPercentage(msg){
  343. this.timer = setInterval(() => {
  344. this.percentage += 1;
  345. if(this.percentage >= 100){
  346. this.percentage = 100;
  347. uni.showToast({
  348. title: msg,
  349. icon: 'none',
  350. });
  351. clearInterval(this.timer);
  352. this.show4 = false;
  353. this.percentage = 0;
  354. this.eqlist();
  355. }
  356. }, 125);
  357. },
  358. getSignal(item){
  359. const val = item?.rssl || 0;
  360. if(val < 0){
  361. return this.signal0;
  362. }
  363. if(val > 5){
  364. return this.signal5;
  365. }
  366. return this['signal' + val];
  367. },
  368. confirmClose(){
  369. this.closeValve();
  370. },
  371. cancelClose(){
  372. this.show3 = false;
  373. },
  374. editHandle(openingValue,item,device){
  375. this.valve_param_key = item.key;
  376. this.current_device_id = device.id;
  377. this.showPopup2 = true;
  378. this.equipContrlForm.openingValue = openingValue;
  379. },
  380. changeHour(e){
  381. this.hour = e[0].value
  382. },
  383. changeMinute(e){
  384. this.minute = e[0].value
  385. },
  386. getProgressWidth(value, min, max) {
  387. if (max === min) return 0
  388. return ((value - min) / (max - min)) * 100
  389. },
  390. getModel(value){
  391. return value == 0 ? false : true
  392. },
  393. async closeValve(){
  394. const res = await this.$myRequest({
  395. url: '/api/api_gateway?method=irrigation_system.valvecontrol.close_valvecontrol_valve',
  396. method: 'POST',
  397. data: {
  398. device_id: this.current_device_id,
  399. valve_param_key: this.valve_param_key
  400. },
  401. });
  402. if(res.code == 0){
  403. this.show4 = true;
  404. this.setPercentage(res.message);
  405. }else{
  406. uni.showToast({
  407. title: res?.message,
  408. icon: 'none',
  409. });
  410. }
  411. },
  412. async setAction(data){
  413. const res = await this.$myRequest({
  414. url: '/api/api_gateway?method=irrigation_system.valvecontrol.open_valvecontrol_valve',
  415. method: 'POST',
  416. data,
  417. });
  418. if(res.code == 0){
  419. this.show4 = true;
  420. this.setPercentage(res.message);
  421. }else{
  422. uni.showToast({
  423. title: res?.message,
  424. icon: 'none',
  425. });
  426. }
  427. },
  428. async setEditAction(data){
  429. const res = await this.$myRequest({
  430. url: '/api/api_gateway?method=irrigation_system.valvecontrol.alter_valvecontrol_valve_percentage',
  431. method: 'POST',
  432. data,
  433. });
  434. if(res.code == 0){
  435. this.show4 = true;
  436. this.setPercentage(res.message);
  437. }else{
  438. uni.showToast({
  439. title: res?.message,
  440. icon: 'none',
  441. });
  442. }
  443. },
  444. onSliderTouchStart(e, field, min, max) {
  445. this.sliderDragging = true
  446. this.sliderField = field
  447. this.sliderMin = min
  448. this.sliderMax = max
  449. const query = uni.createSelectorQuery().in(this)
  450. query.select('.custom-progress').boundingClientRect(rect => {
  451. this.sliderRect = rect
  452. }).exec()
  453. this.updateSliderValue(e.touches[0].clientX, field, min, max)
  454. },
  455. onSliderTouchMove(e, min, max) {
  456. if (!this.sliderField || !this.sliderRect) return
  457. this.updateSliderValue(e.touches[0].clientX, this.sliderField, min, max)
  458. },
  459. onSliderTouchEnd() {
  460. this.sliderField = ''
  461. this.sliderDragging = false
  462. },
  463. onSliderTap(e, field, min, max) {
  464. const query = uni.createSelectorQuery().in(this)
  465. query.select('.custom-progress').boundingClientRect(rect => {
  466. this.sliderRect = rect
  467. this.updateSliderValue(e.detail.x + rect.left, field, min, max)
  468. }).exec()
  469. },
  470. updateSliderValue(clientX, field, min, max) {
  471. if (!this.sliderRect) return
  472. let ratio = (clientX - this.sliderRect.left) / this.sliderRect.width
  473. ratio = Math.max(0, Math.min(1, ratio))
  474. const value = Math.round(min + ratio * (max - min))
  475. if (this.equipContrlForm[field] === value) return
  476. this.$set(this.equipContrlForm, field, value)
  477. },
  478. submit(){
  479. this.setAction({
  480. device_id: this.current_device_id,
  481. valve_param_key: this.valve_param_key,
  482. var_value: this.equipContrlForm.openingValue,
  483. valve_delayed: this.value == 0 ? 0 : Number(this.hour) * 60 + Number(this.minute)
  484. })
  485. this.showPopup = false;
  486. },
  487. submit2(){
  488. this.setEditAction({
  489. device_id: this.current_device_id,
  490. valve_param_key: this.valve_param_key,
  491. var_value: this.equipContrlForm.openingValue,
  492. })
  493. this.showPopup2 = false;
  494. },
  495. getHours(){
  496. for(let i = 1; i <= 12; i++){
  497. this.hours.push({
  498. label: i + ' 时',
  499. value: i,
  500. })
  501. }
  502. },
  503. getMinutes(){
  504. for(let i = 0; i < 60; i++){
  505. this.minutes.push({
  506. label: i + ' 分',
  507. value: i,
  508. })
  509. }
  510. },
  511. isShow(item){
  512. return item.pur_id != 422
  513. },
  514. getSlice(name){
  515. return name.slice(0,4)
  516. },
  517. modification(item) {
  518. uni.navigateTo({
  519. url:
  520. './seabox/modification?data=' +
  521. JSON.stringify(item) +
  522. '&id=' +
  523. this.type_id,
  524. });
  525. },
  526. changeSwitchStatus(status,item,device){
  527. this.valve_param_key = item.key;
  528. this.current_device_id = device.id;
  529. if(status == 0){
  530. this.equipContrlForm.openingValue = 40;
  531. this.showPopup = true;
  532. this.currentRow = item;
  533. }else{
  534. this.show3 = true;
  535. }
  536. },
  537. changeStatus(status){
  538. this.device_status = status;
  539. Debounce(() => {
  540. this.page = 1;
  541. this.eqlist();
  542. }, 500)();
  543. },
  544. async getUserlogin() {
  545. this.list = [];
  546. this.loading = true;
  547. const res = await this.$myRequest({
  548. url: '/api/api_gateway?method=user.login.user_login_info',
  549. method: 'POST',
  550. data: {
  551. is_app: 1,
  552. },
  553. });
  554. this.loading = false;
  555. res.forEach(item=>{
  556. item.icon = '/bigdata_app/newImg/home/sqjd.png'
  557. })
  558. const menulist = res || [];
  559. const menuItem = menulist.find(item => item.purview_name == '智慧物联')
  560. this.menuList = menuItem.children || [];
  561. if(this.menuList.length == 0){
  562. //提示暂无分配权限
  563. uni.showToast({
  564. title: '暂无分配权限,请联系工作人员',
  565. icon: 'none',
  566. });
  567. return
  568. }
  569. if(!this.pur_id){
  570. this.list = this.menuList[0].children || []
  571. this.pur_id = this.menuList[0].pur_id || '';
  572. this.current = 0;
  573. }else{
  574. this.list = this.menuList.find(item => item.pur_id == this.pur_id)?.children || []
  575. this.pur_id = this.menuList.find(item => item.pur_id == this.pur_id)?.pur_id || '';
  576. this.current = this.menuList.findIndex(item => item.pur_id == this.pur_id);
  577. }
  578. if(this.list.length > 1){
  579. if(this.list[0].purview_name != '全部'){
  580. this.list.unshift({
  581. device_type_id: '',
  582. purview_name: '全部'
  583. })
  584. }
  585. }
  586. const firstChild = this.list[0];
  587. this.type_id = firstChild.device_type_id;
  588. if(firstChild.device_type_id !== ''){
  589. this.device_model = firstChild?.device_model || '';
  590. }else{
  591. this.device_model = '';
  592. }
  593. this.initPage();
  594. },
  595. async eqlist(tf) {
  596. this.counts = 0;
  597. this.online_counts = 0;
  598. this.offline_counts = 0;
  599. this.loadingtf = true;
  600. let data = {
  601. device_type_id: this.type_id,
  602. page_num: this.page,
  603. page_size: this.size,
  604. pur_id: this.pur_id,
  605. device_status: this.device_status,
  606. device_id: this.device_id,
  607. device_model: this.device_model
  608. }
  609. const res = await this.$myRequest({
  610. url: '/api/api_gateway?method=device.app_device.app_device_list',
  611. data: data,
  612. });
  613. this.loadingtf = false;
  614. const status = res?.status || {};
  615. this.online_counts = status.online || 0;
  616. this.offline_counts = status.offline || 0;
  617. this.counts = (status.online || 0) + (status.offline || 0);
  618. this.total = res.total || 0;
  619. const resData = res?.data;
  620. resData.forEach(item=>{
  621. if(item.type_id == 49 && item.valve_params.length){
  622. item.valve_params.forEach(param=>{
  623. param.switchValue = param.value == 0 ? false : true;
  624. })
  625. }
  626. })
  627. console.log(resData,'resDasadsdss')
  628. if (tf) {
  629. this.eqlistdata = this.eqlistdata.concat(resData);
  630. } else {
  631. this.eqlistdata = resData;
  632. }
  633. },
  634. change(index,itemData) {
  635. this.list = this.menuList[index].children || []
  636. const list = [];
  637. this.list.forEach(item=>{
  638. if(item.url){
  639. list.push(item)
  640. }
  641. })
  642. // if(list.length > 1){
  643. // if(this.list[0].purview_name != '全部'){
  644. // this.list.unshift({
  645. // device_type_id: '',
  646. // purview_name: '全部'
  647. // })
  648. // }
  649. // }
  650. this.current = index;
  651. const item = this.list[0];
  652. this.pur_id = itemData.pur_id || '';
  653. // this.changeDevice(item,0);
  654. },
  655. changeDevice(item,index){
  656. this.currents = index;
  657. this.currentPur_id = item.pur_id || '';
  658. const name = item.menu;
  659. if (name === 'cbd4') {
  660. this.device_model = 11;
  661. } else if(name === 'cbd1'){
  662. this.device_model = 12;
  663. } else if(name === 'cbd3'){
  664. this.device_model = '';
  665. } else if(name === 'cbd5'){
  666. this.device_model = 13;
  667. } else if(name === 'cbd6'){
  668. this.device_model = 14;
  669. }else if(name === 'gkcbd1'){
  670. this.device_model = 15;
  671. } else if(name === 'zhiCbd'){
  672. this.device_model = 16;
  673. } else {
  674. this.device_model = item.device_model || '';
  675. }
  676. this.page = 1;
  677. this.eqlistdata = [];
  678. this.type_id = item.device_type_id;
  679. Debounce(() => {
  680. this.eqlist();
  681. }, 500)();
  682. },
  683. top() {
  684. uni.pageScrollTo({
  685. scrollTop: 0,
  686. duration: 500,
  687. });
  688. },
  689. initPage(){
  690. this.eqlistdata = [];
  691. this.currents = 0;
  692. this.page = 1;
  693. Debounce(() => {
  694. this.eqlist();
  695. }, 500)();
  696. this.width = 0;
  697. },
  698. historys(item) {
  699. const type_id = item.type_id;
  700. this.accessToken = uni.getStorageSync('session_key')
  701. switch (type_id) {
  702. // 水肥新设备
  703. case 49:
  704. return;
  705. case 22:
  706. var obj = {};
  707. obj.d_id = item.d_id;
  708. obj.device_id = item.id;
  709. obj.is_online = item.status;
  710. obj.lat = item.lat;
  711. obj.lng = item.lng;
  712. obj.equip_name = item.name;
  713. obj.uptime = item.uptime;
  714. uni.navigateTo({
  715. url: '../waterandfernew/details?shebei=' + JSON.stringify(obj),
  716. });
  717. break;
  718. // 病虫害可视监测
  719. case 14:
  720. item.addtime = item.uptime;
  721. uni.navigateTo({
  722. url: '../cb/sy/detail?detail=' + JSON.stringify(item),
  723. });
  724. // uni.navigateTo({
  725. // url: '../sy/detail?info=' +
  726. // JSON.stringify(item) + '&cmd=sy',
  727. // });
  728. break;
  729. case 2:
  730. item.addtime = item.uptime;
  731. if(item.device_model == 102){
  732. uni.navigateTo({
  733. url: '../scd/detail?info=' + JSON.stringify(item),
  734. });
  735. }else{
  736. uni.navigateTo({
  737. url: '../prevention/equipmentdetails?shebei=' + JSON.stringify(item),
  738. });
  739. }
  740. break;
  741. case 38:
  742. uni.navigateTo({
  743. url: `../deviceDetails/weatherStation1/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
  744. });
  745. break;
  746. // var obj = {};
  747. // obj.d_id = item.d_id;
  748. // obj.equip_id = item.id;
  749. // obj.is_online = item.status;
  750. // obj.lat = item.lat;
  751. // obj.lng = item.lng;
  752. // obj.equip_name = item.name;
  753. // obj.uptime = item.uptime;
  754. // uni.navigateTo({
  755. // url: '../environment/equipment-new?shebei=' + JSON.stringify(obj),
  756. // });
  757. break;
  758. case 5:
  759. var obj = {};
  760. obj.d_id = item.d_id;
  761. obj.equip_id = item.id;
  762. obj.is_online = item.status;
  763. obj.lat = item.lat;
  764. obj.lng = item.lng;
  765. obj.equip_name = item.name;
  766. obj.uptime = item.uptime;
  767. // uni.navigateTo({
  768. // url: '../environment/equipment?shebei=' + JSON.stringify(obj),
  769. // });
  770. uni.navigateTo({
  771. url: `../deviceDetails/weatherStation2/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
  772. });
  773. break;
  774. case 6:
  775. uni.navigateTo({
  776. url: '/pages/webview?device_id=' +
  777. item.id +
  778. '&accessToken=' +
  779. this.accessToken,
  780. });
  781. break;
  782. case 44:
  783. uni.navigateTo({
  784. url:
  785. '/pages/webviewdgp?device_id=' +
  786. item.id +
  787. '&accessToken=' +
  788. uni.getStorageSync('session_key') +
  789. '&type=dgp',
  790. });
  791. break;
  792. case 3:
  793. item.addtime = item.uptime;
  794. item.type = item.type_id;
  795. uni.navigateTo({
  796. url: '../cbd/detail?info=' + JSON.stringify(item),
  797. });
  798. break;
  799. case 28:
  800. item.addtime = item.uptime;
  801. item.type = item.type_id;
  802. uni.navigateTo({
  803. url: '../cb/smallPest/smallPest?info=' + JSON.stringify(item),
  804. });
  805. break;
  806. case 4:
  807. item.addtime = item.uptime;
  808. item.type = item.type_id;
  809. uni.navigateTo({
  810. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  811. });
  812. break;
  813. case 32:
  814. case 35:
  815. item.addtime = item.uptime;
  816. item.type = item.type_id;
  817. uni.navigateTo({
  818. url: '../cb/equip-detail/equip-detail-new?info=' +
  819. JSON.stringify(item),
  820. });
  821. break;
  822. case 33:
  823. case 34:
  824. item.addtime = item.uptime;
  825. item.type = item.type_id;
  826. let cmd = ''
  827. if(type_id == 34){
  828. cmd = 'sy1'
  829. }else if(type_id == 33){
  830. cmd = 'sy2'
  831. }
  832. uni.navigateTo({
  833. url: '../sy/detail?info=' +
  834. JSON.stringify(item) + '&cmd=' + cmd,
  835. });
  836. break;
  837. case 7:
  838. item.addtime = item.uptime;
  839. item.type = item.type_id;
  840. // uni.navigateTo({
  841. // url: '../bzy/detail?info=' + JSON.stringify(item),
  842. // });
  843. if(item.pur_id == 458){
  844. uni.navigateTo({
  845. url: '../bzy/detail?info=' + JSON.stringify(item),
  846. });
  847. }else{
  848. uni.navigateTo({
  849. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  850. });
  851. }
  852. break;
  853. case 8:
  854. uni.navigateTo({
  855. url: '../cb/thxydetail/thxydetail?imei=' + item.id,
  856. });
  857. break;
  858. case 29:
  859. uni.navigateTo({
  860. url: `../cb/nlNewXy/nlNewXy?imei=${item.id}&showId=${item.d_id}`,
  861. });
  862. break;
  863. case 24:
  864. uni.navigateTo({
  865. url: '../cb/zjxydetail/thxydetail?imei=' + item.id,
  866. });
  867. break;
  868. case 12:
  869. item.addtime = item.uptime;
  870. uni.navigateTo({
  871. url: '../cb/xctdetail/xctdetail?info=' + JSON.stringify(item),
  872. });
  873. break;
  874. case 13:
  875. var obj = {};
  876. obj.d_id = item.d_id;
  877. obj.device_id = item.id;
  878. obj.is_online = item.status;
  879. obj.lat = item.lat;
  880. obj.lng = item.lng;
  881. obj.equip_name = item.name;
  882. obj.uptime = item.uptime;
  883. uni.navigateTo({
  884. url: '../waterandfer/datails?shebei=' + JSON.stringify(obj),
  885. });
  886. break;
  887. case 15:
  888. var obj = {};
  889. obj.d_id = item.d_id;
  890. obj.device_id = item.id;
  891. obj.is_online = item.status;
  892. obj.lat = item.lat;
  893. obj.lng = item.lng;
  894. obj.equip_name = item.name;
  895. obj.uptime = item.uptime;
  896. obj.address = item.address || '无';
  897. // uni.navigateTo({
  898. // url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
  899. // });
  900. uni.navigateTo({
  901. url: `../deviceDetails/SoilMoisturelist/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
  902. });
  903. break;
  904. case 17:
  905. break;
  906. case 18:
  907. var obj = {};
  908. obj.device_id = item.id;
  909. obj.is_online = item.status;
  910. uni.navigateTo({
  911. url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
  912. });
  913. break;
  914. case 43:
  915. uni.navigateTo({
  916. url: "/pages/fmSys/details?info=" + JSON.stringify(item)
  917. })
  918. break;
  919. // case 44:
  920. // uni.navigateTo({
  921. // url: "/pages/webviewdgp/webview?device_id=" + item.id + "&accessToken=" + this.accessToken || uni
  922. // .getStorageSync('session_key') +
  923. // '&type=dgp'
  924. // })
  925. // break;
  926. case 11:
  927. var obj = {};
  928. obj.d_id = item.d_id;
  929. obj.device_id = item.id;
  930. obj.is_online = item.status;
  931. obj.lat = item.lat;
  932. obj.lng = item.lng;
  933. obj.equip_name = item.name;
  934. obj.uptime = item.uptime;
  935. obj.location = item.address;
  936. obj.type = 11;
  937. uni.navigateTo({
  938. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  939. });
  940. break;
  941. case 19:
  942. var obj = {};
  943. obj.d_id = item.d_id;
  944. obj.device_id = item.id;
  945. obj.is_online = item.status;
  946. obj.lat = item.lat;
  947. obj.lng = item.lng;
  948. obj.equip_name = item.name;
  949. obj.uptime = item.uptime;
  950. obj.location = item.address;
  951. obj.type = 19;
  952. uni.navigateTo({
  953. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  954. });
  955. break;
  956. case 20:
  957. var obj = {};
  958. obj.d_id = item.d_id;
  959. obj.device_id = item.id;
  960. obj.is_online = item.status;
  961. obj.lat = item.lat;
  962. obj.lng = item.lng;
  963. obj.equip_name = item.name;
  964. obj.uptime = item.uptime;
  965. obj.location = item.address;
  966. obj.type = 20;
  967. uni.navigateTo({
  968. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  969. });
  970. break;
  971. case 21:
  972. var obj = {};
  973. obj.d_id = item.d_id;
  974. obj.device_id = item.id;
  975. obj.is_online = item.status;
  976. obj.lat = item.lat;
  977. obj.lng = item.lng;
  978. obj.equip_name = item.name;
  979. obj.uptime = item.uptime;
  980. obj.location = item.address;
  981. obj.type = 21;
  982. uni.navigateTo({
  983. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  984. });
  985. break;
  986. case 26:
  987. var obj = {};
  988. obj.d_id = item.d_id;
  989. obj.device_id = item.id;
  990. obj.is_online = item.status;
  991. obj.lat = item.lat;
  992. obj.lng = item.lng;
  993. obj.equip_name = item.name;
  994. obj.uptime = item.uptime;
  995. obj.location = item.address;
  996. obj.type = 26;
  997. uni.navigateTo({
  998. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  999. });
  1000. break;
  1001. case 27:
  1002. var obj = {};
  1003. obj.d_id = item.d_id;
  1004. obj.device_id = item.id;
  1005. obj.is_online = item.status;
  1006. obj.lat = item.lat;
  1007. obj.lng = item.lng;
  1008. obj.equip_name = item.name;
  1009. obj.uptime = item.uptime;
  1010. obj.location = item.address;
  1011. obj.type = 26;
  1012. uni.navigateTo({
  1013. url: '../disease/mls/mls?shebei=' + JSON.stringify(obj),
  1014. });
  1015. break;
  1016. case 25:
  1017. item.addtime = item.uptime;
  1018. uni.navigateTo({
  1019. url: '../cb/xylps/detail?detail=' + JSON.stringify(item),
  1020. });
  1021. break;
  1022. case 40:
  1023. item.addtime = item.uptime;
  1024. uni.navigateTo({
  1025. url: `../cb/shuifeizs/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1026. });
  1027. break;
  1028. case 42:
  1029. item.addtime = item.uptime;
  1030. uni.navigateTo({
  1031. url: `../cb/wenshizs/wenshizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1032. });
  1033. break;
  1034. case 45:
  1035. item.addtime = item.uptime;
  1036. uni.navigateTo({
  1037. url: `../cb/shuifeizsFirst/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1038. });
  1039. break;
  1040. case 46:
  1041. uni.navigateTo({
  1042. url: `../deviceDetails/weatherStation/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
  1043. });
  1044. break;
  1045. case 47:
  1046. uni.navigateTo({
  1047. url: `../cb/zhamenFirst/zhamenzs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1048. });
  1049. break;
  1050. default:
  1051. item.addtime = item.uptime;
  1052. item.type = this.type_id;
  1053. uni.navigateTo({
  1054. url: '../cb/xy2.0/particulars?info=' + JSON.stringify(item),
  1055. });
  1056. break;
  1057. }
  1058. },
  1059. searchinput() {
  1060. Debounce(() => {
  1061. this.eqlistdata = [];
  1062. this.page = 1;
  1063. this.eqlist();
  1064. }, 1000)();
  1065. },
  1066. scrollTop(e) {},
  1067. upper() {},
  1068. lower() {
  1069. if(this.eqlistdata.length >= this.total){
  1070. return;
  1071. }
  1072. Debounce(() => {
  1073. this.page++;
  1074. this.eqlist(true);
  1075. }, 500)();
  1076. },
  1077. scroll() {},
  1078. },
  1079. watch:{
  1080. pur_id(){
  1081. setTimeout(() => {
  1082. this.getUserlogin();
  1083. }, 100);
  1084. },
  1085. },
  1086. onLoad() {
  1087. this.getHours();
  1088. this.getMinutes();
  1089. const that = this;
  1090. uni.$on('purId', (item) => {
  1091. that.pur_id = item.purId;
  1092. that.menu = item.menu;
  1093. that.device_model = item.device_model;
  1094. });
  1095. uni.$on('refreshData', (refreshData) => {
  1096. this.eqlist();
  1097. });
  1098. uni.getStorage({
  1099. key:"myuser_type",
  1100. success:(res)=>{
  1101. this.myuser_type = res?.data;
  1102. }
  1103. })
  1104. this.getUserlogin();
  1105. },
  1106. onShow() {
  1107. // 监听刷新数据事件
  1108. const refreshData = uni.getStorageSync('refreshData');
  1109. if(!this.refreshData){
  1110. this.refreshData = refreshData;
  1111. // 如果发生改变,刷新数据
  1112. if(refreshData){
  1113. Debounce(() => {
  1114. this.getUserlogin();
  1115. }, 500)();
  1116. }
  1117. }else if(this.refreshData != refreshData){
  1118. this.refreshData = refreshData;
  1119. Debounce(() => {
  1120. this.getUserlogin();
  1121. }, 500)();
  1122. }
  1123. },
  1124. onTabItemTap(e) {
  1125. },
  1126. onReachBottom() {
  1127. if(this.eqlistdata.length >= this.total){
  1128. return;
  1129. }
  1130. Debounce(() => {
  1131. this.page++;
  1132. this.eqlist(true);
  1133. }, 500)();
  1134. },
  1135. onPageScroll(e) {
  1136. //nvue暂不支持滚动监听,可用bindingx代替
  1137. if (e.scrollTop > 200) {
  1138. //距离大于200时显示
  1139. this.isTop = true;
  1140. } else {
  1141. //距离小于200时隐藏
  1142. this.isTop = false;
  1143. }
  1144. },
  1145. };
  1146. </script>
  1147. <style lang="scss">
  1148. page {
  1149. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  1150. }
  1151. ::v-deep .u-flex{
  1152. display: flex;
  1153. align-items: center;
  1154. justify-content: center;
  1155. }
  1156. .hour,.minute{
  1157. font-size: 28rpx;
  1158. color: #999999;
  1159. border-radius: 8rpx;
  1160. border: 2rpx solid #aaa;
  1161. padding: 4rpx 8rpx;
  1162. margin-right: 8rpx;
  1163. height: 40rpx;
  1164. display: flex;
  1165. align-items: center;
  1166. justify-content: center;
  1167. width: 160rpx;
  1168. }
  1169. /deep/.uni-icons {
  1170. font-size: 40rpx !important;
  1171. }
  1172. input{
  1173. background: transparent !important;
  1174. }
  1175. .textbox {
  1176. width: 100%;
  1177. height: calc(100vh - 82rpx);
  1178. padding-top: 82rpx;
  1179. box-sizing: border-box;
  1180. }
  1181. .inputs {
  1182. width: 65%;
  1183. margin-left: 12rpx;
  1184. /deep/.u-content {
  1185. background-color: #fff !important;
  1186. }
  1187. /deep/.uni-input-wrapper {
  1188. background-color: #fff !important;
  1189. }
  1190. }
  1191. .slider-container{
  1192. position: relative;
  1193. margin-top: 10rpx;
  1194. .slider-min-value{
  1195. position: absolute;
  1196. left: 0;
  1197. top: -60rpx;
  1198. }
  1199. .slider{
  1200. width: 600rpx;
  1201. }
  1202. .slider-max-value{
  1203. position: absolute;
  1204. right: 0;
  1205. top: -60rpx;
  1206. }
  1207. }
  1208. .custom-progress{
  1209. width: 500rpx;
  1210. padding: 0;
  1211. &.dragging{
  1212. .progress-fill,
  1213. .progress-thumb{
  1214. transition: none;
  1215. }
  1216. }
  1217. .progress-track{
  1218. position: relative;
  1219. height: 12rpx;
  1220. background-color: #ebedf0;
  1221. border-radius: 6rpx;
  1222. }
  1223. .progress-fill{
  1224. position: absolute;
  1225. left: 0;
  1226. top: 0;
  1227. height: 100%;
  1228. background-color: #0BBC58;
  1229. border-radius: 6rpx;
  1230. transition: width 0.2s;
  1231. }
  1232. .progress-thumb{
  1233. position: absolute;
  1234. top: 50%;
  1235. width: 28rpx;
  1236. height: 28rpx;
  1237. margin-left: -14rpx;
  1238. margin-top: -14rpx;
  1239. border-radius: 50%;
  1240. background-color: #fff;
  1241. box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  1242. transition: left 0.2s;
  1243. }
  1244. }
  1245. .utabs_box {
  1246. width: 100%;
  1247. position: fixed;
  1248. top: 88px;
  1249. background-color: #ffffff;
  1250. z-index: 100;
  1251. .utabs {
  1252. width: 95%;
  1253. margin: 0 auto;
  1254. }
  1255. }
  1256. .opening-container{
  1257. position: relative;
  1258. width: 100%;
  1259. .opening-min{
  1260. position: absolute;
  1261. top: 0;
  1262. left: 0;
  1263. font-size: 24rpx;
  1264. }
  1265. .opening-max{
  1266. position: absolute;
  1267. top: 0;
  1268. right: 0;
  1269. font-size: 24rpx;
  1270. }
  1271. }
  1272. .loading {
  1273. position: fixed;
  1274. top: 440px;
  1275. width: 95%;
  1276. left: 2.5%;
  1277. text-align: center;
  1278. .img {
  1279. width: 300rpx;
  1280. height: 40rpx;
  1281. }
  1282. }
  1283. .active-tab{
  1284. border-radius: 8rpx;
  1285. background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
  1286. }
  1287. .tab-box {
  1288. font-size: 30rpx;
  1289. box-sizing: border-box;
  1290. width: 100%;
  1291. height: 100%;
  1292. overflow-y: hidden;
  1293. overflow-x: auto;
  1294. white-space: nowrap;
  1295. // 去掉滚动条
  1296. -ms-overflow-style: none;
  1297. scrollbar-width: none;
  1298. .tab-item {
  1299. cursor: pointer;
  1300. position: relative;
  1301. text-align: center;
  1302. display: inline-block;
  1303. padding: 16rpx 24rpx;
  1304. box-sizing: border-box;
  1305. span {
  1306. display: inline-block;
  1307. }
  1308. }
  1309. }
  1310. .tab-box-top{
  1311. .tab-item {
  1312. width: 140rpx;
  1313. text-align: center;
  1314. }
  1315. }
  1316. .action-list{
  1317. display: flex;
  1318. margin: 8px 0;
  1319. .action-item{
  1320. display: flex;
  1321. align-items: center;
  1322. margin-right: 8px;
  1323. .item-icon{
  1324. width: 15px;
  1325. height: 15px;
  1326. margin-right: 4px;
  1327. }
  1328. }
  1329. }
  1330. .action-container{
  1331. display: flex;
  1332. align-items: center;
  1333. gap: 16rpx;
  1334. .action-container-item{
  1335. flex:1;
  1336. height: 90rpx;
  1337. border-radius: 8rpx;
  1338. background: #ffffff;
  1339. padding: 8rpx;
  1340. border: 2rpx solid #999999;
  1341. }
  1342. .action-container-container-item-active{
  1343. border: 2rpx solid #0BBC58;
  1344. }
  1345. .action-open{
  1346. width: 100%;
  1347. display: flex;
  1348. justify-content: center;
  1349. align-items: center;
  1350. }
  1351. .item-number{
  1352. width: 30rpx;
  1353. height: 30rpx;
  1354. line-height: 30rpx;
  1355. display: flex;
  1356. justify-content: center;
  1357. align-items: center;
  1358. border-radius: 50%;
  1359. border: 2rpx solid #999999;
  1360. color: #999999;
  1361. font-size: 22rpx;
  1362. margin-right: 8rpx;
  1363. //超出部分省略号
  1364. overflow: hidden;
  1365. white-space: nowrap;
  1366. text-overflow: ellipsis;
  1367. }
  1368. .item-number-active{
  1369. border: 2rpx solid #0BBC58;
  1370. color: #0BBC58;
  1371. }
  1372. .action-open-value{
  1373. margin-top: 8rpx;
  1374. display: flex;
  1375. align-items: center;
  1376. justify-content: center;
  1377. font-size: 24rpx;
  1378. }
  1379. .item-icon{
  1380. width: 15px;
  1381. height: 15px;
  1382. margin-right: 4px;
  1383. }
  1384. }
  1385. .progress-container{
  1386. display: flex;
  1387. justify-content: center;
  1388. align-items: center;
  1389. height:100%;
  1390. }
  1391. .tab {
  1392. // background-color: #0BBC58;
  1393. margin-top: 42rpx;
  1394. margin-bottom: 38rpx;
  1395. padding: 0 32rpx;
  1396. .img-icon {
  1397. width: 80rpx;
  1398. height: 80rpx;
  1399. margin-bottom: 12rpx;
  1400. }
  1401. .text {
  1402. color: #303133;
  1403. font-size: 24rpx;
  1404. }
  1405. .tab-content {
  1406. width: 100%;
  1407. height: 162rpx;
  1408. }
  1409. .tab-item.active {
  1410. border-radius: 24rpx;
  1411. background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
  1412. }
  1413. }
  1414. .action-group{
  1415. display: flex;
  1416. align-items: center;
  1417. gap: 16rpx;
  1418. margin-top: 24rpx;
  1419. .action-item{
  1420. display: flex;
  1421. align-items: center;
  1422. justify-content: center;
  1423. flex:1;
  1424. text-align: center;
  1425. border-radius: 8rpx;
  1426. border:2rpx solid #0BBC58;
  1427. padding: 16rpx 0;
  1428. font-size: 24rpx;
  1429. color: #0BBC58;
  1430. .item-icon{
  1431. width: 15px;
  1432. height: 15px;
  1433. margin-right: 4px;
  1434. }
  1435. }
  1436. }
  1437. .second-tab {
  1438. height: 80rpx;
  1439. .tab-item{
  1440. font-size: 28rpx;
  1441. color: #999999;
  1442. }
  1443. .tab-item.active {
  1444. color: #303133;
  1445. font-weight: 700;
  1446. }
  1447. .tab-item.active::after {
  1448. content: '';
  1449. position: absolute;
  1450. bottom: 0;
  1451. left: 50%;
  1452. transform: translateX(-50%);
  1453. width: 18px; /* 比文字略宽 */
  1454. height: 18px;
  1455. border: 3px solid #0BBC58;
  1456. border-radius: 50%;
  1457. border-color: transparent; /* 隐藏其他部分 */
  1458. border-bottom-color: #0BBC58; /* 组合成45度角 */
  1459. // transform: rotate(0deg); /* 调整角度 */
  1460. }
  1461. }
  1462. .third-tab {
  1463. margin: 8rpx 0;
  1464. height: 64rpx;
  1465. line-height: 64rpx;
  1466. display: flex;
  1467. justify-content: space-between;
  1468. .third-tab-item {
  1469. flex: 1;
  1470. text-align: center;
  1471. }
  1472. }
  1473. .list {
  1474. width: 100%;
  1475. background-color: #F5F6FA;
  1476. // margin-bottom: 100rpx;
  1477. overflow-y: auto;
  1478. padding: 0 32rpx;
  1479. box-sizing: border-box;
  1480. .list_item {
  1481. width: 100%;
  1482. margin: 0 auto 24rpx;
  1483. padding: 32rpx;
  1484. box-sizing: border-box;
  1485. position: relative;
  1486. background-color: #ffffff;
  1487. border-radius: 16rpx;
  1488. .list_item_top {
  1489. .p1 {
  1490. width: 86%;
  1491. font-size: 28rpx;
  1492. overflow: hidden;
  1493. display: flex;
  1494. align-items: center;
  1495. .title{
  1496. max-width: 75%;
  1497. color: #333333;
  1498. font-size: 28rpx;
  1499. font-weight: 700;
  1500. margin-right: 8rpx;
  1501. overflow: hidden;
  1502. text-overflow: ellipsis;
  1503. white-space: nowrap;
  1504. }
  1505. .sub-title{
  1506. border-radius: 32rpx;
  1507. border:2rpx solid #0bbc58;
  1508. padding: 4rpx 12rpx;
  1509. font-size: 22rpx;
  1510. font-weight: 400;
  1511. overflow: hidden;
  1512. text-overflow: ellipsis;
  1513. white-space: nowrap;
  1514. color:#0bbc58;
  1515. margin-left: 20rpx;
  1516. }
  1517. }
  1518. }
  1519. .online-status{
  1520. font-size: 28rpx;
  1521. position: absolute;
  1522. text-align: center;
  1523. right: 2rpx;
  1524. top: 2rpx;
  1525. image{
  1526. width: 140rpx;
  1527. height: 56rpx;
  1528. }
  1529. .status-text-online{
  1530. color: #0BBC58;
  1531. position: absolute;
  1532. top: 0rpx;
  1533. right: 0rpx;
  1534. width: 120rpx;
  1535. height: 56rpx;
  1536. line-height: 56rpx;
  1537. font-size: 26rpx;
  1538. }
  1539. .status-text-offline{
  1540. color: #FB4E52;
  1541. position: absolute;
  1542. top: 0rpx;
  1543. right: 0rpx;
  1544. width: 120rpx;
  1545. height: 56rpx;
  1546. line-height: 56rpx;
  1547. font-size: 26rpx;
  1548. }
  1549. }
  1550. // .p2 {
  1551. // color: #0BBC58;
  1552. // background: #0bbc581a;
  1553. // }
  1554. // .p_out {
  1555. // color: #FB4E52;
  1556. // background: #fb4e521a;
  1557. // }
  1558. .list_item_text {
  1559. margin-top: 20rpx;
  1560. .p1 {
  1561. font-size: 24rpx;
  1562. color: #303133;
  1563. margin-top: 10rpx;
  1564. word-break: break-all;
  1565. }
  1566. .label{
  1567. color: #999999;
  1568. text-align: left;
  1569. margin-right: 32rpx;
  1570. font-size: 24rpx;
  1571. min-width: 90rpx;
  1572. display: inline-block;
  1573. }
  1574. .nav-label{
  1575. //超出隐藏
  1576. display: inline-block;
  1577. width: 70%;
  1578. overflow: hidden;
  1579. text-overflow: ellipsis;
  1580. white-space: nowrap;
  1581. }
  1582. }
  1583. .list_item_btn {
  1584. width: 126rpx;
  1585. color: #42b983;
  1586. height: 40rpx;
  1587. text-align: center;
  1588. border: 1rpx solid #42b983;
  1589. border-radius: 25rpx;
  1590. font-size: 24rpx;
  1591. line-height: 35rpx;
  1592. position: absolute;
  1593. bottom: 15rpx;
  1594. right: 20rpx;
  1595. }
  1596. }
  1597. }
  1598. .top {
  1599. position: fixed;
  1600. right: 30px;
  1601. bottom: 100px;
  1602. z-index: 100;
  1603. image {
  1604. width: 100rpx;
  1605. height: 100rpx;
  1606. }
  1607. }
  1608. </style>