index.vue 42 KB

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