index.vue 42 KB

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