cmb.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  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. <table class="table">
  75. <tr class="tr">
  76. <th class="th" v-for="(item, index) in tableHead" :key="'a' + index">
  77. {{ item }}
  78. </th>
  79. </tr>
  80. <tr class="tr" v-for="(items, indexs) in historylistdata" :key="'b' + indexs"
  81. v-if="!forbidden">
  82. <td class="td">{{ items.uploadTime | timeFormat() }}</td>
  83. <td class="td">{{ items.dianChiDianYa }}</td>
  84. <td class="td">{{ items.fiftyTuRangHanShuiLiang }}</td>
  85. <td class="td">{{ items.fiftyTuRangWenDu }}</td>
  86. <td class="td">{{ items.fiveTuRangHanShuiLiang }}</td>
  87. <td class="td">{{ items.fiveTuRangWenDu }}</td>
  88. <td class="td">{{ items.kongQiWenDu }}</td>
  89. <td class="td">{{ items.luDianWenDu }}</td>
  90. <td class="td">{{ items.riZhaoShiShu }}</td>
  91. <td class="td">{{ items.shiRunShiJian }}</td>
  92. <td class="td">{{ items.tenTuRangHanShuiLiang }}</td>
  93. <td class="td">{{ items.tenTuRangWenDu }}</td>
  94. <td class="td">{{ items.tianJiangYuLiang }}</td>
  95. <td class="td">{{ items.tuRangDaoDianLv }}</td>
  96. <td class="td">{{ items.twentyFiveTuRangHanShuiLiang }}</td>
  97. <td class="td">{{ items.twentyFiveTuRangWenDu }}</td>
  98. <td class="td">{{ items.twentyTuRangHanShuiLiang }}</td>
  99. <td class="td">{{ items.twentyTuRangWenDu }}</td>
  100. <td class="td">{{ items.xiangDuiShiDu }}</td>
  101. <td class="td">{{ items.xiaoShiJiangYuLiang }}</td>
  102. </tr>
  103. <tr class="tr" v-if="forbidden">
  104. <td class="td" v-for="item in 13">暂无数据</td>
  105. </tr>
  106. </table>
  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. var dat = res.sta;
  271. this.historylistdata = [];
  272. for (var i = 0; i < dat.length; i++) {
  273. var item = eval("(" + dat[i] + ")");
  274. var obj = {};
  275. for (var i1 in item) {
  276. // if (i1 == "uploadTime") {
  277. // obj[i1] = this.formatTime(item[i1] * 1000);
  278. // } else {
  279. obj[i1] = item[i1];
  280. // }
  281. }
  282. this.historylistdata.push(obj);
  283. }
  284. } else {
  285. this.historylistdata = [];
  286. }
  287. },
  288. //获取折线图数据
  289. async getChartLine() {
  290. const res = await this.$myRequest({
  291. method: "POST",
  292. url: "/api/api_gateway?method=wheat.wheat.wheat_data",
  293. data: {
  294. device_id: this.eqinfo.device_id,
  295. begin: this.begintime,
  296. end: this.end,
  297. },
  298. });
  299. this.dataloadingtf = false;
  300. var dat = res;
  301. if (dat.length) {
  302. var regroupData = []; //重组数据
  303. var kindArr = []; //通道数组
  304. var time = [];
  305. var xtitle = [];
  306. for (var i = 0; i < dat.length; i++) {
  307. var item = eval("(" + dat[i] + ")");
  308. var tim = parseInt(item["uploadTime"]) * 1000;
  309. var times = new Date(tim);
  310. xtitle.unshift(
  311. times.getMonth() +
  312. 1 +
  313. "/" +
  314. times.getDate() +
  315. "-" +
  316. times.getHours() +
  317. ":" +
  318. times.getMinutes()
  319. );
  320. time.unshift(tim);
  321. for (var j in item) {
  322. var arr = "";
  323. if (j == "id" || j == "uploadTime") {
  324. continue;
  325. } else if (kindArr.indexOf(j) == "-1") {
  326. kindArr.push(j);
  327. regroupData.push({
  328. name: this.param[j],
  329. color: this.color[kindArr.length - 1],
  330. data: [],
  331. });
  332. // arr.push(tim);
  333. arr = parseFloat(item[j]);
  334. regroupData[kindArr.indexOf(j)].data.unshift(arr);
  335. } else {
  336. // arr.push(tim);
  337. // arr.push(parseFloat(item[j]));
  338. arr = parseFloat(item[j]);
  339. regroupData[kindArr.indexOf(j)].data.unshift(arr);
  340. }
  341. }
  342. }
  343. console.log(regroupData);
  344. // 分割折线图
  345. const regroupDataNum = Math.ceil(regroupData.length / 2);
  346. const options1 = regroupData.filter((v, i) => {
  347. return i < regroupDataNum;
  348. });
  349. const options2 = regroupData.filter((v, i) => {
  350. return i >= regroupDataNum;
  351. });
  352. console.log(options1, options1);
  353. this.showColumn("canvasColumnA", xtitle, options1);
  354. this.showColumn("canvasColumnB", xtitle, options2);
  355. this.canvastishiTF = true;
  356. } else {
  357. this.canvastishiTF = false;
  358. this.showColumn("canvasColumnA", xtitle, []);
  359. this.showColumn("canvasColumnB", xtitle, []);
  360. }
  361. },
  362. prev() {
  363. //上一页
  364. if (this.page > 1) {
  365. this.page--;
  366. this.histprydatas();
  367. }
  368. },
  369. next() {
  370. //下一页
  371. if (this.page < this.pagesum) {
  372. this.page++;
  373. this.histprydatas();
  374. }
  375. },
  376. clickLeft() {
  377. uni.navigateBack({
  378. delta: 1,
  379. });
  380. },
  381. showColumn(id, xtitle, xinfo) {
  382. console.log(id);
  383. var _self = this;
  384. if (id === "canvasColumnA") {
  385. canvaColumnA = new uCharts({
  386. canvasId: id,
  387. type: "line",
  388. legend: {
  389. position: "top",
  390. },
  391. fontSize: 11,
  392. background: "#FFFFFF",
  393. pixelRatio: 1,
  394. animation: true,
  395. dataLabel: false,
  396. categories: xtitle,
  397. series: xinfo,
  398. enableScroll: true, //开启图表拖拽功能
  399. xAxis: {
  400. disableGrid: true,
  401. type: "grid",
  402. gridType: "dash",
  403. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  404. scrollShow: true, //新增是否显示滚动条,默认false
  405. // scrollAlign: 'left', //滚动条初始位置
  406. scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
  407. scrollColor: "#DEE7F7", //默认为 #A6A6A6
  408. },
  409. yAxis: {},
  410. width: _self.cWidth * 1,
  411. height: _self.cHeight * 1,
  412. extra: {
  413. line: {
  414. type: "curve",
  415. },
  416. },
  417. });
  418. } else if (id === "canvasColumnB") {
  419. canvaColumnB = new uCharts({
  420. canvasId: id,
  421. type: "line",
  422. legend: {
  423. position: "top",
  424. },
  425. fontSize: 11,
  426. background: "#FFFFFF",
  427. pixelRatio: 1,
  428. animation: true,
  429. dataLabel: false,
  430. categories: xtitle,
  431. series: xinfo,
  432. enableScroll: true, //开启图表拖拽功能
  433. xAxis: {
  434. disableGrid: true,
  435. type: "grid",
  436. gridType: "dash",
  437. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  438. scrollShow: true, //新增是否显示滚动条,默认false
  439. // scrollAlign: 'left', //滚动条初始位置
  440. scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
  441. scrollColor: "#DEE7F7", //默认为 #A6A6A6
  442. },
  443. yAxis: {},
  444. width: _self.cWidth * 1,
  445. height: _self.cHeight * 1,
  446. extra: {
  447. line: {
  448. type: "curve",
  449. },
  450. },
  451. });
  452. }
  453. },
  454. touchLineA(e) {
  455. console.log(e);
  456. canvaColumnA.scrollStart(e);
  457. },
  458. moveLineA(e) {
  459. canvaColumnA.scroll(e);
  460. },
  461. touchEndLineA(e) {
  462. canvaColumnA.scrollEnd(e);
  463. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  464. canvaColumnA.showToolTip(e, {
  465. format: function(item, category) {
  466. return category + " " + item.name + ":" + item.data;
  467. },
  468. });
  469. },
  470. touchLineB(e) {
  471. console.log(e);
  472. canvaColumnB.scrollStart(e);
  473. },
  474. moveLineB(e) {
  475. canvaColumnB.scroll(e);
  476. },
  477. touchEndLineB(e) {
  478. canvaColumnB.scrollEnd(e);
  479. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  480. canvaColumnB.showToolTip(e, {
  481. format: function(item, category) {
  482. return category + " " + item.name + ":" + item.data;
  483. },
  484. });
  485. },
  486. },
  487. onLoad(option) {
  488. this.eqinfo = JSON.parse(option.shebei);
  489. this.basetype = this.eqinfo.type
  490. this.cWidth = uni.upx2px(650);
  491. this.cHeight = uni.upx2px(500);
  492. this.device_id = option.id;
  493. this.end = parseInt(+new Date() / 1000);
  494. this.begintime = parseInt(this.end - 24 * 60 * 60);
  495. this.histprydatas();
  496. this.getChartLine();
  497. if (this.basetype == 11) {
  498. this.kongtf = this.$QueryPermission(251)
  499. this.datatf = this.$QueryPermission(221)
  500. } else if (this.basetype == 19) {
  501. this.kongtf = this.$QueryPermission(252)
  502. this.datatf = this.$QueryPermission(222)
  503. } else if (this.basetype == 20) {
  504. this.kongtf = this.$QueryPermission(253)
  505. this.datatf = this.$QueryPermission(223)
  506. }
  507. },
  508. };
  509. </script>
  510. <style lang="scss">
  511. .info {
  512. width: 100%;
  513. position: absolute;
  514. top: 44px;
  515. .info_item {
  516. width: 90%;
  517. margin: 0 auto;
  518. height: 240rpx;
  519. padding: 40rpx 50rpx;
  520. position: relative;
  521. box-sizing: border-box;
  522. .bgi {
  523. width: 100%;
  524. height: 100%;
  525. position: absolute;
  526. top: 0;
  527. left: 0;
  528. z-index: -1;
  529. }
  530. p {
  531. font-size: 24rpx;
  532. color: #ffffff;
  533. margin-bottom: 10rpx;
  534. .tishi {
  535. width: 30rpx;
  536. height: 30rpx;
  537. margin: 0rpx 0 0 20rpx;
  538. }
  539. }
  540. }
  541. }
  542. .control {
  543. width: 90%;
  544. position: absolute;
  545. top: 360rpx;
  546. left: 5%;
  547. display: flex;
  548. text-align: center;
  549. // padding: 0 30rpx;
  550. box-sizing: border-box;
  551. .control_item {
  552. width: 128rpx;
  553. height: 120rpx;
  554. width: 20%;
  555. image {
  556. width: 70rpx;
  557. height: 70rpx;
  558. }
  559. p {
  560. font-size: 24rpx;
  561. }
  562. }
  563. }
  564. .his_box {
  565. width: 100%;
  566. top: 270px;
  567. position: relative;
  568. }
  569. .selecttimes {
  570. width: 90%;
  571. box-shadow: 0 0 10rpx #bcb9ca;
  572. padding: 10rpx 20rpx;
  573. box-sizing: border-box;
  574. margin: 0 auto;
  575. font-size: 28rpx;
  576. .timesbox {
  577. display: flex;
  578. justify-content: space-around;
  579. image {
  580. width: 30rpx;
  581. height: 30rpx;
  582. margin-top: 6rpx;
  583. }
  584. .icon {
  585. color: #949494;
  586. text-align: right;
  587. margin-left: 30rpx;
  588. }
  589. }
  590. /deep/.u-calendar__action {
  591. display: flex;
  592. justify-content: space-around;
  593. .u-calendar__action__text {
  594. line-height: 25px;
  595. }
  596. }
  597. }
  598. .shuju_one {
  599. width: 90%;
  600. margin: 20px auto;
  601. box-shadow: 0 0 10rpx #bcb9ca;
  602. padding-top: 20rpx;
  603. height: 1000rpx;
  604. .canvastishi {
  605. font-size: 32rpx;
  606. position: absolute;
  607. top: 50%;
  608. left: 50%;
  609. margin-left: -64rpx;
  610. margin-top: -21rpx;
  611. .dataloading:after {
  612. overflow: hidden;
  613. display: inline-block;
  614. vertical-align: bottom;
  615. animation: ellipsis 2s infinite;
  616. content: "\2026";
  617. }
  618. @keyframes ellipsis {
  619. from {
  620. width: 2px;
  621. }
  622. to {
  623. width: 15px;
  624. }
  625. }
  626. }
  627. }
  628. .condition {
  629. display: flex;
  630. flex-wrap: wrap;
  631. width: 90%;
  632. box-shadow: 0 0 10rpx #bcb9ca;
  633. margin: 0 auto 30rpx;
  634. .scroll-X {
  635. width: 95%;
  636. margin: 20rpx auto;
  637. .tr {
  638. display: flex;
  639. overflow: hidden;
  640. .th,
  641. .td {
  642. display: inline-block;
  643. padding: 5rpx;
  644. width: 300rpx;
  645. text-align: center;
  646. height: 52rpx;
  647. line-height: 52rpx;
  648. border: 2rpx solid #f1f1f1;
  649. }
  650. }
  651. .tr:nth-child(2n-1) {
  652. background-color: #f5fff8;
  653. }
  654. .tr:first-child {
  655. background-color: #57c878;
  656. color: #fff;
  657. }
  658. }
  659. .pagenumber {
  660. display: flex;
  661. margin: 20rpx auto;
  662. button {
  663. width: 150rpx;
  664. height: 50rpx;
  665. line-height: 50rpx;
  666. font-size: 26rpx;
  667. text-align: center;
  668. background-color: #57c878;
  669. color: #ffffff;
  670. }
  671. .pagenumber_page {
  672. width: 100rpx;
  673. height: 50rpx;
  674. line-height: 50rpx;
  675. font-size: 26rpx;
  676. text-align: center;
  677. }
  678. }
  679. }
  680. </style>