index.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645
  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)}}v</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" style="display:flex;align-items: center;" 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="n.switchValue?'item-number-active':''">{{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" @change="radioGroupChange">
  155. <u-radio
  156. @change="radioChange"
  157. v-for="(item, index) in radioList" :key="index"
  158. :name="item.value"
  159. active-color="#0BBC58"
  160. >
  161. {{item.name}}
  162. </u-radio>
  163. </u-radio-group>
  164. </u-form-item>
  165. <u-form-item label="开阀时间" v-if="value == 1">
  166. <view @click="show1 = true" class="hour">{{hour}} 小时</view>
  167. <!-- <view @click="show2 = true" class="minute">{{minute}} 分钟</view> -->
  168. </u-form-item>
  169. <u-form-item label="开度数值">
  170. <view class="slider-row" style="display:flex;align-items:center;"><view class="slider-container">
  171. <view class="slider-min-value">10</view>
  172. <view
  173. :class="['custom-progress', { dragging: sliderDragging }]"
  174. @touchstart.stop="onSliderTouchStart($event, 'openingValue', 10, 100)"
  175. @touchmove="onSliderTouchMove($event, 10, 100)"
  176. @touchend.stop="onSliderTouchEnd"
  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></view>
  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-row" style="display:flex;align-items:center;"><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="onSliderTouchMove($event, 10, 100)"
  199. @touchend.stop="onSliderTouchEnd"
  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></view>
  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(){
  323. uni.navigateTo({
  324. url: '/pages/cb/zhamenFirst/controls',
  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. const clientX = e.touches[0].clientX
  447. this.sliderField = field
  448. this.sliderMin = min
  449. this.sliderMax = max
  450. const query = uni.createSelectorQuery().in(this)
  451. query.selectAll('.custom-progress').boundingClientRect(rects => {
  452. const list = Array.isArray(rects) ? rects : []
  453. this.sliderRect = list.find(r => r && r.width > 0) || list[0] || null
  454. this.updateSliderValue(clientX, field, min, max)
  455. }).exec()
  456. },
  457. onSliderTouchMove(e, min, max) {
  458. if (!this.sliderField || !this.sliderRect) return
  459. this.updateSliderValue(e.touches[0].clientX, this.sliderField, min, max)
  460. },
  461. onSliderTouchEnd() {
  462. this.sliderField = ''
  463. this.sliderDragging = false
  464. },
  465. onSliderTap(e, field, min, max) {
  466. const query = uni.createSelectorQuery().in(this)
  467. query.select('.custom-progress').boundingClientRect(rect => {
  468. this.sliderRect = rect
  469. this.updateSliderValue(e.detail.x + rect.left, field, min, max)
  470. }).exec()
  471. },
  472. updateSliderValue(clientX, field, min, max) {
  473. if (!this.sliderRect || !this.sliderRect.width) return
  474. let ratio = (clientX - this.sliderRect.left) / this.sliderRect.width
  475. ratio = Math.max(0, Math.min(1, ratio))
  476. const value = Math.round(min + ratio * (max - min))
  477. if (this.equipContrlForm[field] === value) return
  478. this.$set(this.equipContrlForm, field, value)
  479. },
  480. submit(){
  481. this.setAction({
  482. device_id: this.current_device_id,
  483. valve_param_key: this.valve_param_key,
  484. var_value: this.equipContrlForm.openingValue,
  485. valve_delayed: this.value == 0 ? 0 : Number(this.hour) * 60 + Number(this.minute)
  486. })
  487. this.showPopup = false;
  488. },
  489. submit2(){
  490. this.setEditAction({
  491. device_id: this.current_device_id,
  492. valve_param_key: this.valve_param_key,
  493. var_value: this.equipContrlForm.openingValue,
  494. })
  495. this.showPopup2 = false;
  496. },
  497. getHours(){
  498. for(let i = 1; i <= 12; i++){
  499. this.hours.push({
  500. label: i + ' 时',
  501. value: i,
  502. })
  503. }
  504. },
  505. getMinutes(){
  506. for(let i = 0; i < 60; i++){
  507. this.minutes.push({
  508. label: i + ' 分',
  509. value: i,
  510. })
  511. }
  512. },
  513. isShow(item){
  514. return item.pur_id != 422
  515. },
  516. getSlice(name){
  517. return name.slice(0,4)
  518. },
  519. modification(item) {
  520. uni.navigateTo({
  521. url:
  522. './seabox/modification?data=' +
  523. JSON.stringify(item) +
  524. '&id=' +
  525. this.type_id,
  526. });
  527. },
  528. changeSwitchStatus(status,item,device){
  529. this.valve_param_key = item.key;
  530. this.current_device_id = device.id;
  531. if(status == 0){
  532. this.equipContrlForm.openingValue = 40;
  533. this.showPopup = true;
  534. this.currentRow = item;
  535. }else{
  536. this.show3 = true;
  537. }
  538. },
  539. changeStatus(status){
  540. this.device_status = status;
  541. Debounce(() => {
  542. this.page = 1;
  543. this.eqlist();
  544. }, 500)();
  545. },
  546. async getUserlogin() {
  547. this.list = [];
  548. this.loading = true;
  549. const res = await this.$myRequest({
  550. url: '/api/api_gateway?method=user.login.user_login_info',
  551. method: 'POST',
  552. data: {
  553. is_app: 1,
  554. },
  555. });
  556. this.loading = false;
  557. res.forEach(item=>{
  558. item.icon = '/bigdata_app/newImg/home/sqjd.png'
  559. })
  560. const menulist = res || [];
  561. const menuItem = menulist.find(item => item.purview_name == '智慧物联')
  562. this.menuList = menuItem.children || [];
  563. if(this.menuList.length == 0){
  564. //提示暂无分配权限
  565. uni.showToast({
  566. title: '暂无分配权限,请联系工作人员',
  567. icon: 'none',
  568. });
  569. return
  570. }
  571. if(!this.pur_id){
  572. this.list = this.menuList[0].children || []
  573. this.pur_id = this.menuList[0].pur_id || '';
  574. this.current = 0;
  575. }else{
  576. this.list = this.menuList.find(item => item.pur_id == this.pur_id)?.children || []
  577. this.pur_id = this.menuList.find(item => item.pur_id == this.pur_id)?.pur_id || '';
  578. this.current = this.menuList.findIndex(item => item.pur_id == this.pur_id);
  579. }
  580. if(this.list.length > 1){
  581. if(this.list[0].purview_name != '全部'){
  582. this.list.unshift({
  583. device_type_id: '',
  584. purview_name: '全部'
  585. })
  586. }
  587. }
  588. const firstChild = this.list[0];
  589. this.type_id = firstChild.device_type_id;
  590. if(firstChild.device_type_id !== ''){
  591. this.device_model = firstChild?.device_model || '';
  592. }else{
  593. this.device_model = '';
  594. }
  595. this.initPage();
  596. },
  597. async eqlist(tf) {
  598. this.counts = 0;
  599. this.online_counts = 0;
  600. this.offline_counts = 0;
  601. this.loadingtf = true;
  602. let data = {
  603. device_type_id: this.type_id,
  604. page_num: this.page,
  605. page_size: this.size,
  606. pur_id: this.pur_id,
  607. device_status: this.device_status,
  608. device_id: this.device_id,
  609. device_model: this.device_model
  610. }
  611. const res = await this.$myRequest({
  612. url: '/api/api_gateway?method=device.app_device.app_device_list',
  613. data: data,
  614. });
  615. this.loadingtf = false;
  616. const status = res?.status || {};
  617. this.online_counts = status.online || 0;
  618. this.offline_counts = status.offline || 0;
  619. this.counts = (status.online || 0) + (status.offline || 0);
  620. this.total = res.total || 0;
  621. const resData = res?.data;
  622. resData.forEach(item=>{
  623. if(item.type_id == 49 && item.valve_params.length){
  624. item.valve_params.forEach(param=>{
  625. param.switchValue = param.value == 0 ? false : true;
  626. })
  627. }
  628. })
  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. case 50:
  744. uni.navigateTo({
  745. 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&type_id=${type_id}`,
  746. });
  747. break;
  748. // var obj = {};
  749. // obj.d_id = item.d_id;
  750. // obj.equip_id = item.id;
  751. // obj.is_online = item.status;
  752. // obj.lat = item.lat;
  753. // obj.lng = item.lng;
  754. // obj.equip_name = item.name;
  755. // obj.uptime = item.uptime;
  756. // uni.navigateTo({
  757. // url: '../environment/equipment-new?shebei=' + JSON.stringify(obj),
  758. // });
  759. break;
  760. case 5:
  761. var obj = {};
  762. obj.d_id = item.d_id;
  763. obj.equip_id = item.id;
  764. obj.is_online = item.status;
  765. obj.lat = item.lat;
  766. obj.lng = item.lng;
  767. obj.equip_name = item.name;
  768. obj.uptime = item.uptime;
  769. // uni.navigateTo({
  770. // url: '../environment/equipment?shebei=' + JSON.stringify(obj),
  771. // });
  772. uni.navigateTo({
  773. 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`,
  774. });
  775. break;
  776. case 6:
  777. uni.navigateTo({
  778. url: '/pages/webview/webview?device_id=' +
  779. item.id +
  780. '&accessToken=' +
  781. this.accessToken,
  782. });
  783. break;
  784. case 44:
  785. uni.navigateTo({
  786. url:
  787. '/pages/webviewdgp/webviewdgp?device_id=' +
  788. item.id +
  789. '&accessToken=' +
  790. uni.getStorageSync('session_key') +
  791. '&type=dgp',
  792. });
  793. break;
  794. case 3:
  795. item.addtime = item.uptime;
  796. item.type = item.type_id;
  797. uni.navigateTo({
  798. url: '../cbd/detail?info=' + JSON.stringify(item),
  799. });
  800. break;
  801. case 28:
  802. item.addtime = item.uptime;
  803. item.type = item.type_id;
  804. uni.navigateTo({
  805. url: '../cb/smallPest/smallPest?info=' + JSON.stringify(item),
  806. });
  807. break;
  808. case 4:
  809. item.addtime = item.uptime;
  810. item.type = item.type_id;
  811. uni.navigateTo({
  812. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  813. });
  814. break;
  815. case 32:
  816. case 35:
  817. item.addtime = item.uptime;
  818. item.type = item.type_id;
  819. uni.navigateTo({
  820. url: '../cb/equip-detail/equip-detail-new?info=' +
  821. JSON.stringify(item),
  822. });
  823. break;
  824. case 33:
  825. case 34:
  826. item.addtime = item.uptime;
  827. item.type = item.type_id;
  828. let cmd = ''
  829. if(type_id == 34){
  830. cmd = 'sy1'
  831. }else if(type_id == 33){
  832. cmd = 'sy2'
  833. }
  834. uni.navigateTo({
  835. url: '../sy/detail?info=' +
  836. JSON.stringify(item) + '&cmd=' + cmd,
  837. });
  838. break;
  839. case 7:
  840. item.addtime = item.uptime;
  841. item.type = item.type_id;
  842. // uni.navigateTo({
  843. // url: '../bzy/detail?info=' + JSON.stringify(item),
  844. // });
  845. if(item.pur_id !== 307){
  846. uni.navigateTo({
  847. url: '../bzy/detail?info=' + JSON.stringify(item),
  848. });
  849. }else{
  850. uni.navigateTo({
  851. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  852. });
  853. }
  854. break;
  855. case 8:
  856. uni.navigateTo({
  857. url: '../cb/thxydetail/thxydetail?imei=' + item.id,
  858. });
  859. break;
  860. case 29:
  861. uni.navigateTo({
  862. url: `../cb/nlNewXy/nlNewXy?imei=${item.id}&showId=${item.d_id}`,
  863. });
  864. break;
  865. case 24:
  866. uni.navigateTo({
  867. url: '../cb/zjxydetail/thxydetail?imei=' + item.id,
  868. });
  869. break;
  870. case 12:
  871. item.addtime = item.uptime;
  872. uni.navigateTo({
  873. url: '../cb/xctdetail/xctdetail?info=' + JSON.stringify(item),
  874. });
  875. break;
  876. case 13:
  877. var obj = {};
  878. obj.d_id = item.d_id;
  879. obj.device_id = item.id;
  880. obj.is_online = item.status;
  881. obj.lat = item.lat;
  882. obj.lng = item.lng;
  883. obj.equip_name = item.name;
  884. obj.uptime = item.uptime;
  885. uni.navigateTo({
  886. url: '../waterandfer/datails?shebei=' + JSON.stringify(obj),
  887. });
  888. break;
  889. case 15:
  890. var obj = {};
  891. obj.d_id = item.d_id;
  892. obj.device_id = item.id;
  893. obj.is_online = item.status;
  894. obj.lat = item.lat;
  895. obj.lng = item.lng;
  896. obj.equip_name = item.name;
  897. obj.uptime = item.uptime;
  898. obj.address = item.address || '无';
  899. // uni.navigateTo({
  900. // url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
  901. // });
  902. uni.navigateTo({
  903. 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`,
  904. });
  905. break;
  906. case 17:
  907. break;
  908. case 18:
  909. var obj = {};
  910. obj.device_id = item.id;
  911. obj.is_online = item.status;
  912. uni.navigateTo({
  913. url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
  914. });
  915. break;
  916. case 43:
  917. uni.navigateTo({
  918. url: "/pages/fmSys/details?info=" + JSON.stringify(item)
  919. })
  920. break;
  921. // case 44:
  922. // uni.navigateTo({
  923. // url: "/pages/webviewdgp/webview?device_id=" + item.id + "&accessToken=" + this.accessToken || uni
  924. // .getStorageSync('session_key') +
  925. // '&type=dgp'
  926. // })
  927. // break;
  928. case 11:
  929. var obj = {};
  930. obj.d_id = item.d_id;
  931. obj.device_id = item.id;
  932. obj.is_online = item.status;
  933. obj.lat = item.lat;
  934. obj.lng = item.lng;
  935. obj.equip_name = item.name;
  936. obj.uptime = item.uptime;
  937. obj.location = item.address;
  938. obj.type = 11;
  939. uni.navigateTo({
  940. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  941. });
  942. break;
  943. case 19:
  944. var obj = {};
  945. obj.d_id = item.d_id;
  946. obj.device_id = item.id;
  947. obj.is_online = item.status;
  948. obj.lat = item.lat;
  949. obj.lng = item.lng;
  950. obj.equip_name = item.name;
  951. obj.uptime = item.uptime;
  952. obj.location = item.address;
  953. obj.type = 19;
  954. uni.navigateTo({
  955. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  956. });
  957. break;
  958. case 20:
  959. var obj = {};
  960. obj.d_id = item.d_id;
  961. obj.device_id = item.id;
  962. obj.is_online = item.status;
  963. obj.lat = item.lat;
  964. obj.lng = item.lng;
  965. obj.equip_name = item.name;
  966. obj.uptime = item.uptime;
  967. obj.location = item.address;
  968. obj.type = 20;
  969. uni.navigateTo({
  970. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  971. });
  972. break;
  973. case 21:
  974. var obj = {};
  975. obj.d_id = item.d_id;
  976. obj.device_id = item.id;
  977. obj.is_online = item.status;
  978. obj.lat = item.lat;
  979. obj.lng = item.lng;
  980. obj.equip_name = item.name;
  981. obj.uptime = item.uptime;
  982. obj.location = item.address;
  983. obj.type = 21;
  984. uni.navigateTo({
  985. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  986. });
  987. break;
  988. case 26:
  989. var obj = {};
  990. obj.d_id = item.d_id;
  991. obj.device_id = item.id;
  992. obj.is_online = item.status;
  993. obj.lat = item.lat;
  994. obj.lng = item.lng;
  995. obj.equip_name = item.name;
  996. obj.uptime = item.uptime;
  997. obj.location = item.address;
  998. obj.type = 26;
  999. uni.navigateTo({
  1000. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  1001. });
  1002. break;
  1003. case 27:
  1004. var obj = {};
  1005. obj.d_id = item.d_id;
  1006. obj.device_id = item.id;
  1007. obj.is_online = item.status;
  1008. obj.lat = item.lat;
  1009. obj.lng = item.lng;
  1010. obj.equip_name = item.name;
  1011. obj.uptime = item.uptime;
  1012. obj.location = item.address;
  1013. obj.type = 26;
  1014. uni.navigateTo({
  1015. url: '../disease/mls/mls?shebei=' + JSON.stringify(obj),
  1016. });
  1017. break;
  1018. case 25:
  1019. item.addtime = item.uptime;
  1020. uni.navigateTo({
  1021. url: '../cb/xylps/detail/detail?detail=' + JSON.stringify(item),
  1022. });
  1023. break;
  1024. case 40:
  1025. item.addtime = item.uptime;
  1026. uni.navigateTo({
  1027. url: `../cb/shuifeizs/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1028. });
  1029. break;
  1030. case 42:
  1031. item.addtime = item.uptime;
  1032. uni.navigateTo({
  1033. url: `../cb/wenshizs/wenshizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1034. });
  1035. break;
  1036. case 45:
  1037. item.addtime = item.uptime;
  1038. uni.navigateTo({
  1039. url: `../cb/shuifeizsFirst/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1040. });
  1041. break;
  1042. case 46:
  1043. uni.navigateTo({
  1044. 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`,
  1045. });
  1046. break;
  1047. case 47:
  1048. uni.navigateTo({
  1049. url: `../cb/zhamenFirst/zhamenzs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1050. });
  1051. break;
  1052. default:
  1053. item.addtime = item.uptime;
  1054. item.type = this.type_id;
  1055. uni.navigateTo({
  1056. url: '../cb/xy2.0/particulars?info=' + JSON.stringify(item),
  1057. });
  1058. break;
  1059. }
  1060. },
  1061. searchinput() {
  1062. Debounce(() => {
  1063. this.eqlistdata = [];
  1064. this.page = 1;
  1065. this.eqlist();
  1066. }, 1000)();
  1067. },
  1068. scrollTop(e) {},
  1069. upper() {},
  1070. lower() {
  1071. if(this.eqlistdata.length >= this.total){
  1072. return;
  1073. }
  1074. Debounce(() => {
  1075. this.page++;
  1076. this.eqlist(true);
  1077. }, 500)();
  1078. },
  1079. scroll() {},
  1080. },
  1081. watch:{
  1082. pur_id(){
  1083. setTimeout(() => {
  1084. this.getUserlogin();
  1085. }, 100);
  1086. },
  1087. },
  1088. onLoad() {
  1089. this.getHours();
  1090. this.getMinutes();
  1091. const that = this;
  1092. uni.$on('purId', (item) => {
  1093. that.pur_id = item.purId;
  1094. that.menu = item.menu;
  1095. that.device_model = item.device_model;
  1096. });
  1097. uni.$on('refreshData', (refreshData) => {
  1098. this.eqlist();
  1099. });
  1100. uni.getStorage({
  1101. key:"myuser_type",
  1102. success:(res)=>{
  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. .action-container-item{
  1336. flex:1;
  1337. height: 90rpx;
  1338. border-radius: 8rpx;
  1339. background: #ffffff;
  1340. padding: 8rpx;
  1341. border: 2rpx solid #999999;
  1342. margin-right: 16rpx;
  1343. &:last-child{
  1344. margin-right: 0;
  1345. }
  1346. }
  1347. .action-container-container-item-active{
  1348. border: 2rpx solid #0BBC58;
  1349. }
  1350. .action-open{
  1351. width: 100%;
  1352. display: flex;
  1353. justify-content: center;
  1354. align-items: center;
  1355. }
  1356. .item-number{
  1357. width: 30rpx;
  1358. height: 30rpx;
  1359. line-height: 30rpx;
  1360. display: flex;
  1361. justify-content: center;
  1362. align-items: center;
  1363. border-radius: 50%;
  1364. border: 2rpx solid #999999;
  1365. color: #999999;
  1366. font-size: 22rpx;
  1367. margin-right: 8rpx;
  1368. //超出部分省略号
  1369. overflow: hidden;
  1370. white-space: nowrap;
  1371. text-overflow: ellipsis;
  1372. }
  1373. .item-number-active{
  1374. border: 2rpx solid #0BBC58;
  1375. color: #0BBC58;
  1376. }
  1377. .action-open-value{
  1378. margin-top: 8rpx;
  1379. display: flex;
  1380. align-items: center;
  1381. justify-content: center;
  1382. font-size: 24rpx;
  1383. }
  1384. .item-icon{
  1385. width: 15px;
  1386. height: 15px;
  1387. margin-right: 4px;
  1388. }
  1389. }
  1390. .progress-container{
  1391. display: flex;
  1392. justify-content: center;
  1393. align-items: center;
  1394. height:100%;
  1395. }
  1396. .tab {
  1397. // background-color: #0BBC58;
  1398. margin-top: 42rpx;
  1399. margin-bottom: 38rpx;
  1400. padding: 0 32rpx;
  1401. .img-icon {
  1402. width: 80rpx;
  1403. height: 80rpx;
  1404. margin-bottom: 12rpx;
  1405. }
  1406. .text {
  1407. color: #303133;
  1408. font-size: 24rpx;
  1409. }
  1410. .tab-content {
  1411. width: 100%;
  1412. height: 162rpx;
  1413. }
  1414. .tab-item.active {
  1415. border-radius: 24rpx;
  1416. background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
  1417. }
  1418. }
  1419. .action-group{
  1420. display: flex;
  1421. align-items: center;
  1422. gap: 16rpx;
  1423. margin-top: 24rpx;
  1424. background: #0BBC58;
  1425. position: fixed;
  1426. bottom: 0rpx;;
  1427. border-radius: 8rpx;
  1428. z-index:1000;
  1429. color:#fff;
  1430. width:100%;
  1431. padding: 10rpx 0;
  1432. .action-item{
  1433. display: flex;
  1434. align-items: center;
  1435. justify-content: center;
  1436. flex:1;
  1437. text-align: center;
  1438. border-radius: 8rpx;
  1439. border:2rpx solid #0BBC58;
  1440. padding: 16rpx 0;
  1441. font-size: 24rpx;
  1442. color: #fff;
  1443. .item-icon{
  1444. width: 15px;
  1445. height: 15px;
  1446. margin-right: 4px;
  1447. }
  1448. }
  1449. }
  1450. .second-tab {
  1451. height: 80rpx;
  1452. .tab-item{
  1453. font-size: 28rpx;
  1454. color: #999999;
  1455. }
  1456. .tab-item.active {
  1457. color: #303133;
  1458. font-weight: 700;
  1459. }
  1460. .tab-item.active::after {
  1461. content: '';
  1462. position: absolute;
  1463. bottom: 0;
  1464. left: 50%;
  1465. transform: translateX(-50%);
  1466. width: 18px; /* 比文字略宽 */
  1467. height: 18px;
  1468. border: 3px solid #0BBC58;
  1469. border-radius: 50%;
  1470. border-color: transparent; /* 隐藏其他部分 */
  1471. border-bottom-color: #0BBC58; /* 组合成45度角 */
  1472. // transform: rotate(0deg); /* 调整角度 */
  1473. }
  1474. }
  1475. .third-tab {
  1476. margin: 8rpx 0;
  1477. height: 64rpx;
  1478. line-height: 64rpx;
  1479. display: flex;
  1480. justify-content: space-between;
  1481. .third-tab-item {
  1482. flex: 1;
  1483. text-align: center;
  1484. }
  1485. }
  1486. .list {
  1487. width: 100%;
  1488. background-color: #F5F6FA;
  1489. // margin-bottom: 100rpx;
  1490. overflow-y: auto;
  1491. padding: 0 32rpx;
  1492. padding-bottom: 100rpx;
  1493. box-sizing: border-box;
  1494. .list_item {
  1495. width: 100%;
  1496. margin: 0 auto 24rpx;
  1497. padding: 32rpx;
  1498. box-sizing: border-box;
  1499. position: relative;
  1500. background-color: #ffffff;
  1501. border-radius: 16rpx;
  1502. .list_item_top {
  1503. .p1 {
  1504. width: 86%;
  1505. font-size: 28rpx;
  1506. overflow: hidden;
  1507. display: flex;
  1508. align-items: center;
  1509. .title{
  1510. max-width: 75%;
  1511. color: #333333;
  1512. font-size: 28rpx;
  1513. font-weight: 700;
  1514. margin-right: 8rpx;
  1515. overflow: hidden;
  1516. text-overflow: ellipsis;
  1517. white-space: nowrap;
  1518. }
  1519. .sub-title{
  1520. border-radius: 32rpx;
  1521. border:2rpx solid #0bbc58;
  1522. padding: 4rpx 12rpx;
  1523. font-size: 22rpx;
  1524. font-weight: 400;
  1525. overflow: hidden;
  1526. text-overflow: ellipsis;
  1527. white-space: nowrap;
  1528. color:#0bbc58;
  1529. margin-left: 20rpx;
  1530. }
  1531. }
  1532. }
  1533. .online-status{
  1534. font-size: 28rpx;
  1535. position: absolute;
  1536. text-align: center;
  1537. right: 2rpx;
  1538. top: 2rpx;
  1539. image{
  1540. width: 140rpx;
  1541. height: 56rpx;
  1542. }
  1543. .status-text-online{
  1544. color: #0BBC58;
  1545. position: absolute;
  1546. top: 0rpx;
  1547. right: 0rpx;
  1548. width: 120rpx;
  1549. height: 56rpx;
  1550. line-height: 56rpx;
  1551. font-size: 26rpx;
  1552. }
  1553. .status-text-offline{
  1554. color: #FB4E52;
  1555. position: absolute;
  1556. top: 0rpx;
  1557. right: 0rpx;
  1558. width: 120rpx;
  1559. height: 56rpx;
  1560. line-height: 56rpx;
  1561. font-size: 26rpx;
  1562. }
  1563. }
  1564. // .p2 {
  1565. // color: #0BBC58;
  1566. // background: #0bbc581a;
  1567. // }
  1568. // .p_out {
  1569. // color: #FB4E52;
  1570. // background: #fb4e521a;
  1571. // }
  1572. .list_item_text {
  1573. margin-top: 20rpx;
  1574. .p1 {
  1575. font-size: 24rpx;
  1576. color: #303133;
  1577. margin-top: 10rpx;
  1578. word-break: break-all;
  1579. }
  1580. .label{
  1581. color: #999999;
  1582. text-align: left;
  1583. margin-right: 32rpx;
  1584. font-size: 24rpx;
  1585. min-width: 90rpx;
  1586. display: inline-block;
  1587. }
  1588. .nav-label{
  1589. //超出隐藏
  1590. display: inline-block;
  1591. width: 70%;
  1592. overflow: hidden;
  1593. text-overflow: ellipsis;
  1594. white-space: nowrap;
  1595. }
  1596. }
  1597. .list_item_btn {
  1598. width: 126rpx;
  1599. color: #42b983;
  1600. height: 40rpx;
  1601. text-align: center;
  1602. border: 1rpx solid #42b983;
  1603. border-radius: 25rpx;
  1604. font-size: 24rpx;
  1605. line-height: 35rpx;
  1606. position: absolute;
  1607. bottom: 15rpx;
  1608. right: 20rpx;
  1609. }
  1610. }
  1611. }
  1612. .top {
  1613. position: fixed;
  1614. right: 30px;
  1615. bottom: 100px;
  1616. z-index: 100;
  1617. image {
  1618. width: 100rpx;
  1619. height: 100rpx;
  1620. }
  1621. }
  1622. </style>