diff --git a/package-lock.json b/package-lock.json index 2bb4f8a..3f507de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,7 @@ "@types/signalr": "^2.4.3", "@types/three": "^0.162.0", "ag-grid-angular": "^31.0.2", + "autofit.js": "^3.1.0", "echarts": "^5.5.0", "moment": "^2.30.1", "mqtt": "^5.3.6", @@ -5615,6 +5616,11 @@ "dev": true, "license": "MIT" }, + "node_modules/autofit.js": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/autofit.js/-/autofit.js-3.1.0.tgz", + "integrity": "sha512-zX/2VbpxdDcgDDCT1A0psuF8Phs8QbmFXstvLkqrrOcv33LQttCh2J6GVs84585+LfMAfacemxRXIidrFXu02g==" + }, "node_modules/autoprefixer": { "version": "10.4.16", "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.16.tgz", diff --git a/package.json b/package.json index 1c6198c..afb20ac 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@types/signalr": "^2.4.3", "@types/three": "^0.162.0", "ag-grid-angular": "^31.0.2", + "autofit.js": "^3.1.0", "echarts": "^5.5.0", "moment": "^2.30.1", "mqtt": "^5.3.6", diff --git a/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.css b/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.css index 266fdf7..e257242 100644 --- a/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.css +++ b/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.css @@ -15,8 +15,8 @@ .chart-button { - width: 175px; -height: 51px; + width: 17rem; + height: 5; margin: 5px; font-size: 28px; line-height: 22px; @@ -29,4 +29,10 @@ height: 51px; background-size: contain; /* 或者可以使用 'contain' 根据你的需要 */ border-width: 0; } + + .chart-container { + width: 10rem; + height: 10rem; + } + \ No newline at end of file diff --git a/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.html b/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.html index adf5b20..0917fe1 100644 --- a/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.html +++ b/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.html @@ -1,6 +1,6 @@
-
+

{{ text }}

diff --git a/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.ts b/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.ts index 89e1aa2..c5a2e03 100644 --- a/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.ts +++ b/src/app/routes/data-v/lj-text-dashboard/lj-text-dashboard.component.ts @@ -2,7 +2,9 @@ import { CommonModule } from '@angular/common'; import { Component, Input, OnInit, ViewChild, inject } from '@angular/core'; import { ModalHelper, _HttpClient } from '@delon/theme'; import { SHARED_IMPORTS } from '@shared'; +import autofit from 'autofit.js'; import * as echarts from 'echarts'; + @Component({ selector: 'app-data-v-lj-text-dashboard', standalone: true, @@ -16,6 +18,13 @@ export class DataVLjTextDashboardComponent implements OnInit { ngOnInit(): void { // 使用 setTimeout 确保视图已经初始化 setTimeout(() => this.initCharts(), 0); + // autofit.init(); + // autofit.init({ + // dh: 1080, + // dw: 1920, + // el: 'body', + // resize: true + // }); } initCharts(): void { diff --git a/src/app/routes/data-v/second1/second1.component.html b/src/app/routes/data-v/second1/second1.component.html index 1e9b299..e489c6a 100644 --- a/src/app/routes/data-v/second1/second1.component.html +++ b/src/app/routes/data-v/second1/second1.component.html @@ -1,5 +1,5 @@
-
+
-
+ +
+ +
+ + + + + + +
+
+
+
+ Car Image +
+
+ Long Image +
+
+
车牌号: 苏E8888
+
卡车种类:重型火卡
+
重量:30吨
+
+
+
+
+ +
+
-
共1222 {{ pageRowTotal }} 项数据
+
共 {{ pageRowTotal }} 项数据
diff --git a/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.less b/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.less index 2386fb8..b10d4d7 100644 --- a/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.less +++ b/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.less @@ -2,6 +2,8 @@ @import 'ag-grid-community/styles/ag-grid.css'; @import 'ag-grid-community/styles/ag-theme-quartz.css'; + + .custom-label { display: inline-block; padding: 10px 20px; /* 内边距 */ @@ -32,3 +34,8 @@ width: 100%; height: 100%; } + +/* stylelint-disable-next-line selector-class-pattern */ +.paginationThemeClass{ + width: 100%; +} diff --git a/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.ts b/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.ts index bbcf95b..bc94f06 100644 --- a/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.ts +++ b/src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.ts @@ -24,7 +24,8 @@ export class LjAgGridComponentComponent implements OnInit { // }; gridOptions: GridOptions = { - headerHeight: 0 + headerHeight: 0, + suppressHorizontalScroll: false // columnDefs="columnDefs" }; @@ -120,6 +121,13 @@ export class LjAgGridComponentComponent implements OnInit { }; } //每页数 + onGridReady(params: any) { + console.log('onGridReady'); + console.log(params); + setTimeout(() => { + params.api.sizeColumnsToFit(); + }, 100); + } nzPageSizeChange(_pageSize: any) { this.pageSize = _pageSize; } diff --git a/src/assets/car-status-bg.png b/src/assets/car-status-bg.png new file mode 100644 index 0000000..600777c Binary files /dev/null and b/src/assets/car-status-bg.png differ diff --git a/src/assets/lock.svg b/src/assets/lock.svg new file mode 100644 index 0000000..6870397 --- /dev/null +++ b/src/assets/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/unLock.svg b/src/assets/unLock.svg new file mode 100644 index 0000000..aca8956 --- /dev/null +++ b/src/assets/unLock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 05d03f8..3bcfdb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2931,6 +2931,11 @@ asynckit@^0.4.0: resolved "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +autofit.js@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/autofit.js/-/autofit.js-3.1.0.tgz" + integrity sha512-zX/2VbpxdDcgDDCT1A0psuF8Phs8QbmFXstvLkqrrOcv33LQttCh2J6GVs84585+LfMAfacemxRXIidrFXu02g== + autoprefixer@10.4.16: version "10.4.16" resolved "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.16.tgz"