shuifeizs.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. <template>
  2. <view class="facilitystate-page">
  3. <custom-card>
  4. <block slot="backText">
  5. <view class="facilitystate-top__title">
  6. <text :class="devStatus == '1' ? 'online' : 'offline'">{{
  7. devStatus == '1' ? '在线' : '离线'
  8. }}</text>
  9. {{ devName }}
  10. </view>
  11. </block>
  12. </custom-card>
  13. <view class="facilitystate-top" v-if="username !== '平鲁农业农村局'">
  14. <view
  15. class="facilitystate-top__item"
  16. v-for="(item, index) in deviceList"
  17. :key="index"
  18. v-if="item.show"
  19. @click="nativeTo(item)"
  20. >
  21. <view class="item-icon-container" :class="item.className">
  22. <image class="item-icon" :src="item.icon" />
  23. </view>
  24. <view class="facilitystate-top__item-text">{{ item.title }}</view>
  25. </view>
  26. </view>
  27. <view class="irrMode">
  28. <view class="irrMode__header" v-if="irrigatedAreaList.length">
  29. <view @click="changeMode('1')" :class="workStatus == '1' ? 'active' : ''">施肥模式</view>
  30. <view @click="changeMode('0')" :class="workStatus == '0' ? 'active' : ''">灌溉模式</view>
  31. </view>
  32. <view class="irrMode__content" v-if="irrigatedAreaList.length">
  33. <view class="irrMode__content-header">
  34. <view class="irrMode__content-header-list">
  35. <view class="irrMode__content-header-title">
  36. <view class="irrMode__content-header-container">
  37. <image class="header-item-icon" :src="rain" />
  38. <text style="color:#333;font-size: 24rpx;margin-left: 10rpx">当前灌溉区域:</text>{{ runTitle }}
  39. </view>
  40. <view class="timer-text">{{ timer }}分</view>
  41. </view>
  42. </view>
  43. <view class="irrMode__content-item">
  44. <view class="irrMode__content-item-raduis" :class="runStatus == '1' ? 'active-radius' : ''" @click="changeActive('1')">
  45. <image class="item-icon" :src="runStatus=='1'?mediaPlayFill:mediaPlay" />
  46. <view class="item-text">启动</view>
  47. </view>
  48. <view class="irrMode__content-item-raduis" :class="runStatus == '2' ? 'active-radius' : ''" @click="changeActive('2')">
  49. <image class="item-icon" :src="runStatus=='2'?mediaPauseFill:mediaPause" />
  50. <view class="item-text">暂停</view>
  51. </view>
  52. <view class="irrMode__content-item-raduis" :class="runStatus == '0' ? 'active-radius' : ''" @click="changeActive('0')" style="margin-right:0">
  53. <image class="item-icon" :src="runStatus=='0'?stopFill:stop" />
  54. <view class="item-text">停止</view>
  55. </view>
  56. </view>
  57. <view class="irr-run-list">
  58. <text v-for="(item, index) in selectAreaList" :key="index">
  59. {{ item.group_name }}
  60. <text v-if="index != selectAreaList.length - 1">、</text>
  61. </text>
  62. </view>
  63. </view>
  64. </view>
  65. <Base :dataList="dataList" />
  66. <facilitystate
  67. :devBid="devBid"
  68. :ggbCurrent="ggbCurrent"
  69. :sfbCurrent="sfbCurrent"
  70. :irrigatedAreaList="irrigatedAreaList"
  71. :webSockedData="webSockedData"
  72. :alreadyfertilizerBucketList="alreadyfertilizerBucketList"
  73. />
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import manualControl from './assets/manualControl.png';
  79. import mediaPause from './assets/media-pause.png';
  80. import mediaPauseFill from './assets/media-pause-fill.png';
  81. import mediaPlay from './assets/media-play.png';
  82. import mediaPlayFill from './assets/media-play-fill.png';
  83. import rain from './assets/rain.png';
  84. import stop from './assets/stop.png';
  85. import stopFill from './assets/stop-fill.png';
  86. import wheelIrrigation from './assets/wheelIrrigation.png';
  87. import time from './assets/timing.png';
  88. import formulaSetting from './assets/formulaSetting.png';
  89. import operatingRecord from './assets/operatingRecord.png';
  90. import Base from './components/base.vue';
  91. import facilitystate from './components/facilitystate.vue';
  92. export default {
  93. data() {
  94. return {
  95. ws: null,
  96. currentMode: '1',
  97. title: '水肥一体机',
  98. manualControl,
  99. devBid: '',
  100. devName: '',
  101. devStatus: '1',
  102. dataList: [],
  103. irrigatedAreaList: [],
  104. alreadyfertilizerBucketList: [],
  105. mediaPause,
  106. mediaPauseFill,
  107. mediaPlay,
  108. mediaPlayFill,
  109. rain,
  110. stop,
  111. stopFill,
  112. deviceList: [
  113. {
  114. icon: manualControl,
  115. title: '手动控制',
  116. show: true,
  117. className: 'manualControl',
  118. url: '/pages/cb/shuifeizsFirst/control',
  119. },
  120. {
  121. icon: wheelIrrigation,
  122. title: '自动控制',
  123. show: true,
  124. className: 'wheelIrrigation',
  125. url: '/pages/cb/shuifeizsFirst/autoSetting?devBid=' + this.devBid,
  126. }, {
  127. icon: time,
  128. title: '定时设置',
  129. show: true,
  130. className: 'timedSetting',
  131. url: '/pages/cb/shuifeizsFirst/timingSetting?devBid=' + this.devBid,
  132. },{
  133. icon: formulaSetting,
  134. title: '配方设置',
  135. show: true,
  136. className: 'formulaSetting',
  137. url: '/pages/cb/shuifeizsFirst/formulaSetting?devBid=' + this.devBid,
  138. }, {
  139. icon: operatingRecord,
  140. title: '操作记录',
  141. show: true,
  142. className: 'operatingRecord',
  143. url: '/pages/cb/shuifeizsFirst/history?devBid=' + this.devBid,
  144. },
  145. ],
  146. ggbCurrent: {},
  147. sfbCurrent: {},
  148. sfToken: '',
  149. entityId: '',
  150. heartbeatTimer: null,
  151. info: {},
  152. dataArray:[],
  153. webSockedData: {},
  154. reconnectCount: 0,
  155. isActive: '0',
  156. runStatus: 0,
  157. workStatus: 0,
  158. clearIrr: {},
  159. selectAreaList: [],
  160. runTitle: '--',
  161. username: '',
  162. timer:'--'
  163. };
  164. },
  165. components: {
  166. Base,
  167. facilitystate,
  168. },
  169. onLoad(options) {
  170. /*
  171. 0 水源 泵类 负责水源进入管道的总泵或者阀
  172. 1 肥料 泵类 负责肥料进入管道的总阀或者泵
  173. 2 吸肥 泵类 控制肥料桶出肥的阀或者泵,每个肥料桶一个
  174. 3 搅拌 泵类 肥料桶的搅拌电机或者泵 每个肥料桶一个
  175. 4 肥料桶 泵类 肥料桶,每个施肥机有多个或者没有,不一定真实存在,只是逻辑上的概念
  176. 5 电磁阀 无 管道最末端每个田地里控制出水的阀门
  177. 6 传感器 无 水肥机上的 温度,压力,流速,PH EC等监测类要素
  178. 7 灌区 无 逻辑区域,电磁阀的分组
  179. */
  180. const { devBid, devName, devStatus } = options;
  181. this.devBid = devBid;
  182. this.devName = devName;
  183. this.devStatus = devStatus;
  184. this.deviceList[0].url = `/pages/cb/shuifeizsFirst/control?devBid=${options.devBid}`;
  185. this.deviceList[1].url = `/pages/cb/shuifeizsFirst/autoSetting?devBid=${options.devBid}`;
  186. this.deviceList[2].url = `/pages/cb/shuifeizsFirst/timingSetting?devBid=${options.devBid}`;
  187. this.deviceList[3].url = `/pages/cb/shuifeizsFirst/formulaSetting?devBid=${options.devBid}`;
  188. this.deviceList[
  189. this.deviceList.length - 1
  190. ].url = `/pages/cb/shuifeizsFirst/history?devBid=${options.devBid}`;
  191. if (devBid) {
  192. this.init();
  193. }
  194. uni.getStorage({
  195. key: 'user_name',
  196. success: (res) => {
  197. this.username = res.data
  198. }
  199. })
  200. },
  201. onUnload() {
  202. this.ws.close();
  203. },
  204. methods: {
  205. isHaveTime(childrenList) {
  206. let time = 0;
  207. let currentKey = '';
  208. let currentItem = {};
  209. for (let i = 0; i < this.selectAreaList.length; i++) {
  210. for (let key in this.selectAreaList[i]) {
  211. if (key.includes(':Status')) {
  212. currentKey = key;
  213. currentItem = this.selectAreaList[i];
  214. break;
  215. }
  216. }
  217. for (let i = 0; i < childrenList.length; i++) {
  218. const item = childrenList[i];
  219. if (item.sfCode === currentKey) {
  220. for (let key in currentItem) {
  221. if (key.includes(':PartTim')) {
  222. time = currentItem[key];
  223. }
  224. }
  225. break;
  226. }
  227. }
  228. }
  229. return time;
  230. },
  231. isAutoRun(childrenList) {
  232. for (let i = 0; i < childrenList.length; i++) {
  233. const item = childrenList[i];
  234. if (item.value == 1) {
  235. return true
  236. }
  237. }
  238. return false
  239. },
  240. async initsfyunshangAutoConfigInfo() {
  241. const selectAreaList = [];
  242. const res = await this.$myRequest({
  243. url:'/api/v2/iot/device/sf/yunshang/auto/config/info/',
  244. method:'post',
  245. data: {
  246. devBid: String(this.devBid),
  247. },
  248. })
  249. const list = res;
  250. const group_list = list.group_list || [];
  251. group_list.forEach((item) => {
  252. if (item.group_value == 1) {
  253. selectAreaList.push(item);
  254. }
  255. });
  256. this.selectAreaList = selectAreaList;
  257. },
  258. async devctlContorl(data){
  259. const params = {
  260. devBid: Number(this.devBid),
  261. data,
  262. };
  263. const res = await this.$myRequest({
  264. url: '/api/v2/iot/mobile/device/sf/devctl/',
  265. method: 'post',
  266. data:params,
  267. header: {
  268. 'Content-Type': 'application/json',
  269. },
  270. });
  271. uni.showToast({
  272. title: res.msg,
  273. icon: 'none',
  274. });
  275. },
  276. changeActive(active) {
  277. if(this.username == '平鲁农业农村局'){
  278. uni.showToast({
  279. title: '暂无权限',
  280. icon: 'none',
  281. });
  282. return
  283. }
  284. this.runStatus = active;
  285. const params = {
  286. IrrStatus:active
  287. }
  288. this.devctlContorl(params);
  289. },
  290. changeMode(mode) {
  291. if(this.username == '平鲁农业农村局'){
  292. uni.showToast({
  293. title: '暂无权限',
  294. icon: 'none',
  295. });
  296. return
  297. }
  298. if(this.runStatus == '1' || this.runStatus == '2'){
  299. uni.showToast({
  300. title: '请先停止运行',
  301. icon: 'none',
  302. });
  303. return
  304. }
  305. this.currentMode = mode;
  306. const params = {
  307. IrrMode:mode
  308. }
  309. this.devctlContorl(params);
  310. },
  311. initWebSocket() {
  312. const url = 'wss://things.ysiot.net:18080/api/ws';
  313. this.ws = uni.connectSocket({
  314. url: url,
  315. success: () => {
  316. console.log('WebSocket 连接初始化成功');
  317. }
  318. });
  319. uni.onSocketOpen(() => {
  320. console.log('WebSocket 已连接');
  321. // 发送测试参数
  322. const testParams = {
  323. cmds: [
  324. {
  325. type: 'TIMESERIES',
  326. entityType: 'DEVICE',
  327. entityId: this.entityId,
  328. scope: 'LATEST_TELEMETRY',
  329. cmdId: 1
  330. }
  331. ],
  332. authCmd: {
  333. cmdId: 0,
  334. token: this.sfToken,
  335. }
  336. };
  337. console.log('发送测试参数:', testParams);
  338. uni.sendSocketMessage({
  339. data: JSON.stringify(testParams)
  340. });
  341. // 心跳:每 30 秒 ping 一次
  342. this.heartbeatTimer = setInterval(() => {
  343. uni.sendSocketMessage({
  344. data: JSON.stringify({ type: 'ping' })
  345. });
  346. }, 30 * 1000);
  347. });
  348. uni.onSocketMessage((evt) => {
  349. try {
  350. const data = JSON.parse(evt.data);
  351. this.webSockedData = data;
  352. // 收到实时数据后刷新右侧组件
  353. if(this.dataArray.length){
  354. this.mergeTwoObject(this.dataArray,this.webSockedData?.data);
  355. this.initData(this.dataArray);
  356. }
  357. } catch (e) {
  358. console.error('WebSocket 消息解析失败', e);
  359. }
  360. });
  361. uni.onSocketError((e) => {
  362. console.error('WebSocket 错误', e);
  363. });
  364. uni.onSocketClose(() => {
  365. console.warn('WebSocket 已断开,3 秒后尝试重连');
  366. clearInterval(this.heartbeatTimer);
  367. this.reconnectCount = (this.reconnectCount || 0) + 1;
  368. if (this.reconnectCount <= 10) {
  369. setTimeout(() => this.initWebSocket(), 3000);
  370. } else {
  371. console.warn('WebSocket 重连次数已达上限,停止重连');
  372. }
  373. });
  374. },
  375. mergeTwoObject(firstObject, secondObject) {
  376. // 构建 sfCode 到对象的映射,实现 O(1) 查找
  377. const sfCodeMap = new Map();
  378. // 递归构建映射
  379. const buildMap = (items) => {
  380. for (const item of items) {
  381. if (item.sfCode) {
  382. sfCodeMap.set(item.sfCode, item);
  383. }
  384. if (item.childrenList && item.childrenList.length) {
  385. buildMap(item.childrenList);
  386. }
  387. }
  388. };
  389. buildMap(firstObject);
  390. // 遍历 secondObject 并更新值
  391. for (const key in secondObject) {
  392. let newKey = '';
  393. if(key.includes('GHChannelDev:ChannelParamSet')){
  394. newKey = key + ':Status';
  395. const item = sfCodeMap.get(newKey);
  396. if (item) {
  397. const params = JSON.parse(secondObject[key][0][1]);
  398. this.$set(item,'value',params.Status)
  399. }
  400. }else{
  401. const item = sfCodeMap.get(key);
  402. if (item) {
  403. this.$set(item,'value',secondObject[key][0][1])
  404. }
  405. }
  406. }
  407. },
  408. // 关闭 WebSocket
  409. closeWebSocket() {
  410. clearInterval(this.heartbeatTimer);
  411. if (this.ws) {
  412. uni.closeSocket();
  413. this.ws = null;
  414. }
  415. },
  416. async getsfrhinfo() {
  417. const res = await this.$myRequest({
  418. url: '/api/v2/iot/device/sf/info/',
  419. method: 'post',
  420. data: {
  421. devBid: String(this.devBid),
  422. },
  423. });
  424. this.info = res;
  425. this.sfToken = this.info?.sfToken;
  426. this.entityId = this.info?.sfUuid;
  427. this.closeWebSocket();
  428. this.initWebSocket();
  429. },
  430. async init() {
  431. this.getdeviceSfStatus();
  432. // await this.getpeifangRefresh();
  433. this.getsfrhinfo();
  434. this.initsfyunshangAutoConfigInfo();
  435. await this.getRunStatus();
  436. },
  437. async getpeifangRefresh() {
  438. await this.$myRequest({
  439. url: '/api/v2/iot/mobile/device/sf/peifang/refresh/',
  440. method: 'post',
  441. data: {
  442. devBid: this.devBid,
  443. },
  444. });
  445. },
  446. async getRunStatus() {
  447. const res = await this.$myRequest({
  448. url: '/api/v2/iot/mobile/device/sf/zsrf/task/run/status/',
  449. method: 'post',
  450. data: {
  451. devBid: this.devBid,
  452. },
  453. });
  454. const data = JSON.stringify(res || {});
  455. if (data == '{}') {
  456. this.isRun = true;
  457. } else {
  458. this.isRun = false;
  459. }
  460. },
  461. initData(res){
  462. this.dataList = [];
  463. this.irrigatedAreaList = [];
  464. this.alreadyfertilizerBucketList = [];
  465. res?.forEach((item) => {
  466. if (item.sfType === '0') {
  467. this.ggbCurrent = item;
  468. } else if (item.sfType === '1') {
  469. this.sfbCurrent = item;
  470. } else if (item.sfType === '4') {
  471. this.alreadyfertilizerBucketList.push(item);
  472. } else if (item.sfType === '6') {
  473. this.dataList.push(item);
  474. } else if (item.sfType === '7') {
  475. this.irrigatedAreaList.push(item);
  476. } else if (item.sfType === '9') {
  477. if (item.sfCode === 'IrrStatus') {
  478. this.runStatus = item.value;
  479. } else if (item.sfCode === 'IrrMode') {
  480. this.workStatus = item.value;
  481. } else if (item.sfCode === 'WaterFlowSum:Value') {
  482. this.clearIrr = item;
  483. }
  484. }
  485. });
  486. if(!this.irrigatedAreaList.length){
  487. this.$set(this.deviceList[1],'show', false);
  488. this.$set(this.deviceList[2],'show', false);
  489. this.$set(this.deviceList[3],'show', false);
  490. }
  491. this.runTitle = '--';
  492. this.timer = '--';
  493. if(this.runStatus == '1'){
  494. this.irrigatedAreaList.forEach((item) => {
  495. if (this.isAutoRun(item.childrenList)) {
  496. this.runTitle = item.sfDisplayname || item.sfName;
  497. this.timer = this.isHaveTime(item.childrenList);
  498. }
  499. });
  500. }else{
  501. this.runTitle = '--';
  502. this.timer = '--';
  503. }
  504. },
  505. async getdeviceSfStatus() {
  506. const res = await this.$myRequest({
  507. url: '/api/v2/iot/mobile/device/sf/status/',
  508. method: 'post',
  509. data: {
  510. devBid: this.devBid,
  511. },
  512. });
  513. this.dataArray = res || [];
  514. this.initData(this.dataArray);
  515. },
  516. nativeTo(item) {
  517. if(item.className == 'manualControl'){
  518. if(this.runStatus == '1' || this.runStatus == '2'){
  519. uni.showToast({
  520. title: '请先停止运行',
  521. icon: 'none',
  522. });
  523. return
  524. }
  525. }
  526. uni.navigateTo({
  527. url: item.url,
  528. });
  529. },
  530. },
  531. };
  532. </script>
  533. <style scoped lang="scss">
  534. uni-page-body {
  535. position: relative;
  536. height: 100%;
  537. }
  538. .irrMode{
  539. margin-top: 30rpx;
  540. border-radius: 32rpx 32rpx 0 0;
  541. margin-bottom: 30rpx;
  542. padding: 32rpx;
  543. border: 3rpx solid #FFF;
  544. background: linear-gradient(180deg, #D3F3F2 0%, #FFF 41.06%);
  545. .irrMode__header{
  546. display: flex;
  547. width:320rpx;
  548. padding:0 10rpx;
  549. align-items: center;
  550. background: #ffffff;
  551. border-radius: 12rpx;
  552. margin-bottom: 24rpx;
  553. font-family: "Source Han Sans CN VF";
  554. font-size: 28rpx;
  555. font-style: normal;
  556. font-weight: 400;
  557. line-height: normal;
  558. color:#999999;
  559. height: 68rpx;
  560. line-height: 68rpx;
  561. view{
  562. width: 160rpx;
  563. text-align: center;
  564. }
  565. }
  566. .active{
  567. display: flex;
  568. align-items: center;
  569. justify-content: center;
  570. border-radius: 8rpx;
  571. color: #ffffff;
  572. background: #0BBC58;
  573. height: 56rpx;
  574. }
  575. .irrMode__content{
  576. margin-top: 24rpx;
  577. border-radius: 16rpx;
  578. padding: 2rpx;
  579. background: linear-gradient(180deg, #FFF 0%, #F5F6FA 100%);
  580. .irrMode__content-header{
  581. width: calc(100% - 32rpx);
  582. padding: 16rpx 16rpx 16rpx 16rpx;
  583. border-radius: 12rpx;
  584. background: linear-gradient(180deg, #BBF1EA 0%, #E6F4F9 100%);
  585. .irrMode__content-header-list{
  586. display:flex;
  587. justify-content: space-between;
  588. align-items: center;
  589. margin-bottom: 12rpx;
  590. }
  591. .irrMode__content-header-title{
  592. color: #020305;
  593. text-align: right;
  594. font-family: "Source Han Sans CN VF";
  595. font-size: 30rpx;
  596. font-weight: 500;
  597. display: flex;
  598. align-items: center;
  599. justify-content: space-between;
  600. width: 100%;
  601. .irrMode__content-header-container{
  602. display: flex;
  603. align-items: center;
  604. }
  605. .header-item-icon{
  606. width: 48rpx;
  607. height: 48rpx;
  608. }
  609. .timer-text{
  610. color: #0bbc58;
  611. text-align: right;
  612. font-family: "Source Han Sans CN VF";
  613. font-size: 28rpx;
  614. font-weight: 400;
  615. }
  616. }
  617. .irrMode__content-header-desc{
  618. color: #999999;
  619. text-align: right;
  620. font-family: "Source Han Sans CN VF";
  621. font-size: 28rpx;
  622. font-weight: 400;
  623. }
  624. }
  625. .irrMode__content-item{
  626. display:flex;
  627. align-items: center;
  628. justify-content: center;
  629. padding: 16rpx 0;
  630. border-radius: 12rpx;
  631. .irrMode__content-item-raduis{
  632. display: flex;
  633. height: 88rpx;
  634. padding: 0rpx 32rpx;
  635. flex-direction: column;
  636. justify-content: center;
  637. align-items: center;
  638. flex: 1 0 0;
  639. border-radius: 16rpx;
  640. margin-right: 16rpx;
  641. border: 2rpx solid #0BBC58;
  642. color: #0bbc58;
  643. text-align: right;
  644. font-family: "Source Han Sans CN VF";
  645. font-size: 20rpx;
  646. image{
  647. width: 48rpx;
  648. height: 48rpx;
  649. }
  650. }
  651. .active-radius{
  652. background: #0BBC58;
  653. color:#ffffff;
  654. }
  655. }
  656. .irr-run-list{
  657. padding: 16rpx;
  658. font-family: "Source Han Sans CN VF";
  659. color: #999999;
  660. font-family: "Source Han Sans CN VF";
  661. font-size: 24rpx;
  662. font-weight: 400;
  663. }
  664. }
  665. }
  666. .online {
  667. height: 32rpx;
  668. line-height: 32rpx;
  669. padding: 0 8rpx;
  670. border-radius: 4rpx;
  671. background: #14a478;
  672. color: #ffffff;
  673. font-family: 'Source Han Sans CN';
  674. font-size: 20rpx;
  675. font-weight: 500;
  676. margin-right: 8rpx;
  677. top: -4rpx;
  678. position: relative;
  679. }
  680. .manualControl{
  681. background: linear-gradient(326deg, #FFAB3D 6.86%, #FED55A 93.52%);
  682. }
  683. .wheelIrrigation{
  684. background: linear-gradient(152deg, #83D2FF 14.82%, #02A2FC 92.92%);
  685. }
  686. .timedSetting{
  687. background: linear-gradient(335deg, #0BBC58 6.91%, #60D799 89.95%);
  688. }
  689. .formulaSetting{
  690. background: linear-gradient(147deg, #FE9797 12.77%, #FF6060 92.63%);
  691. }
  692. .operatingRecord{
  693. background: linear-gradient(152deg, #B9B9F6 11.22%, #8080F8 94.92%);
  694. }
  695. .facilitystate-top__title{
  696. width: 80%;
  697. overflow: hidden;
  698. white-space: nowrap;
  699. text-overflow: ellipsis;
  700. }
  701. .offline {
  702. height: 32rpx;
  703. line-height: 32rpx;
  704. padding: 0 8rpx;
  705. border-radius: 4rpx;
  706. background: #ff4d4f;
  707. color: #ffffff;
  708. font-family: 'Source Han Sans CN';
  709. font-size: 20rpx;
  710. font-weight: 500;
  711. margin-right: 8rpx;
  712. top: -4rpx;
  713. position: relative;
  714. }
  715. .facilitystate-page {
  716. background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.46%, #FFF 25.24%, #FFF 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  717. height: 100%;
  718. width: 100%;
  719. overflow-x: hidden;
  720. overflow-y: scroll;
  721. .facilitystate-top {
  722. display: grid;
  723. grid-template-columns: repeat(5, 1fr);
  724. text-align: center;
  725. margin-top: 18rpx;
  726. &__item {
  727. margin-bottom: 32rpx;
  728. .item-icon-container{
  729. width: 80rpx;
  730. height: 80rpx;
  731. border-radius: 26rpx;
  732. overflow: hidden;
  733. margin: 0 auto;
  734. display:flex;
  735. align-items: center;
  736. justify-content: center;
  737. }
  738. .item-icon {
  739. width: 64rpx;
  740. height: 64rpx;
  741. }
  742. }
  743. &__item-text {
  744. color: #042118;
  745. font-family: 'Source Han Sans CN VF';
  746. font-size: 28rpx;
  747. font-weight: 400;
  748. margin-top: 16rpx;
  749. }
  750. }
  751. }
  752. </style>