index.vue 43 KB

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