cmb.vue 19 KB

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