details.vue 37 KB

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