|
@@ -32,7 +32,7 @@
|
|
</div>
|
|
</div>
|
|
<div style="display: flex; flex-direction: row; margin-bottom: 10px">
|
|
<div style="display: flex; flex-direction: row; margin-bottom: 10px">
|
|
<el-select
|
|
<el-select
|
|
- v-if="!isStation"
|
|
|
|
|
|
+ v-if="isStation"
|
|
v-model="query.stationId"
|
|
v-model="query.stationId"
|
|
clearable
|
|
clearable
|
|
size="mini"
|
|
size="mini"
|
|
@@ -89,69 +89,34 @@
|
|
stripe
|
|
stripe
|
|
height="calc(100% - 43px)"
|
|
height="calc(100% - 43px)"
|
|
>
|
|
>
|
|
- <el-table-column label="序列号" align="center" prop="id" />
|
|
|
|
- <el-table-column label="统一编码" align="center" prop="uniformCode">
|
|
|
|
- <template #default="scope">{{
|
|
|
|
- // ednaValueConvert(scope.row.ednaValue)
|
|
|
|
- scope.row.uniformCode
|
|
|
|
- }}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="描述"
|
|
|
|
- align="left"
|
|
|
|
- prop="description"
|
|
|
|
- width="180"
|
|
|
|
- />
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="停机类型"
|
|
|
|
- align="center"
|
|
|
|
- prop="characteristic"
|
|
|
|
- />
|
|
|
|
- <el-table-column label="风机型号" align="center" prop="modelId">
|
|
|
|
- <template #default="{ row }">
|
|
|
|
- {{ row.modelId ? row.modelId : "--" }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="报警类型" align="center" prop="alarmTypeName">
|
|
|
|
- <template #default="{ row }">
|
|
|
|
- {{ row.alarmTypeName ? row.alarmTypeName : "--" }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="故障编码" align="center" prop="nemCode">
|
|
|
|
- <template #default="{ row }">
|
|
|
|
- {{ row.nemCode ? row.nemCode : "--" }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="报警级别" align="center">
|
|
|
|
- <template #default="scope">{{
|
|
|
|
- levelIdConvert(scope.row.rank)
|
|
|
|
- }}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="报警分类" align="center" min-width="50">
|
|
|
|
- <template #default="scope">{{
|
|
|
|
- warningClassIfyIdConvert(scope.row.deviceType)
|
|
|
|
- }}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="是否可以复位" align="center" min-width="50">
|
|
|
|
- <template #default="scope">{{
|
|
|
|
- scope.row.resetTable ? "是" : "否"
|
|
|
|
- }}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="是否启用" align="center" min-width="50">
|
|
|
|
- <template #default="scope">{{
|
|
|
|
- scope.row.enabled == 1 ? "是" : "否"
|
|
|
|
- }}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="关联部件"
|
|
|
|
- align="center"
|
|
|
|
- min-width="50"
|
|
|
|
- prop="componentsName"
|
|
|
|
|
|
+ v-for="item in state.tableHeader"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :prop="item.prop"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :align="item.align"
|
|
|
|
+ header-align="center"
|
|
|
|
+ :width="item.width"
|
|
|
|
+ :min-width="item.minWidth"
|
|
|
|
+ show-overflow-tooltip
|
|
>
|
|
>
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
- {{ row.componentsName ? row.componentsName : "--" }}
|
|
|
|
|
|
+ <span v-if="item.prop == 'rank'">
|
|
|
|
+ {{ levelIdConvert(row.rank) }}</span
|
|
|
|
+ >
|
|
|
|
+ <span v-else-if="item.prop == 'deviceType'">
|
|
|
|
+ {{ warningClassIfyIdConvert(row.deviceType) }}</span
|
|
|
|
+ >
|
|
|
|
+ <span v-else-if="item.prop == 'resetTable'">
|
|
|
|
+ {{ row.resetTable ? "是" : "否" }}</span
|
|
|
|
+ >
|
|
|
|
+ <span v-else-if="item.prop == 'enabled'">
|
|
|
|
+ {{ row.enabled == 1 ? "是" : "否" }}</span
|
|
|
|
+ >
|
|
|
|
+ <span v-else>{{ row[item.prop] ? row[item.prop] : "--" }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+
|
|
|
|
|
|
<el-table-column label="操作" align="center" width="100">
|
|
<el-table-column label="操作" align="center" width="100">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
@@ -216,6 +181,30 @@ const state = reactive({
|
|
modelList: [],
|
|
modelList: [],
|
|
visible: false,
|
|
visible: false,
|
|
form: {},
|
|
form: {},
|
|
|
|
+ tableHeader: [
|
|
|
|
+ { label: "序列号", prop: "id", align: "center" },
|
|
|
|
+ { label: "统一编码", prop: "uniformCode", align: "center" },
|
|
|
|
+ { label: "描述", prop: "description", align: "left", width: 180 },
|
|
|
|
+ { label: "停机类型", prop: "characteristic", align: "center" },
|
|
|
|
+ { label: "风机型号", prop: "modelId", align: "center" },
|
|
|
|
+ { label: "报警类型", prop: "alarmTypeName", align: "center" },
|
|
|
|
+ { label: "故障编码", prop: "nemCode", align: "center" },
|
|
|
|
+ { label: "报警级别", prop: "rank", align: "center" },
|
|
|
|
+ { label: "报警分类", prop: "deviceType", align: "center", minWidth: 50 },
|
|
|
|
+ {
|
|
|
|
+ label: "是否可以复位",
|
|
|
|
+ prop: "resetTable",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 50,
|
|
|
|
+ },
|
|
|
|
+ { label: "是否启用", prop: "enabled", align: "center", minWidth: 50 },
|
|
|
|
+ {
|
|
|
|
+ label: "关联部件",
|
|
|
|
+ prop: "componentsName",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 50,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
});
|
|
});
|
|
const query = reactive({
|
|
const query = reactive({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -263,7 +252,7 @@ const getequipmentmodel_list = async () => {
|
|
};
|
|
};
|
|
// 分页导航
|
|
// 分页导航
|
|
const handlePageChange = (val) => {
|
|
const handlePageChange = (val) => {
|
|
- query.pagenum = val;
|
|
|
|
|
|
+ query.pageNum = val;
|
|
getData();
|
|
getData();
|
|
};
|
|
};
|
|
|
|
|
|
@@ -310,17 +299,27 @@ const tableKey = [
|
|
];
|
|
];
|
|
// 批量导出
|
|
// 批量导出
|
|
const export2Excel = async () => {
|
|
const export2Excel = async () => {
|
|
- let { name, stationId, modelId } = query;
|
|
|
|
const res = await windturbinebj_fetchTableData({
|
|
const res = await windturbinebj_fetchTableData({
|
|
|
|
+ ...query,
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 999999,
|
|
pageSize: 999999,
|
|
- name,
|
|
|
|
- stationId,
|
|
|
|
- modelId,
|
|
|
|
});
|
|
});
|
|
|
|
|
|
- ElMessage.success(`导出成功!`);
|
|
|
|
- outExportExcel(tableHeader, tableKey, res.records, "风机报警配置导出excel");
|
|
|
|
|
|
+ outExportExcel(
|
|
|
|
+ state.tableHeader.map((item) => item.label),
|
|
|
|
+ state.tableHeader.map((item) => item.prop),
|
|
|
|
+ res.data.records.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ rank: levelIdConvert(item.rank),
|
|
|
|
+ alarmTypeName: warningClassIfyIdConvert(item.alarmType),
|
|
|
|
+ deviceType: warningClassIfyIdConvert(item.deviceType),
|
|
|
|
+ enabled: item.enabled == 1 ? "是" : "否",
|
|
|
|
+ resetTable: item.resetTable ? "是" : "否",
|
|
|
|
+ };
|
|
|
|
+ }),
|
|
|
|
+ "设备报警配置导出excel"
|
|
|
|
+ );
|
|
};
|
|
};
|
|
// 模板下载
|
|
// 模板下载
|
|
const outExe = () => {
|
|
const outExe = () => {
|
|
@@ -357,8 +356,8 @@ const levelIdConvert = (val) => {
|
|
// 报警分类
|
|
// 报警分类
|
|
const warningClassIfyIdConvert = (val) => {
|
|
const warningClassIfyIdConvert = (val) => {
|
|
switch (val) {
|
|
switch (val) {
|
|
- case "station":
|
|
|
|
- return "场站";
|
|
|
|
|
|
+ case "interver":
|
|
|
|
+ return "光伏";
|
|
case "windturbine":
|
|
case "windturbine":
|
|
return "风机";
|
|
return "风机";
|
|
case "booststation":
|
|
case "booststation":
|