index.vue 44 KB

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