index.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458
  1. <template>
  2. <view class="device-details-page">
  3. <cu-custom :isBack="true">
  4. <template slot="content">
  5. <view class="nav-title">{{ deviceInfo.devName }}</view>
  6. </template>
  7. </cu-custom>
  8. <!-- 设备基本信息 -->
  9. <view class="device-info">
  10. <view class="operation" @click.stop="isShowOperation = !isShowOperation">操作</view>
  11. <view class="operation-container" v-if="isShowOperation" @click="closeOperationHandler">
  12. <view class="operation-background"></view>
  13. <view class="operation-content">
  14. <view class="operation-item" @click="goPage('devControl')">
  15. <image :src="serviceIcon" class="operation-icon"></image>
  16. 参数设置
  17. </view>
  18. <!-- <view class="operation-item" @click="goPage('simDetail')">
  19. <image :src="simIcon" class="operation-icon"></image>
  20. SIM卡
  21. </view> -->
  22. <!-- <view class="operation-item" @click="modification">
  23. <image :src="editIcon" class="operation-icon"></image>
  24. 修改
  25. </view> -->
  26. </view>
  27. </view>
  28. <view @click="copy(deviceInfo.devBid)" class="info-item">
  29. <text class="info-label">设备ID</text>
  30. <text class="info-value">{{ deviceInfo.devBid }}</text>
  31. <image
  32. src="/static/images/device/copy.svg"
  33. mode=""
  34. class="info-img"
  35. ></image>
  36. </view>
  37. <view class="info-item">
  38. <text class="info-label">上报时间</text>
  39. <text class="info-value">{{ formatTimestamp(deviceInfo.uptime) }}</text>
  40. </view>
  41. <view class="info-item">
  42. <text class="info-label">设备位置</text>
  43. <text class="info-value">{{ deviceInfo.address }}</text>
  44. </view>
  45. <view class="dev-status">{{
  46. deviceInfo.devStatus == '1' ? '在线' : '离线'
  47. }}</view>
  48. </view>
  49. <!-- 标签页切换 -->
  50. <view class="tab-container">
  51. <view class="tab-top">
  52. <view
  53. class="tab-item"
  54. :class="{ active: activeTab === 'monitoring' }"
  55. @click="switchTab('monitoring')"
  56. >
  57. <text class="tab-text">实时数据</text>
  58. <image
  59. v-if="activeTab === 'monitoring'"
  60. src="/static/images/device/smile.svg"
  61. mode=""
  62. class="smile"
  63. ></image>
  64. </view>
  65. <view
  66. class="tab-item"
  67. :class="{ active: activeTab === 'details' }"
  68. @click="switchTab('details')"
  69. >
  70. <text class="tab-text">历史数据</text>
  71. <image
  72. v-if="activeTab === 'details'"
  73. src="/static/images/device/smile.svg"
  74. mode=""
  75. class="smile"
  76. ></image>
  77. </view>
  78. </view>
  79. <view class="datetime">
  80. <view class="datetime-left" @click="openDatePicker">
  81. <view class="datetime-start">
  82. {{ startDate }}
  83. </view>
  84. 至
  85. <view class="datetime-end">
  86. {{ endDate }}
  87. </view>
  88. </view>
  89. <view>
  90. <u-icon name="calendar" size="24"></u-icon>
  91. </view>
  92. </view>
  93. </view>
  94. <!-- 标签页内容 -->
  95. <view class="tab-content">
  96. <!-- 监测要素页面 -->
  97. <view v-if="activeTab === 'monitoring'" class="monitoring-page">
  98. <view
  99. class="data-card"
  100. >
  101. <image
  102. src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/img/gssq.png"
  103. alt=""
  104. class="status-img"
  105. ></image>
  106. <view class="data-card-right">
  107. <view class="device-qx">
  108. <image src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/img/trsd.png" alt="" class="qx-img"></image>
  109. 空气温度:<text style="font-weight: bold;">{{at}}</text>℃
  110. </view>
  111. <view class="device-list">
  112. <view class="device-temp-list">
  113. <view class="temp-item" v-for="swc in swcList" :key="swc.key">
  114. <image src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/img/trwd.png" alt="" class="temp-icon" v-show="swc.isShow"></image>
  115. <view class="temp-content" v-show="swc.isShow">
  116. <view class="temp-value">{{swc.val}}
  117. <text class="unit">%</text>
  118. </view>
  119. <view class="temp-name">{{swc.label}}</view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="device-swc-list">
  124. <view class="swc-item" v-for="item in tempList" :key="item.key">
  125. <image src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/img/trhsl.png" alt="" class="swc-icon" v-show="item.isShow"></image>
  126. <view class="swc-content" v-show="item.isShow">
  127. <view class="swc-value">
  128. {{item.val}}
  129. <text class="unit">℃</text>
  130. </view>
  131. <view class="swc-name">{{item.label}}</view>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="device-dept-list">
  136. <view class="dept-item" v-for="item in ecsList" :key="item.key">
  137. <image src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/img/ec.png" alt="" class="dept-icon" v-show="item.isShow"></image>
  138. <view class="dept-content" v-show="item.isShow">
  139. <view class="dept-value">
  140. {{item.val}}
  141. <text class="unit">ms/cm</text>
  142. </view>
  143. <view class="dept-name">{{item.label}}</view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <!-- 设备详情页面 -->
  152. <view v-if="activeTab === 'details'" class="details-page">
  153. <view class="chart-container">
  154. <view class="chart-wrap" v-if="dat_char && dat_char.length > 0">
  155. <canvas
  156. v-show="!show && !isShowOperation"
  157. canvas-id="datCharChart"
  158. id="datCharChart"
  159. class="charts"
  160. @touchstart="touchLineA($event)"
  161. @touchmove="moveLineA($event)"
  162. @touchend="touchEndLineA($event)"
  163. disable-scroll="true"
  164. :style="{'width':'100%','height':cHeight*pixelRatio+'px','transform':'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"
  165. ></canvas>
  166. </view>
  167. <view class="empty-state" v-else>
  168. <u-empty text="暂无数据" mode="list"></u-empty>
  169. </view>
  170. </view>
  171. <!-- 设备数据表格 -->
  172. <view class="table-container">
  173. <view class="table-control">
  174. <view class="title">历史数据</view>
  175. <!-- <view class="date-board" @click="openDatePicker">
  176. <text>{{ startDate }}</text>
  177. <text class="line">至</text>
  178. <text>{{ endDate }}</text>
  179. <image class="date-icon" src="/static/images/device/date.svg" />
  180. </view> -->
  181. </view>
  182. <view class="table-wrap" v-if="tableData && tableData.length > 0">
  183. <view class="fixed-column">
  184. <view class="table-cell header">上报时间</view>
  185. <view
  186. class="table-cell"
  187. v-for="(item, idx) in tableData"
  188. :key="idx"
  189. >
  190. {{ formatTimestamp(item.upl_time) }}
  191. </view>
  192. </view>
  193. <view class="table-bg"></view>
  194. <scroll-view class="scroll-column" scroll-x="true">
  195. <view class="scroll-content">
  196. <view class="table-row">
  197. <view
  198. class="table-cell header"
  199. v-for="(item, index) in tableColumn"
  200. :key="index"
  201. >{{ item.label }}</view
  202. >
  203. </view>
  204. <view
  205. class="table-row"
  206. v-for="(item, idx) in tableData"
  207. :key="idx"
  208. >
  209. <view
  210. class="table-cell"
  211. v-for="(item1, index1) in tableColumn"
  212. :key="index1"
  213. >{{ item[item1.prop] }}</view
  214. >
  215. </view>
  216. </view>
  217. </scroll-view>
  218. </view>
  219. <view class="empty-state" v-else>
  220. <u-empty text="暂无数据" mode="list"></u-empty>
  221. </view>
  222. <view class="pagination" v-if="tableData && tableData.length > 0">
  223. <view
  224. class="page-item prev"
  225. :class="{ disabled: page <= 1 }"
  226. @click="prevPage"
  227. >上一页</view
  228. >
  229. <view class="page-info">
  230. <text class="curret-page">{{ page }}</text>
  231. <text>/</text>
  232. <text>{{ totalPages }}</text>
  233. </view>
  234. <view
  235. class="page-item next"
  236. :class="{ disabled: page >= totalPages }"
  237. @click="nextPage"
  238. >下一页</view
  239. >
  240. </view>
  241. </view>
  242. </view>
  243. <u-calendar
  244. v-model="show"
  245. :mode="mode"
  246. @change="onDateChange"
  247. range-color="#999" btn-type="success" active-bg-color="#0BBC58" range-bg-color="rgba(11,188,88,0.13)"
  248. ref="calendar"
  249. ></u-calendar>
  250. </view>
  251. </view>
  252. </template>
  253. <script>
  254. import uCharts from '../../../components/js_sdk/u-charts/u-charts/u-charts.js';
  255. var canvaColumnA = null;
  256. export default {
  257. onLoad(options) {
  258. this.deviceInfo = options;
  259. this.initDateRange(options.uptime);
  260. this.getEleConfig();
  261. this.cWidth = uni.upx2px(686); // 页面左右 padding 32rpx,可用宽 750-64=686
  262. this.cHeight = uni.upx2px(500);
  263. // this.getDeviceStatus();
  264. // this.getDeviceData();
  265. },
  266. data() {
  267. return {
  268. deviceInfo: {},
  269. isShowOperation: false,
  270. loadingFull: false,
  271. at: 0,
  272. activeTab: 'monitoring',
  273. monitorList: [],
  274. realtimedata: {},
  275. statusList: [],
  276. legendData: [],
  277. show: false,
  278. mode: 'range',
  279. startDate: '',
  280. endDate: '',
  281. page: 1,
  282. photoIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoIcon.png',
  283. editIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/editIcon.png',
  284. serviceIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/settingNewIcon.png',
  285. simIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/simIcon.png',
  286. settingIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/settingIcon.png',
  287. isShowPhoto:false,
  288. pageSize: 9,
  289. total: 0,
  290. tableData: [],
  291. swcList: [],
  292. tempList: [],
  293. configList: {},
  294. ecsList: [],
  295. saltList: [],
  296. tableColumn: [],
  297. elemengIsSetting: false,
  298. currentResData: {},
  299. dat_char: [],
  300. depth: '',
  301. cWidth: '',
  302. cHeight: '',
  303. pixelRatio: 1,
  304. };
  305. },
  306. computed: {
  307. totalPages() {
  308. return Math.ceil(this.total / this.pageSize) || 1;
  309. },
  310. },
  311. methods: {
  312. onDateChange(event) {
  313. if (event && event.startDate && event.endDate) {
  314. this.startDate = event.startDate;
  315. this.endDate = event.endDate;
  316. this.show = false;
  317. this.page = 1;
  318. this.getDeviceData();
  319. }
  320. },
  321. formartValue(value){
  322. return value?.split('#')?.[0] || '';
  323. },
  324. closeOperationHandler(){
  325. this.isShowOperation = false;
  326. },
  327. async refreshData(){
  328. await this.$myRequest({
  329. url: '/api/api_gateway?method=qxz.device.control',
  330. data: {
  331. device_id: this.deviceInfo.devBid,
  332. cmd: 'READ',
  333. },
  334. });
  335. //弹框提示
  336. uni.showToast({
  337. title: '刷新成功',
  338. icon: 'success',
  339. });
  340. this.getDeviceData();
  341. },
  342. formatTimestamp(timestamp) {
  343. if (timestamp === '请选择') return '请选择';
  344. if (!timestamp) return '';
  345. const date = new Date(Number(timestamp) * 1000);
  346. const year = date.getFullYear();
  347. const month = String(date.getMonth() + 1).padStart(2, '0');
  348. const day = String(date.getDate()).padStart(2, '0');
  349. const hours = String(date.getHours()).padStart(2, '0');
  350. const minutes = String(date.getMinutes()).padStart(2, '0');
  351. const seconds = String(date.getSeconds()).padStart(2, '0');
  352. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  353. },
  354. formatDate(date) {
  355. const year = date.getFullYear();
  356. const month = String(date.getMonth() + 1).padStart(2, '0');
  357. const day = String(date.getDate()).padStart(2, '0');
  358. return `${year}-${month}-${day}`;
  359. },
  360. initDateRange(timestamp) {
  361. if (!timestamp) {
  362. const today = new Date();
  363. this.endDate = this.formatDate(today);
  364. const startDate = new Date(today);
  365. startDate.setDate(startDate.getDate() - 1);
  366. this.startDate = this.formatDate(startDate);
  367. return;
  368. }
  369. const date = new Date(Number(timestamp) * 1000);
  370. this.endDate = this.formatDate(date);
  371. const startDate = new Date(date);
  372. startDate.setDate(startDate.getDate() - 1);
  373. this.startDate = this.formatDate(startDate);
  374. },
  375. switchTab(tab) {
  376. this.activeTab = tab;
  377. if(tab == 'details'){
  378. this.getEleConfig();
  379. }
  380. },
  381. copy(item) {
  382. uni.setClipboardData({
  383. data: item,
  384. success: function () {
  385. },
  386. });
  387. },
  388. goPage(type, eleItem) {
  389. let url = '';
  390. if (eleItem && eleItem.key) {
  391. url = `/pages/deviceDetails/SoilMoisturelist/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}&eleKey=${eleItem.name}&unit=${eleItem.unit}&key=${eleItem.key}`;
  392. } else {
  393. url = `/pages/deviceDetails/SoilMoisturelist/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}`;
  394. }
  395. if (type === 'devRepair') {
  396. url = `/pages/afterSale/addafter?d_id=${this.deviceInfo.d_id}&device_id=${this.deviceInfo.devBid}&device_type=${this.deviceInfo.deviceType}`;
  397. }
  398. uni.navigateTo({
  399. url,
  400. });
  401. },
  402. openDatePicker() {
  403. this.show = true;
  404. },
  405. prevPage() {
  406. if (this.page <= 1) return;
  407. this.page--;
  408. this.getDeviceData();
  409. },
  410. nextPage() {
  411. if (this.page >= this.totalPages) return;
  412. this.page++;
  413. this.getDeviceData();
  414. },
  415. // 获取设备最新监测数据
  416. async getQxzObData() {
  417. const res = await this.$myRequest({
  418. url: '/api/api_gateway?method=weather.weather.nd_status',
  419. data: {
  420. device_id: this.deviceInfo.devBid,
  421. },
  422. });
  423. const resData = res || {};
  424. this.realtimedata = resData;
  425. var arr = resData.depth.split(',');
  426. this.realtimedata['stepsizelist'] = arr;
  427. this.loadingFull = false;
  428. this.at = resData?.at || 0;
  429. const depth = resData?.depth.split(',') || [];
  430. const swc = resData?.swc.split(',') || [];
  431. const temp = resData?.temp.split(',') || [];
  432. const ecs = resData?.ecs.split(',') || [];
  433. const salt = resData?.salt.split(',') || [];
  434. this.swcList = [];
  435. swc.forEach((item,index) =>{
  436. if(item){
  437. this.swcList.push({
  438. label: depth[index] + 'cm土壤湿度',
  439. val: item,
  440. key: 'swc' + index,
  441. isShow: this.elemengIsSetting ? this.currentResData[depth[index]].includes('swc') : true
  442. })
  443. }
  444. })
  445. this.tempList = [];
  446. temp.forEach((item,index) =>{
  447. if(item){
  448. this.tempList.push({
  449. label: depth[index] + 'cm土壤温度',
  450. val: item,
  451. key: 'temp' + index,
  452. isShow:this.elemengIsSetting ? this.currentResData[depth[index]].includes('temp') : true
  453. })
  454. }
  455. })
  456. this.ecsList = [];
  457. ecs.forEach((item,index) =>{
  458. if(item){
  459. this.ecsList.push({
  460. label: depth[index] + 'cm土壤EC值',
  461. val: item,
  462. key: 'ecs' + index,
  463. isShow: this.elemengIsSetting ? this.currentResData[depth[index]].includes('ecs') : true
  464. })
  465. }
  466. })
  467. this.saltList = [];
  468. salt.forEach((item,index) =>{
  469. if(item){
  470. this.saltList.push({
  471. label: depth[index] + 'cm土壤盐度',
  472. val: item,
  473. key: 'salt' + index,
  474. isShow: this.elemengIsSetting ? this.currentResData[depth[index]].includes('salt') : true
  475. })
  476. }
  477. })
  478. },
  479. // 获取设备状态数据
  480. async getDeviceStatus() {
  481. const res = await this.$myRequest({
  482. url: '/api/api_gateway?method=qxz.data.qxz_status',
  483. data: {
  484. device_id: this.deviceInfo.devBid,
  485. },
  486. });
  487. const newArr = this.transformObjectToArray(res);
  488. this.statusList = newArr;
  489. },
  490. transformObjectToArray(originalData) {
  491. if (
  492. typeof originalData !== 'object' ||
  493. originalData === null ||
  494. Array.isArray(originalData)
  495. ) {
  496. return [];
  497. }
  498. return Object.keys(originalData).map((key) => {
  499. const [val = '', label = ''] = originalData[key] || [];
  500. return {
  501. label,
  502. val,
  503. key,
  504. };
  505. });
  506. },
  507. async getEleConfig(){
  508. const res = await this.$myRequest({
  509. url: '/api/api_gateway?method=weather.weather.get_ele_config',
  510. data: {
  511. device_id: this.deviceInfo.devBid,
  512. },
  513. });
  514. const resData = res?.data;
  515. if(resData){
  516. this.elemengIsSetting = true;
  517. }else{
  518. this.elemengIsSetting = false;
  519. }
  520. this.currentResData = resData ? JSON.parse(resData) : "{}";
  521. this.getDeviceData();
  522. this.getQxzObData();
  523. },
  524. // 设备数据列表
  525. async getDeviceData() {
  526. const data = await this.$myRequest({
  527. url: '/api/api_gateway?method=weather.weather.nd_data',
  528. data: {
  529. device_id: this.deviceInfo.devBid,
  530. page: String(this.page),
  531. begin: String(
  532. Math.floor(new Date(this.startDate + ' 00:00:00').getTime() / 1000),
  533. ),
  534. end: String(
  535. Math.floor(new Date(this.endDate + ' 23:59:59').getTime() / 1000),
  536. ),
  537. },
  538. });
  539. this.total = data?.nums || 0;
  540. this.tableData = data?.dat_list;
  541. this.dat_char = data?.dat_char || [];
  542. this.depth = data?.depth || '';
  543. const depth = data?.depth.split(',');
  544. let title = this.tableData?.[0]?.swc || '';
  545. let temp = this.tableData?.[0]?.temp || '';
  546. let ecs = this.tableData?.[0]?.ecs || '';
  547. let salt = this.tableData?.[0]?.salt || '';
  548. const swcMap = title?.split(',') || [];
  549. const tempMap = temp?.split(',') || [];
  550. const ecsMap = ecs?.split(',') || [];
  551. const saltMap = salt?.split(',') || [];
  552. this.tableColumn = [];
  553. const swcDataMap = new Map();
  554. this.tableData.forEach(item=>{
  555. const swc = item.swc.split(',');
  556. const temp = item.temp.split(',');
  557. const ecs = item.ecs.split(',');
  558. const salt = item.salt.split(',');
  559. swc.forEach((n,index) => {
  560. if(this.elemengIsSetting){
  561. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('swc')){
  562. item['swc'+ index] = n;
  563. if(swcDataMap.has(depth[index] + 'cm土壤湿度(%)')){
  564. swcDataMap.get(depth[index] + 'cm土壤湿度(%)').push(n);
  565. }else{
  566. swcDataMap.set(depth[index] + 'cm土壤湿度(%)',[]);
  567. swcDataMap.get(depth[index] + 'cm土壤湿度(%)').push(n);
  568. }
  569. }
  570. }else{
  571. item['swc'+ index] = n;
  572. if(swcDataMap.has(depth[index] + 'cm土壤湿度(%)')){
  573. swcDataMap.get(depth[index] + 'cm土壤湿度(%)').push(n);
  574. }else{
  575. swcDataMap.set(depth[index] + 'cm土壤湿度(%)',[]);
  576. swcDataMap.get(depth[index] + 'cm土壤湿度(%)').push(n);
  577. }
  578. }
  579. });
  580. temp.forEach((n,index) => {
  581. if(this.elemengIsSetting){
  582. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('temp')){
  583. item['temp' + index] = n;
  584. if(swcDataMap.has(depth[index] + 'cm土壤温度(℃)')){
  585. swcDataMap.get(depth[index] + 'cm土壤温度(℃)').push(n);
  586. }else{
  587. swcDataMap.set(depth[index] + 'cm土壤温度(℃)',[]);
  588. swcDataMap.get(depth[index] + 'cm土壤温度(℃)').push(n);
  589. }
  590. }
  591. }else{
  592. item['temp' + index] = n;
  593. if(swcDataMap.has(depth[index] + 'cm土壤温度(℃)')){
  594. swcDataMap.get(depth[index] + 'cm土壤温度(℃)').push(n);
  595. }else{
  596. swcDataMap.set(depth[index] + 'cm土壤温度(℃)',[]);
  597. swcDataMap.get(depth[index] + 'cm土壤温度(℃)').push(n);
  598. }
  599. }
  600. });
  601. ecs.forEach((n,index) => {
  602. if(this.elemengIsSetting){
  603. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('ecs')){
  604. item['ecs' + index] = n;
  605. if(swcDataMap.has(depth[index] + 'cm电导率(ms/cm)')){
  606. swcDataMap.get(depth[index] + 'cm电导率(ms/cm)').push(n);
  607. }else{
  608. swcDataMap.set(depth[index] + 'cm电导率(ms/cm)',[]);
  609. swcDataMap.get(depth[index] + 'cm电导率(ms/cm)').push(n);
  610. }
  611. }
  612. }else{
  613. item['ecs' + index] = n;
  614. if(swcDataMap.has(depth[index] + 'cm电导率(ms/cm)')){
  615. swcDataMap.get(depth[index] + 'cm电导率(ms/cm)').push(n);
  616. }else{
  617. swcDataMap.set(depth[index] + 'cm电导率(ms/cm)',[]);
  618. swcDataMap.get(depth[index] + 'cm电导率(ms/cm)').push(n);
  619. }
  620. }
  621. });
  622. salt.forEach((n,index) => {
  623. if(this.elemengIsSetting){
  624. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('salt')){
  625. item['salt' + index] = n;
  626. if(swcDataMap.has(depth[index] + 'cm盐度(%)')){
  627. swcDataMap.get(depth[index] + 'cm盐度(%)').push(n);
  628. }else{
  629. swcDataMap.set(depth[index] + 'cm盐度(%)',[]);
  630. swcDataMap.get(depth[index] + 'cm盐度(%)').push(n);
  631. }
  632. }
  633. }else{
  634. item['salt' + index] = n;
  635. if(swcDataMap.has(depth[index] + 'cm盐度(%)')){
  636. swcDataMap.get(depth[index] + 'cm盐度(%)').push(n);
  637. }else{
  638. swcDataMap.set(depth[index] + 'cm盐度(%)',[]);
  639. swcDataMap.get(depth[index] + 'cm盐度(%)').push(n);
  640. }
  641. }
  642. });
  643. })
  644. tempMap.map((item,index) => {
  645. if(item){
  646. if(this.elemengIsSetting){
  647. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('temp')){
  648. this.legendData.push(depth[index] + 'cm土壤温度(℃)');
  649. this.tableColumn.push({
  650. label: depth[index] + 'cm土壤温度(℃)',
  651. prop: 'temp' + index,
  652. index
  653. });
  654. }}else{
  655. this.legendData.push(depth[index] + 'cm土壤温度(℃)');
  656. this.tableColumn.push({
  657. label: depth[index] + 'cm土壤温度(℃)',
  658. prop: 'temp' + index,
  659. index
  660. });
  661. }
  662. }
  663. })
  664. swcMap.map((item,index) => {
  665. if(item){
  666. if(this.elemengIsSetting){
  667. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('swc')){
  668. this.legendData.push(depth[index] + 'cm土壤湿度(%)');
  669. this.tableColumn.push({
  670. label: depth[index] + 'cm土壤湿度(%)',
  671. prop: 'swc' + index,
  672. index
  673. });
  674. }
  675. }else{
  676. this.legendData.push(depth[index] + 'cm土壤湿度(%)');
  677. this.tableColumn.push({
  678. label: depth[index] + 'cm土壤湿度(%)',
  679. prop: 'swc' + index,
  680. index
  681. });
  682. }
  683. }
  684. });
  685. ecsMap.map((item,index) => {
  686. if(item){
  687. if(this.elemengIsSetting){
  688. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('ecs')){
  689. this.legendData.push(depth[index] + 'cm电导率(ms/cm)');
  690. this.tableColumn.push({
  691. label: depth[index] + 'cm电导率(ms/cm)',
  692. prop: 'ecs' + index,
  693. index
  694. });
  695. }
  696. }else{
  697. this.legendData.push(depth[index] + 'cm电导率(ms/cm)');
  698. this.tableColumn.push({
  699. label: depth[index] + 'cm电导率(ms/cm)',
  700. prop: 'ecs' + index,
  701. index
  702. });
  703. }
  704. }
  705. });
  706. saltMap.map((item,index) => {
  707. if(item){
  708. if(this.elemengIsSetting){
  709. if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('salt')){
  710. this.legendData.push(depth[index] + 'cm盐度(%)');
  711. this.tableColumn.push({
  712. label: depth[index] + 'cm盐度(%)',
  713. prop: 'salt',
  714. index
  715. });
  716. }
  717. }else{
  718. this.legendData.push(depth[index] + 'cm盐度(%)');
  719. this.tableColumn.push({
  720. label: depth[index] + 'cm盐度(%)',
  721. prop: 'salt',
  722. index
  723. });
  724. }
  725. }
  726. });
  727. this.$nextTick(() => {
  728. this.renderChart();
  729. });
  730. },
  731. // 渲染历史数据趋势图(温度/湿度/电导率 × 各深度)
  732. renderChart() {
  733. const datChar = this.dat_char || [];
  734. if (!datChar.length) {
  735. return;
  736. }
  737. const depthArr = (this.depth || '').split(',').filter(Boolean);
  738. const xtitle = [];
  739. const listArr = []; // [{ name, data: [], hasData: boolean }]
  740. const ensureSeries = (name) => {
  741. let s = listArr.find((item) => item.name === name);
  742. if (!s) {
  743. s = { name, data: [], hasData: false };
  744. listArr.push(s);
  745. }
  746. return s;
  747. };
  748. const markHasData = (s, rawVal) => {
  749. if (rawVal !== '' && rawVal !== undefined && rawVal !== null) {
  750. s.hasData = true;
  751. }
  752. };
  753. datChar.forEach((row) => {
  754. const t = new Date(Number(row.upl_time) * 1000);
  755. const label =
  756. String(t.getMonth() + 1).padStart(2, '0') +
  757. '-' +
  758. String(t.getDate()).padStart(2, '0') +
  759. '/' +
  760. String(t.getHours()).padStart(2, '0') +
  761. ':' +
  762. String(t.getMinutes()).padStart(2, '0');
  763. xtitle.unshift(label);
  764. const tempArr = (row.temp || '').split(',');
  765. const swcArr = (row.swc || '').split(',');
  766. const ecsArr = (row.ecs || '').split(',');
  767. depthArr.forEach((dep, index) => {
  768. const tVal = tempArr[index];
  769. const sVal = swcArr[index];
  770. const eVal = ecsArr[index];
  771. const tempSeries = ensureSeries(dep + 'cm土壤温度(℃)');
  772. tempSeries.data.unshift(Number(tVal));
  773. markHasData(tempSeries, tVal);
  774. const swcSeries = ensureSeries(dep + 'cm土壤湿度(%)');
  775. swcSeries.data.unshift(Number(sVal));
  776. markHasData(swcSeries, sVal);
  777. const ecsSeries = ensureSeries(dep + 'cm电导率(ms/cm)');
  778. ecsSeries.data.unshift(Number(eVal));
  779. markHasData(ecsSeries, eVal);
  780. });
  781. });
  782. const series = listArr
  783. .filter((s) => s.hasData)
  784. .map((s) => ({ name: s.name, data: s.data, legendShape: 'circle' }));
  785. this.showColumn('datCharChart', xtitle, series);
  786. },
  787. showColumn(id, xtitle, xinfo) {
  788. const _self = this;
  789. const ctx = uni.createCanvasContext(id, this);
  790. canvaColumnA = new uCharts({
  791. context: ctx,
  792. type: 'area',
  793. legend: {
  794. position: 'top',
  795. float: 'left', // 圆点左对齐
  796. lineHeight: 19, // 行间距 8px(字号 11 + 8)
  797. },
  798. fontSize: 11,
  799. background: '#FFFFFF',
  800. pixelRatio: 1,
  801. animation: true,
  802. dataLabel: false,
  803. categories: xtitle,
  804. series: xinfo,
  805. enableScroll: true, // 开启图表拖拽功能
  806. xAxis: {
  807. disableGrid: true,
  808. type: 'grid',
  809. gridType: 'dash',
  810. itemCount: 4, // x轴单屏显示数据的数量
  811. scrollShow: true,
  812. scrollBackgroundColor: '#F7F7FF',
  813. scrollColor: '#DEE7F7',
  814. },
  815. yAxis: {},
  816. width: _self.cWidth * 1,
  817. height: _self.cHeight * 1,
  818. extra: {
  819. area: {
  820. type: 'curve',
  821. opacity: 0.2,
  822. addLine: true, // 在渐变填充上方同时绘制折线
  823. width: 2,
  824. gradient: true, // 折线下方填充渐变色(从折线颜色渐变到透明)
  825. },
  826. },
  827. });
  828. },
  829. touchLineA(e) {
  830. if (canvaColumnA) canvaColumnA.scrollStart(e);
  831. },
  832. moveLineA(e) {
  833. if (canvaColumnA) canvaColumnA.scroll(e);
  834. },
  835. touchEndLineA(e) {
  836. if (!canvaColumnA) return;
  837. canvaColumnA.scrollEnd(e);
  838. canvaColumnA.showToolTip(e, {
  839. format: function (item, category) {
  840. return category + ' ' + item.name + ':' + item.data;
  841. },
  842. });
  843. },
  844. },
  845. };
  846. </script>
  847. <style lang="scss">
  848. .device-details-page {
  849. background:
  850. linear-gradient(180deg, #ffffff00 0%, #f5f6fa 23.64%, #f5f6fa 100%),
  851. linear-gradient(102deg, #bfeadd 6.77%, #b8f1e7 40.15%, #b9eef5 84.02%);
  852. min-height: 100vh;
  853. padding: 0 32rpx;
  854. padding-top: 98rpx;
  855. }
  856. .nav-title{
  857. //超出隐藏
  858. overflow: hidden;
  859. text-overflow: ellipsis;
  860. white-space: nowrap;
  861. text-align: center;
  862. }
  863. /* 设备基本信息 */
  864. .device-info {
  865. background-color: #ffffff;
  866. margin: 46rpx 0 24rpx 0;
  867. padding: 32rpx 24rpx;
  868. border-radius: 16rpx;
  869. background: linear-gradient(180deg, #eff 0%, #fff 23.56%);
  870. position: relative;
  871. .info-item {
  872. display: flex;
  873. align-items: center;
  874. margin-bottom: 16rpx;
  875. }
  876. .info-item:last-child {
  877. margin-bottom: 0;
  878. }
  879. .operation-container{
  880. position: fixed;
  881. right: 0;
  882. top: 0;
  883. width: 100%;
  884. height: 100%;
  885. z-index: 99;
  886. }
  887. .operation{
  888. position: fixed;
  889. top: 260rpx;
  890. right: 0;
  891. z-index: 999;
  892. width:48rpx;
  893. height: 100rpx;
  894. line-height: 50rpx;
  895. border-radius: 8px 0 0 8px;
  896. border-top: 4rpx solid #FFF;
  897. border-bottom: 4rpx solid #FFF;
  898. border-left: 4rpx solid #FFF;
  899. background: #dddfe6a3;
  900. color: #515153;
  901. text-align: center;
  902. font-family: "Source Han Sans CN VF";
  903. font-size: 24rpx;
  904. font-weight: 500;
  905. writing-mode: vertical-rl;
  906. }
  907. .operation-background{
  908. position: fixed;
  909. right: 0;
  910. top: 0;
  911. width: 100%;
  912. height: 100%;
  913. z-index: 998;
  914. background: #00000040;
  915. }
  916. .operation-content{
  917. position: fixed;
  918. top: 240rpx;
  919. right: 80rpx;
  920. height: 126rpx;
  921. display: flex;
  922. padding: 16rpx 32rpx;
  923. align-items: center;
  924. gap: 64rpx;
  925. z-index: 999;
  926. border-radius: 32rpx;
  927. border: 2rpx solid #FFF;
  928. background: #FFF;
  929. backdrop-filter: blur(8rpx);
  930. .operation-item{
  931. display: flex;
  932. flex-direction: column;
  933. align-items: center;
  934. justify-content: center;
  935. color: #333333;
  936. text-align: center;
  937. font-family: "Source Han Sans CN VF";
  938. font-size: 24rpx;
  939. font-weight: 400;
  940. }
  941. .operation-icon{
  942. width: 58rpx;
  943. height: 58rpx;
  944. }
  945. }
  946. .info-label {
  947. width: 116rpx;
  948. color: #999999;
  949. text-align: right;
  950. font-family: 'Source Han Sans CN VF';
  951. font-size: 28rpx;
  952. font-style: normal;
  953. font-weight: 400;
  954. line-height: normal;
  955. margin-right: 32rpx;
  956. white-space: nowrap;
  957. }
  958. .info-value {
  959. color: #333333;
  960. font-family: 'Source Han Sans CN VF';
  961. font-size: 28rpx;
  962. font-style: normal;
  963. font-weight: 400;
  964. line-height: normal;
  965. text-overflow: ellipsis;
  966. overflow: hidden;
  967. white-space: nowrap;
  968. }
  969. .info-img {
  970. width: 32rpx;
  971. height: 32rpx;
  972. margin-left: 16rpx;
  973. background: #0bbc581a;
  974. display: flex;
  975. align-items: center;
  976. justify-content: center;
  977. }
  978. .tishi {
  979. width: 24rpx;
  980. height: 24rpx;
  981. }
  982. .dev-status {
  983. position: absolute;
  984. right: 0;
  985. top: 0;
  986. border: 2rpx solid #ffffff;
  987. background: #0bbc581a;
  988. width: 152rpx;
  989. height: 56rpx;
  990. color: #0bbc58;
  991. text-align: center;
  992. font-size: 28rpx;
  993. font-weight: 400;
  994. line-height: 52rpx;
  995. border-radius: 0 16rpx 0 64rpx;
  996. }
  997. }
  998. /* 标签页切换 */
  999. .tab-container {
  1000. background-color: #ffffff;
  1001. border-radius: 16rpx;
  1002. overflow: hidden;
  1003. padding: 0 32rpx;
  1004. margin-bottom: 24rpx;
  1005. .datetime{
  1006. display: flex;
  1007. height: 48rpx;
  1008. padding: 8rpx 24rpx;
  1009. justify-content: space-between;
  1010. align-items: center;
  1011. flex: 1 0 0;
  1012. border-radius: 32rpx;
  1013. background: #F1F4F8;
  1014. margin-bottom: 20rpx;
  1015. color: #656565;
  1016. text-align: center;
  1017. font-family: "Source Han Sans CN VF";
  1018. font-size: 12px;
  1019. font-style: normal;
  1020. font-weight: 400;
  1021. line-height: normal;
  1022. .datetime-left{
  1023. width: 90%;
  1024. display: flex;
  1025. align-items: center;
  1026. justify-content: space-around;
  1027. .datetime-start{
  1028. width: 45%;
  1029. }
  1030. .datetime-end{
  1031. width: 45%;
  1032. }
  1033. }
  1034. }
  1035. .tab-top {
  1036. display: flex;
  1037. }
  1038. .tab-item {
  1039. flex: 1;
  1040. height: 80rpx;
  1041. display: flex;
  1042. flex-direction: column;
  1043. align-items: center;
  1044. position: relative;
  1045. color: #666666;
  1046. text-align: center;
  1047. font-family: 'Source Han Sans CN VF';
  1048. font-size: 28rpx;
  1049. font-style: normal;
  1050. font-weight: 400;
  1051. line-height: normal;
  1052. .tab-text {
  1053. margin-top: 16rpx;
  1054. }
  1055. .smile {
  1056. width: 24rpx;
  1057. height: 18rpx;
  1058. }
  1059. }
  1060. .tab-item.active {
  1061. color: #333333;
  1062. font-weight: 700;
  1063. }
  1064. .time-board {
  1065. display: flex;
  1066. align-items: center;
  1067. justify-content: space-between;
  1068. margin-bottom: 16rpx;
  1069. }
  1070. .time-filter {
  1071. display: flex;
  1072. align-items: center;
  1073. justify-content: space-between;
  1074. width: 256rpx;
  1075. height: 48rpx;
  1076. padding: 6rpx 8rpx;
  1077. border-radius: 32rpx;
  1078. background: #f1f4f8;
  1079. color: #303133;
  1080. font-size: 20rpx;
  1081. font-weight: 400;
  1082. .filter-item {
  1083. padding: 4rpx 16rpx;
  1084. height: 36rpx;
  1085. line-height: 36rpx;
  1086. }
  1087. .active {
  1088. border-radius: 32rpx;
  1089. background: #fff;
  1090. }
  1091. }
  1092. }
  1093. /* 监测要素页面 */
  1094. .monitoring-page {
  1095. padding-bottom: 20px;
  1096. display: flex;
  1097. flex-wrap: wrap;
  1098. justify-content: space-between;
  1099. .data-card {
  1100. position: relative;
  1101. top: 100rpx;
  1102. width: 100%;
  1103. background: url('https://s3.hnyfwlw.com/webstaticimg/bigdata_app/img/solid.png');
  1104. background-size: cover;
  1105. background-position: center center;
  1106. background-repeat: no-repeat;
  1107. border-radius: 16rpx;
  1108. height: 500rpx;
  1109. .status-img{
  1110. position: absolute;
  1111. top: -100rpx;
  1112. left: -20rpx;
  1113. width: 150rpx;
  1114. height: 620rpx;
  1115. }
  1116. .data-card-right{
  1117. width:calc(100% - 150rpx);
  1118. position: absolute;
  1119. top: 0;
  1120. left: 130rpx;
  1121. display: flex;
  1122. flex-direction: column;
  1123. justify-content: space-between;
  1124. align-items: center;
  1125. .device-qx{
  1126. display: flex;
  1127. align-items: center;
  1128. justify-content: center;
  1129. margin-bottom: 24rpx;
  1130. margin-top: -48rpx;
  1131. .qx-img{
  1132. width: 48rpx;
  1133. height: 48rpx;
  1134. margin-right: 16rpx;
  1135. }
  1136. }
  1137. .device-temp-list{
  1138. width: 100%;
  1139. display: flex;
  1140. flex-direction: column;
  1141. align-items: center;
  1142. gap: 24rpx;
  1143. margin: 24rpx 0;
  1144. .temp-item{
  1145. display: flex;
  1146. align-items: center;
  1147. justify-content: center;
  1148. text-align: center;
  1149. width: 200rpx;
  1150. height: 80rpx;
  1151. margin-bottom: 12rpx;
  1152. }
  1153. .temp-icon{
  1154. width: 48rpx;
  1155. height: 40rpx;
  1156. margin-right: 16rpx;
  1157. }
  1158. .temp-content{
  1159. .temp-value{
  1160. color: #ffffff;
  1161. font-size: 28rpx;
  1162. font-weight: 700;
  1163. }
  1164. .temp-name{
  1165. color: #ffffffcc;
  1166. font-size: 24rpx;
  1167. font-family: "Source Han Sans CN VF";
  1168. font-weight: 400;
  1169. // 超出部分省略号
  1170. overflow: hidden;
  1171. text-overflow: ellipsis;
  1172. white-space: nowrap;
  1173. }
  1174. }
  1175. }
  1176. .device-swc-list{
  1177. display: flex;
  1178. flex-direction: column;
  1179. align-items: center;
  1180. gap: 24rpx;
  1181. margin: 24rpx 0;
  1182. width: 100%;
  1183. .swc-item{
  1184. display: flex;
  1185. align-items: center;
  1186. justify-content: center;
  1187. text-align: center;
  1188. width: 200rpx;
  1189. height: 80rpx;
  1190. margin-bottom: 12rpx;
  1191. }
  1192. .swc-icon{
  1193. width: 48rpx;
  1194. height: 40rpx;
  1195. margin-right: 16rpx;
  1196. }
  1197. .swc-content{
  1198. .swc-value{
  1199. color: #ffffff;
  1200. font-size: 28rpx;
  1201. font-weight: 700;
  1202. }
  1203. .swc-name{
  1204. color: #ffffffcc;
  1205. font-size: 24rpx;
  1206. font-family: "Source Han Sans CN VF";
  1207. font-weight: 400;
  1208. // 超出部分省略号
  1209. overflow: hidden;
  1210. text-overflow: ellipsis;
  1211. white-space: nowrap;
  1212. }
  1213. }
  1214. }
  1215. .device-dept-list{
  1216. display: flex;
  1217. flex-direction: column;
  1218. align-items: center;
  1219. gap: 24rpx;
  1220. margin: 24rpx 0;
  1221. width: 100%;
  1222. .dept-item{
  1223. display: flex;
  1224. align-items: center;
  1225. justify-content: center;
  1226. text-align: center;
  1227. width: 200rpx;
  1228. height: 80rpx;
  1229. margin-bottom: 12rpx;
  1230. }
  1231. .dept-icon{
  1232. width: 48rpx;
  1233. height: 40rpx;
  1234. margin-right: 16rpx;
  1235. }
  1236. .dept-content{
  1237. .dept-value{
  1238. color: #ffffff;
  1239. font-size: 28rpx;
  1240. font-weight: 700;
  1241. }
  1242. .dept-name{
  1243. color: #ffffffcc;
  1244. font-size: 24rpx;
  1245. font-family: "Source Han Sans CN VF";
  1246. font-weight: 400;
  1247. // 超出部分省略号
  1248. overflow: hidden;
  1249. text-overflow: ellipsis;
  1250. white-space: nowrap;
  1251. }
  1252. }
  1253. }
  1254. .device-list{
  1255. display: flex;
  1256. gap: 24rpx;
  1257. justify-content: space-between;
  1258. margin-top: 40rpx;
  1259. }
  1260. }
  1261. }
  1262. }
  1263. /* 设备详情页面 */
  1264. .details-page {
  1265. .chart-container {
  1266. padding: 16rpx 32rpx 32rpx 32rpx;
  1267. border-radius: 16rpx;
  1268. background: #fff;
  1269. margin-bottom: 24rpx;
  1270. .chart-control {
  1271. display: flex;
  1272. align-items: center;
  1273. justify-content: space-between;
  1274. margin-bottom: 16rpx;
  1275. .title {
  1276. color: #042118;
  1277. font-family: 'Source Han Sans CN VF';
  1278. font-size: 28rpx;
  1279. font-style: normal;
  1280. font-weight: 700;
  1281. line-height: normal;
  1282. }
  1283. }
  1284. .chart-wrap {
  1285. height: 520rpx;
  1286. .charts {
  1287. width: 100%;
  1288. height: 100%;
  1289. }
  1290. }
  1291. .empty-state {
  1292. padding: 80rpx 0;
  1293. }
  1294. }
  1295. .table-container {
  1296. padding: 16rpx 32rpx 32rpx 32rpx;
  1297. border-radius: 16rpx;
  1298. background: #fff;
  1299. .table-control {
  1300. display: flex;
  1301. align-items: center;
  1302. justify-content: space-between;
  1303. margin-bottom: 16rpx;
  1304. .title {
  1305. color: #042118;
  1306. font-family: 'Source Han Sans CN VF';
  1307. font-size: 28rpx;
  1308. font-style: normal;
  1309. font-weight: 700;
  1310. line-height: normal;
  1311. }
  1312. .date-board {
  1313. display: flex;
  1314. align-items: center;
  1315. color: #020305;
  1316. font-family: 'Source Han Sans CN VF';
  1317. font-size: 24rpx;
  1318. font-weight: 400;
  1319. border-radius: 32rpx;
  1320. background: #f1f4f8;
  1321. padding: 16rpx 24rpx;
  1322. .line {
  1323. color: #656565;
  1324. margin: 0 10rpx;
  1325. }
  1326. .date-icon {
  1327. width: 32rpx;
  1328. height: 32rpx;
  1329. margin-left: 16rpx;
  1330. }
  1331. }
  1332. }
  1333. .table-wrap {
  1334. display: flex;
  1335. width: 100%;
  1336. height: 850rpx;
  1337. box-sizing: border-box;
  1338. margin: 20rpx 0;
  1339. color: #042118;
  1340. font-family: 'Source Han Sans CN VF';
  1341. font-size: 24rpx;
  1342. font-style: normal;
  1343. font-weight: 400;
  1344. line-height: normal;
  1345. .fixed-column {
  1346. width: 250rpx;
  1347. .table-cell {
  1348. width: 100%;
  1349. white-space: nowrap;
  1350. }
  1351. }
  1352. .table-bg {
  1353. width: 16rpx;
  1354. background: linear-gradient(270deg, #ffffff33 0%, #9598a433 100%);
  1355. }
  1356. .scroll-column {
  1357. flex: 1;
  1358. height: auto;
  1359. overflow: hidden;
  1360. margin-left: -10rpx;
  1361. }
  1362. .scroll-content {
  1363. min-width: 100%;
  1364. width: fit-content;
  1365. display: flex;
  1366. flex-direction: column;
  1367. .table-row {
  1368. display: flex;
  1369. .table-cell {
  1370. flex: 1;
  1371. padding-right: 10rpx;
  1372. }
  1373. }
  1374. }
  1375. .table-cell {
  1376. width: 180rpx;
  1377. height: 80rpx;
  1378. line-height: 80rpx;
  1379. padding-right: 10rpx;
  1380. text-align: center;
  1381. border-bottom: 2px solid #e4e7ed;
  1382. box-sizing: border-box;
  1383. overflow: hidden;
  1384. padding: 0 4rpx;
  1385. text-overflow: ellipsis;
  1386. }
  1387. .table-cell.header {
  1388. background: #f6f8fc;
  1389. }
  1390. }
  1391. .pagination {
  1392. display: flex;
  1393. align-items: center;
  1394. justify-content: space-between;
  1395. margin-top: 24rpx;
  1396. .page-item {
  1397. width: 104rpx;
  1398. height: 48rpx;
  1399. color: #656565;
  1400. font-size: 24rpx;
  1401. line-height: 48rpx;
  1402. text-align: center;
  1403. border: 2rpx solid #e4e7ed;
  1404. border-radius: 8rpx;
  1405. }
  1406. .prev.disabled {
  1407. color: #c0c4cc;
  1408. border-color: #e4e7ed;
  1409. }
  1410. .next {
  1411. color: #0bbc58;
  1412. border: 2px solid #0bbc58;
  1413. }
  1414. .next.disabled {
  1415. color: #c0c4cc;
  1416. border-color: #e4e7ed;
  1417. }
  1418. .page-info {
  1419. color: #999999;
  1420. font-family: 'Source Han Sans CN VF';
  1421. font-size: 24rpx;
  1422. font-style: normal;
  1423. font-weight: 400;
  1424. line-height: normal;
  1425. .curret-page {
  1426. color: #303133;
  1427. }
  1428. }
  1429. }
  1430. .empty-state {
  1431. padding: 80rpx 0;
  1432. }
  1433. }
  1434. }
  1435. ::v-deep .u-calendar__action {
  1436. display: flex;
  1437. justify-content: center;
  1438. }
  1439. </style>