|
@@ -10,7 +10,11 @@
|
|
|
clearable
|
|
|
placeholder="请选择"
|
|
|
popper-class="select"
|
|
|
- @change="(stationId) => { Windturbines() }"
|
|
|
+ @change="
|
|
|
+ (stationId) => {
|
|
|
+ Windturbines();
|
|
|
+ }
|
|
|
+ "
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in ChangZhan"
|
|
@@ -24,7 +28,11 @@
|
|
|
<div class="query-item">
|
|
|
<div class="lable">机组:</div>
|
|
|
<div class="search-input">
|
|
|
- <el-select v-model="wtId" placeholder="请选择" popper-class="select">
|
|
|
+ <el-select
|
|
|
+ v-model="wtId"
|
|
|
+ placeholder="请选择"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in windturbines"
|
|
|
:key="item.id"
|
|
@@ -43,7 +51,12 @@
|
|
|
<div class="query-item">
|
|
|
<div class="lable">等级:</div>
|
|
|
<div class="search-input">
|
|
|
- <el-select v-model="level" clearable placeholder="请选择" popper-class="select">
|
|
|
+ <el-select
|
|
|
+ v-model="level"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in levelArray"
|
|
|
:key="item.id"
|
|
@@ -56,7 +69,12 @@
|
|
|
<div class="query-item">
|
|
|
<div class="lable">分类:</div>
|
|
|
<div class="search-input">
|
|
|
- <el-select v-model="partsId" clearable placeholder="请选择" popper-class="select">
|
|
|
+ <el-select
|
|
|
+ v-model="partsId"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in partsArray"
|
|
|
:key="item.id"
|
|
@@ -107,6 +125,8 @@
|
|
|
:data="tableData"
|
|
|
:pageSize="20"
|
|
|
@onPagging="onChangePage"
|
|
|
+ @sizeChange="sizeChange"
|
|
|
+ @pageClick="pageClick"
|
|
|
height="68vh"
|
|
|
v-loading="tableLoading"
|
|
|
element-loading-text="拼命加载中.."
|
|
@@ -132,28 +152,28 @@ export default {
|
|
|
levelArray: [
|
|
|
{
|
|
|
id: "",
|
|
|
- name: "请选择"
|
|
|
+ name: "请选择",
|
|
|
},
|
|
|
{
|
|
|
id: "1",
|
|
|
- name: "一级"
|
|
|
+ name: "一级",
|
|
|
},
|
|
|
{
|
|
|
id: "2",
|
|
|
- name: "二级"
|
|
|
+ name: "二级",
|
|
|
},
|
|
|
{
|
|
|
id: "3",
|
|
|
- name: "三级"
|
|
|
+ name: "三级",
|
|
|
},
|
|
|
{
|
|
|
id: "4",
|
|
|
- name: "四级"
|
|
|
+ name: "四级",
|
|
|
},
|
|
|
{
|
|
|
id: "5",
|
|
|
- name: "五级"
|
|
|
- }
|
|
|
+ name: "五级",
|
|
|
+ },
|
|
|
],
|
|
|
level: "",
|
|
|
partsArray: [],
|
|
@@ -172,7 +192,7 @@ export default {
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true,
|
|
|
- id: "id"
|
|
|
+ id: "id",
|
|
|
},
|
|
|
{
|
|
|
name: "机组",
|
|
@@ -180,7 +200,7 @@ export default {
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true,
|
|
|
- id: "id"
|
|
|
+ id: "id",
|
|
|
},
|
|
|
|
|
|
{
|
|
@@ -189,7 +209,7 @@ export default {
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true,
|
|
|
- id: "id"
|
|
|
+ id: "id",
|
|
|
},
|
|
|
{
|
|
|
name: "报警描述",
|
|
@@ -197,7 +217,7 @@ export default {
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true,
|
|
|
- id: "id"
|
|
|
+ id: "id",
|
|
|
},
|
|
|
{
|
|
|
name: "报警类别",
|
|
@@ -206,9 +226,9 @@ export default {
|
|
|
is_light: false,
|
|
|
sortable: true,
|
|
|
id: "id",
|
|
|
- template: function(row) {
|
|
|
+ template: function (row) {
|
|
|
return that.partsMap[row];
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
name: "报警等级",
|
|
@@ -216,12 +236,12 @@ export default {
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true,
|
|
|
- id: "id"
|
|
|
- }
|
|
|
+ id: "id",
|
|
|
+ },
|
|
|
],
|
|
|
data: [],
|
|
|
- currentPageTotal: 0
|
|
|
- }
|
|
|
+ currentPageTotal: 0,
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -245,7 +265,7 @@ export default {
|
|
|
success(res) {
|
|
|
that.ChangZhan = res.data;
|
|
|
that.stationId = res.data[0].id;
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
Windturbines() {
|
|
@@ -259,7 +279,7 @@ export default {
|
|
|
// that.wtId = res.data[0].id;
|
|
|
that.windturbines.unshift({ id: "", name: "请选择" });
|
|
|
that.wtId = "";
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
Parts() {
|
|
@@ -271,10 +291,10 @@ export default {
|
|
|
that.partsArray = res.data;
|
|
|
that.partsArray.unshift({ id: "", name: "请选择" });
|
|
|
that.partsId = "";
|
|
|
- res.data.forEach(ele => {
|
|
|
+ res.data.forEach((ele) => {
|
|
|
that.partsMap[ele.id] = ele.name;
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
getTable() {
|
|
@@ -294,7 +314,7 @@ export default {
|
|
|
keyword: this.alarmDesc,
|
|
|
windturbineid: this.wtId,
|
|
|
pagenum: this.pageIndex,
|
|
|
- pagesize: this.pageSize
|
|
|
+ pagesize: this.pageSize,
|
|
|
},
|
|
|
success(res) {
|
|
|
if (res.data) {
|
|
@@ -305,22 +325,32 @@ export default {
|
|
|
that.tableData.total = 0;
|
|
|
}
|
|
|
that.tableLoading = false;
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
onChangePage(params) {
|
|
|
this.pageIndex = params.pageIndex;
|
|
|
this.pageSize = params.pageSize;
|
|
|
this.getTable();
|
|
|
+ console.log("页码切换:", params);
|
|
|
+ },
|
|
|
+
|
|
|
+ sizeChange(res) {
|
|
|
+ console.log("每页数量:", res);
|
|
|
+ },
|
|
|
+
|
|
|
+ pageClick(res) {
|
|
|
+ console.log("页码:", res);
|
|
|
},
|
|
|
+
|
|
|
exportExcel() {
|
|
|
let excelData = this.BASE.deepCopy(this.tableData);
|
|
|
- excelData.data.forEach(ele => {
|
|
|
+ excelData.data.forEach((ele) => {
|
|
|
ele["category2"] = this.partsMap[ele["category2"]];
|
|
|
});
|
|
|
this.BASE.exportExcel(excelData, "SCADA报警");
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less">
|