index.vue 41 KB

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