|
|
@ -128,7 +128,7 @@ export default { |
|
|
|
|
|
|
|
this.searchData.eventState = activeName == "-1" ? null : activeName; |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
this.getData(activeName); |
|
|
|
}, |
|
|
|
getStateCardBind(item) { |
|
|
|
const { state, textColor, text } = tabMap[this.activeName]; |
|
|
@ -140,15 +140,29 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
request({ |
|
|
|
url: `/dc/system/event/list`, |
|
|
|
method: "get", |
|
|
|
params: this.searchData, |
|
|
|
}).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
this.data = result.rows; |
|
|
|
this.total = result.total; |
|
|
|
}); |
|
|
|
|
|
|
|
if (this.activeName == '-1') { |
|
|
|
request({ |
|
|
|
url: `/perceivedEvents/warning/perceivedEventsList`, |
|
|
|
method: "post", |
|
|
|
data: this.searchData, |
|
|
|
}).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
this.data = result.rows; |
|
|
|
this.total = result.total; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
request({ |
|
|
|
url: `/dc/system/event/list`, |
|
|
|
method: "get", |
|
|
|
params: this.searchData, |
|
|
|
}).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
this.data = result.rows; |
|
|
|
this.total = result.total; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// request({ |
|
|
|
// url: `/dc/system/event/count`, |
|
|
|