| | |
| | | gap: 8px; |
| | | } |
| | | |
| | | .dl-picker-actions { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .dl-dialog-note { |
| | | margin-bottom: 14px; |
| | | font-size: 12px; |
| | | line-height: 1.6; |
| | | color: var(--dl-text-sub); |
| | | } |
| | | |
| | | .dl-dialog-form { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .dl-btn { |
| | | height: 34px; |
| | | padding: 0 14px; |
| | |
| | | <div class="dl-panel-desc">{{ selectedDay ? ('日志日期 ' + formatDayText(selectedDay) + ',先筛选设备类型,再点击一台设备进入状态查看页。') : '先从左侧选择一个日志日期。' }}</div> |
| | | </div> |
| | | <div class="dl-panel-body"> |
| | | <div class="dl-picker-actions"> |
| | | <button type="button" class="dl-btn is-ghost" @click="openSystemLogDialog" :disabled="!selectedDay">下载系统日志</button> |
| | | </div> |
| | | <div class="dl-picker-toolbar"> |
| | | <div class="dl-type-tabs"> |
| | | <button |
| | |
| | | 当前日期 |
| | | <strong>{{ selectedDay ? formatDayText(selectedDay) : '未选择' }}</strong> |
| | | </div> |
| | | <div class="dl-device-search" style="margin-bottom: 0;"> |
| | | <div class="dl-device-search" style="margin-bottom: 0; display: flex; flex-direction: column; gap: 8px;"> |
| | | <el-input |
| | | v-model.trim="searchDeviceNo" |
| | | size="small" |
| | | clearable |
| | | placeholder="按设备编号筛选"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | <el-input |
| | | v-model.trim="searchStationId" |
| | | size="small" |
| | | clearable |
| | | placeholder="按站点编号筛选"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </div> |
| | |
| | | <button |
| | | v-else |
| | | v-for="device in filteredDevices" |
| | | :key="buildDeviceKey(device.type, device.deviceNo)" |
| | | :key="buildDeviceKey(device.type, device.deviceNo, device.stationId)" |
| | | type="button" |
| | | class="dl-device-item" |
| | | @click="selectDevice(device)"> |
| | | <div class="dl-device-name"> |
| | | <span>{{ device.deviceNo }} 号{{ device.typeLabel }}</span> |
| | | <span>{{ device.deviceNo }} 号{{ device.typeLabel }}<template v-if="device.type === 'Devp' && device.stationId"> · 站点 {{ device.stationId }}</template></span> |
| | | <span class="dl-device-badge">{{ device.fileCount }} 文件</span> |
| | | </div> |
| | | <div class="dl-device-meta"> |
| | | <span>首条: {{ formatTimestamp(device.firstTime, false) }}</span> |
| | | <span>末条: {{ formatTimestamp(device.lastTime, false) }}</span> |
| | | <span v-if="device.type === 'Devp' && device.stationIds && device.stationIds.length">站点数: {{ device.stationIds.length }}</span> |
| | | <span v-if="device.type === 'Devp' && device.matchedStationId">命中站点: {{ device.matchedStationId }}</span> |
| | | <span v-else-if="device.type === 'Devp' && device.matchedStationIds && device.matchedStationIds.length > 1">命中 {{ device.matchedStationIds.length }} 个站点</span> |
| | | </div> |
| | | </button> |
| | | </div> |
| | |
| | | <div class="dl-viewer-header-main"> |
| | | <button type="button" class="dl-btn is-ghost" @click="returnToSelector">返回筛选</button> |
| | | <div class="dl-viewer-copy"> |
| | | <div class="dl-panel-title">{{ selectedDeviceSummary ? (selectedDeviceSummary.typeLabel + ' ' + selectedDeviceSummary.deviceNo + '号') : '设备状态查看' }}</div> |
| | | <div class="dl-panel-desc">{{ selectedDay ? ('日志日期 ' + formatDayText(selectedDay)) : '请选择日期和设备' }}</div> |
| | | <div class="dl-panel-title">{{ selectedDeviceSummary ? (selectedDeviceSummary.typeLabel + ' ' + selectedDeviceSummary.deviceNo + '号' + ((selectedDeviceSummary.type === 'Devp' && selectedStationLabel) ? (' · 站点 ' + selectedStationLabel) : '')) : '设备状态查看' }}</div> |
| | | <div class="dl-panel-desc">{{ selectedDay ? ('日志日期 ' + formatDayText(selectedDay)) : '请选择日期和设备' }}<template v-if="selectedType === 'Devp' && selectedStationId === '' && selectedStationLabel"> · 当前仅按站点定位展示设备实时状态,未绑定单站点日志文件</template></div> |
| | | <div v-if="selectedDeviceSummary" class="dl-viewer-meta"> |
| | | <span class="dl-viewer-meta-item">类型 <strong>{{ selectedDeviceSummary.typeLabel }}</strong></span> |
| | | <span v-if="selectedDeviceSummary.type === 'Devp' && selectedStationLabel" class="dl-viewer-meta-item">站点 <strong>{{ selectedStationLabel }}</strong></span> |
| | | <span class="dl-viewer-meta-item">文件 <strong>{{ selectedDeviceSummary.fileCount }}</strong></span> |
| | | <span class="dl-viewer-meta-item">已载 <strong>{{ loadedSegmentCount }}</strong></span> |
| | | <span class="dl-viewer-meta-item">范围 <strong>{{ timelineRangeText }}</strong></span> |
| | |
| | | </section> |
| | | </div> |
| | | |
| | | <el-dialog title="下载系统日志" :visible.sync="systemLogDialogVisible" width="520px"> |
| | | <div class="dl-dialog-note">请选择日志类型和时间范围,然后下载指定时间段内的系统日志。</div> |
| | | <div class="dl-dialog-form"> |
| | | <el-select v-model="systemLogType" size="small" placeholder="日志类型"> |
| | | <el-option label="info.log" value="info"></el-option> |
| | | <el-option label="error.log" value="error"></el-option> |
| | | </el-select> |
| | | <el-date-picker |
| | | v-model="systemLogRange" |
| | | size="small" |
| | | type="datetimerange" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" @click="systemLogDialogVisible = false">取消</el-button> |
| | | <el-button size="small" type="primary" @click="handleSystemLogDownload" :disabled="!canDownloadSystemLog">下载</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :title="downloadDialogTitle" :visible.sync="downloadDialogVisible" width="400px" :close-on-click-modal="false" :show-close="false"> |
| | | <div style="padding: 10px;"> |
| | | <div style="margin-bottom: 5px; font-size: 14px;">压缩生成进度</div> |