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