cmb.vue 21 KB

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