| | |
| | | import SiteDetail from '@/views/line_graph/components/SiteDetail.vue' |
| | | import { useLoadingStore } from '@/stores/loadingStore'; |
| | | import { mapStores } from 'pinia'; |
| | | import riskApi from '@/api/risk/riskApi.js'; |
| | | import riskValue from '@/utils/risk_estimate_common_function/riskValue.js'; |
| | | export default { |
| | | components: { |
| | | AreaAndmonitorType, |
| | |
| | | this.tableHeight = `calc(100vh - ${h1}px - 40px - 40px - var(--el-main-padding) * 2` |
| | | }, |
| | | // 点击风险排名按钮 |
| | | fetchData() { |
| | | // fetchData() { |
| | | // this.loading = true |
| | | // this.queryButton = true |
| | | // exceptionApi |
| | | // .analysisdataByType(this.form.month, 'month') |
| | | // .then((response) => { |
| | | // this.chartData = response.data.data |
| | | // this.queryButton = false |
| | | // this.isNoData = false |
| | | |
| | | // if (response.data.data.length == 0) { |
| | | // this.isNoData = true |
| | | // return |
| | | // } |
| | | |
| | | // exceptionApi |
| | | // .exceptiondata1({ |
| | | // siteName: '', |
| | | // beginTime: this.form.beginTime, |
| | | // endTime: this.form.endTime |
| | | // }) |
| | | // .then((res) => { |
| | | // this.isNoData = false |
| | | |
| | | // this.table = index.merge( |
| | | // this.chartData, |
| | | // res.data.data, |
| | | // this.form.beginTime, |
| | | // this.form.endTime |
| | | // ) |
| | | // this.loading = false |
| | | |
| | | // this.$nextTick(()=>{ |
| | | // this.$refs.table.sort('riskValue','descending') |
| | | |
| | | // }) |
| | | |
| | | // }) |
| | | |
| | | // }) |
| | | // }, |
| | | |
| | | // 点击风险排名按钮 |
| | | fetchData() { |
| | | this.loading = true |
| | | this.queryButton = true |
| | | exceptionApi |
| | | .analysisdataByType(this.form.month, 'month') |
| | | riskApi |
| | | .queryRiskValue('',this.form.month, 'month') |
| | | .then((response) => { |
| | | this.chartData = response.data.data |
| | | this.queryButton = false |
| | | this.isNoData = false |
| | | |
| | | if (response.data.data.length == 0) { |
| | | this.isNoData = true |
| | | return |
| | | } |
| | | |
| | | exceptionApi |
| | | .exceptiondata1({ |
| | | siteName: '', |
| | | beginTime: this.form.beginTime, |
| | | endTime: this.form.endTime |
| | | }) |
| | | .then((res) => { |
| | | this.isNoData = false |
| | | |
| | | this.table = index.merge( |
| | | this.chartData, |
| | | res.data.data, |
| | | this.form.beginTime, |
| | | this.form.endTime |
| | | ) |
| | | this.loading = false |
| | | |
| | | this.table = riskValue.calMonthlyRiskValue(response.data.data) |
| | | this.queryButton = false |
| | | this.isNoData = false |
| | | this.$nextTick(()=>{ |
| | | this.$refs.table.sort('riskValue','descending') |
| | | |
| | | }) |
| | | |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 初始加载函数 |