cmb.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. <template>
  2. <view>
  3. <view class="status_bar"></view>
  4. <view class="" style="position: relative; top: 44px">
  5. <view style="position: fixed; z-index: 100; width: 100%">
  6. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备详情"></uni-nav-bar>
  7. </view>
  8. <view class="info">
  9. <view class="info_item">
  10. <image src="https://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png" mode="" class="bgi"></image>
  11. <p style="font-size: 32rpx" @click="copy(eqinfo.device_id)">
  12. 设备 ID:{{ eqinfo.device_id }}
  13. <image src="https://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode=""
  14. class="tishi"></image>
  15. </p>
  16. <p>设备名称:{{ eqinfo.device_name || "无" }}</p>
  17. <p>
  18. 最近上报时间:<span v-if="eqinfo.uptime">{{ eqinfo.uptime == 0 ? '无' : eqinfo.uptime | timeFormat()
  19. }}</span><span v-else>{{eqinfo.uptime == 0 ? '无' : eqinfo.uptime | timeFormat() }}</span>
  20. </p>
  21. <p>地址:{{ eqinfo.location || "暂无地址" }}</p>
  22. </view>
  23. </view>
  24. <view class="control">
  25. <view class="control_item" v-if="kongtf" @click="control">
  26. <image :src="
  27. 'https://www.hnyfwlw.com:8006/bigdata_app' +
  28. '/image/environment/forecastResult.png'
  29. " mode=""></image>
  30. <p>预测结果</p>
  31. </view>
  32. </view>
  33. <view class="his_box" v-if="datatf">
  34. <view class="selecttimes" @click="tiemshow = !tiemshow">
  35. <view class="timesbox">
  36. <image
  37. :src="'https://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
  38. mode=""></image>
  39. <p>{{ timetab(begintime) }}</p>
  40. <p class="or">~</p>
  41. <p>{{ timetab(end) }}</p>
  42. <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
  43. </view>
  44. <u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
  45. </view>
  46. <view class="shuju_one">
  47. <view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
  48. 暂无数据
  49. </view>
  50. <view class="canvastishi" v-if="dataloadingtf">
  51. <p class="dataloading">加载中</p>
  52. </view>
  53. <canvas v-show="!tiemshow" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
  54. @touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
  55. @touchend="touchEndLineA($event)" disable-scroll="true" :style="{
  56. width: cWidth * pixelRatio + 'px',
  57. height: cHeight * pixelRatio + 'px',
  58. transform: 'scale(' + 1 / pixelRatio + ')',
  59. 'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
  60. 'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
  61. }"></canvas>
  62. <canvas v-show="!tiemshow" canvas-id="canvasColumnB" id="canvasColumnB" class="charts"
  63. @touchstart="touchLineB($event)" @touchmove="moveLineB($event)"
  64. @touchend="touchEndLineB($event)" disable-scroll="true" :style="{
  65. width: cWidth * pixelRatio + 'px',
  66. height: cHeight * pixelRatio + 'px',
  67. transform: 'scale(' + 1 / pixelRatio + ')',
  68. 'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
  69. 'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
  70. }"></canvas>
  71. </view>
  72. <view class="condition">
  73. <scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
  74. <view class="table">
  75. <view class="tr" style="width:6000rpx">
  76. <view class="th" v-for="(item, index) in tableHead" :key="'a' + index">
  77. {{ item }}
  78. </view>
  79. </view>
  80. <view class="tr" style="width:6000rpx" v-for="(items, indexs) in historylistdata"
  81. :key="'b' + indexs">
  82. <view class="td">{{ items.uploadTime | timeFormat() }}</view>
  83. <view class="td">{{ items.dianChiDianYa }}</view>
  84. <view class="td">{{ items.fiftyTuRangHanShuiLiang }}</view>
  85. <view class="td">{{ items.fiftyTuRangWenDu }}</view>
  86. <view class="td">{{ items.fiveTuRangHanShuiLiang }}</view>
  87. <view class="td">{{ items.fiveTuRangWenDu }}</view>
  88. <view class="td">{{ items.kongQiWenDu }}</view>
  89. <view class="td">{{ items.luDianWenDu }}</view>
  90. <view class="td">{{ items.riZhaoShiShu }}</view>
  91. <view class="td">{{ items.shiRunShiJian }}</view>
  92. <view class="td">{{ items.tenTuRangHanShuiLiang }}</view>
  93. <view class="td">{{ items.tenTuRangWenDu }}</view>
  94. <view class="td">{{ items.tianJiangYuLiang }}</view>
  95. <view class="td">{{ items.tuRangDaoDianLv }}</view>
  96. <view class="td">{{ items.twentyFiveTuRangHanShuiLiang }}</view>
  97. <view class="td">{{ items.twentyFiveTuRangWenDu }}</view>
  98. <view class="td">{{ items.twentyTuRangHanShuiLiang }}</view>
  99. <view class="td">{{ items.twentyTuRangWenDu }}</view>
  100. <view class="td">{{ items.xiangDuiShiDu }}</view>
  101. <view class="td">{{ items.xiaoShiJiangYuLiang }}</view>
  102. </view>
  103. <view class="tr" style="width:6000rpx" v-if="historylistdata.length == 0">
  104. <view class="td" v-for="item in 13">暂无数据</view>
  105. </view>
  106. </view>
  107. </scroll-view>
  108. <view class="pagenumber">
  109. <button @click="prev">上一页</button>
  110. <view class="pagenumber_page"> 第 {{ page }} 页 </view>
  111. <view class="pagenumber_page"> 共 {{ pagesum }} 页 </view>
  112. <button @click="next">下一页</button>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </template>
  119. <script>
  120. import uCharts from "../../components/js_sdk/u-charts/u-charts/u-charts.js";
  121. var canvaColumnA = null;
  122. var canvaColumnB = null;
  123. export default {
  124. data() {
  125. return {
  126. basetype: "",
  127. kongtf: false,
  128. datatf: false,
  129. eqinfo: {},
  130. city: "河南省",
  131. tiemshow: false, //时间筛选弹框
  132. begintime: "", //开始时间
  133. end: "", //结束时间
  134. dataloadingtf: true,
  135. canvastishiTF: false,
  136. device_id: "", //设备ID
  137. tableHead: [
  138. "上报时间",
  139. "电池电压",
  140. "50cm土壤含水量",
  141. "50cm土壤温度",
  142. "5cm土壤含水量",
  143. "5cm土壤温度",
  144. "空气温度",
  145. "露点温度",
  146. "日照时数",
  147. "叶面湿润时间",
  148. "10cm土壤含水量",
  149. "10cm土壤温度",
  150. "天降雨量",
  151. "土壤导电率",
  152. "25cm土壤含水量",
  153. "25cm土壤温度",
  154. "20cm土壤含水量",
  155. "20cm土壤温度",
  156. "相对湿度",
  157. "时降雨量",
  158. ], //表格抬头
  159. forbidden: false,
  160. historylistdata: [], //历史数据
  161. pagesum: 1,
  162. page: 1,
  163. cWidth: "",
  164. cHeight: "",
  165. pixelRatio: 1,
  166. param: {
  167. dianChiDianYa: "电池电压",
  168. fiftyTuRangHanShuiLiang: "50cm土壤含水量",
  169. fiftyTuRangWenDu: "50cm土壤温度",
  170. fiveTuRangHanShuiLiang: "5cm土壤含水量",
  171. fiveTuRangWenDu: "5cm土壤温度",
  172. kongQiWenDu: "空气温度",
  173. luDianWenDu: "露点温度",
  174. riZhaoShiShu: "日照时数",
  175. shiRunShiJian: "叶面湿润时间",
  176. tenTuRangHanShuiLiang: "10cm土壤含水量",
  177. tenTuRangWenDu: "10cm土壤温度",
  178. tianJiangYuLiang: "天降雨量",
  179. tuRangDaoDianLv: "土壤导电率",
  180. twentyFiveTuRangHanShuiLiang: "25cm土壤含水量",
  181. twentyFiveTuRangWenDu: "25cm土壤温度",
  182. twentyTuRangHanShuiLiang: "20cm土壤含水量",
  183. twentyTuRangWenDu: "20cm土壤温度",
  184. xiangDuiShiDu: "相对湿度",
  185. xiaoShiJiangYuLiang: "小时降雨量",
  186. },
  187. color: [
  188. "#ff7b30",
  189. "#f93948",
  190. "#fb2ea4",
  191. "#bc59db",
  192. "#7457ec",
  193. "#307dfd",
  194. "#31bfff",
  195. "#46e9b1",
  196. "#19cd48",
  197. "#b2e409",
  198. "#f0f254",
  199. "#fed000",
  200. "#f06f14",
  201. "#a74040",
  202. "#90bb71",
  203. "#a07635",
  204. "#6502bd",
  205. "#048bbb",
  206. "#9ebb01",
  207. "#cc9202",
  208. "#ff8fa0",
  209. "#a3d55f",
  210. "#d9bedd",
  211. "#00a6b6",
  212. "#236093",
  213. "#009fff",
  214. "#ddc0a6",
  215. "#c4a6dd",
  216. "#dda6a6",
  217. "#779e33",
  218. "#a6ddb0",
  219. ],
  220. };
  221. },
  222. methods: {
  223. copy(item) {
  224. uni.setClipboardData({
  225. data: item,
  226. success: function() {
  227. console.log("success");
  228. },
  229. });
  230. },
  231. control() {
  232. //设备控制
  233. uni.navigateTo({
  234. url: "./forecastResult?id=" + this.eqinfo.device_id,
  235. });
  236. },
  237. tiemchange(e) {
  238. console.log(e);
  239. //切换时间
  240. // this.begintime = parseInt(+new Date(e.startDate) / 1000);
  241. this.begintime = parseInt(+new Date(`${e.startDate} 00:00:00`) / 1000);
  242. this.end = parseInt(+new Date(`${e.endDate} 00:00:00`) / 1000);
  243. this.histprydatas();
  244. this.getChartLine();
  245. },
  246. timetab(e) {
  247. //时间转换
  248. e = new Date(e * 1000);
  249. var year = e.getFullYear();
  250. var month =
  251. e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1;
  252. var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate();
  253. var time = year + "/" + month + "/" + day;
  254. return time;
  255. },
  256. // 表格数据
  257. async histprydatas() {
  258. //表格历史数据
  259. const res = await this.$myRequest({
  260. url: "/api/api_gateway?method=wheat.wheat.wheat_data_list",
  261. data: {
  262. device_id: this.eqinfo.device_id,
  263. page: this.page,
  264. begin: this.begintime,
  265. end: this.end,
  266. },
  267. });
  268. this.pagesum = Math.ceil(res.nums / 10) || 1;
  269. if (this.pagesum > 0) {
  270. this.forbidden = false;
  271. var dat = res.sta;
  272. this.historylistdata = [];
  273. for (var i = 0; i < dat.length; i++) {
  274. dat[i] = dat[i].replace(/'/g, '"')
  275. // console.log(dat[i])
  276. var item = JSON.parse(`${dat[i]}`);
  277. var obj = {};
  278. for (var i1 in item) {
  279. // if (i1 == "uploadTime") {
  280. // obj[i1] = this.formatTime(item[i1] * 1000);
  281. // } else {
  282. obj[i1] = item[i1];
  283. // }
  284. }
  285. this.historylistdata.push(obj);
  286. }
  287. } else {
  288. this.forbidden = true;
  289. this.historylistdata = [];
  290. }
  291. },
  292. //获取折线图数据
  293. async getChartLine() {
  294. const res = await this.$myRequest({
  295. method: "POST",
  296. url: "/api/api_gateway?method=wheat.wheat.wheat_data",
  297. data: {
  298. device_id: this.eqinfo.device_id,
  299. begin: this.begintime,
  300. end: this.end,
  301. },
  302. });
  303. this.dataloadingtf = false;
  304. var dat = res;
  305. if (dat.length) {
  306. var regroupData = []; //重组数据
  307. var kindArr = []; //通道数组
  308. var time = [];
  309. var xtitle = [];
  310. for (var i = 0; i < dat.length; i++) {
  311. // console.log(dat[i])
  312. dat[i] = dat[i].replace(/'/g, '"')
  313. var item = JSON.parse(`${dat[i]}`);
  314. var tim = parseInt(item["uploadTime"]) * 1000;
  315. var times = new Date(tim);
  316. xtitle.unshift(
  317. times.getMonth() +
  318. 1 +
  319. "/" +
  320. times.getDate() +
  321. "-" +
  322. times.getHours() +
  323. ":" +
  324. times.getMinutes()
  325. );
  326. time.unshift(tim);
  327. for (var j in item) {
  328. var arr = "";
  329. if (j == "id" || j == "uploadTime") {
  330. continue;
  331. } else if (kindArr.indexOf(j) == "-1") {
  332. kindArr.push(j);
  333. regroupData.push({
  334. name: this.param[j],
  335. color: this.color[kindArr.length - 1],
  336. data: [],
  337. });
  338. // arr.push(tim);
  339. arr = parseFloat(item[j]);
  340. regroupData[kindArr.indexOf(j)].data.unshift(arr);
  341. } else {
  342. // arr.push(tim);
  343. // arr.push(parseFloat(item[j]));
  344. arr = parseFloat(item[j]);
  345. regroupData[kindArr.indexOf(j)].data.unshift(arr);
  346. }
  347. }
  348. }
  349. console.log(regroupData);
  350. // 分割折线图
  351. const regroupDataNum = Math.ceil(regroupData.length / 2);
  352. const options1 = regroupData.filter((v, i) => {
  353. return i < regroupDataNum;
  354. });
  355. const options2 = regroupData.filter((v, i) => {
  356. return i >= regroupDataNum;
  357. });
  358. console.log(options1, options1);
  359. this.showColumn("canvasColumnA", xtitle, options1);
  360. this.showColumn("canvasColumnB", xtitle, options2);
  361. this.canvastishiTF = true;
  362. } else {
  363. this.canvastishiTF = false;
  364. this.showColumn("canvasColumnA", xtitle, []);
  365. this.showColumn("canvasColumnB", xtitle, []);
  366. }
  367. },
  368. prev() {
  369. //上一页
  370. if (this.page > 1) {
  371. this.page--;
  372. this.histprydatas();
  373. }
  374. },
  375. next() {
  376. //下一页
  377. if (this.page < this.pagesum) {
  378. this.page++;
  379. this.histprydatas();
  380. }
  381. },
  382. clickLeft() {
  383. uni.navigateBack({
  384. delta: 1,
  385. });
  386. },
  387. showColumn(id, xtitle, xinfo) {
  388. console.log(id);
  389. var _self = this;
  390. const ctx = uni.createCanvasContext(id, this);
  391. if (id === "canvasColumnA") {
  392. canvaColumnA = new uCharts({
  393. context: ctx,
  394. type: "line",
  395. legend: {
  396. position: "top",
  397. },
  398. fontSize: 11,
  399. background: "#FFFFFF",
  400. pixelRatio: 1,
  401. animation: true,
  402. dataLabel: false,
  403. categories: xtitle,
  404. series: xinfo,
  405. enableScroll: true, //开启图表拖拽功能
  406. xAxis: {
  407. disableGrid: true,
  408. type: "grid",
  409. gridType: "dash",
  410. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  411. scrollShow: true, //新增是否显示滚动条,默认false
  412. // scrollAlign: 'left', //滚动条初始位置
  413. scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
  414. scrollColor: "#DEE7F7", //默认为 #A6A6A6
  415. },
  416. yAxis: {},
  417. width: _self.cWidth * 1,
  418. height: _self.cHeight * 1,
  419. extra: {
  420. line: {
  421. type: "curve",
  422. },
  423. },
  424. });
  425. } else if (id === "canvasColumnB") {
  426. canvaColumnB = new uCharts({
  427. context: ctx,
  428. type: "line",
  429. legend: {
  430. position: "top",
  431. },
  432. fontSize: 11,
  433. background: "#FFFFFF",
  434. pixelRatio: 1,
  435. animation: true,
  436. dataLabel: false,
  437. categories: xtitle,
  438. series: xinfo,
  439. enableScroll: true, //开启图表拖拽功能
  440. xAxis: {
  441. disableGrid: true,
  442. type: "grid",
  443. gridType: "dash",
  444. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  445. scrollShow: true, //新增是否显示滚动条,默认false
  446. // scrollAlign: 'left', //滚动条初始位置
  447. scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
  448. scrollColor: "#DEE7F7", //默认为 #A6A6A6
  449. },
  450. yAxis: {},
  451. width: _self.cWidth * 1,
  452. height: _self.cHeight * 1,
  453. extra: {
  454. line: {
  455. type: "curve",
  456. },
  457. },
  458. });
  459. }
  460. },
  461. touchLineA(e) {
  462. console.log(e);
  463. canvaColumnA.scrollStart(e);
  464. },
  465. moveLineA(e) {
  466. canvaColumnA.scroll(e);
  467. },
  468. touchEndLineA(e) {
  469. canvaColumnA.scrollEnd(e);
  470. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  471. canvaColumnA.showToolTip(e, {
  472. format: function(item, category) {
  473. return category + " " + item.name + ":" + item.data;
  474. },
  475. });
  476. },
  477. touchLineB(e) {
  478. console.log(e);
  479. canvaColumnB.scrollStart(e);
  480. },
  481. moveLineB(e) {
  482. canvaColumnB.scroll(e);
  483. },
  484. touchEndLineB(e) {
  485. canvaColumnB.scrollEnd(e);
  486. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  487. canvaColumnB.showToolTip(e, {
  488. format: function(item, category) {
  489. return category + " " + item.name + ":" + item.data;
  490. },
  491. });
  492. },
  493. },
  494. onLoad(option) {
  495. this.eqinfo = JSON.parse(option.shebei);
  496. this.basetype = this.eqinfo.type
  497. this.cWidth = uni.upx2px(650);
  498. this.cHeight = uni.upx2px(500);
  499. this.device_id = option.id;
  500. this.end = parseInt(+new Date() / 1000);
  501. this.begintime = parseInt(this.end - 24 * 60 * 60);
  502. this.histprydatas();
  503. this.getChartLine();
  504. if (this.basetype == 11) {
  505. this.kongtf = this.$QueryPermission(251)
  506. this.datatf = this.$QueryPermission(221)
  507. } else if (this.basetype == 19) {
  508. this.kongtf = this.$QueryPermission(252)
  509. this.datatf = this.$QueryPermission(222)
  510. } else if (this.basetype == 20) {
  511. this.kongtf = this.$QueryPermission(253)
  512. this.datatf = this.$QueryPermission(223)
  513. } else if (this.basetype == 21) {
  514. this.kongtf = this.$QueryPermission(280)
  515. this.datatf = this.$QueryPermission(279)
  516. } else if (this.basetype == 26) {
  517. this.kongtf = this.$QueryPermission(344)
  518. this.datatf = this.$QueryPermission(343)
  519. }
  520. },
  521. };
  522. </script>
  523. <style lang="scss">
  524. .info {
  525. width: 100%;
  526. position: absolute;
  527. top: 44px;
  528. .info_item {
  529. width: 90%;
  530. margin: 0 auto;
  531. height: 240rpx;
  532. padding: 40rpx 50rpx;
  533. position: relative;
  534. box-sizing: border-box;
  535. .bgi {
  536. width: 100%;
  537. height: 100%;
  538. position: absolute;
  539. top: 0;
  540. left: 0;
  541. z-index: -1;
  542. }
  543. p {
  544. font-size: 24rpx;
  545. color: #ffffff;
  546. margin-bottom: 10rpx;
  547. .tishi {
  548. width: 30rpx;
  549. height: 30rpx;
  550. margin: 0rpx 0 0 20rpx;
  551. }
  552. }
  553. }
  554. }
  555. .control {
  556. width: 90%;
  557. position: absolute;
  558. top: 360rpx;
  559. left: 5%;
  560. display: flex;
  561. text-align: center;
  562. // padding: 0 30rpx;
  563. box-sizing: border-box;
  564. .control_item {
  565. width: 128rpx;
  566. height: 120rpx;
  567. width: 20%;
  568. image {
  569. width: 70rpx;
  570. height: 70rpx;
  571. }
  572. p {
  573. font-size: 24rpx;
  574. }
  575. }
  576. }
  577. .his_box {
  578. width: 100%;
  579. top: 270px;
  580. position: relative;
  581. }
  582. .selecttimes {
  583. width: 90%;
  584. box-shadow: 0 0 10rpx #bcb9ca;
  585. padding: 10rpx 20rpx;
  586. box-sizing: border-box;
  587. margin: 0 auto;
  588. font-size: 28rpx;
  589. .timesbox {
  590. display: flex;
  591. justify-content: space-around;
  592. image {
  593. width: 30rpx;
  594. height: 30rpx;
  595. margin-top: 6rpx;
  596. }
  597. .icon {
  598. color: #949494;
  599. text-align: right;
  600. margin-left: 30rpx;
  601. }
  602. }
  603. /deep/.u-calendar__action {
  604. display: flex;
  605. justify-content: space-around;
  606. .u-calendar__action__text {
  607. line-height: 25px;
  608. }
  609. }
  610. }
  611. .shuju_one {
  612. width: 90%;
  613. margin: 20px auto;
  614. box-shadow: 0 0 10rpx #bcb9ca;
  615. padding-top: 20rpx;
  616. height: 1000rpx;
  617. .canvastishi {
  618. font-size: 32rpx;
  619. position: absolute;
  620. top: 50%;
  621. left: 50%;
  622. margin-left: -64rpx;
  623. margin-top: -21rpx;
  624. .dataloading:after {
  625. overflow: hidden;
  626. display: inline-block;
  627. vertical-align: bottom;
  628. animation: ellipsis 2s infinite;
  629. content: "\2026";
  630. }
  631. @keyframes ellipsis {
  632. from {
  633. width: 2px;
  634. }
  635. to {
  636. width: 15px;
  637. }
  638. }
  639. }
  640. }
  641. .condition {
  642. display: flex;
  643. flex-wrap: wrap;
  644. width: 90%;
  645. box-shadow: 0 0 10rpx #bcb9ca;
  646. margin: 0 auto 30rpx;
  647. .scroll-X {
  648. width: 95%;
  649. margin: 20rpx auto;
  650. .tr {
  651. display: flex;
  652. overflow: hidden;
  653. .th,
  654. .td {
  655. display: inline-block;
  656. padding: 5rpx;
  657. width: 300rpx;
  658. text-align: center;
  659. height: 52rpx;
  660. line-height: 52rpx;
  661. border: 2rpx solid #f1f1f1;
  662. }
  663. }
  664. .tr:nth-child(2n-1) {
  665. background-color: #f5fff8;
  666. }
  667. .tr:first-child {
  668. background-color: #57c878;
  669. color: #fff;
  670. }
  671. }
  672. .pagenumber {
  673. display: flex;
  674. margin: 20rpx auto;
  675. button {
  676. width: 150rpx;
  677. height: 50rpx;
  678. line-height: 50rpx;
  679. font-size: 26rpx;
  680. text-align: center;
  681. background-color: #57c878;
  682. color: #ffffff;
  683. }
  684. .pagenumber_page {
  685. width: 100rpx;
  686. height: 50rpx;
  687. line-height: 50rpx;
  688. font-size: 26rpx;
  689. text-align: center;
  690. }
  691. }
  692. }
  693. </style>