details.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406
  1. <template>
  2. <view class="box">
  3. <view class="status_bar"></view>
  4. <view style="position: fixed;z-index: 100;width: 100%;">
  5. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="水肥详情"></uni-nav-bar>
  6. </view>
  7. <!-- 上面要素值 -->
  8. <view class="bigBox bigOpen" v-if="show">
  9. <view class="topInfo">
  10. <u-row gutter="10">
  11. <u-col span="3" v-for="item in ElementList" :key="item.id">
  12. <view class="item">
  13. <view>{{item.value}}</view>
  14. <view>{{item.unit}}</view>
  15. <view>{{item.name}}</view>
  16. </view>
  17. </u-col>
  18. </u-row>
  19. <view class="readmore" v-if="!show" @click="show=true;getHistoryData()">
  20. 查看详情<u-icon name="arrow-down" color="#93FFDE" size="28"></u-icon>
  21. </view>
  22. </view>
  23. <!-- 统计图 -->
  24. <view class="hisBox" v-show="show">
  25. <view class="axiosBox">
  26. <view class="title">
  27. 历史数据
  28. </view>
  29. <view class="histimeBox">
  30. <u-icon name="calendar" color="#C1C1C1" size="24"></u-icon>
  31. <view class="time" @click="calendarshow = true">
  32. {{historyTime.startDate ? historyTime.startDate : timestampToDateTime(new Date().getTime()/1000)}}
  33. </view>
  34. <view class="">至</view>
  35. <view class="time" @click="calendarshow = true">
  36. {{historyTime.endDate ? historyTime.endDate : timestampToDateTime(new Date().getTime()/1000)}}
  37. </view>
  38. <u-icon name="close-circle" color="#C1C1C1" size="28" @click="historyTime={};getHistoryData()"
  39. v-if="historyTime.startDate"></u-icon>
  40. </view>
  41. <u-calendar v-model="calendarshow" mode="range" @change="changeDate"></u-calendar>
  42. <view class="chartBox">
  43. <canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
  44. @touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
  45. @touchend="touchEndLineA($event)"></canvas>
  46. </view>
  47. </view>
  48. <view class="readmoreHIs" @click="show=false">
  49. 收起详情<u-icon name="arrow-up" color="#14A478" size="28"></u-icon>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="bigBox" v-else>
  54. <view class="topInfo">
  55. <u-row gutter="10">
  56. <u-col span="3" v-for="item in ElementList" :key="item.id">
  57. <view class="item">
  58. <view>{{item.value}}</view>
  59. <view>{{item.unit}}</view>
  60. <view>{{item.name}}</view>
  61. </view>
  62. </u-col>
  63. </u-row>
  64. <view class="readmore" v-if="!show" @click="show=true;getHistoryData()">
  65. 查看详情<u-icon name="arrow-down" color="#93FFDE" size="28"></u-icon>
  66. </view>
  67. </view>
  68. <!-- 统计图 -->
  69. <view class="hisBox" v-show="show">
  70. <view class="axiosBox">
  71. <view class="title">
  72. 历史数据
  73. </view>
  74. <view class="histimeBox">
  75. <u-icon name="calendar" color="#C1C1C1" size="24"></u-icon>
  76. <view class="time" @click="calendarshow = true">
  77. {{historyTime.startDate ? historyTime.startDate : timestampToDateTime(new Date().getTime()/1000)}}
  78. </view>
  79. <view class="">至</view>
  80. <view class="time" @click="calendarshow = true">
  81. {{historyTime.endDate ? historyTime.endDate : timestampToDateTime(new Date().getTime()/1000)}}
  82. </view>
  83. <u-icon name="close-circle" color="#C1C1C1" size="28" @click="historyTime={};getHistoryData()"
  84. v-if="historyTime.startDate"></u-icon>
  85. </view>
  86. <u-calendar v-model="calendarshow" mode="range" @change="changeDate"></u-calendar>
  87. <view class="chartBox">
  88. <canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
  89. @touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
  90. @touchend="touchEndLineA($event)"></canvas>
  91. </view>
  92. </view>
  93. <view class="readmoreHIs" @click="show=false">
  94. 收起详情<u-icon name="arrow-up" color="#14A478" size="28"></u-icon>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="" v-if="!show">
  99. <!-- 历史记录弹框 -->
  100. <u-tabs :list="list" active-color="#14A478" bar-width="100" :is-scroll="false" :current="current"
  101. @change="change"></u-tabs>
  102. <!-- 设备图 -->
  103. <view class="devicePhoto" v-if="current == 0">
  104. <view class="titleBox">
  105. <u-alert-tips type="primary" :title-style="alertTipColor" title="点击按钮可对应控制阀门开关,开即打开,关即关闭"
  106. :show-icon="true"></u-alert-tips>
  107. <!-- <view class="btn" @click="statusPanel=true">控制面板</view> -->
  108. <!-- <u-popup v-model="statusPanel" mode="bottom">
  109. <view class="consoleBox">
  110. <view class="swichBox">
  111. <u-row :gutter="16" justify="space-between">
  112. <u-col span="6" v-for="(item, index) in buttonList" v-if="(index + 1) % 2 == 1">
  113. <view class="preSwich">
  114. <view>肥料{{ (index + 1) / 2 > 1 ? (index + 2) / 2 : 1 }}</view>
  115. <u-switch v-model="item.off" active-color="#14A478" inactive-color="#AEB4C2"
  116. :loading="item.disabled"
  117. @change="switchchange($event, item.number, item, index, true)"></u-switch>
  118. </view>
  119. </u-col>
  120. <u-col span="6" v-for="(item, index) in facilityvalve"
  121. v-if="index > buttonList.length - 1">
  122. <view class="preSwich">
  123. <view>{{item.name}}</view>
  124. <u-switch v-model="item.off" active-color="#14A478" inactive-color="#AEB4C2"
  125. :loading="item.disabled"
  126. @change="switchchange($event, item.number, item, index)"></u-switch>
  127. </view>
  128. </u-col>
  129. </u-row>
  130. </view>
  131. <u-button type="success" @click="statusPanel=false">确定</u-button>
  132. </view>
  133. </u-popup> -->
  134. </view>
  135. <view class="main">
  136. <image class="mainContent" src="https://www.hnyfwlw.com:8006/bigdata_app/log/mainNew.png"></image>
  137. <!-- <view class="sourceBox">
  138. <view class="smallBox">
  139. 水源
  140. </view>
  141. </view> -->
  142. <!-- 桶 -->
  143. <view class="colList">
  144. <view class="preClo" v-for="item, index in pickBtnList" :key="item.type">
  145. <view class="btnName">
  146. {{resultBan[index].e_name}}
  147. </view>
  148. <image src="https://www.hnyfwlw.com:8006/bigdata_app/log/colNew.png" v-if="pickBtnList.length == 1">
  149. </image>
  150. <image src="https://www.hnyfwlw.com:8006/bigdata_app/log/colLeft.png"
  151. v-else-if="pickBtnList.length > 1 && index == 0"></image>
  152. <image src="https://www.hnyfwlw.com:8006/bigdata_app/log/colRight.png"
  153. v-else-if="pickBtnList.length > 1 && index == pickBtnList.length - 1"></image>
  154. <image src="https://www.hnyfwlw.com:8006/bigdata_app/log/colCenter.png" v-else></image>
  155. <view class="jiaoBtn" v-if="resultBan.length > 0">
  156. <u-switch v-model="resultBan[index]['off']" active-color="#14A478"
  157. inactive-color="#AEB4C2" :loading="resultBan[index]['disabled']"
  158. @change="switchchange($event, resultBan[index]['number'], resultBan[index], index)"></u-switch>
  159. </view>
  160. <view class="shanBox" v-if="resultBan.length > 0">
  161. <image v-if="!resultBan[index]['off']"
  162. src="https://www.hnyfwlw.com:8006/bigdata_app/log/shan.png"></image>
  163. <image v-else class="circleAnm"
  164. src="https://www.hnyfwlw.com:8006/bigdata_app/log/shanannimate.png"></image>
  165. </view>
  166. <view class="btnBox" @click="switchchange($event, item.number, item, index, true)">
  167. <image v-if="item.off" src="https://www.hnyfwlw.com:8006/bigdata_app/log/feiopen.png"></image>
  168. <image v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/feiclose.png"></image>
  169. </view>
  170. </view>
  171. </view>
  172. <!-- 废料管口 -->
  173. <view class="exit">
  174. <image src="https://www.hnyfwlw.com:8006/bigdata_app/log/exit.png"></image>
  175. </view>
  176. <!-- 注肥泵 -->
  177. <view class="feiLight"
  178. @click="switchchange(!feiBengItem.e_status, feiBengItem.number, feiBengItem, feiBengIndex)">
  179. <image v-if="feiBengItem.e_status" src="https://www.hnyfwlw.com:8006/bigdata_app/log/feiAllopen.png"></image>
  180. <image v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/feiAllclose.png"></image>
  181. </view>
  182. <!-- 控制柜 -->
  183. <view class="kongBox">
  184. <image v-if="feiBengItem.e_status" src="https://www.hnyfwlw.com:8006/bigdata_app/log/kongclose.png"></image>
  185. <image v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/kongopen.png"></image>
  186. </view>
  187. <!-- 进水泵 -->
  188. <view class="warterIn"
  189. @click="switchchange(!mainBengItem.e_status, mainBengItem.number, mainBengItem, mainBengIndex)">
  190. <image v-if="mainBengItem.e_status" src="https://www.hnyfwlw.com:8006/bigdata_app/log/feiopen.png"></image>
  191. <image v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/feiclose.png"></image>
  192. </view>
  193. <!-- 进水指示 -->
  194. <view class="warterLight">
  195. <image v-if="mainBengItem.e_status" src="https://www.hnyfwlw.com:8006/bigdata_app/log/bengopen.png"></image>
  196. <image v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/bengclose.png"></image>
  197. </view>
  198. <!-- 电风扇 -->
  199. <!-- <view class="fengBox">
  200. <view class="relativeBox">
  201. <image src="https://www.hnyfwlw.com:8006/bigdata_app/log/fengmain.png"></image>
  202. <image :class="feiBeng ? 'circleAnm' : ''"
  203. src="https://www.hnyfwlw.com:8006/bigdata_app/log/fengleafs.png"></image>
  204. </view>
  205. </view> -->
  206. <!-- 水管控制阀 -->
  207. <view class="benList">
  208. <!-- <view class="preBen" v-for="item, index in buttonList" v-if="(index + 1) % 2 == 1"
  209. @click="switchchange(!item.off, item.number, item, index, true)">
  210. <image class="daoguan" src="https://www.hnyfwlw.com:8006/bigdata_app/log/bottomNew.png"
  211. v-if="(index + 1) % 2 < 4"></image>
  212. <view class="info">
  213. 肥料{{ (index + 1) / 2 > 1 ? (index + 2) / 2 : 1 }}开关
  214. </view>
  215. <image class="status" v-if="item.off" src="https://www.hnyfwlw.com:8006/bigdata_app/log/open.png">
  216. </image>
  217. <image class="status" v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/close.png"></image>
  218. </view> -->
  219. <view class="preBen" v-for="item, index in faList"
  220. @click="switchchange(!item.e_status, item.number, item, index)">
  221. <image class="daoguan" src="https://www.hnyfwlw.com:8006/bigdata_app/log/bottomNew.png"
  222. v-if="index < 5"></image>
  223. <view class="info">
  224. {{item.e_name}}
  225. </view>
  226. <image class="status" v-if="item.e_status" src="https://www.hnyfwlw.com:8006/bigdata_app/log/open.png">
  227. </image>
  228. <image class="status" v-else src="https://www.hnyfwlw.com:8006/bigdata_app/log/close.png"></image>
  229. </view>
  230. </view>
  231. </view>
  232. </view>
  233. <!-- 操作记录 -->
  234. <view class="consoleList" v-else>
  235. <view class="histimeBox">
  236. <u-icon name="calendar" color="#C1C1C1" size="24"></u-icon>
  237. <view class="time" @click="consoleshow = true">
  238. {{consoleTime.startDate ? consoleTime.startDate : '开始'}}
  239. </view>
  240. <view class="">至</view>
  241. <view class="time" @click="consoleshow = true">{{consoleTime.endDate ? consoleTime.endDate : '结束'}}
  242. </view>
  243. <u-icon name="close-circle" color="#C1C1C1" size="28" @click="clearContime"
  244. v-if="consoleTime.startDate"></u-icon>
  245. </view>
  246. <u-calendar v-model="consoleshow" mode="range" @change="changeConsoleDate"></u-calendar>
  247. <view class="tableList tableTitle">
  248. <view>设备名称</view>
  249. <view>操作内容</view>
  250. <view>操作时间</view>
  251. </view>
  252. <view class="tableList" v-for="(item, index) in tableData" :key="item.uptime">
  253. <view>{{item.device_name}}</view>
  254. <view :class="item.status ? 'success' : 'error'">{{item.operation_content}}</view>
  255. <view>{{item.uptime}}</view>
  256. </view>
  257. <u-loadmore :status="status" />
  258. </view>
  259. </view>
  260. </view>
  261. </template>
  262. <script>
  263. import uCharts from '../../components/js_sdk/u-charts/u-charts/u-charts.js';
  264. var canvaColumnA = null;
  265. var canvasRing = null;
  266. export default {
  267. data() {
  268. return {
  269. typeObj: {
  270. 1: '控制柜',
  271. 2: '灌溉泵',
  272. 3: '搅拌机',
  273. 4: '注肥泵',
  274. 5: '阀控器',
  275. 6: '施肥桶'
  276. }, //阀控器类型对应
  277. pickBtnList: [], // 肥料开关列表
  278. resultBan: [], // 搅拌机开关列表
  279. faList: [], // 发空气开关列表
  280. alertTipColor: {
  281. color: '#1890FF',
  282. fontSize: "12px"
  283. },
  284. device_id: '',
  285. mainBengEKey: '',
  286. mainBengIndex: 0, // 进水泵的位置
  287. mainBengItem:{},
  288. mainBeng: false,
  289. feiBeng: false,
  290. feiBengItem: {}, // 施肥泵的位置
  291. feiBengEKey:'',
  292. calendarshow: false,
  293. historyTime: {},
  294. cWidth: '350',
  295. cHeight: '350',
  296. pixelRatio: 1,
  297. facilityvalve: [],
  298. feiNum: 0, //肥料桶实际占据通道个数
  299. buttonList: [], // 肥料开关列表
  300. colomRoundList: ['j1', 'j2', 'j3', 'j4', 'j5', 'j6', 'j7', 'j8'], // 废料桶的通道
  301. ElementList: [],
  302. typename: [
  303. "-",
  304. "风机",
  305. "水泵",
  306. "增氧机",
  307. "湿帘",
  308. "遮阳",
  309. "开窗",
  310. "保温",
  311. "投食机",
  312. ],
  313. show: false,
  314. list: [{
  315. name: '设备控制'
  316. }, {
  317. name: '执行结果'
  318. }, {
  319. name: '操作记录'
  320. }],
  321. statusPanel: false,
  322. current: 0,
  323. consoleshow: false,
  324. consoleTime: {},
  325. tableData: [],
  326. page: 1,
  327. total: 0,
  328. status: 'loadmore'
  329. }
  330. },
  331. methods: {
  332. clickLeft() {
  333. uni.navigateBack({
  334. delta: 1
  335. })
  336. },
  337. changeTimeStatus(item, changeIndex) {
  338. this.timer = setTimeout(() => {
  339. item.disabled = false; // 改变值
  340. this.facilityvalve[changeIndex].disabled = false;
  341. this.getEquipstatus()
  342. this.timer = null; // 清空定时器引用
  343. }, 15000);
  344. },
  345. // 选择日期
  346. changeDate(e) {
  347. console.log(e)
  348. this.historyTime = e;
  349. this.getHistoryData()
  350. },
  351. // 绘制折线图
  352. showColumn(id, xtitle, xinfo) {
  353. var _self = this
  354. canvaColumnA = new uCharts({
  355. canvasId: id,
  356. type: 'line',
  357. legend: {
  358. position: "top"
  359. },
  360. fontSize: 11,
  361. background: '#FFFFFF',
  362. pixelRatio: 1,
  363. animation: true,
  364. dataLabel: false,
  365. categories: xtitle,
  366. series: xinfo,
  367. enableScroll: true, //开启图表拖拽功能
  368. xAxis: {
  369. disabled: true,
  370. disableGrid: false,
  371. type: 'grid',
  372. gridType: 'dash',
  373. itemCount: 15, //x轴单屏显示数据的数量,默认为5个
  374. scrollShow: true, //新增是否显示滚动条,默认false
  375. scrollAlign: 'right', //滚动条初始位置
  376. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
  377. scrollColor: '#DEE7F7', //默认为 #A6A6A6
  378. },
  379. yAxis: {},
  380. width: _self.cWidth * 1,
  381. height: _self.cHeight * 1,
  382. extra: {
  383. line: {
  384. type: 'curve'
  385. }
  386. }
  387. });
  388. },
  389. touchLineA(e) {
  390. // console.log(e)
  391. canvaColumnA.scrollStart(e);
  392. },
  393. moveLineA(e) {
  394. canvaColumnA.scroll(e);
  395. },
  396. touchEndLineA(e) {
  397. canvaColumnA.touchLegend(e);
  398. // canvaColumnA.showToolTip(e);
  399. canvaColumnA.scrollEnd(e);
  400. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  401. canvaColumnA.showToolTip(e, {
  402. format: function(item, category) {
  403. return category + ' ' + item.name + ':' + item.data
  404. }
  405. });
  406. },
  407. // 时间戳转换
  408. timestampToDateTime(timestamp, isTime) {
  409. var date = new Date(timestamp * 1000); // 将时间戳转换为毫秒并创建一个日期对象
  410. var year = date.getFullYear(); // 获取年份
  411. var month = ('0' + (date.getMonth() + 1)).slice(-2); // 获取月份,并补零
  412. var day = ('0' + date.getDate()).slice(-2); // 获取日期,并补零
  413. var hours = ('0' + date.getHours()).slice(-2); // 获取小时,并补零
  414. var minutes = ('0' + date.getMinutes()).slice(-2); // 获取分钟,并补零
  415. var seconds = ('0' + date.getSeconds()).slice(-2); // 获取秒数,并补零
  416. if (isTime) {
  417. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  418. } else {
  419. return `${year}-${month}-${day}`;
  420. }
  421. },
  422. // 历史数据
  423. async getHistoryData() {
  424. uni.showLoading({
  425. title: '加载中'
  426. });
  427. const {
  428. historyTime
  429. } = this;
  430. // 获取当前日期
  431. var currentDate = new Date();
  432. // 设置时间为 0 点
  433. currentDate.setHours(0, 0, 0, 0);
  434. let begin = historyTime.startDate ? (new Date(historyTime.startDate).getTime() / 1000) - 8 * 3600 : (
  435. Math.floor(currentDate.getTime() / 1000));
  436. // 设置时间为 24 点
  437. currentDate.setHours(24, 0, 0, 0);
  438. let end = historyTime.endDate ? (new Date(historyTime.endDate).getTime() / 1000) - 8 * 3600 : (Math
  439. .floor(currentDate.getTime() / 1000));
  440. //折线图数据
  441. let res = await this.$myRequest({
  442. url: "/api/api_gateway?method=weather.weather.sf_data_chart",
  443. data: {
  444. device_id: this.device_id,
  445. begin: begin,
  446. end: end,
  447. },
  448. })
  449. uni.hideLoading();
  450. var conf = res.conf.eleName;
  451. var dat = res.dat.reverse();
  452. //console.log(dat);
  453. conf = conf.split("/");
  454. // var arr1 = [];
  455. var regroupData = []; //重组数据
  456. let options = [];
  457. var timeList = [];
  458. for (var i = 0; i < conf.length; i++) {
  459. // var arr = [];
  460. if (conf[i] != "-") {
  461. var optionobj = {};
  462. optionobj.value = i;
  463. optionobj.label = conf[i];
  464. options.push(optionobj);
  465. var reddata = [];
  466. dat.forEach((item, index) => {
  467. if (timeList.length < dat.length) {
  468. timeList.push(this.timestampToDateTime(item.uptime, true));
  469. }
  470. var status = item.device_status.split(",");
  471. // //console.log(status);
  472. var arr = [];
  473. for (var j = 0; j < status.length; j++) {
  474. if (status[j].indexOf("e") + 1) {
  475. arr.push(status[j]);
  476. }
  477. }
  478. // //console.log(arr)
  479. var dataobj = {};
  480. for (var k = 0; k < arr.length; k++) {
  481. var indexs = arr[k].indexOf(":");
  482. // //console.log(arr[k])
  483. if (k == 0) {
  484. dataobj[arr[k].slice(1, indexs).trim()] = arr[k]
  485. .substr(indexs + 1)
  486. .trim();
  487. } else {
  488. dataobj[arr[k].slice(0, indexs).trim()] = arr[k]
  489. .substr(indexs + 1)
  490. .trim();
  491. }
  492. }
  493. // //console.log(dataobj)
  494. for (var key in dataobj) {
  495. // //console.log(i)
  496. var str = "'e" + (i + 1) + "'";
  497. // //console.log(key,str);
  498. if (key == str) {
  499. if (Number(dataobj[key]) == 32767) {
  500. // reddata.push([]);
  501. } else {
  502. reddata.push(Number(dataobj[key]));
  503. }
  504. }
  505. }
  506. });
  507. regroupData.push({
  508. name: conf[i],
  509. type: "spline",
  510. fillColor: {
  511. linearGradient: [0, 0, 0, 300],
  512. },
  513. data: reddata,
  514. });
  515. }
  516. }
  517. // console.log(timeList);
  518. this.showColumn('canvasColumnA', timeList, regroupData)
  519. },
  520. // 切换选项卡
  521. change(index) {
  522. this.page = 1;
  523. this.total = 0;
  524. this.current = index;
  525. this.status = 'loadmore';
  526. this.tableData = [];
  527. this.getEquipcontroldata();
  528. },
  529. // 获取要素实时数据
  530. async getElmentInfo() {
  531. uni.showLoading({
  532. title: '加载中'
  533. });
  534. let res = await this.$myRequest({
  535. url: "/api/api_gateway?method=xphsp.views.device_elements",
  536. data: {
  537. device_id: this.device_id,
  538. },
  539. })
  540. uni.hideLoading();
  541. var conf = res.conf.eleName.split('/');
  542. var dataList = [res.data.device_data];
  543. if (dataList.length == 0) return
  544. this.ElementList = [];
  545. conf.forEach((item, index) => {
  546. let obj = {}
  547. if (item == '-') return
  548. obj.name = item;
  549. let valList = dataList[0][`e${index + 1}`].split('#');
  550. obj.value = valList[0];
  551. obj.unit = valList[1];
  552. obj.time = dataList[0].uptime;
  553. this.ElementList.push(obj)
  554. })
  555. // console.log(this.ElementList)
  556. },
  557. // 当前配置的元素列表
  558. async getPickList() {
  559. // e_type类型对应
  560. // 1:'控制柜',
  561. // 2:'灌溉泵',
  562. // 3:'搅拌机',
  563. // 4:'注肥泵',
  564. // 5:'阀控器',
  565. // 6:'施肥桶'
  566. let res = await this.$myRequest({
  567. url: "/api/api_gateway?method=xphsp.views.sf_valve_location_list",
  568. data: {
  569. sf_device_id: this.device_id,
  570. },
  571. });
  572. let pickList = [];
  573. let pickBtnList = []; // 肥料开关
  574. let pickBanList = []; // 肥料搅拌机开关
  575. let faList = []; // 管道阀开关
  576. res.forEach((pick, index) => {
  577. this.facilityvalve.forEach(item => {
  578. if (pick.e_key == item.type) {
  579. // 获取当前灌溉泵位置
  580. let pickObj = Object.assign(pick,item);
  581. if(pick.e_type == 2) {
  582. this.mainBengIndex = pickList.length;
  583. this.mainBengItem = pickObj;
  584. this.mainBeng = pickObj.e_status;
  585. this.mainBengEKey = pickObj.e_key;
  586. }
  587. // 获取当前施肥泵位置
  588. if(pick.e_type == 4) {
  589. this.feiBengIndex = pickList.length;
  590. this.feiBengItem = pickObj;
  591. this.feiBeng = pickObj.e_status;
  592. this.feiBengEKey = pickObj.e_key;
  593. }
  594. // 获取肥料开关列表
  595. if (pick.e_type == 6) {
  596. pickBtnList.push(pickObj)
  597. }
  598. // 获取搅拌机开关列表
  599. if (pick.e_type == 3) {
  600. pickBanList.push(pickObj)
  601. }
  602. // 获取管道阀开关列表
  603. if (pick.e_type == 1 || pick.e_type == 5) {
  604. faList.push(pickObj)
  605. }
  606. pickList.push(pickObj)
  607. }
  608. })
  609. })
  610. // 把肥料和搅拌机位置对应起来(根据创建时间)
  611. let resultBan = [];
  612. pickBtnList.forEach(fei => {
  613. pickBanList.forEach(ban => {
  614. if (fei.create_time == ban.create_time) {
  615. resultBan.push(ban)
  616. }
  617. })
  618. })
  619. this.pickBtnList = pickBtnList;
  620. this.resultBan = resultBan;
  621. this.faList = faList;
  622. console.log(pickBtnList, pickBanList, resultBan, faList)
  623. },
  624. // 元素状态
  625. async getEquipstatus() {
  626. uni.showLoading({
  627. title: '加载中'
  628. });
  629. this.facilityvalve = [];
  630. let res = await this.$myRequest({
  631. url: "/api/api_gateway?method=xphsp.views.device_info",
  632. data: {
  633. device_id: this.device_id,
  634. },
  635. })
  636. uni.hideLoading();
  637. var conf = res.conf.relayName;
  638. var dataobj = res.device_status;
  639. var relayNum = res.conf.relayNum;
  640. var arr = [];
  641. function numberToArray(number) {
  642. // 将数字转换为字符串
  643. let numString = number.toString();
  644. // 创建一个空数组,用于存储结果
  645. let result = [];
  646. // 遍历字符串的每个字符,并将其转换为对应的数字
  647. for (let i = 0; i < numString.length; i++) {
  648. result.push(parseInt(numString.charAt(i)));
  649. }
  650. return result;
  651. }
  652. for (var i = 0; i < dataobj.length; i++) {
  653. // if (offobj[i].indexOf("j") + 1) {
  654. arr.push(offobj[i]);
  655. // }
  656. }
  657. conf = conf.split("/");
  658. relayNum = relayNum.split("/");
  659. var arr1 = [];
  660. var reg = /\d/;
  661. let totalP = Math.ceil((conf.length) / 32); //总圈数
  662. for (var i = 0; i < conf.length; i++) {
  663. var obj = {};
  664. obj.name = conf[i];
  665. // if (reg.test(conf[i])) {
  666. // obj.name2 = conf[i].slice(0, conf[i].length - 1);
  667. // } else {
  668. // obj.name2 = conf[i];
  669. // }
  670. obj.name2 = this.typename[relayNum[i]];
  671. obj.number = i;
  672. obj.type = `j${i + 1}`;
  673. obj.disabled = false;
  674. // "state": 1 继电器打开 ;"state": 0 继电器关闭
  675. // 处理开关值
  676. // J开头表示状态,总共只有32长度,超过32则从头赋值 位数多一位
  677. // 例:1和33是都在J1里面,返回值是一个二进制数 倒数第一位表示第一个 第二位表示33状态 以此类推
  678. // 根据总长度 为超过32的j赋值
  679. // 当前是循环的第几轮
  680. let baseP = Math.ceil((i + 1) / 32);
  681. if (i > 31) {
  682. dataobj[`j${i + 1}`] = dataobj[
  683. `j${(i + 1) % 32 == 0 ? 32 : (i + 1) % 32}`]; // 当前脚标/32取余 当恰好整除的时候 取32
  684. }
  685. dataobj[`j${i + 1}`] = dataobj[`j${i + 1}`].slice(-totalP); // 截取当前圈数的最后几位数字
  686. let baseOff = numberToArray(dataobj[`j${i + 1}`]); // 把当前值根据位数 转换为数组
  687. obj.off = baseOff[baseP - 1] == '0' ? false : true; // 根据当前圈数,取对应的数组的值
  688. arr1.push(obj);
  689. }
  690. for (var i = 0; i < arr1.length; i++) {
  691. if (arr1[i].name != "-") {
  692. this.facilityvalve.push(arr1[i]);
  693. }
  694. }
  695. let feiNum = 0; // 记录废料桶占据通道个数,两个通道为一个肥料桶
  696. this.buttonList = [];
  697. this.facilityvalve.forEach((item, index) => {
  698. if (this.colomRoundList.indexOf(item.type) > -1) {
  699. feiNum++;
  700. this.buttonList.push(item);
  701. }
  702. })
  703. this.feiNum = feiNum;
  704. this.getPickList();
  705. console.log(this.facilityvalve)
  706. },
  707. async getEquipcontrol(num, state, double_order, item) {
  708. // console.log({
  709. // device_id: item.cc_device_id == '' ? this.device_id : item.cc_device_id,
  710. // relayNum: num,
  711. // relayState: state,
  712. // double_order
  713. // });
  714. //设备控制
  715. uni.showLoading({
  716. title: '正在下发指令'
  717. });
  718. let res = await this.$myRequest({
  719. url: "/api/api_gateway?method=xphsp.views.control_order",
  720. data: {
  721. device_id: item.cc_device_id == '' ? this.device_id : item.cc_device_id,
  722. relayNum: num,
  723. relayState: state,
  724. double_order
  725. },
  726. })
  727. uni.hideLoading();
  728. if (res.msg_code == 200) {
  729. uni.showToast({
  730. title: '指令下发成功',
  731. duration: 2000,
  732. icon: 'none'
  733. });
  734. } else {
  735. uni.showToast({
  736. title: res.msg,
  737. duration: 2000,
  738. icon: 'none'
  739. })
  740. setTimeout(() => {
  741. this.getEquipstatus()
  742. }, 2000)
  743. }
  744. },
  745. // sf_control_data
  746. // 操作记录日期
  747. changeConsoleDate(e) {
  748. this.consoleTime = e;
  749. this.tableData = [];
  750. this.page = 1;
  751. this.getEquipcontroldata()
  752. },
  753. clearContime() {
  754. this.consoleTime = {};
  755. this.tableData = [];
  756. this.page = 1;
  757. this.getEquipcontroldata()
  758. },
  759. //操作记录
  760. async getEquipcontroldata() {
  761. uni.showLoading({
  762. title: '加载中'
  763. });
  764. const {
  765. consoleTime
  766. } = this;
  767. let begin = consoleTime.startDate ? new Date(consoleTime.startDate).getTime() / 1000 : '';
  768. let end = consoleTime.endDate ? new Date(consoleTime.endDate).getTime() / 1000 : '';
  769. //操作记录
  770. let res = await this.$myRequest({
  771. method: "POST",
  772. url: "/api/api_gateway?method=xphsp.views.control_log",
  773. data: {
  774. device_id: this.device_id,
  775. page_num: this.page,
  776. page_size: 15,
  777. start: begin,
  778. end: end,
  779. sys_control: this.current - 1
  780. },
  781. })
  782. uni.hideLoading();
  783. // this.tableData = [];
  784. var record = res.result;
  785. this.tableData = [...this.tableData, ...record];
  786. this.total = res.count;
  787. if (this.page * 15 > this.total) {
  788. this.status = 'nomore'
  789. } else {
  790. this.status = 'loadmore'
  791. }
  792. // console.log(this.tableData);
  793. },
  794. switchchange(e, state, item, index, isfeiButton) {
  795. // 是否是肥料开关,是的话 两个合并为一个
  796. item.disabled = true;
  797. if (isfeiButton) {
  798. // console.log(item, this.mainBengEKey, this.feiBengEKey)
  799. this.changeTimeStatus(item, index);
  800. // 当前是打开
  801. if (!item.e_status) {
  802. // 打开通道传1,关闭通道传0
  803. this.getEquipcontrol(state, 1, 1, item);
  804. // this.getEquipcontrol(state + 1, 0);
  805. } else {
  806. // this.getEquipcontrol(state + 1, 0);
  807. this.getEquipcontrol(state, 0, 1, item);
  808. }
  809. item.off = !item.off;
  810. item.e_status = !item.e_status;
  811. return
  812. }
  813. item.off = !item.off;
  814. item.e_status = !item.e_status;
  815. // if (item.type == this.mainBengEKey) {
  816. // // 判断注水泵是否打开
  817. // this.mainBeng = !item.e_status;
  818. // // console.log(this.mainBeng);
  819. // }
  820. // if (item.type == this.feiBengEKey) {
  821. // // 判断施肥阀是否打开
  822. // this.feiBeng = !item.e_status;
  823. // }
  824. // console.log(item, this.mainBengEKey, this.feiBengEKey)
  825. // if (this.colomRoundList.indexOf(item.type) > -1) {
  826. // let changeIndex = index;
  827. // if ((index + 1) % 2 == 0) {
  828. // // 偶数 往前取值
  829. // this.facilityvalve[index - 1].disabled = true;
  830. // changeIndex = index - 1;
  831. // } else if ((index + 1) % 2 == 1) {
  832. // // 基数 往后取值
  833. // this.facilityvalve[index + 1].disabled = true;
  834. // changeIndex = index + 1;
  835. // }
  836. // item.disabled = true;
  837. // this.changeTimeStatus(item, changeIndex);
  838. // this.getEquipcontrol(changeIndex, Number(!e));
  839. // } else {
  840. // }
  841. item.disabled = true;
  842. this.changeTimeStatus(item, index);
  843. //console.log(Number(e), state);
  844. this.getEquipcontrol(state, Number(e), undefined, item);
  845. },
  846. currentchange(e) {
  847. //页码
  848. if (this.type == 0) {
  849. this.pageDialog = e;
  850. } else {
  851. this.page = e;
  852. }
  853. this.getEquipcontroldata(this.type);
  854. },
  855. },
  856. onReachBottom() {
  857. if (this.current != 0 && this.status == 'loadmore') {
  858. this.page++;
  859. this.getEquipcontroldata()
  860. }
  861. },
  862. onLoad(option) {
  863. this.$forceUpdate()
  864. let deviceItem = JSON.parse(option.shebei)
  865. this.device_id = deviceItem.device_id;
  866. this.getEquipstatus();
  867. this.getElmentInfo();
  868. this.getEquipcontroldata();
  869. // this.getPickList();
  870. }
  871. }
  872. </script>
  873. <style scoped lang="less">
  874. .circleAnm {
  875. animation: ancirle 1s linear infinite;
  876. }
  877. // 旋转
  878. @keyframes ancirle {
  879. 0% {
  880. transform: rotate(360deg);
  881. }
  882. 100% {
  883. transform: rotate(0);
  884. }
  885. }
  886. .box {
  887. position: relative;
  888. width: 100%;
  889. min-height: 100vh;
  890. overflow: auto;
  891. padding-top: 40px;
  892. }
  893. .bigBox {
  894. width: 100%;
  895. padding-top: 40px;
  896. }
  897. .bigOpen {
  898. height: 100vh;
  899. }
  900. /deep/ .u-flex {
  901. display: flex;
  902. justify-content: center;
  903. }
  904. .topInfo {
  905. background: #14A478;
  906. color: #fff;
  907. font-size: 28rpx;
  908. padding-bottom: 32rpx;
  909. box-sizing: border-box;
  910. border-bottom-left-radius: 16rpx;
  911. border-bottom-right-radius: 16rpx;
  912. /deep/ .u-col {
  913. box-sizing: border-box;
  914. margin-top: 32rpx;
  915. box-sizing: border-box;
  916. .item {
  917. text-align: center;
  918. view:first-child {
  919. font-size: 40rpx;
  920. }
  921. view:nth-child(2) {
  922. font-size: 24rpx;
  923. line-height: 40rpx;
  924. opacity: .72;
  925. }
  926. }
  927. }
  928. }
  929. .readmore {
  930. text-align: center;
  931. font-size: 26rpx;
  932. line-height: 40rpx;
  933. margin-top: 32rpx;
  934. color: #93FFDE;
  935. .u-icon {
  936. margin-left: 15rpx;
  937. }
  938. }
  939. .histimeBox {
  940. display: flex;
  941. align-items: center;
  942. justify-content: space-between;
  943. height: 56rpx;
  944. padding: 6rpx 24rpx;
  945. box-sizing: border-box;
  946. border-radius: 8rpx;
  947. margin-top: 54rpx;
  948. border: 2rpx solid var(--neutral-color-border-light, #E4EDEA);
  949. .u-icon {
  950. z-index: 10;
  951. }
  952. .time {
  953. width: 280rpx;
  954. color: #C1C1C1;
  955. }
  956. view {
  957. color: #333333;
  958. text-align: center;
  959. }
  960. }
  961. .consoleBox {
  962. position: relative;
  963. max-height: 75vh;
  964. padding-bottom: 80rpx;
  965. overflow: auto;
  966. .u-row {
  967. box-sizing: border-box;
  968. .u-col {
  969. box-sizing: border-box;
  970. }
  971. }
  972. .u-btn {
  973. position: absolute;
  974. bottom: 0;
  975. left: 0;
  976. right: 0;
  977. background: #14A478;
  978. }
  979. .swichBox {
  980. position: relative;
  981. padding: 32rpx;
  982. overflow: hidden;
  983. .preSwich {
  984. display: flex;
  985. align-items: center;
  986. justify-content: space-between;
  987. padding: 24rpx 18rpx;
  988. border-radius: 8rpx;
  989. background: #EFF2FA;
  990. margin-bottom: 32rpx;
  991. view {
  992. color: #333333;
  993. font-size: 28rpx;
  994. }
  995. }
  996. }
  997. }
  998. .hisBox {
  999. position: relative;
  1000. width: 100vw;
  1001. padding-bottom: 100rpx;
  1002. box-sizing: border-box;
  1003. overflow-y: scroll;
  1004. .axiosBox {
  1005. position: relative;
  1006. padding: 48rpx 32rpx;
  1007. .title {
  1008. color: #333333;
  1009. font-size: 28rpx;
  1010. font-weight: 700;
  1011. }
  1012. .chartBox {
  1013. position: relative;
  1014. margin-top: 32rpx;
  1015. height: 800rpx;
  1016. overflow: hidden;
  1017. #canvasColumnA {
  1018. width: 100%;
  1019. height: 800rpx;
  1020. }
  1021. }
  1022. }
  1023. .readmoreHIs {
  1024. position: absolute;
  1025. bottom: 60rpx;
  1026. left: 50%;
  1027. transform: translate(-50%);
  1028. color: #14A478;
  1029. z-index: 5;
  1030. }
  1031. }
  1032. .devicePhoto {
  1033. padding: 32rpx;
  1034. .titleBox {
  1035. display: flex;
  1036. align-items: center;
  1037. justify-content: space-between;
  1038. .btn {
  1039. padding: 10rpx 14rpx;
  1040. border-radius: 8rpx;
  1041. background: #14A478;
  1042. color: #fff;
  1043. font-size: 28rpx;
  1044. }
  1045. }
  1046. .main {
  1047. position: relative;
  1048. width: 678rpx;
  1049. height: 612rpx;
  1050. margin-top: 10px;
  1051. .mainContent {
  1052. position: absolute;
  1053. left: 50%;
  1054. transform: translateX(-50%);
  1055. width: 678rpx;
  1056. top: 10rpx;
  1057. height: 602rpx;
  1058. z-index: 1;
  1059. }
  1060. .sourceBox {
  1061. position: absolute;
  1062. left: 20rpx;
  1063. z-index: 2;
  1064. display: flex;
  1065. align-items: center;
  1066. justify-content: center;
  1067. width: 112rpx;
  1068. height: 112rpx;
  1069. background: #E3FDFF;
  1070. border-radius: 112rpx;
  1071. color: #fff;
  1072. view {
  1073. width: 85rpx;
  1074. height: 85rpx;
  1075. background: #1890FF;
  1076. border-radius: 85rpx;
  1077. text-align: center;
  1078. line-height: 85rpx;
  1079. font-size: 28rpx;
  1080. }
  1081. }
  1082. .colList {
  1083. position: absolute;
  1084. z-index: 2;
  1085. top: 44rpx;
  1086. left: 154rpx;
  1087. width: 528rpx;
  1088. display: flex;
  1089. justify-content: center;
  1090. overflow: hidden;
  1091. .preClo {
  1092. position: relative;
  1093. float: left;
  1094. width: 88rpx;
  1095. // margin-left: 40rpx;
  1096. view {
  1097. text-align: center;
  1098. color: #333333;
  1099. font-size: 20rpx;
  1100. margin-bottom: 20rpx;
  1101. }
  1102. .btnName{
  1103. width: 100%;
  1104. overflow: hidden;
  1105. text-overflow: ellipsis;
  1106. white-space: nowrap;
  1107. }
  1108. image {
  1109. width: 88rpx;
  1110. height: 272rpx;
  1111. }
  1112. .shanBox {
  1113. position: absolute;
  1114. width: 64rpx;
  1115. height: 64rpx;
  1116. top: 116rpx;
  1117. left: 50%;
  1118. transform: translateX(-50%);
  1119. z-index: 2;
  1120. image {
  1121. width: 64rpx;
  1122. height: 64rpx;
  1123. }
  1124. }
  1125. .jiaoBtn {
  1126. position: absolute;
  1127. width: 64rpx;
  1128. height: 32rpx;
  1129. top: 72rpx;
  1130. left: 50%;
  1131. transform: translateX(-50%);
  1132. z-index: 2;
  1133. /deep/ .u-switch__node {
  1134. width: 28rpx !important;
  1135. height: 28rpx !important;
  1136. top: 2rpx !important;
  1137. }
  1138. /deep/ .u-switch__loading {
  1139. height: 20rpx !important;
  1140. }
  1141. /deep/ .u-switch {
  1142. width: 64rpx;
  1143. height: 32rpx;
  1144. }
  1145. /deep/ .u-switch--on .u-switch__node {
  1146. transform: translateX(36rpx) !important;
  1147. }
  1148. }
  1149. .btnBox {
  1150. position: absolute;
  1151. width: 66rpx;
  1152. height: 72rpx;
  1153. bottom: 40rpx;
  1154. left: 22rpx;
  1155. z-index: 2;
  1156. image {
  1157. width: 66rpx;
  1158. height: 72rpx;
  1159. }
  1160. }
  1161. }
  1162. }
  1163. .benList {
  1164. position: absolute;
  1165. width: 678rpx;
  1166. left: 50%;
  1167. transform: translateX(-50%);
  1168. top: 610rpx;
  1169. .preBen {
  1170. float: left;
  1171. text-align: center;
  1172. width: 20%;
  1173. .daoguan {
  1174. width: 20rpx;
  1175. height: 40rpx;
  1176. }
  1177. .info {
  1178. color: #333333;
  1179. font-size: 12px;
  1180. font-weight: 400;
  1181. }
  1182. .status {
  1183. width: 76rpx;
  1184. height: 100rpx;
  1185. margin-top: 10rpx;
  1186. }
  1187. }
  1188. }
  1189. .lineExit {}
  1190. .exit {
  1191. position: absolute;
  1192. width: 22rpx;
  1193. height: 20rpx;
  1194. top: 360rpx;
  1195. right: 251rpx;
  1196. z-index: 2;
  1197. image {
  1198. width: 22rpx;
  1199. height: 20rpx;
  1200. }
  1201. }
  1202. .warterIn {
  1203. position: absolute;
  1204. width: 66rpx;
  1205. height: 72rpx;
  1206. top: 190rpx;
  1207. left: 52rpx;
  1208. z-index: 3;
  1209. image {
  1210. width: 66rpx;
  1211. height: 72rpx;
  1212. }
  1213. }
  1214. .warterLight {
  1215. position: absolute;
  1216. width: 72rpx;
  1217. height: 48rpx;
  1218. top: 506rpx;
  1219. left: 110rpx;
  1220. z-index: 3;
  1221. image {
  1222. width: 72rpx;
  1223. height: 48rpx;
  1224. }
  1225. }
  1226. .feiLight {
  1227. position: absolute;
  1228. width: 72rpx;
  1229. height: 66rpx;
  1230. top: 424rpx;
  1231. right: 140rpx;
  1232. z-index: 3;
  1233. image {
  1234. width: 72rpx;
  1235. height: 66rpx;
  1236. }
  1237. }
  1238. .kongBox {
  1239. position: absolute;
  1240. width: 84rpx;
  1241. height: 108rpx;
  1242. top: 390rpx;
  1243. right: 228rpx;
  1244. z-index: 3;
  1245. image {
  1246. width: 84rpx;
  1247. height: 108rpx;
  1248. }
  1249. }
  1250. .fengBox {
  1251. position: absolute;
  1252. right: 12rpx;
  1253. top: 270rpx;
  1254. width: 55rpx;
  1255. height: 44rpx;
  1256. z-index: 2;
  1257. .relativeBox {
  1258. position: relative;
  1259. width: 100%;
  1260. height: 100%;
  1261. image:nth-child(1) {
  1262. width: 16rpx;
  1263. height: 32rpx;
  1264. }
  1265. image:nth-child(2) {
  1266. position: absolute;
  1267. right: 0;
  1268. top: -6rpx;
  1269. width: 44rpx;
  1270. height: 44rpx;
  1271. }
  1272. }
  1273. }
  1274. }
  1275. }
  1276. .consoleList {
  1277. padding: 0 32rpx;
  1278. .histimeBox {
  1279. margin: 32rpx 0;
  1280. }
  1281. .tableTitle {
  1282. background: #E8F3F0;
  1283. color: #333;
  1284. font-weight: 600;
  1285. }
  1286. .tableList {
  1287. font-size: 28rpx;
  1288. height: 78rpx;
  1289. color: #666666;
  1290. display: flex;
  1291. justify-content: space-between;
  1292. align-items: center;
  1293. border-bottom: 2rpx solid var(--neutral-color-border-base, #DCE6E3);
  1294. view {
  1295. text-align: center;
  1296. }
  1297. .success {
  1298. color: #14A478;
  1299. }
  1300. .error {
  1301. color: #FF5951;
  1302. }
  1303. view:nth-child(1) {
  1304. width: 120rpx;
  1305. text-align: left;
  1306. }
  1307. view:nth-child(2) {
  1308. width: 280rpx;
  1309. }
  1310. view:nth-child(3) {
  1311. width: 280rpx;
  1312. }
  1313. }
  1314. }
  1315. </style>