cmb.vue 18 KB

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