cmb.vue 18 KB

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