index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  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 @click="copy(deviceInfo.devBid)" class="info-item">
  11. <text class="info-label">设备ID</text>
  12. <text class="info-value">{{ deviceInfo.devBid }}</text>
  13. <image
  14. src="/static/images/device/copy.svg"
  15. mode=""
  16. class="info-img"
  17. ></image>
  18. </view>
  19. <view class="info-item">
  20. <text class="info-label">上报时间</text>
  21. <text class="info-value">{{ formatTimestamp(deviceInfo.uptime) }}</text>
  22. </view>
  23. <view class="info-item">
  24. <text class="info-label">设备位置</text>
  25. <text class="info-value">{{ deviceInfo.address }}</text>
  26. </view>
  27. <view class="dev-status">{{
  28. deviceInfo.devStatus == '1' ? '在线' : '离线'
  29. }}</view>
  30. </view>
  31. <!-- 标签页切换 -->
  32. <view class="tab-container">
  33. <view class="tab-top">
  34. <view
  35. class="tab-item"
  36. :class="{ active: activeTab === 'monitoring' }"
  37. @click="switchTab('monitoring')"
  38. >
  39. <text class="tab-text">监测要素</text>
  40. <image
  41. v-if="activeTab === 'monitoring'"
  42. src="/static/images/device/smile.svg"
  43. mode=""
  44. class="smile"
  45. ></image>
  46. </view>
  47. <view
  48. class="tab-item"
  49. :class="{ active: activeTab === 'details' }"
  50. @click="switchTab('details')"
  51. >
  52. <text class="tab-text">设备详情</text>
  53. <image
  54. v-if="activeTab === 'details'"
  55. src="/static/images/device/smile.svg"
  56. mode=""
  57. class="smile"
  58. ></image>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 标签页内容 -->
  63. <view class="tab-content">
  64. <!-- 监测要素页面 -->
  65. <view v-if="activeTab === 'monitoring'" class="monitoring-page">
  66. <view
  67. class="data-card"
  68. v-for="(item, index) in monitorList"
  69. :key="index"
  70. @click="goPage('eleDetail', item)"
  71. >
  72. <view class="card-title">{{ item.factorName }}</view>
  73. <view class="data-value-row">
  74. <view>
  75. <text v-if="item.yData && item.yData.length" class="data-value">{{
  76. item.yData[0]
  77. }}</text>
  78. <text class="data-unit">{{ item.factorUnit }}</text>
  79. </view>
  80. <image
  81. class="device-img"
  82. :src="`/static/images/device/${item.key}-default.svg`"
  83. mode="aspectFit"
  84. ></image>
  85. </view>
  86. <view class="card-thrid">
  87. <text>{{ item.alias || ''}}</text>
  88. </view>
  89. </view>
  90. </view>
  91. <!-- 设备详情页面 -->
  92. <view v-if="activeTab === 'details'" class="details-page">
  93. <!-- 设备参数 -->
  94. <view class="device-params">
  95. <view class="device-control">
  96. <view class="control-left">
  97. <view>{{formatTimestamp(deviceInfo.uptime)}}</view>
  98. <u-icon name="reload" color="#0BBC58" style="margin-left: 12rpx" @click="refreshData"></u-icon>
  99. </view>
  100. <!-- {{formatDate(deviceInfo.uptime)}} -->
  101. <view class="control-right">
  102. <image
  103. class="control-img"
  104. src="/static/images/cb/control.svg"
  105. mode="aspectFit"
  106. @click="goPage('devControl')"
  107. ></image>
  108. <image
  109. class="control-img"
  110. src="/static/images/cb/setting.svg"
  111. mode="aspectFit"
  112. @click="goPage('devRepair')"
  113. ></image>
  114. <image
  115. class="control-img"
  116. src="/static/images/cb/sim.svg"
  117. mode="aspectFit"
  118. @click="goPage('simDetail')"
  119. ></image>
  120. </view>
  121. </view>
  122. <view class="params-board">
  123. <view class="params-left">
  124. <view
  125. v-for="(item, index) in statusList"
  126. :key="index"
  127. class="params-item"
  128. >
  129. <view class="params-val">{{ item.val }}</view>
  130. <view class="params-label">{{ item.label }}</view>
  131. </view>
  132. </view>
  133. <view class="params-right">
  134. <image
  135. class="device-img"
  136. src="/static/images/device/dev-station.svg"
  137. mode="aspectFit"
  138. ></image>
  139. </view>
  140. </view>
  141. </view>
  142. <!-- 设备数据表格 -->
  143. <view class="table-container">
  144. <view class="table-control">
  145. <view class="title">设备数据</view>
  146. <view class="date-board" @click="openDatePicker">
  147. <text>{{ startDate }}</text>
  148. <text class="line">至</text>
  149. <text>{{ endDate }}</text>
  150. <image class="date-icon" src="/static/images/device/date.svg" />
  151. </view>
  152. </view>
  153. <u-calendar
  154. v-model="show"
  155. :mode="mode"
  156. @change="onDateChange"
  157. range-color="#999" btn-type="success" active-bg-color="#0BBC58" range-bg-color="rgba(11,188,88,0.13)"
  158. ref="calendar"
  159. ></u-calendar>
  160. <view class="table-wrap" v-if="tableData && tableData.length > 0">
  161. <view class="fixed-column">
  162. <view class="table-cell header">上报时间</view>
  163. <view
  164. class="table-cell"
  165. v-for="(item, idx) in tableData"
  166. :key="idx"
  167. >
  168. {{ item.uptime }}
  169. </view>
  170. </view>
  171. <view class="table-bg"></view>
  172. <scroll-view class="scroll-column" scroll-x="true">
  173. <view class="scroll-content">
  174. <view class="table-row">
  175. <view
  176. class="table-cell header"
  177. v-for="(item, index) in tableColumn"
  178. :key="index"
  179. >{{ item.label }}</view
  180. >
  181. </view>
  182. <view
  183. class="table-row"
  184. v-for="(item, idx) in tableData"
  185. :key="idx"
  186. >
  187. <view
  188. class="table-cell"
  189. v-for="(item1, index1) in tableColumn"
  190. :key="index1"
  191. >{{ item[item1.prop] }}</view
  192. >
  193. </view>
  194. </view>
  195. </scroll-view>
  196. </view>
  197. <view class="empty-state" v-else>
  198. <u-empty text="暂无数据" mode="list"></u-empty>
  199. </view>
  200. <view class="pagination" v-if="tableData && tableData.length > 0">
  201. <view
  202. class="page-item prev"
  203. :class="{ disabled: page <= 1 }"
  204. @click="prevPage"
  205. >上一页</view
  206. >
  207. <view class="page-info">
  208. <text class="curret-page">{{ page }}</text>
  209. <text>/</text>
  210. <text>{{ totalPages }}</text>
  211. </view>
  212. <view
  213. class="page-item next"
  214. :class="{ disabled: page >= totalPages }"
  215. @click="nextPage"
  216. >下一页</view
  217. >
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </template>
  224. <script>
  225. export default {
  226. onLoad(options) {
  227. console.log(options, 'optionsss');
  228. this.deviceInfo = options;
  229. this.initDateRange(options.uptime);
  230. this.getQxzObData();
  231. this.getDeviceStatus();
  232. this.getDeviceData();
  233. },
  234. data() {
  235. return {
  236. deviceInfo: {},
  237. activeTab: 'monitoring',
  238. monitorList: [],
  239. statusList: [],
  240. show: false,
  241. mode: 'range',
  242. startDate: '',
  243. endDate: '',
  244. page: 1,
  245. pageSize: 9,
  246. total: 0,
  247. tableData: [],
  248. tableColumn: [],
  249. };
  250. },
  251. computed: {
  252. totalPages() {
  253. return Math.ceil(this.total / this.pageSize) || 1;
  254. },
  255. },
  256. methods: {
  257. async refreshData(){
  258. //api/api_gateway?method=qxz.device.control
  259. await this.$myRequest({
  260. url: '/api/api_gateway?method=qxz.device.control',
  261. data: {
  262. device_id: this.deviceInfo.devBid,
  263. cmd: 'READ',
  264. },
  265. });
  266. //弹框提示
  267. uni.showToast({
  268. title: '刷新成功',
  269. icon: 'success',
  270. });
  271. this.getDeviceData();
  272. },
  273. formatTimestamp(timestamp) {
  274. if (!timestamp) return '';
  275. const date = new Date(Number(timestamp) * 1000);
  276. const year = date.getFullYear();
  277. const month = String(date.getMonth() + 1).padStart(2, '0');
  278. const day = String(date.getDate()).padStart(2, '0');
  279. const hours = String(date.getHours()).padStart(2, '0');
  280. const minutes = String(date.getMinutes()).padStart(2, '0');
  281. const seconds = String(date.getSeconds()).padStart(2, '0');
  282. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  283. },
  284. formatDate(date) {
  285. const year = date.getFullYear();
  286. const month = String(date.getMonth() + 1).padStart(2, '0');
  287. const day = String(date.getDate()).padStart(2, '0');
  288. return `${year}-${month}-${day}`;
  289. },
  290. initDateRange(timestamp) {
  291. if (!timestamp) {
  292. const today = new Date();
  293. this.endDate = this.formatDate(today);
  294. const startDate = new Date(today);
  295. startDate.setDate(startDate.getDate() - 7);
  296. this.startDate = this.formatDate(startDate);
  297. return;
  298. }
  299. const date = new Date(Number(timestamp) * 1000);
  300. this.endDate = this.formatDate(date);
  301. const startDate = new Date(date);
  302. startDate.setDate(startDate.getDate() - 7);
  303. this.startDate = this.formatDate(startDate);
  304. },
  305. switchTab(tab) {
  306. this.activeTab = tab;
  307. },
  308. copy(item) {
  309. console.log(item);
  310. uni.setClipboardData({
  311. data: item,
  312. success: function () {
  313. console.log('success');
  314. },
  315. });
  316. },
  317. goPage(type, eleItem) {
  318. let url = '';
  319. if (eleItem && eleItem.key) {
  320. url = `/pages/deviceDetails/weatherStation/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}&eleKey=${eleItem.key}`;
  321. } else {
  322. url = `/pages/deviceDetails/weatherStation/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}`;
  323. }
  324. if (type === 'devRepair') {
  325. url = `/pages/afterSale/addafter?d_id=${this.deviceInfo.d_id}&device_id=${this.deviceInfo.devBid}&device_type=${this.deviceInfo.deviceType}`;
  326. }
  327. uni.navigateTo({
  328. url,
  329. });
  330. },
  331. openDatePicker() {
  332. this.show = true;
  333. },
  334. onDateChange(event) {
  335. if (event && event.startDate && event.endDate) {
  336. this.startDate = event.startDate;
  337. this.endDate = event.endDate;
  338. this.show = false;
  339. this.page = 1;
  340. this.getDeviceData();
  341. }
  342. },
  343. prevPage() {
  344. if (this.page <= 1) return;
  345. this.page--;
  346. this.getDeviceData();
  347. },
  348. nextPage() {
  349. if (this.page >= this.totalPages) return;
  350. this.page++;
  351. this.getDeviceData();
  352. },
  353. // 获取设备最新监测数据
  354. async getQxzObData() {
  355. const res = await this.$myRequest({
  356. url: '/api/api_gateway?method=qxz.data.qxz_ob_last_data',
  357. data: {
  358. device_id: this.deviceInfo.devBid,
  359. },
  360. });
  361. console.log('设备最新监测数据:', res);
  362. const title = res.title;
  363. const data = res.data;
  364. const alias = res.alias;
  365. this.monitorList = this.formatChartData(title, data, alias);
  366. },
  367. formatChartData(obj, data, alias) {
  368. const keys = Object.keys(obj);
  369. const result = [];
  370. console.log(data, 'datadata');
  371. for (const prop of keys) {
  372. const objArr = obj[prop];
  373. if (objArr[4] == 1) {
  374. result.push({
  375. factorName: objArr[1],
  376. key: prop,
  377. yData: data[prop],
  378. factorUnit: objArr[3],
  379. newData: objArr[5],
  380. alias: alias[prop],
  381. });
  382. }
  383. }
  384. console.log(result, 'real-time data');
  385. return result;
  386. },
  387. convertDynamic(data, getLabelValue) {
  388. if (!data || typeof data !== 'object') return [];
  389. const result = [];
  390. const keys = Object.keys(data);
  391. for (const prop of keys) {
  392. const arr = data[prop];
  393. const value = getLabelValue(prop, arr, data);
  394. if (value !== undefined && value !== null) {
  395. result.push({
  396. label: String(value),
  397. prop,
  398. align: 'center',
  399. });
  400. }
  401. }
  402. return result;
  403. },
  404. // 获取设备状态数据
  405. async getDeviceStatus() {
  406. const res = await this.$myRequest({
  407. url: '/api/api_gateway?method=qxz.data.qxz_status',
  408. data: {
  409. device_id: this.deviceInfo.devBid,
  410. },
  411. });
  412. console.log('getDeviceStatus:', res);
  413. const newArr = this.transformObjectToArray(res);
  414. this.statusList = newArr;
  415. console.log(this.statusList, 'getDevStatus');
  416. },
  417. transformObjectToArray(originalData) {
  418. if (
  419. typeof originalData !== 'object' ||
  420. originalData === null ||
  421. Array.isArray(originalData)
  422. ) {
  423. return [];
  424. }
  425. return Object.keys(originalData).map((key) => {
  426. const [val = '', label = ''] = originalData[key] || [];
  427. return {
  428. label,
  429. val,
  430. key,
  431. };
  432. });
  433. },
  434. // 设备数据列表
  435. async getDeviceData() {
  436. const data = await this.$myRequest({
  437. url: '/api/api_gateway?method=qxz.data.qxz_device_data',
  438. data: {
  439. device_id: this.deviceInfo.devBid,
  440. page: String(this.page),
  441. page_size: String(this.pageSize),
  442. start: String(
  443. Math.floor(new Date(this.startDate + ' 00:00:00').getTime() / 1000),
  444. ),
  445. end: String(
  446. Math.floor(new Date(this.endDate + ' 23:59:59').getTime() / 1000),
  447. ),
  448. },
  449. });
  450. console.log(data, 'resss');
  451. if (Array.isArray(data) && data.length > 0) {
  452. this.total = data[0]?.count || 0;
  453. this.tableData = data[0].data || [];
  454. const title = data[0].title;
  455. this.tableColumn = title
  456. .map((item) => {
  457. return {
  458. label: item[1],
  459. prop: item[0],
  460. };
  461. })
  462. .filter((item) => item.prop !== 'uptime');
  463. } else {
  464. // 没数据时,设置为空
  465. this.total = 0;
  466. this.tableData = [];
  467. this.tableColumn = [];
  468. }
  469. console.log(this.tableColumn, 'tableCol');
  470. console.log(this.tableData, 'tableData');
  471. },
  472. },
  473. };
  474. </script>
  475. <style lang="scss">
  476. .device-details-page {
  477. background:
  478. linear-gradient(180deg, #ffffff00 0%, #f5f6fa 23.64%, #f5f6fa 100%),
  479. linear-gradient(102deg, #bfeadd 6.77%, #b8f1e7 40.15%, #b9eef5 84.02%);
  480. min-height: 100vh;
  481. padding: 0 32rpx;
  482. padding-top: 98rpx;
  483. }
  484. .nav-title{
  485. //超出隐藏
  486. overflow: hidden;
  487. text-overflow: ellipsis;
  488. white-space: nowrap;
  489. }
  490. /* 设备基本信息 */
  491. .device-info {
  492. background-color: #ffffff;
  493. margin: 46rpx 0 24rpx 0;
  494. padding: 32rpx 24rpx;
  495. border-radius: 16rpx;
  496. background: linear-gradient(180deg, #eff 0%, #fff 23.56%);
  497. position: relative;
  498. .info-item {
  499. display: flex;
  500. align-items: center;
  501. margin-bottom: 16rpx;
  502. }
  503. .info-item:last-child {
  504. margin-bottom: 0;
  505. }
  506. .info-label {
  507. width: 116rpx;
  508. color: #999999;
  509. text-align: right;
  510. font-family: 'Source Han Sans CN VF';
  511. font-size: 28rpx;
  512. font-style: normal;
  513. font-weight: 400;
  514. line-height: normal;
  515. margin-right: 32rpx;
  516. white-space: nowrap;
  517. }
  518. .info-value {
  519. color: #333333;
  520. font-family: 'Source Han Sans CN VF';
  521. font-size: 28rpx;
  522. font-style: normal;
  523. font-weight: 400;
  524. line-height: normal;
  525. text-overflow: ellipsis;
  526. overflow: hidden;
  527. white-space: nowrap;
  528. }
  529. .info-img {
  530. width: 32rpx;
  531. height: 32rpx;
  532. margin-left: 16rpx;
  533. background: #0bbc581a;
  534. display: flex;
  535. align-items: center;
  536. justify-content: center;
  537. }
  538. .tishi {
  539. width: 24rpx;
  540. height: 24rpx;
  541. }
  542. .dev-status {
  543. position: absolute;
  544. right: 0;
  545. top: 0;
  546. border: 2rpx solid #ffffff;
  547. background: #0bbc581a;
  548. width: 152rpx;
  549. height: 56rpx;
  550. color: #0bbc58;
  551. text-align: center;
  552. font-size: 28rpx;
  553. font-weight: 400;
  554. line-height: 52rpx;
  555. border-radius: 0 16rpx 0 64rpx;
  556. }
  557. }
  558. /* 标签页切换 */
  559. .tab-container {
  560. background-color: #ffffff;
  561. border-radius: 16rpx;
  562. overflow: hidden;
  563. padding: 0 32rpx;
  564. margin-bottom: 24rpx;
  565. .tab-top {
  566. display: flex;
  567. }
  568. .tab-item {
  569. flex: 1;
  570. height: 80rpx;
  571. display: flex;
  572. flex-direction: column;
  573. align-items: center;
  574. position: relative;
  575. color: #666666;
  576. text-align: center;
  577. font-family: 'Source Han Sans CN VF';
  578. font-size: 28rpx;
  579. font-style: normal;
  580. font-weight: 400;
  581. line-height: normal;
  582. .tab-text {
  583. margin-top: 16rpx;
  584. }
  585. .smile {
  586. width: 24rpx;
  587. height: 18rpx;
  588. }
  589. }
  590. .tab-item.active {
  591. color: #333333;
  592. font-weight: 700;
  593. }
  594. .time-board {
  595. display: flex;
  596. align-items: center;
  597. justify-content: space-between;
  598. margin-bottom: 16rpx;
  599. }
  600. .time-filter {
  601. display: flex;
  602. align-items: center;
  603. justify-content: space-between;
  604. width: 256rpx;
  605. height: 48rpx;
  606. padding: 6rpx 8rpx;
  607. border-radius: 32rpx;
  608. background: #f1f4f8;
  609. color: #303133;
  610. font-size: 20rpx;
  611. font-weight: 400;
  612. .filter-item {
  613. padding: 4rpx 16rpx;
  614. height: 36rpx;
  615. line-height: 36rpx;
  616. }
  617. .active {
  618. border-radius: 32rpx;
  619. background: #fff;
  620. }
  621. }
  622. }
  623. /* 监测要素页面 */
  624. .monitoring-page {
  625. padding-bottom: 20px;
  626. display: flex;
  627. flex-wrap: wrap;
  628. justify-content: space-between;
  629. .data-card {
  630. width: calc(50% - 8rpx);
  631. margin-bottom: 16rpx;
  632. background-color: #ffffff;
  633. border-radius: 16rpx;
  634. padding: 16rpx 24rpx;
  635. height: 186rpx;
  636. font-family: 'Source Han Sans CN VF';
  637. font-size: 28rpx;
  638. font-weight: 400;
  639. box-sizing: border-box;
  640. .card-title {
  641. color: #042118;
  642. margin-bottom: 6rpx;
  643. }
  644. .data-value-row {
  645. display: flex;
  646. justify-content: space-between;
  647. align-items: center;
  648. color: #042118;
  649. font-family: 'Source Han Sans CN VF';
  650. font-weight: 400;
  651. .data-value {
  652. font-size: 40rpx;
  653. font-weight: 700;
  654. margin-right: 8rpx;
  655. }
  656. .data-unit {
  657. font-size: 24rpx;
  658. }
  659. .device-img {
  660. width: 52rpx;
  661. height: 52rpx;
  662. }
  663. }
  664. .card-thrid {
  665. color: #687a74;
  666. margin-top: 6rpx;
  667. }
  668. }
  669. }
  670. /* 设备详情页面 */
  671. .details-page {
  672. .device-params {
  673. background-color: #ffffff;
  674. border-radius: 16rpx;
  675. padding: 32rpx;
  676. margin-bottom: 24rpx;
  677. .device-control {
  678. position: relative;
  679. z-index: 3;
  680. display: flex;
  681. align-items: center;
  682. justify-content: space-between;
  683. margin-bottom: 24rpx;
  684. .control-left {
  685. color: #999999;
  686. font-family: 'Source Han Sans CN VF';
  687. font-size: 28rpx;
  688. display: flex;
  689. align-items: center;
  690. .reload-img {
  691. font-size: 32rpx;
  692. color: #0bbc58;
  693. margin-left: 14rpx;
  694. }
  695. }
  696. .control-right {
  697. display: flex;
  698. align-items: center;
  699. .control-img {
  700. width: 48rpx;
  701. height: 48rpx;
  702. margin-left: 24rpx;
  703. }
  704. }
  705. }
  706. .params-board {
  707. display: flex;
  708. justify-content: space-between;
  709. align-items: center;
  710. position: relative;
  711. .params-left {
  712. display: flex;
  713. flex-wrap: wrap;
  714. .params-item {
  715. display: flex;
  716. flex-direction: column;
  717. width: 100%;
  718. // width: calc(50% - 20rpx);
  719. margin-bottom: 24rpx;
  720. .params-val {
  721. color: #303133;
  722. font-size: 28rpx;
  723. font-weight: 700;
  724. }
  725. .params-label {
  726. color: #999999;
  727. font-size: 24rpx;
  728. font-weight: 400;
  729. }
  730. }
  731. }
  732. .params-right {
  733. position: absolute;
  734. right: 0;
  735. top:0;
  736. .device-img {
  737. width: 150rpx;
  738. height: 300rpx;
  739. }
  740. }
  741. }
  742. }
  743. .table-container {
  744. padding: 16rpx 32rpx 32rpx 32rpx;
  745. border-radius: 16rpx;
  746. background: #fff;
  747. .table-control {
  748. display: flex;
  749. align-items: center;
  750. justify-content: space-between;
  751. margin-bottom: 16rpx;
  752. .title {
  753. color: #042118;
  754. font-family: 'Source Han Sans CN VF';
  755. font-size: 28rpx;
  756. font-style: normal;
  757. font-weight: 700;
  758. line-height: normal;
  759. }
  760. .date-board {
  761. display: flex;
  762. align-items: center;
  763. color: #020305;
  764. font-family: 'Source Han Sans CN VF';
  765. font-size: 24rpx;
  766. font-weight: 400;
  767. border-radius: 32rpx;
  768. background: #f1f4f8;
  769. padding: 16rpx 24rpx;
  770. .line {
  771. color: #656565;
  772. margin: 0 10rpx;
  773. }
  774. .date-icon {
  775. width: 32rpx;
  776. height: 32rpx;
  777. margin-left: 16rpx;
  778. }
  779. }
  780. }
  781. .table-wrap {
  782. display: flex;
  783. width: 100%;
  784. height: 788rpx;
  785. box-sizing: border-box;
  786. margin: 20rpx 0;
  787. color: #042118;
  788. font-family: 'Source Han Sans CN VF';
  789. font-size: 24rpx;
  790. font-style: normal;
  791. font-weight: 400;
  792. line-height: normal;
  793. .fixed-column {
  794. width: 250rpx;
  795. .table-cell {
  796. width: 100%;
  797. white-space: nowrap;
  798. }
  799. }
  800. .table-bg {
  801. width: 16rpx;
  802. background: linear-gradient(270deg, #ffffff33 0%, #9598a433 100%);
  803. }
  804. .scroll-column {
  805. flex: 1;
  806. height: auto;
  807. overflow: hidden;
  808. margin-left: -10rpx;
  809. }
  810. .scroll-content {
  811. min-width: 100%;
  812. width: fit-content;
  813. display: flex;
  814. flex-direction: column;
  815. .table-row {
  816. display: flex;
  817. .table-cell {
  818. flex: 1;
  819. }
  820. }
  821. }
  822. .table-cell {
  823. width: 160rpx;
  824. height: 80rpx;
  825. line-height: 80rpx;
  826. text-align: center;
  827. border-bottom: 2px solid #e4e7ed;
  828. box-sizing: border-box;
  829. overflow: hidden;
  830. padding: 0 4rpx;
  831. text-overflow: ellipsis;
  832. }
  833. .table-cell.header {
  834. background: #f6f8fc;
  835. }
  836. }
  837. .pagination {
  838. display: flex;
  839. align-items: center;
  840. justify-content: space-between;
  841. margin-top: 24rpx;
  842. .page-item {
  843. width: 104rpx;
  844. height: 48rpx;
  845. color: #656565;
  846. font-size: 24rpx;
  847. line-height: 48rpx;
  848. text-align: center;
  849. border: 2rpx solid #e4e7ed;
  850. border-radius: 8rpx;
  851. }
  852. .prev.disabled {
  853. color: #c0c4cc;
  854. border-color: #e4e7ed;
  855. }
  856. .next {
  857. color: #0bbc58;
  858. border: 2px solid #0bbc58;
  859. }
  860. .next.disabled {
  861. color: #c0c4cc;
  862. border-color: #e4e7ed;
  863. }
  864. .page-info {
  865. color: #999999;
  866. font-family: 'Source Han Sans CN VF';
  867. font-size: 24rpx;
  868. font-style: normal;
  869. font-weight: 400;
  870. line-height: normal;
  871. .curret-page {
  872. color: #303133;
  873. }
  874. }
  875. }
  876. .empty-state {
  877. padding: 80rpx 0;
  878. }
  879. }
  880. }
  881. ::v-deep .u-calendar__action {
  882. display: flex;
  883. justify-content: center;
  884. }
  885. </style>