index.vue 42 KB

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