index.vue 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  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. <p class="p1">
  64. <span class="title">{{ (item.name || '--' )}}</span>
  65. <span class="sub-title" @click.stop="modification(item)">信息修改</span>
  66. </p>
  67. <p 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. </p>
  75. <p
  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. </p>
  85. </view>
  86. <view class="list_item_text">
  87. <p v-if="item.imei">
  88. <span class="label">IMEI</span>{{ (item.dui || item.imei) }}
  89. </p>
  90. <p>
  91. <span class="label">设备ID</span>{{ item.only_for_show || item.id || item.device_id }}
  92. </p>
  93. <p>
  94. <span class="label">上报时间</span>{{ (item.report || item.uptime) | timeFormat() }}
  95. </p>
  96. <p style="display:flex;align-items: center;">
  97. <span class="label">设备位置</span>
  98. <span class="nav-label">{{ (item.address|| '无') }}</span>
  99. </p>
  100. </view>
  101. </view>
  102. </scroll-view>
  103. </view>
  104. </view>
  105. <view class="loading" v-if="loadingtf">
  106. <image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
  107. </view>
  108. <view class="top" v-if="isTop" @click="top">
  109. <image
  110. :src="
  111. $imageURL+'/bigdata_app' +
  112. '/image/6209a98f0cb3b5086f2ca36152c9269.png'
  113. " mode=""></image>
  114. </view>
  115. </view>
  116. </template>
  117. <script>
  118. import {
  119. Debounce,
  120. Throttle
  121. } from '../../util/anitthro.js';
  122. export default {
  123. data() {
  124. return {
  125. list: [],
  126. pur_id: '',
  127. loading: false,
  128. currentPur_id:'',
  129. device_status: '',
  130. counts:0,
  131. online_counts:0,
  132. offline_counts:0,
  133. current: 0,
  134. currents: 0,
  135. total: 0,
  136. refreshData:'',
  137. page: 1,
  138. size: 10,
  139. eqlistdata: [],
  140. isTop: false,
  141. device_model: '',
  142. infoalter: false, // 权限设置,
  143. type_id: 0, //设备类型,
  144. imgpath: [],
  145. loadingtf: false,
  146. width: 0, //顶部搜索栏宽度
  147. device_id: '', //搜索设备ID
  148. menuList: []
  149. };
  150. },
  151. methods: {
  152. isShow(item){
  153. return item.pur_id != 422
  154. },
  155. getSlice(name){
  156. return name.slice(0,4)
  157. },
  158. modification(item) {
  159. uni.navigateTo({
  160. url:
  161. './seabox/modification?data=' +
  162. JSON.stringify(item) +
  163. '&id=' +
  164. this.type_id,
  165. });
  166. },
  167. changeStatus(status){
  168. this.device_status = status;
  169. Debounce(() => {
  170. this.page = 1;
  171. this.eqlist();
  172. }, 500)();
  173. },
  174. async getUserlogin() {
  175. this.list = [];
  176. this.loading = true;
  177. const res = await this.$myRequest({
  178. url: '/api/api_gateway?method=user.login.user_login_info',
  179. method: 'POST',
  180. data: {
  181. is_app: 1,
  182. },
  183. });
  184. this.loading = false;
  185. res.forEach(item=>{
  186. item.icon = '/bigdata_app/newImg/home/sqjd.png'
  187. })
  188. const menulist = res || [];
  189. const menuItem = menulist.find(item => item.purview_name == '智慧物联')
  190. this.menuList = menuItem.children || [];
  191. if(!this.pur_id){
  192. this.list = this.menuList[0].children || []
  193. this.pur_id = this.menuList[0].pur_id || '';
  194. this.current = 0;
  195. }else{
  196. this.list = this.menuList.find(item => item.pur_id == this.pur_id)?.children || []
  197. this.pur_id = this.menuList.find(item => item.pur_id == this.pur_id)?.pur_id || '';
  198. this.current = this.menuList.findIndex(item => item.pur_id == this.pur_id);
  199. }
  200. if(this.list.length > 1){
  201. if(this.list[0].purview_name != '全部'){
  202. this.list.unshift({
  203. device_type_id: '',
  204. purview_name: '全部'
  205. })
  206. }
  207. }
  208. this.type_id = this.list[0].device_type_id;
  209. this.initPage();
  210. },
  211. async eqlist(tf) {
  212. this.counts = 0;
  213. this.online_counts = 0;
  214. this.offline_counts = 0;
  215. this.loadingtf = true;
  216. let data = {
  217. device_type_id: this.type_id,
  218. page_num: this.page,
  219. page_size: this.size,
  220. pur_id: this.pur_id,
  221. device_status: this.device_status,
  222. device_id: this.device_id,
  223. device_model: this.device_model
  224. }
  225. const res = await this.$myRequest({
  226. url: '/api/api_gateway?method=device.app_device.app_device_list',
  227. data: data,
  228. });
  229. this.loadingtf = false;
  230. const status = res?.status || {};
  231. this.online_counts = status.online || 0;
  232. this.offline_counts = status.offline || 0;
  233. this.counts = (status.online || 0) + (status.offline || 0);
  234. this.total = res.total || 0;
  235. if (tf) {
  236. this.eqlistdata = this.eqlistdata.concat(res.data);
  237. } else {
  238. this.eqlistdata = res.data;
  239. }
  240. },
  241. change(index,itemData) {
  242. this.list = this.menuList[index].children || []
  243. const list = [];
  244. this.list.forEach(item=>{
  245. if(item.url){
  246. list.push(item)
  247. }
  248. })
  249. if(list.length > 1){
  250. if(this.list[0].purview_name != '全部'){
  251. this.list.unshift({
  252. device_type_id: '',
  253. purview_name: '全部'
  254. })
  255. }
  256. }
  257. this.current = index;
  258. const item = this.list[0];
  259. this.pur_id = itemData.pur_id || '';
  260. this.changeDevice(item,0);
  261. },
  262. changeDevice(item,index){
  263. this.currents = index;
  264. this.currentPur_id = item.pur_id || '';
  265. const name = item.menu;
  266. if (name === 'cbd4') {
  267. this.device_model = 11;
  268. } else if(name === 'cbd1'){
  269. this.device_model = 12;
  270. } else if(name === 'cbd3'){
  271. this.device_model = '';
  272. } else if(name === 'cbd5'){
  273. this.device_model = 13;
  274. } else if(name === 'cbd6'){
  275. this.device_model = 14;
  276. }else if(name === 'gkcbd1'){
  277. this.device_model = 15;
  278. } else if(name === 'zhiCbd'){
  279. this.device_model = 16;
  280. }else {
  281. this.device_model = item.device_model || '';
  282. }
  283. this.page = 1;
  284. this.eqlistdata = [];
  285. this.type_id = item.device_type_id;
  286. Debounce(() => {
  287. this.eqlist();
  288. }, 500)();
  289. },
  290. top() {
  291. uni.pageScrollTo({
  292. scrollTop: 0,
  293. duration: 500,
  294. });
  295. },
  296. initPage(){
  297. this.eqlistdata = [];
  298. this.currents = 0;
  299. this.page = 1;
  300. Debounce(() => {
  301. this.eqlist();
  302. }, 500)();
  303. this.width = 0;
  304. },
  305. historys(item) {
  306. const type_id = item.type_id;
  307. item.pur_id = this.pur_id;
  308. switch (type_id) {
  309. // 水肥新设备
  310. case 22:
  311. var obj = {};
  312. obj.d_id = item.d_id;
  313. obj.device_id = item.id;
  314. obj.is_online = item.status;
  315. obj.lat = item.lat;
  316. obj.lng = item.lng;
  317. obj.equip_name = item.name;
  318. obj.uptime = item.uptime;
  319. uni.navigateTo({
  320. url: '../waterandfernew/details?shebei=' + JSON.stringify(obj),
  321. });
  322. break;
  323. // 病虫害可视监测
  324. case 14:
  325. item.addtime = item.uptime;
  326. uni.navigateTo({
  327. url: '../cb/sy/detail?detail=' + JSON.stringify(item),
  328. });
  329. break;
  330. case 2:
  331. item.addtime = item.uptime;
  332. uni.navigateTo({
  333. url: '../prevention/equipmentdetails?shebei=' + JSON.stringify(item),
  334. });
  335. // uni.navigateTo({
  336. // url: '../scd/detail?info=' + JSON.stringify(item),
  337. // });
  338. break;
  339. case 38:
  340. var obj = {};
  341. obj.d_id = item.d_id;
  342. obj.equip_id = item.id;
  343. obj.is_online = item.status;
  344. obj.lat = item.lat;
  345. obj.lng = item.lng;
  346. obj.equip_name = item.name;
  347. obj.uptime = item.uptime;
  348. uni.navigateTo({
  349. url: '../environment/equipment-new?shebei=' + JSON.stringify(obj),
  350. });
  351. break;
  352. case 5:
  353. var obj = {};
  354. obj.d_id = item.d_id;
  355. obj.equip_id = item.id;
  356. obj.is_online = item.status;
  357. obj.lat = item.lat;
  358. obj.lng = item.lng;
  359. obj.equip_name = item.name;
  360. obj.uptime = item.uptime;
  361. uni.navigateTo({
  362. url: '../environment/equipment?shebei=' + JSON.stringify(obj),
  363. });
  364. break;
  365. case 6:
  366. uni.navigateTo({
  367. url: '/pages/webview/webview?device_id=' +
  368. item.id +
  369. '&accessToken=' +
  370. this.accessToken,
  371. });
  372. break;
  373. case 44:
  374. uni.navigateTo({
  375. url:
  376. '/pages/webviewdgp/webviewdgp?device_id=' +
  377. item.id +
  378. '&accessToken=' +
  379. uni.getStorageSync('session_key') +
  380. '&type=dgp',
  381. });
  382. break;
  383. case 3:
  384. item.addtime = item.uptime;
  385. item.type = item.type_id;
  386. uni.navigateTo({
  387. url: '../cbd/detail?info=' + JSON.stringify(item),
  388. });
  389. break;
  390. case 28:
  391. item.addtime = item.uptime;
  392. item.type = item.type_id;
  393. uni.navigateTo({
  394. url: '../cb/smallPest/smallPest?info=' + JSON.stringify(item),
  395. });
  396. break;
  397. case 4:
  398. item.addtime = item.uptime;
  399. item.type = item.type_id;
  400. uni.navigateTo({
  401. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  402. });
  403. break;
  404. case 32:
  405. case 33:
  406. case 34:
  407. case 35:
  408. item.addtime = item.uptime;
  409. item.type = item.type_id;
  410. uni.navigateTo({
  411. url: '../cb/equip-detail/equip-detail-new?info=' +
  412. JSON.stringify(item),
  413. });
  414. break;
  415. case 7:
  416. item.addtime = item.uptime;
  417. item.type = item.type_id;
  418. // uni.navigateTo({
  419. // url: '../bzy/detail?info=' + JSON.stringify(item),
  420. // });
  421. if(item.pur_id == 458){
  422. uni.navigateTo({
  423. url: '../bzy/detail?info=' + JSON.stringify(item),
  424. });
  425. }else{
  426. uni.navigateTo({
  427. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  428. });
  429. }
  430. break;
  431. case 8:
  432. uni.navigateTo({
  433. url: '../cb/thxydetail/thxydetail?imei=' + item.id,
  434. });
  435. break;
  436. case 29:
  437. uni.navigateTo({
  438. url: `../cb/nlNewXy/nlNewXy?imei=${item.id}&showId=${item.d_id}`,
  439. });
  440. break;
  441. case 24:
  442. uni.navigateTo({
  443. url: '../cb/zjxydetail/thxydetail?imei=' + item.id,
  444. });
  445. break;
  446. case 12:
  447. item.addtime = item.uptime;
  448. uni.navigateTo({
  449. url: '../cb/xctdetail/xctdetail?info=' + JSON.stringify(item),
  450. });
  451. break;
  452. case 13:
  453. var obj = {};
  454. obj.d_id = item.d_id;
  455. obj.device_id = item.id;
  456. obj.is_online = item.status;
  457. obj.lat = item.lat;
  458. obj.lng = item.lng;
  459. obj.equip_name = item.name;
  460. obj.uptime = item.uptime;
  461. uni.navigateTo({
  462. url: '../waterandfer/datails?shebei=' + JSON.stringify(obj),
  463. });
  464. break;
  465. case 15:
  466. var obj = {};
  467. obj.d_id = item.d_id;
  468. obj.device_id = item.id;
  469. obj.is_online = item.status;
  470. obj.lat = item.lat;
  471. obj.lng = item.lng;
  472. obj.equip_name = item.name;
  473. obj.uptime = item.uptime;
  474. obj.address = item.address || '无';
  475. uni.navigateTo({
  476. url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
  477. });
  478. break;
  479. case 17:
  480. break;
  481. case 18:
  482. var obj = {};
  483. obj.device_id = item.id;
  484. obj.is_online = item.status;
  485. uni.navigateTo({
  486. url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
  487. });
  488. break;
  489. case 43:
  490. uni.navigateTo({
  491. url: "/pages/fmSys/details?info=" + JSON.stringify(item)
  492. })
  493. break;
  494. // case 44:
  495. // uni.navigateTo({
  496. // url: "/pages/webviewdgp/webview?device_id=" + item.id + "&accessToken=" + this.accessToken || uni
  497. // .getStorageSync('session_key') +
  498. // '&type=dgp'
  499. // })
  500. // break;
  501. case 11:
  502. var obj = {};
  503. obj.d_id = item.d_id;
  504. obj.device_id = item.id;
  505. obj.is_online = item.status;
  506. obj.lat = item.lat;
  507. obj.lng = item.lng;
  508. obj.equip_name = item.name;
  509. obj.uptime = item.uptime;
  510. obj.location = item.address;
  511. obj.type = 11;
  512. uni.navigateTo({
  513. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  514. });
  515. break;
  516. case 19:
  517. var obj = {};
  518. obj.d_id = item.d_id;
  519. obj.device_id = item.id;
  520. obj.is_online = item.status;
  521. obj.lat = item.lat;
  522. obj.lng = item.lng;
  523. obj.equip_name = item.name;
  524. obj.uptime = item.uptime;
  525. obj.location = item.address;
  526. obj.type = 19;
  527. uni.navigateTo({
  528. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  529. });
  530. break;
  531. case 20:
  532. var obj = {};
  533. obj.d_id = item.d_id;
  534. obj.device_id = item.id;
  535. obj.is_online = item.status;
  536. obj.lat = item.lat;
  537. obj.lng = item.lng;
  538. obj.equip_name = item.name;
  539. obj.uptime = item.uptime;
  540. obj.location = item.address;
  541. obj.type = 20;
  542. uni.navigateTo({
  543. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  544. });
  545. break;
  546. case 21:
  547. var obj = {};
  548. obj.d_id = item.d_id;
  549. obj.device_id = item.id;
  550. obj.is_online = item.status;
  551. obj.lat = item.lat;
  552. obj.lng = item.lng;
  553. obj.equip_name = item.name;
  554. obj.uptime = item.uptime;
  555. obj.location = item.address;
  556. obj.type = 21;
  557. uni.navigateTo({
  558. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  559. });
  560. break;
  561. case 26:
  562. var obj = {};
  563. obj.d_id = item.d_id;
  564. obj.device_id = item.id;
  565. obj.is_online = item.status;
  566. obj.lat = item.lat;
  567. obj.lng = item.lng;
  568. obj.equip_name = item.name;
  569. obj.uptime = item.uptime;
  570. obj.location = item.address;
  571. obj.type = 26;
  572. uni.navigateTo({
  573. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  574. });
  575. break;
  576. case 27:
  577. var obj = {};
  578. obj.d_id = item.d_id;
  579. obj.device_id = item.id;
  580. obj.is_online = item.status;
  581. obj.lat = item.lat;
  582. obj.lng = item.lng;
  583. obj.equip_name = item.name;
  584. obj.uptime = item.uptime;
  585. obj.location = item.address;
  586. obj.type = 26;
  587. uni.navigateTo({
  588. url: '../disease/mls/mls?shebei=' + JSON.stringify(obj),
  589. });
  590. break;
  591. case 25:
  592. item.addtime = item.uptime;
  593. uni.navigateTo({
  594. url: '../cb/xylps/detail/detail?detail=' + JSON.stringify(item),
  595. });
  596. break;
  597. case 40:
  598. item.addtime = item.uptime;
  599. uni.navigateTo({
  600. url: `../cb/shuifeizs/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  601. });
  602. break;
  603. case 42:
  604. item.addtime = item.uptime;
  605. uni.navigateTo({
  606. url: `../cb/wenshizs/wenshizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  607. });
  608. break;
  609. case 45:
  610. item.addtime = item.uptime;
  611. uni.navigateTo({
  612. url: `../cb/shuifeizsFirst/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  613. });
  614. break;
  615. case 46:
  616. uni.navigateTo({
  617. 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`,
  618. });
  619. break;
  620. case 47:
  621. uni.navigateTo({
  622. url: `../cb/zhamenFirst/zhamenzs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  623. });
  624. break;
  625. default:
  626. item.addtime = item.uptime;
  627. item.type = this.type_id;
  628. uni.navigateTo({
  629. url: '../cb/xy2.0/particulars?info=' + JSON.stringify(item),
  630. });
  631. break;
  632. }
  633. },
  634. searchinput() {
  635. Debounce(() => {
  636. this.eqlistdata = [];
  637. this.page = 1;
  638. this.eqlist();
  639. }, 1000)();
  640. },
  641. scrollTop(e) {},
  642. upper() {},
  643. lower() {
  644. if(this.eqlistdata.length >= this.total){
  645. return;
  646. }
  647. Debounce(() => {
  648. this.page++;
  649. this.eqlist(true);
  650. }, 500)();
  651. },
  652. scroll() {},
  653. },
  654. watch:{
  655. pur_id(){
  656. setTimeout(() => {
  657. this.getUserlogin();
  658. }, 100);
  659. },
  660. },
  661. onLoad() {
  662. const that = this;
  663. uni.$on('purId', (item) => {
  664. that.pur_id = item.purId;
  665. that.menu = item.menu;
  666. that.device_model = item.device_model;
  667. });
  668. uni.$on('refreshData', (refreshData) => {
  669. this.eqlist();
  670. });
  671. this.getUserlogin();
  672. },
  673. onShow() {
  674. // 监听刷新数据事件
  675. const refreshData = uni.getStorageSync('refreshData');
  676. if(!this.refreshData){
  677. this.refreshData = refreshData;
  678. // 如果发生改变,刷新数据
  679. if(refreshData){
  680. Debounce(() => {
  681. this.getUserlogin();
  682. }, 500)();
  683. }
  684. }else if(this.refreshData != refreshData){
  685. this.refreshData = refreshData;
  686. Debounce(() => {
  687. this.getUserlogin();
  688. }, 500)();
  689. }
  690. },
  691. onTabItemTap(e) {
  692. },
  693. onReachBottom() {
  694. if(this.eqlistdata.length >= this.total){
  695. return;
  696. }
  697. Debounce(() => {
  698. this.page++;
  699. this.eqlist(true);
  700. }, 500)();
  701. },
  702. onPageScroll(e) {
  703. //nvue暂不支持滚动监听,可用bindingx代替
  704. if (e.scrollTop > 200) {
  705. //距离大于200时显示
  706. this.isTop = true;
  707. } else {
  708. //距离小于200时隐藏
  709. this.isTop = false;
  710. }
  711. },
  712. };
  713. </script>
  714. <style lang="scss">
  715. page {
  716. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  717. }
  718. /deep/.uni-icons {
  719. font-size: 40rpx !important;
  720. }
  721. input{
  722. background: transparent !important;
  723. }
  724. .textbox {
  725. width: 100%;
  726. height: calc(100vh - 82rpx);
  727. padding-top: 82rpx;
  728. box-sizing: border-box;
  729. }
  730. .inputs {
  731. width: 65%;
  732. margin-left: 12rpx;
  733. /deep/.u-content {
  734. background-color: #fff !important;
  735. }
  736. /deep/.uni-input-wrapper {
  737. background-color: #fff !important;
  738. }
  739. }
  740. .utabs_box {
  741. width: 100%;
  742. position: fixed;
  743. top: 88px;
  744. background-color: #ffffff;
  745. z-index: 100;
  746. .utabs {
  747. width: 95%;
  748. margin: 0 auto;
  749. }
  750. }
  751. .loading {
  752. position: fixed;
  753. top: 440px;
  754. width: 95%;
  755. left: 2.5%;
  756. text-align: center;
  757. .img {
  758. width: 300rpx;
  759. height: 40rpx;
  760. }
  761. }
  762. .active-tab{
  763. border-radius: 8rpx;
  764. background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
  765. }
  766. .tab-box {
  767. font-size: 30rpx;
  768. box-sizing: border-box;
  769. width: 100%;
  770. height: 100%;
  771. overflow-y: hidden;
  772. overflow-x: auto;
  773. white-space: nowrap;
  774. // 去掉滚动条
  775. -ms-overflow-style: none;
  776. scrollbar-width: none;
  777. .tab-item {
  778. cursor: pointer;
  779. position: relative;
  780. text-align: center;
  781. display: inline-block;
  782. padding: 16rpx 24rpx;
  783. box-sizing: border-box;
  784. span {
  785. display: inline-block;
  786. }
  787. }
  788. }
  789. .tab-box-top{
  790. .tab-item {
  791. width: 140rpx;
  792. text-align: center;
  793. }
  794. }
  795. .tab {
  796. // background-color: #0BBC58;
  797. margin-top: 42rpx;
  798. margin-bottom: 38rpx;
  799. padding: 0 32rpx;
  800. .img-icon {
  801. width: 80rpx;
  802. height: 80rpx;
  803. margin-bottom: 12rpx;
  804. }
  805. .text {
  806. color: #303133;
  807. font-size: 24rpx;
  808. }
  809. .tab-content {
  810. width: 100%;
  811. height: 162rpx;
  812. }
  813. .tab-item.active {
  814. border-radius: 24rpx;
  815. background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
  816. }
  817. }
  818. .second-tab {
  819. height: 80rpx;
  820. .tab-item{
  821. font-size: 28rpx;
  822. color: #999999;
  823. }
  824. .tab-item.active {
  825. color: #303133;
  826. font-weight: 700;
  827. }
  828. .tab-item.active::after {
  829. content: '';
  830. position: absolute;
  831. bottom: 0;
  832. left: 50%;
  833. transform: translateX(-50%);
  834. width: 18px; /* 比文字略宽 */
  835. height: 18px;
  836. border: 3px solid #0BBC58;
  837. border-radius: 50%;
  838. border-color: transparent; /* 隐藏其他部分 */
  839. border-bottom-color: #0BBC58; /* 组合成45度角 */
  840. // transform: rotate(0deg); /* 调整角度 */
  841. }
  842. }
  843. .third-tab {
  844. margin: 8rpx 0;
  845. height: 64rpx;
  846. line-height: 64rpx;
  847. display: flex;
  848. justify-content: space-between;
  849. .third-tab-item {
  850. flex: 1;
  851. text-align: center;
  852. }
  853. }
  854. .list {
  855. width: 100%;
  856. background-color: #F5F6FA;
  857. // margin-bottom: 100rpx;
  858. overflow-y: auto;
  859. padding: 0 32rpx;
  860. box-sizing: border-box;
  861. .list_item {
  862. width: 100%;
  863. margin: 0 auto 24rpx;
  864. padding: 32rpx;
  865. box-sizing: border-box;
  866. position: relative;
  867. background-color: #ffffff;
  868. border-radius: 16rpx;
  869. .list_item_top {
  870. .p1 {
  871. width: 86%;
  872. font-size: 28rpx;
  873. overflow: hidden;
  874. display: flex;
  875. align-items: center;
  876. .title{
  877. max-width: 75%;
  878. color: #333333;
  879. font-size: 28rpx;
  880. font-weight: 700;
  881. margin-right: 8rpx;
  882. overflow: hidden;
  883. text-overflow: ellipsis;
  884. white-space: nowrap;
  885. }
  886. .sub-title{
  887. border-radius: 32rpx;
  888. border:2rpx solid #0bbc58;
  889. padding: 4rpx 12rpx;
  890. font-size: 22rpx;
  891. font-weight: 400;
  892. overflow: hidden;
  893. text-overflow: ellipsis;
  894. white-space: nowrap;
  895. color:#0bbc58;
  896. margin-left: 20rpx;
  897. }
  898. }
  899. }
  900. .online-status{
  901. font-size: 28rpx;
  902. position: absolute;
  903. top:0rpx;
  904. text-align: center;
  905. right: 8rpx;
  906. top: 2rpx;
  907. width: 76px;
  908. height: 28px;
  909. // line-height: 28px;
  910. // border-radius: 0px 0px 0px 26px;
  911. // border: 1px solid #ffffff;
  912. image{
  913. width: 140rpx;
  914. height: 56rpx;
  915. }
  916. .status-text-online{
  917. color: #0BBC58;
  918. position: absolute;
  919. top: 0rpx;
  920. right: 0rpx;
  921. width: 120rpx;
  922. height: 56rpx;
  923. line-height: 56rpx;
  924. font-size: 26rpx;
  925. }
  926. .status-text-offline{
  927. color: #FB4E52;
  928. position: absolute;
  929. top: 0rpx;
  930. right: 0rpx;
  931. width: 120rpx;
  932. height: 56rpx;
  933. line-height: 56rpx;
  934. font-size: 26rpx;
  935. }
  936. }
  937. // .p2 {
  938. // color: #0BBC58;
  939. // background: #0bbc581a;
  940. // }
  941. // .p_out {
  942. // color: #FB4E52;
  943. // background: #fb4e521a;
  944. // }
  945. .list_item_text {
  946. margin-top: 20rpx;
  947. p {
  948. font-size: 24rpx;
  949. color: #303133;
  950. margin-top: 10rpx;
  951. word-break: break-all;
  952. }
  953. .label{
  954. color: #999999;
  955. text-align: left;
  956. margin-right: 32rpx;
  957. font-size: 24rpx;
  958. min-width: 90rpx;
  959. display: inline-block;
  960. }
  961. .nav-label{
  962. //超出隐藏
  963. display: inline-block;
  964. width: 70%;
  965. overflow: hidden;
  966. text-overflow: ellipsis;
  967. white-space: nowrap;
  968. }
  969. }
  970. .list_item_btn {
  971. width: 126rpx;
  972. color: #42b983;
  973. height: 40rpx;
  974. text-align: center;
  975. border: 1rpx solid #42b983;
  976. border-radius: 25rpx;
  977. font-size: 24rpx;
  978. line-height: 35rpx;
  979. position: absolute;
  980. bottom: 15rpx;
  981. right: 20rpx;
  982. }
  983. }
  984. }
  985. .top {
  986. position: fixed;
  987. right: 30px;
  988. bottom: 100px;
  989. z-index: 100;
  990. image {
  991. width: 100rpx;
  992. height: 100rpx;
  993. }
  994. }
  995. </style>