index.vue 39 KB

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