details.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407
  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. const ctx = uni.createCanvasContext(id, this);
  355. canvaColumnA = new uCharts({
  356. context: ctx,
  357. type: 'line',
  358. legend: {
  359. position: "top"
  360. },
  361. fontSize: 11,
  362. background: '#FFFFFF',
  363. pixelRatio: 1,
  364. animation: true,
  365. dataLabel: false,
  366. categories: xtitle,
  367. series: xinfo,
  368. enableScroll: true, //开启图表拖拽功能
  369. xAxis: {
  370. disabled: true,
  371. disableGrid: false,
  372. type: 'grid',
  373. gridType: 'dash',
  374. itemCount: 15, //x轴单屏显示数据的数量,默认为5个
  375. scrollShow: true, //新增是否显示滚动条,默认false
  376. scrollAlign: 'right', //滚动条初始位置
  377. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
  378. scrollColor: '#DEE7F7', //默认为 #A6A6A6
  379. },
  380. yAxis: {},
  381. width: _self.cWidth * 1,
  382. height: _self.cHeight * 1,
  383. extra: {
  384. line: {
  385. type: 'curve'
  386. }
  387. }
  388. });
  389. },
  390. touchLineA(e) {
  391. // console.log(e)
  392. canvaColumnA.scrollStart(e);
  393. },
  394. moveLineA(e) {
  395. canvaColumnA.scroll(e);
  396. },
  397. touchEndLineA(e) {
  398. canvaColumnA.touchLegend(e);
  399. // canvaColumnA.showToolTip(e);
  400. canvaColumnA.scrollEnd(e);
  401. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  402. canvaColumnA.showToolTip(e, {
  403. format: function(item, category) {
  404. return category + ' ' + item.name + ':' + item.data
  405. }
  406. });
  407. },
  408. // 时间戳转换
  409. timestampToDateTime(timestamp, isTime) {
  410. var date = new Date(timestamp * 1000); // 将时间戳转换为毫秒并创建一个日期对象
  411. var year = date.getFullYear(); // 获取年份
  412. var month = ('0' + (date.getMonth() + 1)).slice(-2); // 获取月份,并补零
  413. var day = ('0' + date.getDate()).slice(-2); // 获取日期,并补零
  414. var hours = ('0' + date.getHours()).slice(-2); // 获取小时,并补零
  415. var minutes = ('0' + date.getMinutes()).slice(-2); // 获取分钟,并补零
  416. var seconds = ('0' + date.getSeconds()).slice(-2); // 获取秒数,并补零
  417. if (isTime) {
  418. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  419. } else {
  420. return `${year}-${month}-${day}`;
  421. }
  422. },
  423. // 历史数据
  424. async getHistoryData() {
  425. uni.showLoading({
  426. title: '加载中'
  427. });
  428. const {
  429. historyTime
  430. } = this;
  431. // 获取当前日期
  432. var currentDate = new Date();
  433. // 设置时间为 0 点
  434. currentDate.setHours(0, 0, 0, 0);
  435. let begin = historyTime.startDate ? (new Date(historyTime.startDate).getTime() / 1000) - 8 * 3600 : (
  436. Math.floor(currentDate.getTime() / 1000));
  437. // 设置时间为 24 点
  438. currentDate.setHours(24, 0, 0, 0);
  439. let end = historyTime.endDate ? (new Date(historyTime.endDate).getTime() / 1000) - 8 * 3600 : (Math
  440. .floor(currentDate.getTime() / 1000));
  441. //折线图数据
  442. let res = await this.$myRequest({
  443. url: "/api/api_gateway?method=weather.weather.sf_data_chart",
  444. data: {
  445. device_id: this.device_id,
  446. begin: begin,
  447. end: end,
  448. },
  449. })
  450. uni.hideLoading();
  451. var conf = res.conf.eleName;
  452. var dat = res.dat.reverse();
  453. //console.log(dat);
  454. conf = conf.split("/");
  455. // var arr1 = [];
  456. var regroupData = []; //重组数据
  457. let options = [];
  458. var timeList = [];
  459. for (var i = 0; i < conf.length; i++) {
  460. // var arr = [];
  461. if (conf[i] != "-") {
  462. var optionobj = {};
  463. optionobj.value = i;
  464. optionobj.label = conf[i];
  465. options.push(optionobj);
  466. var reddata = [];
  467. dat.forEach((item, index) => {
  468. if (timeList.length < dat.length) {
  469. timeList.push(this.timestampToDateTime(item.uptime, true));
  470. }
  471. var status = item.device_status.split(",");
  472. // //console.log(status);
  473. var arr = [];
  474. for (var j = 0; j < status.length; j++) {
  475. if (status[j].indexOf("e") + 1) {
  476. arr.push(status[j]);
  477. }
  478. }
  479. // //console.log(arr)
  480. var dataobj = {};
  481. for (var k = 0; k < arr.length; k++) {
  482. var indexs = arr[k].indexOf(":");
  483. // //console.log(arr[k])
  484. if (k == 0) {
  485. dataobj[arr[k].slice(1, indexs).trim()] = arr[k]
  486. .substr(indexs + 1)
  487. .trim();
  488. } else {
  489. dataobj[arr[k].slice(0, indexs).trim()] = arr[k]
  490. .substr(indexs + 1)
  491. .trim();
  492. }
  493. }
  494. // //console.log(dataobj)
  495. for (var key in dataobj) {
  496. // //console.log(i)
  497. var str = "'e" + (i + 1) + "'";
  498. // //console.log(key,str);
  499. if (key == str) {
  500. if (Number(dataobj[key]) == 32767) {
  501. // reddata.push([]);
  502. } else {
  503. reddata.push(Number(dataobj[key]));
  504. }
  505. }
  506. }
  507. });
  508. regroupData.push({
  509. name: conf[i],
  510. type: "spline",
  511. fillColor: {
  512. linearGradient: [0, 0, 0, 300],
  513. },
  514. data: reddata,
  515. });
  516. }
  517. }
  518. // console.log(timeList);
  519. this.showColumn('canvasColumnA', timeList, regroupData)
  520. },
  521. // 切换选项卡
  522. change(index) {
  523. this.page = 1;
  524. this.total = 0;
  525. this.current = index;
  526. this.status = 'loadmore';
  527. this.tableData = [];
  528. this.getEquipcontroldata();
  529. },
  530. // 获取要素实时数据
  531. async getElmentInfo() {
  532. uni.showLoading({
  533. title: '加载中'
  534. });
  535. let res = await this.$myRequest({
  536. url: "/api/api_gateway?method=xphsp.views.device_elements",
  537. data: {
  538. device_id: this.device_id,
  539. },
  540. })
  541. uni.hideLoading();
  542. var conf = res.conf.eleName.split('/');
  543. var dataList = [res.data.device_data];
  544. if (dataList.length == 0) return
  545. this.ElementList = [];
  546. conf.forEach((item, index) => {
  547. let obj = {}
  548. if (item == '-') return
  549. obj.name = item;
  550. let valList = dataList[0][`e${index + 1}`].split('#');
  551. obj.value = valList[0];
  552. obj.unit = valList[1];
  553. obj.time = dataList[0].uptime;
  554. this.ElementList.push(obj)
  555. })
  556. // console.log(this.ElementList)
  557. },
  558. // 当前配置的元素列表
  559. async getPickList() {
  560. // e_type类型对应
  561. // 1:'控制柜',
  562. // 2:'灌溉泵',
  563. // 3:'搅拌机',
  564. // 4:'注肥泵',
  565. // 5:'阀控器',
  566. // 6:'施肥桶'
  567. let res = await this.$myRequest({
  568. url: "/api/api_gateway?method=xphsp.views.sf_valve_location_list",
  569. data: {
  570. sf_device_id: this.device_id,
  571. },
  572. });
  573. let pickList = [];
  574. let pickBtnList = []; // 肥料开关
  575. let pickBanList = []; // 肥料搅拌机开关
  576. let faList = []; // 管道阀开关
  577. res.forEach((pick, index) => {
  578. this.facilityvalve.forEach(item => {
  579. if (pick.e_key == item.type) {
  580. // 获取当前灌溉泵位置
  581. let pickObj = Object.assign(pick,item);
  582. if(pick.e_type == 2) {
  583. this.mainBengIndex = pickList.length;
  584. this.mainBengItem = pickObj;
  585. this.mainBeng = pickObj.e_status;
  586. this.mainBengEKey = pickObj.e_key;
  587. }
  588. // 获取当前施肥泵位置
  589. if(pick.e_type == 4) {
  590. this.feiBengIndex = pickList.length;
  591. this.feiBengItem = pickObj;
  592. this.feiBeng = pickObj.e_status;
  593. this.feiBengEKey = pickObj.e_key;
  594. }
  595. // 获取肥料开关列表
  596. if (pick.e_type == 6) {
  597. pickBtnList.push(pickObj)
  598. }
  599. // 获取搅拌机开关列表
  600. if (pick.e_type == 3) {
  601. pickBanList.push(pickObj)
  602. }
  603. // 获取管道阀开关列表
  604. if (pick.e_type == 1 || pick.e_type == 5) {
  605. faList.push(pickObj)
  606. }
  607. pickList.push(pickObj)
  608. }
  609. })
  610. })
  611. // 把肥料和搅拌机位置对应起来(根据创建时间)
  612. let resultBan = [];
  613. pickBtnList.forEach(fei => {
  614. pickBanList.forEach(ban => {
  615. if (fei.create_time == ban.create_time) {
  616. resultBan.push(ban)
  617. }
  618. })
  619. })
  620. this.pickBtnList = pickBtnList;
  621. this.resultBan = resultBan;
  622. this.faList = faList;
  623. console.log(pickBtnList, pickBanList, resultBan, faList)
  624. },
  625. // 元素状态
  626. async getEquipstatus() {
  627. uni.showLoading({
  628. title: '加载中'
  629. });
  630. this.facilityvalve = [];
  631. let res = await this.$myRequest({
  632. url: "/api/api_gateway?method=xphsp.views.device_info",
  633. data: {
  634. device_id: this.device_id,
  635. },
  636. })
  637. uni.hideLoading();
  638. var conf = res.conf.relayName;
  639. var dataobj = res.device_status;
  640. var relayNum = res.conf.relayNum;
  641. var arr = [];
  642. function numberToArray(number) {
  643. // 将数字转换为字符串
  644. let numString = number.toString();
  645. // 创建一个空数组,用于存储结果
  646. let result = [];
  647. // 遍历字符串的每个字符,并将其转换为对应的数字
  648. for (let i = 0; i < numString.length; i++) {
  649. result.push(parseInt(numString.charAt(i)));
  650. }
  651. return result;
  652. }
  653. for (var i = 0; i < dataobj.length; i++) {
  654. // if (offobj[i].indexOf("j") + 1) {
  655. arr.push(offobj[i]);
  656. // }
  657. }
  658. conf = conf.split("/");
  659. relayNum = relayNum.split("/");
  660. var arr1 = [];
  661. var reg = /\d/;
  662. let totalP = Math.ceil((conf.length) / 32); //总圈数
  663. for (var i = 0; i < conf.length; i++) {
  664. var obj = {};
  665. obj.name = conf[i];
  666. // if (reg.test(conf[i])) {
  667. // obj.name2 = conf[i].slice(0, conf[i].length - 1);
  668. // } else {
  669. // obj.name2 = conf[i];
  670. // }
  671. obj.name2 = this.typename[relayNum[i]];
  672. obj.number = i;
  673. obj.type = `j${i + 1}`;
  674. obj.disabled = false;
  675. // "state": 1 继电器打开 ;"state": 0 继电器关闭
  676. // 处理开关值
  677. // J开头表示状态,总共只有32长度,超过32则从头赋值 位数多一位
  678. // 例:1和33是都在J1里面,返回值是一个二进制数 倒数第一位表示第一个 第二位表示33状态 以此类推
  679. // 根据总长度 为超过32的j赋值
  680. // 当前是循环的第几轮
  681. let baseP = Math.ceil((i + 1) / 32);
  682. if (i > 31) {
  683. dataobj[`j${i + 1}`] = dataobj[
  684. `j${(i + 1) % 32 == 0 ? 32 : (i + 1) % 32}`]; // 当前脚标/32取余 当恰好整除的时候 取32
  685. }
  686. dataobj[`j${i + 1}`] = dataobj[`j${i + 1}`].slice(-totalP); // 截取当前圈数的最后几位数字
  687. let baseOff = numberToArray(dataobj[`j${i + 1}`]); // 把当前值根据位数 转换为数组
  688. obj.off = baseOff[baseP - 1] == '0' ? false : true; // 根据当前圈数,取对应的数组的值
  689. arr1.push(obj);
  690. }
  691. for (var i = 0; i < arr1.length; i++) {
  692. if (arr1[i].name != "-") {
  693. this.facilityvalve.push(arr1[i]);
  694. }
  695. }
  696. let feiNum = 0; // 记录废料桶占据通道个数,两个通道为一个肥料桶
  697. this.buttonList = [];
  698. this.facilityvalve.forEach((item, index) => {
  699. if (this.colomRoundList.indexOf(item.type) > -1) {
  700. feiNum++;
  701. this.buttonList.push(item);
  702. }
  703. })
  704. this.feiNum = feiNum;
  705. this.getPickList();
  706. console.log(this.facilityvalve)
  707. },
  708. async getEquipcontrol(num, state, double_order, item) {
  709. // console.log({
  710. // device_id: item.cc_device_id == '' ? this.device_id : item.cc_device_id,
  711. // relayNum: num,
  712. // relayState: state,
  713. // double_order
  714. // });
  715. //设备控制
  716. uni.showLoading({
  717. title: '正在下发指令'
  718. });
  719. let res = await this.$myRequest({
  720. url: "/api/api_gateway?method=xphsp.views.control_order",
  721. data: {
  722. device_id: item.cc_device_id == '' ? this.device_id : item.cc_device_id,
  723. relayNum: num,
  724. relayState: state,
  725. double_order
  726. },
  727. })
  728. uni.hideLoading();
  729. if (res.msg_code == 200) {
  730. uni.showToast({
  731. title: '指令下发成功',
  732. duration: 2000,
  733. icon: 'none'
  734. });
  735. } else {
  736. uni.showToast({
  737. title: res.msg,
  738. duration: 2000,
  739. icon: 'none'
  740. })
  741. setTimeout(() => {
  742. this.getEquipstatus()
  743. }, 2000)
  744. }
  745. },
  746. // sf_control_data
  747. // 操作记录日期
  748. changeConsoleDate(e) {
  749. this.consoleTime = e;
  750. this.tableData = [];
  751. this.page = 1;
  752. this.getEquipcontroldata()
  753. },
  754. clearContime() {
  755. this.consoleTime = {};
  756. this.tableData = [];
  757. this.page = 1;
  758. this.getEquipcontroldata()
  759. },
  760. //操作记录
  761. async getEquipcontroldata() {
  762. uni.showLoading({
  763. title: '加载中'
  764. });
  765. const {
  766. consoleTime
  767. } = this;
  768. let begin = consoleTime.startDate ? new Date(consoleTime.startDate).getTime() / 1000 : '';
  769. let end = consoleTime.endDate ? new Date(consoleTime.endDate).getTime() / 1000 : '';
  770. //操作记录
  771. let res = await this.$myRequest({
  772. method: "POST",
  773. url: "/api/api_gateway?method=xphsp.views.control_log",
  774. data: {
  775. device_id: this.device_id,
  776. page_num: this.page,
  777. page_size: 15,
  778. start: begin,
  779. end: end,
  780. sys_control: this.current - 1
  781. },
  782. })
  783. uni.hideLoading();
  784. // this.tableData = [];
  785. var record = res.result;
  786. this.tableData = [...this.tableData, ...record];
  787. this.total = res.count;
  788. if (this.page * 15 > this.total) {
  789. this.status = 'nomore'
  790. } else {
  791. this.status = 'loadmore'
  792. }
  793. // console.log(this.tableData);
  794. },
  795. switchchange(e, state, item, index, isfeiButton) {
  796. // 是否是肥料开关,是的话 两个合并为一个
  797. item.disabled = true;
  798. if (isfeiButton) {
  799. // console.log(item, this.mainBengEKey, this.feiBengEKey)
  800. this.changeTimeStatus(item, index);
  801. // 当前是打开
  802. if (!item.e_status) {
  803. // 打开通道传1,关闭通道传0
  804. this.getEquipcontrol(state, 1, 1, item);
  805. // this.getEquipcontrol(state + 1, 0);
  806. } else {
  807. // this.getEquipcontrol(state + 1, 0);
  808. this.getEquipcontrol(state, 0, 1, item);
  809. }
  810. item.off = !item.off;
  811. item.e_status = !item.e_status;
  812. return
  813. }
  814. item.off = !item.off;
  815. item.e_status = !item.e_status;
  816. // if (item.type == this.mainBengEKey) {
  817. // // 判断注水泵是否打开
  818. // this.mainBeng = !item.e_status;
  819. // // console.log(this.mainBeng);
  820. // }
  821. // if (item.type == this.feiBengEKey) {
  822. // // 判断施肥阀是否打开
  823. // this.feiBeng = !item.e_status;
  824. // }
  825. // console.log(item, this.mainBengEKey, this.feiBengEKey)
  826. // if (this.colomRoundList.indexOf(item.type) > -1) {
  827. // let changeIndex = index;
  828. // if ((index + 1) % 2 == 0) {
  829. // // 偶数 往前取值
  830. // this.facilityvalve[index - 1].disabled = true;
  831. // changeIndex = index - 1;
  832. // } else if ((index + 1) % 2 == 1) {
  833. // // 基数 往后取值
  834. // this.facilityvalve[index + 1].disabled = true;
  835. // changeIndex = index + 1;
  836. // }
  837. // item.disabled = true;
  838. // this.changeTimeStatus(item, changeIndex);
  839. // this.getEquipcontrol(changeIndex, Number(!e));
  840. // } else {
  841. // }
  842. item.disabled = true;
  843. this.changeTimeStatus(item, index);
  844. //console.log(Number(e), state);
  845. this.getEquipcontrol(state, Number(e), undefined, item);
  846. },
  847. currentchange(e) {
  848. //页码
  849. if (this.type == 0) {
  850. this.pageDialog = e;
  851. } else {
  852. this.page = e;
  853. }
  854. this.getEquipcontroldata(this.type);
  855. },
  856. },
  857. onReachBottom() {
  858. if (this.current != 0 && this.status == 'loadmore') {
  859. this.page++;
  860. this.getEquipcontroldata()
  861. }
  862. },
  863. onLoad(option) {
  864. this.$forceUpdate()
  865. let deviceItem = JSON.parse(option.shebei)
  866. this.device_id = deviceItem.device_id;
  867. this.getEquipstatus();
  868. this.getElmentInfo();
  869. this.getEquipcontroldata();
  870. // this.getPickList();
  871. }
  872. }
  873. </script>
  874. <style scoped lang="less">
  875. .circleAnm {
  876. animation: ancirle 1s linear infinite;
  877. }
  878. // 旋转
  879. @keyframes ancirle {
  880. 0% {
  881. transform: rotate(360deg);
  882. }
  883. 100% {
  884. transform: rotate(0);
  885. }
  886. }
  887. .box {
  888. position: relative;
  889. width: 100%;
  890. min-height: 100vh;
  891. overflow: auto;
  892. padding-top: 40px;
  893. }
  894. .bigBox {
  895. width: 100%;
  896. padding-top: 40px;
  897. }
  898. .bigOpen {
  899. height: 100vh;
  900. }
  901. /deep/ .u-flex {
  902. display: flex;
  903. justify-content: center;
  904. }
  905. .topInfo {
  906. background: #14A478;
  907. color: #fff;
  908. font-size: 28rpx;
  909. padding-bottom: 32rpx;
  910. box-sizing: border-box;
  911. border-bottom-left-radius: 16rpx;
  912. border-bottom-right-radius: 16rpx;
  913. /deep/ .u-col {
  914. box-sizing: border-box;
  915. margin-top: 32rpx;
  916. box-sizing: border-box;
  917. .item {
  918. text-align: center;
  919. view:first-child {
  920. font-size: 40rpx;
  921. }
  922. view:nth-child(2) {
  923. font-size: 24rpx;
  924. line-height: 40rpx;
  925. opacity: .72;
  926. }
  927. }
  928. }
  929. }
  930. .readmore {
  931. text-align: center;
  932. font-size: 26rpx;
  933. line-height: 40rpx;
  934. margin-top: 32rpx;
  935. color: #93FFDE;
  936. .u-icon {
  937. margin-left: 15rpx;
  938. }
  939. }
  940. .histimeBox {
  941. display: flex;
  942. align-items: center;
  943. justify-content: space-between;
  944. height: 56rpx;
  945. padding: 6rpx 24rpx;
  946. box-sizing: border-box;
  947. border-radius: 8rpx;
  948. margin-top: 54rpx;
  949. border: 2rpx solid var(--neutral-color-border-light, #E4EDEA);
  950. .u-icon {
  951. z-index: 10;
  952. }
  953. .time {
  954. width: 280rpx;
  955. color: #C1C1C1;
  956. }
  957. view {
  958. color: #333333;
  959. text-align: center;
  960. }
  961. }
  962. .consoleBox {
  963. position: relative;
  964. max-height: 75vh;
  965. padding-bottom: 80rpx;
  966. overflow: auto;
  967. .u-row {
  968. box-sizing: border-box;
  969. .u-col {
  970. box-sizing: border-box;
  971. }
  972. }
  973. .u-btn {
  974. position: absolute;
  975. bottom: 0;
  976. left: 0;
  977. right: 0;
  978. background: #14A478;
  979. }
  980. .swichBox {
  981. position: relative;
  982. padding: 32rpx;
  983. overflow: hidden;
  984. .preSwich {
  985. display: flex;
  986. align-items: center;
  987. justify-content: space-between;
  988. padding: 24rpx 18rpx;
  989. border-radius: 8rpx;
  990. background: #EFF2FA;
  991. margin-bottom: 32rpx;
  992. view {
  993. color: #333333;
  994. font-size: 28rpx;
  995. }
  996. }
  997. }
  998. }
  999. .hisBox {
  1000. position: relative;
  1001. width: 100vw;
  1002. padding-bottom: 100rpx;
  1003. box-sizing: border-box;
  1004. overflow-y: scroll;
  1005. .axiosBox {
  1006. position: relative;
  1007. padding: 48rpx 32rpx;
  1008. .title {
  1009. color: #333333;
  1010. font-size: 28rpx;
  1011. font-weight: 700;
  1012. }
  1013. .chartBox {
  1014. position: relative;
  1015. margin-top: 32rpx;
  1016. height: 800rpx;
  1017. overflow: hidden;
  1018. #canvasColumnA {
  1019. width: 100%;
  1020. height: 800rpx;
  1021. }
  1022. }
  1023. }
  1024. .readmoreHIs {
  1025. position: absolute;
  1026. bottom: 60rpx;
  1027. left: 50%;
  1028. transform: translate(-50%);
  1029. color: #14A478;
  1030. z-index: 5;
  1031. }
  1032. }
  1033. .devicePhoto {
  1034. padding: 32rpx;
  1035. .titleBox {
  1036. display: flex;
  1037. align-items: center;
  1038. justify-content: space-between;
  1039. .btn {
  1040. padding: 10rpx 14rpx;
  1041. border-radius: 8rpx;
  1042. background: #14A478;
  1043. color: #fff;
  1044. font-size: 28rpx;
  1045. }
  1046. }
  1047. .main {
  1048. position: relative;
  1049. width: 678rpx;
  1050. height: 612rpx;
  1051. margin-top: 10px;
  1052. .mainContent {
  1053. position: absolute;
  1054. left: 50%;
  1055. transform: translateX(-50%);
  1056. width: 678rpx;
  1057. top: 10rpx;
  1058. height: 602rpx;
  1059. z-index: 1;
  1060. }
  1061. .sourceBox {
  1062. position: absolute;
  1063. left: 20rpx;
  1064. z-index: 2;
  1065. display: flex;
  1066. align-items: center;
  1067. justify-content: center;
  1068. width: 112rpx;
  1069. height: 112rpx;
  1070. background: #E3FDFF;
  1071. border-radius: 112rpx;
  1072. color: #fff;
  1073. view {
  1074. width: 85rpx;
  1075. height: 85rpx;
  1076. background: #1890FF;
  1077. border-radius: 85rpx;
  1078. text-align: center;
  1079. line-height: 85rpx;
  1080. font-size: 28rpx;
  1081. }
  1082. }
  1083. .colList {
  1084. position: absolute;
  1085. z-index: 2;
  1086. top: 44rpx;
  1087. left: 154rpx;
  1088. width: 528rpx;
  1089. display: flex;
  1090. justify-content: center;
  1091. overflow: hidden;
  1092. .preClo {
  1093. position: relative;
  1094. float: left;
  1095. width: 88rpx;
  1096. // margin-left: 40rpx;
  1097. view {
  1098. text-align: center;
  1099. color: #333333;
  1100. font-size: 20rpx;
  1101. margin-bottom: 20rpx;
  1102. }
  1103. .btnName{
  1104. width: 100%;
  1105. overflow: hidden;
  1106. text-overflow: ellipsis;
  1107. white-space: nowrap;
  1108. }
  1109. image {
  1110. width: 88rpx;
  1111. height: 272rpx;
  1112. }
  1113. .shanBox {
  1114. position: absolute;
  1115. width: 64rpx;
  1116. height: 64rpx;
  1117. top: 116rpx;
  1118. left: 50%;
  1119. transform: translateX(-50%);
  1120. z-index: 2;
  1121. image {
  1122. width: 64rpx;
  1123. height: 64rpx;
  1124. }
  1125. }
  1126. .jiaoBtn {
  1127. position: absolute;
  1128. width: 64rpx;
  1129. height: 32rpx;
  1130. top: 72rpx;
  1131. left: 50%;
  1132. transform: translateX(-50%);
  1133. z-index: 2;
  1134. /deep/ .u-switch__node {
  1135. width: 28rpx !important;
  1136. height: 28rpx !important;
  1137. top: 2rpx !important;
  1138. }
  1139. /deep/ .u-switch__loading {
  1140. height: 20rpx !important;
  1141. }
  1142. /deep/ .u-switch {
  1143. width: 64rpx;
  1144. height: 32rpx;
  1145. }
  1146. /deep/ .u-switch--on .u-switch__node {
  1147. transform: translateX(36rpx) !important;
  1148. }
  1149. }
  1150. .btnBox {
  1151. position: absolute;
  1152. width: 66rpx;
  1153. height: 72rpx;
  1154. bottom: 40rpx;
  1155. left: 22rpx;
  1156. z-index: 2;
  1157. image {
  1158. width: 66rpx;
  1159. height: 72rpx;
  1160. }
  1161. }
  1162. }
  1163. }
  1164. .benList {
  1165. position: absolute;
  1166. width: 678rpx;
  1167. left: 50%;
  1168. transform: translateX(-50%);
  1169. top: 610rpx;
  1170. .preBen {
  1171. float: left;
  1172. text-align: center;
  1173. width: 20%;
  1174. .daoguan {
  1175. width: 20rpx;
  1176. height: 40rpx;
  1177. }
  1178. .info {
  1179. color: #333333;
  1180. font-size: 12px;
  1181. font-weight: 400;
  1182. }
  1183. .status {
  1184. width: 76rpx;
  1185. height: 100rpx;
  1186. margin-top: 10rpx;
  1187. }
  1188. }
  1189. }
  1190. .lineExit {}
  1191. .exit {
  1192. position: absolute;
  1193. width: 22rpx;
  1194. height: 20rpx;
  1195. top: 360rpx;
  1196. right: 251rpx;
  1197. z-index: 2;
  1198. image {
  1199. width: 22rpx;
  1200. height: 20rpx;
  1201. }
  1202. }
  1203. .warterIn {
  1204. position: absolute;
  1205. width: 66rpx;
  1206. height: 72rpx;
  1207. top: 190rpx;
  1208. left: 52rpx;
  1209. z-index: 3;
  1210. image {
  1211. width: 66rpx;
  1212. height: 72rpx;
  1213. }
  1214. }
  1215. .warterLight {
  1216. position: absolute;
  1217. width: 72rpx;
  1218. height: 48rpx;
  1219. top: 506rpx;
  1220. left: 110rpx;
  1221. z-index: 3;
  1222. image {
  1223. width: 72rpx;
  1224. height: 48rpx;
  1225. }
  1226. }
  1227. .feiLight {
  1228. position: absolute;
  1229. width: 72rpx;
  1230. height: 66rpx;
  1231. top: 424rpx;
  1232. right: 140rpx;
  1233. z-index: 3;
  1234. image {
  1235. width: 72rpx;
  1236. height: 66rpx;
  1237. }
  1238. }
  1239. .kongBox {
  1240. position: absolute;
  1241. width: 84rpx;
  1242. height: 108rpx;
  1243. top: 390rpx;
  1244. right: 228rpx;
  1245. z-index: 3;
  1246. image {
  1247. width: 84rpx;
  1248. height: 108rpx;
  1249. }
  1250. }
  1251. .fengBox {
  1252. position: absolute;
  1253. right: 12rpx;
  1254. top: 270rpx;
  1255. width: 55rpx;
  1256. height: 44rpx;
  1257. z-index: 2;
  1258. .relativeBox {
  1259. position: relative;
  1260. width: 100%;
  1261. height: 100%;
  1262. image:nth-child(1) {
  1263. width: 16rpx;
  1264. height: 32rpx;
  1265. }
  1266. image:nth-child(2) {
  1267. position: absolute;
  1268. right: 0;
  1269. top: -6rpx;
  1270. width: 44rpx;
  1271. height: 44rpx;
  1272. }
  1273. }
  1274. }
  1275. }
  1276. }
  1277. .consoleList {
  1278. padding: 0 32rpx;
  1279. .histimeBox {
  1280. margin: 32rpx 0;
  1281. }
  1282. .tableTitle {
  1283. background: #E8F3F0;
  1284. color: #333;
  1285. font-weight: 600;
  1286. }
  1287. .tableList {
  1288. font-size: 28rpx;
  1289. height: 78rpx;
  1290. color: #666666;
  1291. display: flex;
  1292. justify-content: space-between;
  1293. align-items: center;
  1294. border-bottom: 2rpx solid var(--neutral-color-border-base, #DCE6E3);
  1295. view {
  1296. text-align: center;
  1297. }
  1298. .success {
  1299. color: #14A478;
  1300. }
  1301. .error {
  1302. color: #FF5951;
  1303. }
  1304. view:nth-child(1) {
  1305. width: 120rpx;
  1306. text-align: left;
  1307. }
  1308. view:nth-child(2) {
  1309. width: 280rpx;
  1310. }
  1311. view:nth-child(3) {
  1312. width: 280rpx;
  1313. }
  1314. }
  1315. }
  1316. </style>