index.vue 40 KB

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