cmb.vue 19 KB

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