diff --git a/frontend/src/api/device/error/errorData.ts b/frontend/src/api/device/error/errorData.ts index e78e39f..3d4f5c3 100644 --- a/frontend/src/api/device/error/errorData.ts +++ b/frontend/src/api/device/error/errorData.ts @@ -67,14 +67,14 @@ const errordata = ref([ maxErrorValue: '±1%' }, { - measured: '电压波动幅值', + measured: '电压波动/电压幅值', deviceLevel: 'A', measurementType:'电压', condition: '', maxErrorValue: '±0.2%Un' }, { - measured: '电压波动持续时间', + measured: '电压波动/持续时间', deviceLevel: 'A', measurementType:'时间', condition: '', @@ -193,14 +193,14 @@ const errordata = ref([ maxErrorValue: '±1%' }, { - measured: '暂态电压幅值', + measured: '电压暂降、电压暂升和短时中断/电压幅值', deviceLevel: 'A', measurementType:'电压', condition: '', maxErrorValue: '±0.2%Un' }, { - measured: '暂态持续时间', + measured: '电压暂降、电压暂升和短时中断/持续时间', deviceLevel: 'A', measurementType:'时间', condition: '', diff --git a/frontend/src/components/TimeControl/index.vue b/frontend/src/components/TimeControl/index.vue index 1f27f4d..a4a2813 100644 --- a/frontend/src/components/TimeControl/index.vue +++ b/frontend/src/components/TimeControl/index.vue @@ -126,6 +126,15 @@ const handleChange = (unit: string) => { endDate.value = new Date() } timeUnit.value = unit + + // 确保开始时间和结束时间不为空 + if (!startDate.value) { + startDate.value = new Date() + } + if (!endDate.value) { + endDate.value = new Date() + } + emitDateChange() // 变化时也发出更新事件 updateNextButtonStatus() } @@ -172,7 +181,13 @@ const updateDateRange = () => { // endDate.value.setHours(23, 59, 59, 999); // 设置结束时间为今天的23:59:59.999 // } } - + // 确保开始时间和结束时间不为空 + if (!startDate.value) { + startDate.value = new Date() + } + if (!endDate.value) { + endDate.value = new Date() + } updateNextButtonStatus() } @@ -285,7 +300,10 @@ const disableEndDate = (date: Date) => { // 格式化日期yyyy-mm-dd -function formatDate(date:Date) { +function formatDate(date: Date | null): string { + if (!date) { + return ''; + } const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0'); diff --git a/frontend/src/views/authority/role/index.vue b/frontend/src/views/authority/role/index.vue index fdd3906..9c9c85f 100644 --- a/frontend/src/views/authority/role/index.vue +++ b/frontend/src/views/authority/role/index.vue @@ -91,6 +91,22 @@ const columns = reactive[]>([ search: { el: 'input' }, minWidth: 200, }, + { + prop: 'type', + label: '类型', + minWidth: 200, + render: (scope) => { + const typeMap: { [key: number]: { label: string; type: string } } = { + 0: { label: '超级管理员', type: 'primary' }, + 1: { label: '管理员角色', type: 'success' }, + 2: { label: '普通角色', type: 'info' }, + }; + const typeInfo = typeMap[scope.row.type] || { label: '未知', type: 'danger' }; + return ( + {typeInfo.label} + ); + }, + }, { prop: 'remark', label: '描述', diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue index f833eda..f980abb 100644 --- a/frontend/src/views/machine/device/components/devicePopup.vue +++ b/frontend/src/views/machine/device/components/devicePopup.vue @@ -2,8 +2,8 @@ -
- +
+ 设备信息 diff --git a/frontend/src/views/machine/device/components/monitorTab.vue b/frontend/src/views/machine/device/components/monitorTab.vue index 209b289..b2deb88 100644 --- a/frontend/src/views/machine/device/components/monitorTab.vue +++ b/frontend/src/views/machine/device/components/monitorTab.vue @@ -5,6 +5,7 @@ @@ -65,8 +63,9 @@ const spanMethod = ({ rowIndex, columnIndex, }: SpanMethodProps) => { + if (columnIndex === 0 ) { // 检查是否为第一列 - if (rowIndex === 2 || rowIndex === 21) { // 检查是否为第三行 + if (rowIndex === 2 ||rowIndex === 21) { // 检查是否为第三行 return { rowspan: 2, // 合并行数 colspan: 1, // 单元格列数 @@ -93,6 +92,37 @@ const spanMethod = ({ }; } } + if (columnIndex === 1 ){ + if (rowIndex === 2 + || rowIndex === 8|| rowIndex === 10|| rowIndex === 12|| rowIndex === 14 + || rowIndex === 16|| rowIndex === 18 + || rowIndex === 21) { + return { + rowspan: 2, + colspan: 1, + }; + } + else if (rowIndex === 3 + || rowIndex === 9|| rowIndex === 11|| rowIndex === 13|| rowIndex === 15 + || rowIndex === 17|| rowIndex === 19 + || rowIndex === 22) { // 检查是否为第四行 + return { + rowspan: 0, // 不显示该单元格 + colspan: 0, + }; + } + // if (rowIndex === 0 ) { + // return { + // rowspan: 25, + // colspan: 1, + // }; + // } else if (rowIndex != 0) { // 检查是否为第四行 + // return { + // rowspan: 0, // 不显示该单元格 + // colspan: 0, + // }; + // } + } else if(columnIndex === 2) { // 检查是否为第三列 if (rowIndex === 2 || rowIndex === 8|| rowIndex === 10|| rowIndex === 12|| rowIndex === 14 @@ -150,5 +180,11 @@ const props = defineProps<{ .notes-container { text-align: center; + width: 100%; /* 确保注释容器宽度与表格一致 */ +} + +.notes-container label { + display: block; /* 使每个label标签上下排列 */ + margin-bottom: 10px; /* 调整两个label之间的间距 */ } diff --git a/frontend/src/views/machine/errorSystem/components/errorSystemDetailTable.vue b/frontend/src/views/machine/errorSystem/components/errorSystemDetailTable.vue index 70730f6..98fb287 100644 --- a/frontend/src/views/machine/errorSystem/components/errorSystemDetailTable.vue +++ b/frontend/src/views/machine/errorSystem/components/errorSystemDetailTable.vue @@ -8,49 +8,51 @@ :header-cell-style="{ textAlign: 'center',backgroundColor: '#003078',color: '#fff' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" + :style="{ height: '250px',maxHeight: '400px',overflow:'hidden'}" @selection-change="handleSelectionChange" > - + - + - + @@ -74,7 +76,7 @@ - +