|
|
|
@ -2,14 +2,18 @@
|
|
|
|
|
<div class="sys-tenant-container">
|
|
|
|
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
|
|
|
|
<el-form :model="state.queryParams" ref="queryForm" :inline="true">
|
|
|
|
|
<el-form-item label="设备编码">
|
|
|
|
|
<el-input v-model="state.queryParams.equipCode" placeholder="请输入" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<label class="label"> {{$t('message.un_repair_info.Device_code')}}:</label>
|
|
|
|
|
<el-input v-model="state.queryParams.equipCode" :placeholder="$t('message.un_repair_info.Please_enter')" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item :label="$t('message.un_repair_info.Device_code')">
|
|
|
|
|
<el-input v-model="state.queryParams.equipCode" :placeholder="$t('message.un_repair_info.Please_enter')" clearable />
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="ele-Search" @click="handleQuery"> 查询 </el-button>
|
|
|
|
|
<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
|
|
|
|
|
<el-button icon="ele-FolderOpened" @click="handleExport"> 导出 </el-button>
|
|
|
|
|
<el-button type="primary" icon="ele-Search" @click="handleQuery"> {{$t('message.un_repair_info.Querying')}} </el-button>
|
|
|
|
|
<el-button icon="ele-Refresh" @click="resetQuery"> {{$t('message.un_repair_info.Reset')}} </el-button>
|
|
|
|
|
<el-button icon="ele-FolderOpened" @click="handleExport"> {{$t('message.un_repair_info.Export')}} </el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
@ -21,21 +25,21 @@
|
|
|
|
|
|
|
|
|
|
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
|
|
|
|
<el-table :data="state.tenantData" style="width: 100%" v-loading="state.loading" border ref="tableRef" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="index" label="序号" width="55" align="center" fixed />
|
|
|
|
|
<el-table-column label="设备类型编码" align="center" show-overflow-tooltip>
|
|
|
|
|
<el-table-column type="index" :label="$t('message.un_repair_info.Serial_number')" width="55" align="center" fixed />
|
|
|
|
|
<el-table-column :label="$t('message.un_repair_info.Device_type_encoding')" align="center" show-overflow-tooltip>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag v-if="scope.row.equipTypeCode === 0"> 充电机 </el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.equipTypeCode === 0"> {{$t('message.un_repair_info.Electric_charging_machine')}} </el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.equipTypeCode === 3"> PLC </el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.equipTypeCode === 4"> BMS电池 </el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.equipTypeCode === 4"> {{$t('message.un_repair_info.BMS_battery')}} </el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="equipCode" label="设备编码" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="errorCode" label="报警编码" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="errorLevel" label="报警等级" align="center" header-align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="errorMsg" label="报警描述" align="center" header-align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="processMethod" label="处理方法" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="startTime" label="开始时间" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="processTime" label="处理时间" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="equipCode" :label="$t('message.un_repair_info.Device_code')" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="errorCode" :label="$t('message.un_repair_info.Alarm_code')" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="errorLevel" :label="$t('message.un_repair_info.Alarm_level')" align="center" header-align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="errorMsg" :label="$t('message.un_repair_info.Alarm_description')" align="center" header-align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="processMethod" :label="$t('message.un_repair_info.Processing_method')" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="startTime" :label="$t('message.un_repair_info.Start_time')" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="processTime" :label="$t('message.un_repair_info.Processing_time')" align="center" show-overflow-tooltip />
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-pagination
|
|
|
|
|
v-model:currentPage="state.tableParams.pageNum"
|
|
|
|
@ -60,7 +64,8 @@ import { downloadByData, getFileName } from '/@/utils/download';
|
|
|
|
|
import { getAPI } from '/@/utils/axios-utils';
|
|
|
|
|
|
|
|
|
|
import { SysEquipAlarmLogApi } from '/@/api-services/api'; //zz
|
|
|
|
|
|
|
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
|
const { t } = useI18n();
|
|
|
|
|
const tableRef = ref<RefType>();
|
|
|
|
|
|
|
|
|
|
const state = reactive({
|
|
|
|
@ -104,7 +109,8 @@ const handleExport = async () => {
|
|
|
|
|
let params = {};
|
|
|
|
|
const response = await getAPI(SysEquipAlarmLogApi).apiExportEquipAlarmProcessRecordPost(params, { responseType: 'blob' });
|
|
|
|
|
// var fileName = getFileName(response.headers);
|
|
|
|
|
var fileName = '设备已处理故障日志表.xlsx';
|
|
|
|
|
var fileName = t('message.un_repair_info.The_device_has_been_processed_failure_log_table');
|
|
|
|
|
// var fileName = '设备已处理故障日志表.xlsx';
|
|
|
|
|
downloadByData(response.data as any, fileName);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|