index.vue 43 KB

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