index.vue 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643
  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 {
  242. Debounce,
  243. Throttle
  244. } from '../../util/anitthro.js';
  245. export default {
  246. data() {
  247. return {
  248. showPopup: false,
  249. showPopup2: false,
  250. show4: false,
  251. percentage: 0,
  252. openingValue: 60,
  253. show1: false,
  254. show2: false,
  255. show3: false,
  256. content:'确认关闭当前阀吗?',
  257. hours: [],
  258. value: 0,
  259. minutes: [],
  260. sensor_params:{},
  261. valve_params:[],
  262. currentRow: {},
  263. lightning,
  264. battery,
  265. radioList:[{
  266. name:'常开',
  267. value:0
  268. },
  269. {
  270. name:'定时',
  271. value:1
  272. }],
  273. form:{},
  274. openingDegree,
  275. signal0,
  276. signal1,
  277. signal2,
  278. signal3,
  279. signal4,
  280. signal5,
  281. list: [],
  282. hour: 1,
  283. minute: 0,
  284. pur_id: '',
  285. loading: false,
  286. currentPur_id:'',
  287. device_status: '',
  288. counts:0,
  289. online_counts:0,
  290. offline_counts:0,
  291. accessToken: '',
  292. current: 0,
  293. currents: 0,
  294. total: 0,
  295. refreshData:'',
  296. page: 1,
  297. size: 10,
  298. eqlistdata: [],
  299. isTop: false,
  300. device_model: '',
  301. infoalter: false, // 权限设置,
  302. type_id: 0, //设备类型,
  303. imgpath: [],
  304. loadingtf: false,
  305. width: 0, //顶部搜索栏宽度
  306. device_id: '', //搜索设备ID
  307. current_device_id: '', //当前设备ID
  308. menuList: [],
  309. sliderRect: {},
  310. sliderDragging: false,
  311. equipContrlForm: {
  312. openingValue: 60,
  313. },
  314. sliderField: '',
  315. sliderMin: 0,
  316. sliderMax: 0,
  317. timer: null,
  318. myuser_type: -1,
  319. valve_param_key: '',
  320. };
  321. },
  322. methods: {
  323. toControls(){
  324. uni.navigateTo({
  325. url: '/pages/cb/zhamenFirst/controls',
  326. });
  327. },
  328. getvalve_params(item){
  329. return item?.valve_params || [];
  330. },
  331. getcharging_vol(item){
  332. return item?.charging_vol || 0;
  333. },
  334. getrssl(item){
  335. return item?.rssl || 0;
  336. },
  337. getopeningValue(item){
  338. return item?.kwh || 0;
  339. },
  340. getRadioValue(){
  341. return this.value;
  342. },
  343. setPercentage(msg){
  344. this.timer = setInterval(() => {
  345. this.percentage += 1;
  346. if(this.percentage >= 100){
  347. this.percentage = 100;
  348. uni.showToast({
  349. title: msg,
  350. icon: 'none',
  351. });
  352. clearInterval(this.timer);
  353. this.show4 = false;
  354. this.percentage = 0;
  355. this.eqlist();
  356. }
  357. }, 125);
  358. },
  359. getSignal(item){
  360. const val = item?.rssl || 0;
  361. if(val < 0){
  362. return this.signal0;
  363. }
  364. if(val > 5){
  365. return this.signal5;
  366. }
  367. return this['signal' + val];
  368. },
  369. confirmClose(){
  370. this.closeValve();
  371. },
  372. cancelClose(){
  373. this.show3 = false;
  374. },
  375. editHandle(openingValue,item,device){
  376. this.valve_param_key = item.key;
  377. this.current_device_id = device.id;
  378. this.showPopup2 = true;
  379. this.equipContrlForm.openingValue = openingValue;
  380. },
  381. changeHour(e){
  382. this.hour = e[0].value
  383. },
  384. changeMinute(e){
  385. this.minute = e[0].value
  386. },
  387. getProgressWidth(value, min, max) {
  388. if (max === min) return 0
  389. return ((value - min) / (max - min)) * 100
  390. },
  391. getModel(value){
  392. return value == 0 ? false : true
  393. },
  394. async closeValve(){
  395. const res = await this.$myRequest({
  396. url: '/api/api_gateway?method=irrigation_system.valvecontrol.close_valvecontrol_valve',
  397. method: 'POST',
  398. data: {
  399. device_id: this.current_device_id,
  400. valve_param_key: this.valve_param_key
  401. },
  402. });
  403. if(res.code == 0){
  404. this.show4 = true;
  405. this.setPercentage(res.message);
  406. }else{
  407. uni.showToast({
  408. title: res?.message,
  409. icon: 'none',
  410. });
  411. }
  412. },
  413. async setAction(data){
  414. const res = await this.$myRequest({
  415. url: '/api/api_gateway?method=irrigation_system.valvecontrol.open_valvecontrol_valve',
  416. method: 'POST',
  417. data,
  418. });
  419. if(res.code == 0){
  420. this.show4 = true;
  421. this.setPercentage(res.message);
  422. }else{
  423. uni.showToast({
  424. title: res?.message,
  425. icon: 'none',
  426. });
  427. }
  428. },
  429. async setEditAction(data){
  430. const res = await this.$myRequest({
  431. url: '/api/api_gateway?method=irrigation_system.valvecontrol.alter_valvecontrol_valve_percentage',
  432. method: 'POST',
  433. data,
  434. });
  435. if(res.code == 0){
  436. this.show4 = true;
  437. this.setPercentage(res.message);
  438. }else{
  439. uni.showToast({
  440. title: res?.message,
  441. icon: 'none',
  442. });
  443. }
  444. },
  445. onSliderTouchStart(e, field, min, max) {
  446. this.sliderDragging = true
  447. this.sliderField = field
  448. this.sliderMin = min
  449. this.sliderMax = max
  450. const query = uni.createSelectorQuery().in(this)
  451. query.select('.custom-progress').boundingClientRect(rect => {
  452. this.sliderRect = rect
  453. }).exec()
  454. this.updateSliderValue(e.touches[0].clientX, field, min, max)
  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) 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. console.log(resData,'resDasadsdss')
  629. if (tf) {
  630. this.eqlistdata = this.eqlistdata.concat(resData);
  631. } else {
  632. this.eqlistdata = resData;
  633. }
  634. },
  635. change(index,itemData) {
  636. this.list = this.menuList[index].children || []
  637. const list = [];
  638. this.list.forEach(item=>{
  639. if(item.url){
  640. list.push(item)
  641. }
  642. })
  643. // if(list.length > 1){
  644. // if(this.list[0].purview_name != '全部'){
  645. // this.list.unshift({
  646. // device_type_id: '',
  647. // purview_name: '全部'
  648. // })
  649. // }
  650. // }
  651. this.current = index;
  652. const item = this.list[0];
  653. this.pur_id = itemData.pur_id || '';
  654. // this.changeDevice(item,0);
  655. },
  656. changeDevice(item,index){
  657. this.currents = index;
  658. this.currentPur_id = item.pur_id || '';
  659. const name = item.menu;
  660. if (name === 'cbd4') {
  661. this.device_model = 11;
  662. } else if(name === 'cbd1'){
  663. this.device_model = 12;
  664. } else if(name === 'cbd3'){
  665. this.device_model = '';
  666. } else if(name === 'cbd5'){
  667. this.device_model = 13;
  668. } else if(name === 'cbd6'){
  669. this.device_model = 14;
  670. }else if(name === 'gkcbd1'){
  671. this.device_model = 15;
  672. } else if(name === 'zhiCbd'){
  673. this.device_model = 16;
  674. } else {
  675. this.device_model = item.device_model || '';
  676. }
  677. this.page = 1;
  678. this.eqlistdata = [];
  679. this.type_id = item.device_type_id;
  680. Debounce(() => {
  681. this.eqlist();
  682. }, 500)();
  683. },
  684. top() {
  685. uni.pageScrollTo({
  686. scrollTop: 0,
  687. duration: 500,
  688. });
  689. },
  690. initPage(){
  691. this.eqlistdata = [];
  692. this.currents = 0;
  693. this.page = 1;
  694. Debounce(() => {
  695. this.eqlist();
  696. }, 500)();
  697. this.width = 0;
  698. },
  699. historys(item) {
  700. const type_id = item.type_id;
  701. this.accessToken = uni.getStorageSync('session_key')
  702. switch (type_id) {
  703. // 水肥新设备
  704. case 49:
  705. return;
  706. case 22:
  707. var obj = {};
  708. obj.d_id = item.d_id;
  709. obj.device_id = item.id;
  710. obj.is_online = item.status;
  711. obj.lat = item.lat;
  712. obj.lng = item.lng;
  713. obj.equip_name = item.name;
  714. obj.uptime = item.uptime;
  715. uni.navigateTo({
  716. url: '../waterandfernew/details?shebei=' + JSON.stringify(obj),
  717. });
  718. break;
  719. // 病虫害可视监测
  720. case 14:
  721. item.addtime = item.uptime;
  722. uni.navigateTo({
  723. url: '../cb/sy/detail?detail=' + JSON.stringify(item),
  724. });
  725. // uni.navigateTo({
  726. // url: '../sy/detail?info=' +
  727. // JSON.stringify(item) + '&cmd=sy',
  728. // });
  729. break;
  730. case 2:
  731. item.addtime = item.uptime;
  732. // if(item.device_model == 102){
  733. uni.navigateTo({
  734. url: '../scd/detail?info=' + JSON.stringify(item),
  735. });
  736. // }else{
  737. // uni.navigateTo({
  738. // url: '../prevention/equipmentdetails?shebei=' + JSON.stringify(item),
  739. // });
  740. // }
  741. break;
  742. case 38:
  743. case 50:
  744. uni.navigateTo({
  745. 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}`,
  746. });
  747. break;
  748. // var obj = {};
  749. // obj.d_id = item.d_id;
  750. // obj.equip_id = item.id;
  751. // obj.is_online = item.status;
  752. // obj.lat = item.lat;
  753. // obj.lng = item.lng;
  754. // obj.equip_name = item.name;
  755. // obj.uptime = item.uptime;
  756. // uni.navigateTo({
  757. // url: '../environment/equipment-new?shebei=' + JSON.stringify(obj),
  758. // });
  759. break;
  760. case 5:
  761. var obj = {};
  762. obj.d_id = item.d_id;
  763. obj.equip_id = item.id;
  764. obj.is_online = item.status;
  765. obj.lat = item.lat;
  766. obj.lng = item.lng;
  767. obj.equip_name = item.name;
  768. obj.uptime = item.uptime;
  769. // uni.navigateTo({
  770. // url: '../environment/equipment?shebei=' + JSON.stringify(obj),
  771. // });
  772. uni.navigateTo({
  773. 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`,
  774. });
  775. break;
  776. case 6:
  777. uni.navigateTo({
  778. url: '/pages/webview?device_id=' +
  779. item.id +
  780. '&accessToken=' +
  781. this.accessToken,
  782. });
  783. break;
  784. case 44:
  785. uni.navigateTo({
  786. url:
  787. '/pages/webviewdgp?device_id=' +
  788. item.id +
  789. '&accessToken=' +
  790. uni.getStorageSync('session_key') +
  791. '&type=dgp',
  792. });
  793. break;
  794. case 3:
  795. item.addtime = item.uptime;
  796. item.type = item.type_id;
  797. uni.navigateTo({
  798. url: '../cbd/detail?info=' + JSON.stringify(item),
  799. });
  800. break;
  801. case 28:
  802. item.addtime = item.uptime;
  803. item.type = item.type_id;
  804. uni.navigateTo({
  805. url: '../cb/smallPest/smallPest?info=' + JSON.stringify(item),
  806. });
  807. break;
  808. case 4:
  809. item.addtime = item.uptime;
  810. item.type = item.type_id;
  811. uni.navigateTo({
  812. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  813. });
  814. break;
  815. case 32:
  816. case 35:
  817. item.addtime = item.uptime;
  818. item.type = item.type_id;
  819. uni.navigateTo({
  820. url: '../cb/equip-detail/equip-detail-new?info=' +
  821. JSON.stringify(item),
  822. });
  823. break;
  824. case 33:
  825. case 34:
  826. item.addtime = item.uptime;
  827. item.type = item.type_id;
  828. let cmd = ''
  829. if(type_id == 34){
  830. cmd = 'sy1'
  831. }else if(type_id == 33){
  832. cmd = 'sy2'
  833. }
  834. uni.navigateTo({
  835. url: '../sy/detail?info=' +
  836. JSON.stringify(item) + '&cmd=' + cmd,
  837. });
  838. break;
  839. case 7:
  840. item.addtime = item.uptime;
  841. item.type = item.type_id;
  842. // uni.navigateTo({
  843. // url: '../bzy/detail?info=' + JSON.stringify(item),
  844. // });
  845. if(item.pur_id !== 307){
  846. uni.navigateTo({
  847. url: '../bzy/detail?info=' + JSON.stringify(item),
  848. });
  849. }else{
  850. uni.navigateTo({
  851. url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
  852. });
  853. }
  854. break;
  855. case 8:
  856. uni.navigateTo({
  857. url: '../cb/thxydetail/thxydetail?imei=' + item.id,
  858. });
  859. break;
  860. case 29:
  861. uni.navigateTo({
  862. url: `../cb/nlNewXy/nlNewXy?imei=${item.id}&showId=${item.d_id}`,
  863. });
  864. break;
  865. case 24:
  866. uni.navigateTo({
  867. url: '../cb/zjxydetail/thxydetail?imei=' + item.id,
  868. });
  869. break;
  870. case 12:
  871. item.addtime = item.uptime;
  872. uni.navigateTo({
  873. url: '../cb/xctdetail/xctdetail?info=' + JSON.stringify(item),
  874. });
  875. break;
  876. case 13:
  877. var obj = {};
  878. obj.d_id = item.d_id;
  879. obj.device_id = item.id;
  880. obj.is_online = item.status;
  881. obj.lat = item.lat;
  882. obj.lng = item.lng;
  883. obj.equip_name = item.name;
  884. obj.uptime = item.uptime;
  885. uni.navigateTo({
  886. url: '../waterandfer/datails?shebei=' + JSON.stringify(obj),
  887. });
  888. break;
  889. case 15:
  890. var obj = {};
  891. obj.d_id = item.d_id;
  892. obj.device_id = item.id;
  893. obj.is_online = item.status;
  894. obj.lat = item.lat;
  895. obj.lng = item.lng;
  896. obj.equip_name = item.name;
  897. obj.uptime = item.uptime;
  898. obj.address = item.address || '无';
  899. // uni.navigateTo({
  900. // url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
  901. // });
  902. uni.navigateTo({
  903. 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`,
  904. });
  905. break;
  906. case 17:
  907. break;
  908. case 18:
  909. var obj = {};
  910. obj.device_id = item.id;
  911. obj.is_online = item.status;
  912. uni.navigateTo({
  913. url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
  914. });
  915. break;
  916. case 43:
  917. uni.navigateTo({
  918. url: "/pages/fmSys/details?info=" + JSON.stringify(item)
  919. })
  920. break;
  921. // case 44:
  922. // uni.navigateTo({
  923. // url: "/pages/webviewdgp/webview?device_id=" + item.id + "&accessToken=" + this.accessToken || uni
  924. // .getStorageSync('session_key') +
  925. // '&type=dgp'
  926. // })
  927. // break;
  928. case 11:
  929. var obj = {};
  930. obj.d_id = item.d_id;
  931. obj.device_id = item.id;
  932. obj.is_online = item.status;
  933. obj.lat = item.lat;
  934. obj.lng = item.lng;
  935. obj.equip_name = item.name;
  936. obj.uptime = item.uptime;
  937. obj.location = item.address;
  938. obj.type = 11;
  939. uni.navigateTo({
  940. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  941. });
  942. break;
  943. case 19:
  944. var obj = {};
  945. obj.d_id = item.d_id;
  946. obj.device_id = item.id;
  947. obj.is_online = item.status;
  948. obj.lat = item.lat;
  949. obj.lng = item.lng;
  950. obj.equip_name = item.name;
  951. obj.uptime = item.uptime;
  952. obj.location = item.address;
  953. obj.type = 19;
  954. uni.navigateTo({
  955. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  956. });
  957. break;
  958. case 20:
  959. var obj = {};
  960. obj.d_id = item.d_id;
  961. obj.device_id = item.id;
  962. obj.is_online = item.status;
  963. obj.lat = item.lat;
  964. obj.lng = item.lng;
  965. obj.equip_name = item.name;
  966. obj.uptime = item.uptime;
  967. obj.location = item.address;
  968. obj.type = 20;
  969. uni.navigateTo({
  970. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  971. });
  972. break;
  973. case 21:
  974. var obj = {};
  975. obj.d_id = item.d_id;
  976. obj.device_id = item.id;
  977. obj.is_online = item.status;
  978. obj.lat = item.lat;
  979. obj.lng = item.lng;
  980. obj.equip_name = item.name;
  981. obj.uptime = item.uptime;
  982. obj.location = item.address;
  983. obj.type = 21;
  984. uni.navigateTo({
  985. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  986. });
  987. break;
  988. case 26:
  989. var obj = {};
  990. obj.d_id = item.d_id;
  991. obj.device_id = item.id;
  992. obj.is_online = item.status;
  993. obj.lat = item.lat;
  994. obj.lng = item.lng;
  995. obj.equip_name = item.name;
  996. obj.uptime = item.uptime;
  997. obj.location = item.address;
  998. obj.type = 26;
  999. uni.navigateTo({
  1000. url: '../disease/cmb?shebei=' + JSON.stringify(obj),
  1001. });
  1002. break;
  1003. case 27:
  1004. var obj = {};
  1005. obj.d_id = item.d_id;
  1006. obj.device_id = item.id;
  1007. obj.is_online = item.status;
  1008. obj.lat = item.lat;
  1009. obj.lng = item.lng;
  1010. obj.equip_name = item.name;
  1011. obj.uptime = item.uptime;
  1012. obj.location = item.address;
  1013. obj.type = 26;
  1014. uni.navigateTo({
  1015. url: '../disease/mls/mls?shebei=' + JSON.stringify(obj),
  1016. });
  1017. break;
  1018. case 25:
  1019. item.addtime = item.uptime;
  1020. uni.navigateTo({
  1021. url: '../cb/xylps/detail?detail=' + JSON.stringify(item),
  1022. });
  1023. break;
  1024. case 40:
  1025. item.addtime = item.uptime;
  1026. uni.navigateTo({
  1027. url: `../cb/shuifeizs/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1028. });
  1029. break;
  1030. case 42:
  1031. item.addtime = item.uptime;
  1032. uni.navigateTo({
  1033. url: `../cb/wenshizs/wenshizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1034. });
  1035. break;
  1036. case 45:
  1037. item.addtime = item.uptime;
  1038. uni.navigateTo({
  1039. url: `../cb/shuifeizsFirst/shuifeizs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1040. });
  1041. break;
  1042. case 46:
  1043. uni.navigateTo({
  1044. 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`,
  1045. });
  1046. break;
  1047. case 47:
  1048. uni.navigateTo({
  1049. url: `../cb/zhamenFirst/zhamenzs?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}`,
  1050. });
  1051. break;
  1052. default:
  1053. item.addtime = item.uptime;
  1054. item.type = this.type_id;
  1055. uni.navigateTo({
  1056. url: '../cb/xy2.0/particulars?info=' + JSON.stringify(item),
  1057. });
  1058. break;
  1059. }
  1060. },
  1061. searchinput() {
  1062. Debounce(() => {
  1063. this.eqlistdata = [];
  1064. this.page = 1;
  1065. this.eqlist();
  1066. }, 1000)();
  1067. },
  1068. scrollTop(e) {},
  1069. upper() {},
  1070. lower() {
  1071. if(this.eqlistdata.length >= this.total){
  1072. return;
  1073. }
  1074. Debounce(() => {
  1075. this.page++;
  1076. this.eqlist(true);
  1077. }, 500)();
  1078. },
  1079. scroll() {},
  1080. },
  1081. watch:{
  1082. pur_id(){
  1083. setTimeout(() => {
  1084. this.getUserlogin();
  1085. }, 100);
  1086. },
  1087. },
  1088. onLoad() {
  1089. this.getHours();
  1090. this.getMinutes();
  1091. const that = this;
  1092. uni.$on('purId', (item) => {
  1093. that.pur_id = item.purId;
  1094. that.menu = item.menu;
  1095. that.device_model = item.device_model;
  1096. });
  1097. uni.$on('refreshData', (refreshData) => {
  1098. this.eqlist();
  1099. });
  1100. uni.getStorage({
  1101. key:"myuser_type",
  1102. success:(res)=>{
  1103. console.log(res,'resresres')
  1104. this.myuser_type = res?.data;
  1105. }
  1106. })
  1107. this.getUserlogin();
  1108. },
  1109. onShow() {
  1110. // 监听刷新数据事件
  1111. const refreshData = uni.getStorageSync('refreshData');
  1112. if(!this.refreshData){
  1113. this.refreshData = refreshData;
  1114. // 如果发生改变,刷新数据
  1115. if(refreshData){
  1116. Debounce(() => {
  1117. this.getUserlogin();
  1118. }, 500)();
  1119. }
  1120. }else if(this.refreshData != refreshData){
  1121. this.refreshData = refreshData;
  1122. Debounce(() => {
  1123. this.getUserlogin();
  1124. }, 500)();
  1125. }
  1126. },
  1127. onTabItemTap(e) {
  1128. },
  1129. onReachBottom() {
  1130. if(this.eqlistdata.length >= this.total){
  1131. return;
  1132. }
  1133. Debounce(() => {
  1134. this.page++;
  1135. this.eqlist(true);
  1136. }, 500)();
  1137. },
  1138. onPageScroll(e) {
  1139. //nvue暂不支持滚动监听,可用bindingx代替
  1140. if (e.scrollTop > 200) {
  1141. //距离大于200时显示
  1142. this.isTop = true;
  1143. } else {
  1144. //距离小于200时隐藏
  1145. this.isTop = false;
  1146. }
  1147. },
  1148. };
  1149. </script>
  1150. <style lang="scss">
  1151. page {
  1152. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  1153. }
  1154. ::v-deep .u-flex{
  1155. display: flex;
  1156. align-items: center;
  1157. justify-content: center;
  1158. }
  1159. .hour,.minute{
  1160. font-size: 28rpx;
  1161. color: #999999;
  1162. border-radius: 8rpx;
  1163. border: 2rpx solid #aaa;
  1164. padding: 4rpx 8rpx;
  1165. margin-right: 8rpx;
  1166. height: 40rpx;
  1167. display: flex;
  1168. align-items: center;
  1169. justify-content: center;
  1170. width: 160rpx;
  1171. }
  1172. /deep/.uni-icons {
  1173. font-size: 40rpx !important;
  1174. }
  1175. input{
  1176. background: transparent !important;
  1177. }
  1178. .textbox {
  1179. width: 100%;
  1180. height: calc(100vh - 82rpx);
  1181. padding-top: 82rpx;
  1182. box-sizing: border-box;
  1183. }
  1184. .inputs {
  1185. width: 65%;
  1186. margin-left: 12rpx;
  1187. /deep/.u-content {
  1188. background-color: #fff !important;
  1189. }
  1190. /deep/.uni-input-wrapper {
  1191. background-color: #fff !important;
  1192. }
  1193. }
  1194. .slider-container{
  1195. position: relative;
  1196. margin-top: 10rpx;
  1197. .slider-min-value{
  1198. position: absolute;
  1199. left: 0;
  1200. top: -60rpx;
  1201. }
  1202. .slider{
  1203. width: 600rpx;
  1204. }
  1205. .slider-max-value{
  1206. position: absolute;
  1207. right: 0;
  1208. top: -60rpx;
  1209. }
  1210. }
  1211. .custom-progress{
  1212. width: 500rpx;
  1213. padding: 0;
  1214. &.dragging{
  1215. .progress-fill,
  1216. .progress-thumb{
  1217. transition: none;
  1218. }
  1219. }
  1220. .progress-track{
  1221. position: relative;
  1222. height: 12rpx;
  1223. background-color: #ebedf0;
  1224. border-radius: 6rpx;
  1225. }
  1226. .progress-fill{
  1227. position: absolute;
  1228. left: 0;
  1229. top: 0;
  1230. height: 100%;
  1231. background-color: #0BBC58;
  1232. border-radius: 6rpx;
  1233. transition: width 0.2s;
  1234. }
  1235. .progress-thumb{
  1236. position: absolute;
  1237. top: 50%;
  1238. width: 28rpx;
  1239. height: 28rpx;
  1240. margin-left: -14rpx;
  1241. margin-top: -14rpx;
  1242. border-radius: 50%;
  1243. background-color: #fff;
  1244. box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  1245. transition: left 0.2s;
  1246. }
  1247. }
  1248. .utabs_box {
  1249. width: 100%;
  1250. position: fixed;
  1251. top: 88px;
  1252. background-color: #ffffff;
  1253. z-index: 100;
  1254. .utabs {
  1255. width: 95%;
  1256. margin: 0 auto;
  1257. }
  1258. }
  1259. .opening-container{
  1260. position: relative;
  1261. width: 100%;
  1262. .opening-min{
  1263. position: absolute;
  1264. top: 0;
  1265. left: 0;
  1266. font-size: 24rpx;
  1267. }
  1268. .opening-max{
  1269. position: absolute;
  1270. top: 0;
  1271. right: 0;
  1272. font-size: 24rpx;
  1273. }
  1274. }
  1275. .loading {
  1276. position: fixed;
  1277. top: 440px;
  1278. width: 95%;
  1279. left: 2.5%;
  1280. text-align: center;
  1281. .img {
  1282. width: 300rpx;
  1283. height: 40rpx;
  1284. }
  1285. }
  1286. .active-tab{
  1287. border-radius: 8rpx;
  1288. background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
  1289. }
  1290. .tab-box {
  1291. font-size: 30rpx;
  1292. box-sizing: border-box;
  1293. width: 100%;
  1294. height: 100%;
  1295. overflow-y: hidden;
  1296. overflow-x: auto;
  1297. white-space: nowrap;
  1298. // 去掉滚动条
  1299. -ms-overflow-style: none;
  1300. scrollbar-width: none;
  1301. .tab-item {
  1302. cursor: pointer;
  1303. position: relative;
  1304. text-align: center;
  1305. display: inline-block;
  1306. padding: 16rpx 24rpx;
  1307. box-sizing: border-box;
  1308. span {
  1309. display: inline-block;
  1310. }
  1311. }
  1312. }
  1313. .tab-box-top{
  1314. .tab-item {
  1315. width: 140rpx;
  1316. text-align: center;
  1317. }
  1318. }
  1319. .action-list{
  1320. display: flex;
  1321. margin: 8px 0;
  1322. .action-item{
  1323. display: flex;
  1324. align-items: center;
  1325. margin-right: 8px;
  1326. .item-icon{
  1327. width: 15px;
  1328. height: 15px;
  1329. margin-right: 4px;
  1330. }
  1331. }
  1332. }
  1333. .action-container{
  1334. display: flex;
  1335. align-items: center;
  1336. gap: 16rpx;
  1337. .action-container-item{
  1338. flex:1;
  1339. height: 90rpx;
  1340. border-radius: 8rpx;
  1341. background: #ffffff;
  1342. padding: 8rpx;
  1343. border: 2rpx solid #999999;
  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. background: #0BBC58;
  1423. position: fixed;
  1424. bottom: 0rpx;;
  1425. border-radius: 8rpx;
  1426. z-index:1000;
  1427. color:#fff;
  1428. width:100%;
  1429. padding: 10rpx 0;
  1430. .action-item{
  1431. display: flex;
  1432. align-items: center;
  1433. justify-content: center;
  1434. flex:1;
  1435. text-align: center;
  1436. border-radius: 8rpx;
  1437. border:2rpx solid #0BBC58;
  1438. padding: 16rpx 0;
  1439. font-size: 24rpx;
  1440. color: #fff;
  1441. .item-icon{
  1442. width: 15px;
  1443. height: 15px;
  1444. margin-right: 4px;
  1445. }
  1446. }
  1447. }
  1448. .second-tab {
  1449. height: 80rpx;
  1450. .tab-item{
  1451. font-size: 28rpx;
  1452. color: #999999;
  1453. }
  1454. .tab-item.active {
  1455. color: #303133;
  1456. font-weight: 700;
  1457. }
  1458. .tab-item.active::after {
  1459. content: '';
  1460. position: absolute;
  1461. bottom: 0;
  1462. left: 50%;
  1463. transform: translateX(-50%);
  1464. width: 18px; /* 比文字略宽 */
  1465. height: 18px;
  1466. border: 3px solid #0BBC58;
  1467. border-radius: 50%;
  1468. border-color: transparent; /* 隐藏其他部分 */
  1469. border-bottom-color: #0BBC58; /* 组合成45度角 */
  1470. // transform: rotate(0deg); /* 调整角度 */
  1471. }
  1472. }
  1473. .third-tab {
  1474. margin: 8rpx 0;
  1475. height: 64rpx;
  1476. line-height: 64rpx;
  1477. display: flex;
  1478. justify-content: space-between;
  1479. .third-tab-item {
  1480. flex: 1;
  1481. text-align: center;
  1482. }
  1483. }
  1484. .list {
  1485. width: 100%;
  1486. background-color: #F5F6FA;
  1487. // margin-bottom: 100rpx;
  1488. overflow-y: auto;
  1489. padding: 0 32rpx;
  1490. padding-bottom: 100rpx;
  1491. box-sizing: border-box;
  1492. .list_item {
  1493. width: 100%;
  1494. margin: 0 auto 24rpx;
  1495. padding: 32rpx;
  1496. box-sizing: border-box;
  1497. position: relative;
  1498. background-color: #ffffff;
  1499. border-radius: 16rpx;
  1500. .list_item_top {
  1501. .p1 {
  1502. width: 86%;
  1503. font-size: 28rpx;
  1504. overflow: hidden;
  1505. display: flex;
  1506. align-items: center;
  1507. .title{
  1508. max-width: 75%;
  1509. color: #333333;
  1510. font-size: 28rpx;
  1511. font-weight: 700;
  1512. margin-right: 8rpx;
  1513. overflow: hidden;
  1514. text-overflow: ellipsis;
  1515. white-space: nowrap;
  1516. }
  1517. .sub-title{
  1518. border-radius: 32rpx;
  1519. border:2rpx solid #0bbc58;
  1520. padding: 4rpx 12rpx;
  1521. font-size: 22rpx;
  1522. font-weight: 400;
  1523. overflow: hidden;
  1524. text-overflow: ellipsis;
  1525. white-space: nowrap;
  1526. color:#0bbc58;
  1527. margin-left: 20rpx;
  1528. }
  1529. }
  1530. }
  1531. .online-status{
  1532. font-size: 28rpx;
  1533. position: absolute;
  1534. text-align: center;
  1535. right: 2rpx;
  1536. top: 2rpx;
  1537. image{
  1538. width: 140rpx;
  1539. height: 56rpx;
  1540. }
  1541. .status-text-online{
  1542. color: #0BBC58;
  1543. position: absolute;
  1544. top: 0rpx;
  1545. right: 0rpx;
  1546. width: 120rpx;
  1547. height: 56rpx;
  1548. line-height: 56rpx;
  1549. font-size: 26rpx;
  1550. }
  1551. .status-text-offline{
  1552. color: #FB4E52;
  1553. position: absolute;
  1554. top: 0rpx;
  1555. right: 0rpx;
  1556. width: 120rpx;
  1557. height: 56rpx;
  1558. line-height: 56rpx;
  1559. font-size: 26rpx;
  1560. }
  1561. }
  1562. // .p2 {
  1563. // color: #0BBC58;
  1564. // background: #0bbc581a;
  1565. // }
  1566. // .p_out {
  1567. // color: #FB4E52;
  1568. // background: #fb4e521a;
  1569. // }
  1570. .list_item_text {
  1571. margin-top: 20rpx;
  1572. .p1 {
  1573. font-size: 24rpx;
  1574. color: #303133;
  1575. margin-top: 10rpx;
  1576. word-break: break-all;
  1577. }
  1578. .label{
  1579. color: #999999;
  1580. text-align: left;
  1581. margin-right: 32rpx;
  1582. font-size: 24rpx;
  1583. min-width: 90rpx;
  1584. display: inline-block;
  1585. }
  1586. .nav-label{
  1587. //超出隐藏
  1588. display: inline-block;
  1589. width: 70%;
  1590. overflow: hidden;
  1591. text-overflow: ellipsis;
  1592. white-space: nowrap;
  1593. }
  1594. }
  1595. .list_item_btn {
  1596. width: 126rpx;
  1597. color: #42b983;
  1598. height: 40rpx;
  1599. text-align: center;
  1600. border: 1rpx solid #42b983;
  1601. border-radius: 25rpx;
  1602. font-size: 24rpx;
  1603. line-height: 35rpx;
  1604. position: absolute;
  1605. bottom: 15rpx;
  1606. right: 20rpx;
  1607. }
  1608. }
  1609. }
  1610. .top {
  1611. position: fixed;
  1612. right: 30px;
  1613. bottom: 100px;
  1614. z-index: 100;
  1615. image {
  1616. width: 100rpx;
  1617. height: 100rpx;
  1618. }
  1619. }
  1620. </style>