index.vue 42 KB

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