增加时间戳转换,修改各页面的布局

This commit is contained in:
Ran_Chen
2025-04-16 10:15:58 +08:00
parent f2f66579cb
commit 8667a9680e
4 changed files with 24 additions and 20 deletions
@@ -115,8 +115,8 @@ export default {
activeSearchKeyword: "",
currentAgentId: this.$route.query.agentId || '',
currentPage: 1,
pageSize: 5,
pageSizeOptions: [5, 10, 20, 50, 100],
pageSize: 10,
pageSizeOptions: [10, 20, 50, 100],
deviceList: [],
loading: false,
userApi: null,
@@ -283,13 +283,18 @@ export default {
this.deviceList = data.data.map(device => {
const bindDate = new Date(device.createDate);
const formattedBindTime = `${bindDate.getFullYear()}-${(bindDate.getMonth() + 1).toString().padStart(2, '0')}-${bindDate.getDate().toString().padStart(2, '0')} ${bindDate.getHours().toString().padStart(2, '0')}:${bindDate.getMinutes().toString().padStart(2, '0')}:${bindDate.getSeconds().toString().padStart(2, '0')}`;
let formattedLastConversation = '';
if (device.lastConnectedAt) {
const lastConvoDate = new Date(device.lastConnectedAt);
formattedLastConversation = `${lastConvoDate.getFullYear()}-${(lastConvoDate.getMonth() + 1).toString().padStart(2, '0')}-${lastConvoDate.getDate().toString().padStart(2, '0')} ${lastConvoDate.getHours().toString().padStart(2, '0')}:${lastConvoDate.getMinutes().toString().padStart(2, '0')}:${lastConvoDate.getSeconds().toString().padStart(2, '0')}`;
}
return {
device_id: device.id,
model: device.board,
firmwareVersion: device.appVersion,
macAddress: device.macAddress,
bindTime: formattedBindTime,
lastConversation: device.lastConnectedAt,
lastConversation: formattedLastConversation,
remark: device.alias,
isEdit: false,
otaSwitch: device.autoUpdate === 1,
@@ -331,7 +336,7 @@ export default {
.main-wrapper {
margin: 5px 22px;
border-radius: 15px;
min-height: calc(100vh - 200px);
min-height: calc(100vh - 24vh);
height: auto;
max-height: 80vh;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
@@ -628,12 +633,12 @@ export default {
flex: 1;
display: flex;
flex-direction: column;
max-height: calc(100vh - 330px);
max-height: calc(100vh - 40vh);
}
:deep(.el-table__body-wrapper) {
flex: 1;
overflow: auto;
overflow-y: auto;
max-height: none !important;
}
+3 -4
View File
@@ -152,7 +152,7 @@ export default {
ttsDialogVisible: false,
selectedTtsModelId: '',
modelList: [],
pageSizeOptions: [5, 10, 20, 50, 100],
pageSizeOptions: [10, 20, 50, 100],
currentPage: 1,
pageSize: 10,
total: 0,
@@ -461,7 +461,7 @@ export default {
.main-wrapper {
margin: 5px 22px;
border-radius: 15px;
min-height: calc(100vh - 235px);
min-height: calc(100vh - 24vh);
height: auto;
max-height: 80vh;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
@@ -656,7 +656,6 @@ export default {
}
.table-footer {
margin-top: 24px;
display: flex;
justify-content: space-between;
align-items: center;
@@ -904,7 +903,7 @@ export default {
}
.data-table {
--table-max-height: calc(100vh - 450px);
--table-max-height: calc(100vh - 45vh);
max-height: var(--table-max-height);
}
@@ -92,8 +92,8 @@ export default {
searchCode: "",
paramsList: [],
currentPage: 1,
pageSize: 5,
pageSizeOptions: [5, 10, 20, 50, 100],
pageSize: 10,
pageSizeOptions: [10, 20, 50, 100],
total: 0,
dialogVisible: false,
dialogTitle: "新增参数",
@@ -330,7 +330,7 @@ export default {
.main-wrapper {
margin: 5px 22px;
border-radius: 15px;
min-height: calc(100vh - 350px);
min-height: calc(100vh - 24vh);
height: auto;
max-height: 80vh;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
@@ -516,7 +516,7 @@ export default {
flex-direction: column;
.el-table__body-wrapper {
flex: 1;
overflow: auto;
overflow-y: auto;
max-height: none !important;
}
@@ -649,7 +649,7 @@ export default {
}
.el-table {
--table-max-height: calc(100vh - 400px);
--table-max-height: calc(100vh - 40vh);
max-height: var(--table-max-height);
.el-table__body-wrapper {
@@ -99,9 +99,9 @@ export default {
currentPassword: "",
searchPhone: "",
userList: [],
pageSizeOptions: [5, 10, 20, 50, 100],
pageSizeOptions: [10, 20, 50, 100],
currentPage: 1,
pageSize: 5,
pageSize: 10,
total: 0,
isAllSelected: false
};
@@ -355,7 +355,7 @@ export default {
.main-wrapper {
margin: 5px 22px;
border-radius: 15px;
min-height: calc(100vh - 350px);
min-height: calc(100vh - 24vh);
height: auto;
max-height: 80vh;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
@@ -557,7 +557,7 @@ export default {
flex-direction: column;
.el-table__body-wrapper {
flex: 1;
overflow: auto;
overflow-y: auto;
max-height: none !important;
}
@@ -674,7 +674,7 @@ export default {
}
.el-table {
--table-max-height: calc(100vh - 400px);
--table-max-height: calc(100vh - 40vh);
max-height: var(--table-max-height);
.el-table__body-wrapper {