| | |
| | | |
| | | import DustRadarChart from '@/views/risk_assessment/components/DustRadarChart.vue' |
| | | import FYLineChart from '@/components/chart/FYLineChart.vue' |
| | | |
| | | import time from '@/utils/time.js' |
| | | import index from '@/utils/risk_estimate_common_function/index.js' |
| | | import ButtonClick from '@/sfc/ButtonClick.vue' |
| | | import dayjs from 'dayjs' |
| | |
| | | import riskValue from '@/utils/risk_estimate_common_function/riskValue.js' |
| | | import lineChart from '@/utils/chartFunction/lineChart.js' |
| | | import siteInfo from '@/api/site/siteInfo.js' |
| | | import CompDailyStatistic from '@/views/risk_assessment/riskModel/components/CompDailyStatistic.vue' |
| | | export default { |
| | | props: { |
| | | // 点位名字 |
| | |
| | | AreaAndmonitorType, |
| | | DustRadarChart, |
| | | ButtonClick, |
| | | MonthSelect |
| | | MonthSelect, |
| | | CompDailyStatistic |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // } |
| | | // }, |
| | | siteName() { |
| | | if(this.siteName!= ''){ |
| | | // 更新站点名字和时间 |
| | | this.form.name = this.siteName |
| | | this.screenLoading = true |
| | | siteInfo.queryMnCode(this.siteName).then((response) => { |
| | | this.form.number = response.data.data[0].mnCode |
| | | this.month = this.time |
| | | // 同时更新月起始时间 |
| | | this.form.beginTime = dayjs(this.month).startOf().format('YYYY-MM-DD HH:mm:ss') |
| | | this.form.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss') |
| | | if (this.siteName != '') { |
| | | // 更新站点名字和时间 |
| | | this.form.name = this.siteName |
| | | this.screenLoading = true |
| | | siteInfo.queryMnCode(this.siteName).then((response) => { |
| | | this.form.number = response.data.data[0].mnCode |
| | | this.month = this.time |
| | | // 同时更新月起始时间 |
| | | this.form.beginTime = dayjs(this.month).startOf().format('YYYY-MM-DD HH:mm:ss') |
| | | this.form.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss') |
| | | |
| | | // 更新该站点的所属场景和运维商 |
| | | this.getSiteInfo(this.form.number) |
| | | // 更新统计数据 |
| | | this.getAnalysisData() |
| | | // 计算风险值 |
| | | this.calRiskValue() |
| | | this.screenLoading = false |
| | | }) |
| | | // 更新该站点的所属场景和运维商 |
| | | this.getSiteInfo(this.form.number) |
| | | // 更新统计数据 |
| | | this.getAnalysisData() |
| | | // 计算风险值 |
| | | this.calRiskValue() |
| | | this.screenLoading = false |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | return riskApi.getRiskAdvice(this.weight) |
| | | } |
| | | }, |
| | | mounted(){ |
| | | if(this.showAll){ |
| | | // 加载风险值最高的站点数据 |
| | | this.ShowDefaultData() |
| | | mounted() { |
| | | if (this.showAll) { |
| | | // 加载风险值最高的站点数据 |
| | | this.ShowDefaultData() |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 查询站点统计信息 |
| | | async querySiteStaticsInfo(row) { |
| | |
| | | this.isNoData = true |
| | | return |
| | | } |
| | | this.chartData.sort(time.compareByScore) |
| | | // 分析数据中的最早时间 |
| | | let begin = this.chartData[0].lst |
| | | // 分析数据中的最晚时间 |
| | |
| | | |
| | | // 移除空数据状态 |
| | | this.isNoData = false |
| | | |
| | | // 无数据的时间段 |
| | | let noDataTimeInteval = lineChart.backNoDataInteval(begin, end) |
| | | // 无数据配置时间段 |
| | | this.areaColor = lineChart.getMarkArea(noDataTimeInteval) |
| | | this.setChart() |
| | | |
| | | // 折线图数据 |
| | | let temp = index.calBillData(this.chartData, begin, end) |
| | |
| | | this.bill.exceedingNearCount = obj['exceedingNearCount'] |
| | | this.bill.exceedingCriticalDegree = obj['exceedingCriticalDegree'] |
| | | }) |
| | | }, |
| | | |
| | | // 选择其他值类型时 |
| | | setChart() { |
| | | if (this.chartData.length) { |
| | | // 构建折线图x,y数据 |
| | | let obj = lineChart.getLineChartXYData( |
| | | this.chartData, |
| | | this.form.beginTime, |
| | | this.form.endTime |
| | | ) |
| | | |
| | | this.chartData1 = { |
| | | x: obj.xData, |
| | | y: obj.yAvg |
| | | } |
| | | this.chartData2 = { |
| | | x: obj.xData, |
| | | y: obj.yOnline |
| | | } |
| | | this.chartData3 = { |
| | | x: obj.xData, |
| | | y: obj.yValid |
| | | } |
| | | this.chartData4 = { |
| | | x: obj.xData, |
| | | y: obj.yExceed |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 得到前10风险排名清单 |
| | |
| | | <el-form-item v-show="showAll"> |
| | | <MonthSelect @submit-value="giveMonth"></MonthSelect> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item v-show="showAll"> |
| | | <ButtonClick |
| | |
| | | <el-tag class="mx-1">场景</el-tag>{{ siteInfo.typename }} |
| | | |
| | | <el-tag class="mx-1">运维商</el-tag>{{ siteInfo.dutyCompany }} |
| | | <el-button type="primary" size="default" class="exception-button" v-show="showAll" @click="openDetail"> |
| | | <el-button |
| | | type="primary" |
| | | size="default" |
| | | class="exception-button" |
| | | v-show="showAll" |
| | | @click="openDetail" |
| | | > |
| | | 数据异常详情 |
| | | </el-button> |
| | | </el-card> |
| | | |
| | | <el-row :gutter="10" > |
| | | <el-row :gutter="10"> |
| | | <el-col :span="5" v-show="showAll"> |
| | | <el-card shadow="never" class="table-class"> |
| | | <el-table |
| | |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="showAll ?11:14" > |
| | | <el-col :span="showAll ? 11 : 14"> |
| | | <el-card shadow="never" class="table-class"> |
| | | <DustRadarChart |
| | | :name="[ |
| | |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="showAll ?4: 5" > |
| | | <el-col :span="showAll ? 4 : 5"> |
| | | <el-card shadow="never" class="card-height risk-card"> |
| | | <template #header> |
| | | <span class="title-16"> 风险值(0~1): </span> |
| | | <span |
| | | class="title-16" |
| | | :class="{ |
| | | 'weightColor-low': weight < 0.15, |
| | | 'weightColor-medium': weight >= 0.15 && weight <= 0.6, |
| | | 'weightColor-heigh': weight > 0.6 |
| | | }" |
| | | > |
| | | 风险值(0~1): |
| | | </span> |
| | | <span :class="{ |
| | | 'weightColor-low': weight < 0.15, |
| | | 'weightColor-medium': weight >= 0.15 && weight <= 0.6, |
| | | 'weightColor-heigh': weight > 0.6 |
| | | }"> {{ weight }}</span> |
| | | {{ weight }}</span |
| | | > |
| | | </template> |
| | | <div class="risk-text-container"> |
| | | <div class="risk-grade"> |
| | | <h1 class="sub-title">风险等级:</h1> |
| | | <span :class="{ |
| | | 'weightColor-low': weight < 0.15, |
| | | 'weightColor-medium': weight >= 0.15 && weight <= 0.6, |
| | | 'weightColor-heigh': weight > 0.6 |
| | | }" >{{ riskGradeAndAdvice.riskGrade }} </span> |
| | | <span |
| | | :class="{ |
| | | 'weightColor-low': weight < 0.15, |
| | | 'weightColor-medium': weight >= 0.15 && weight <= 0.6, |
| | | 'weightColor-heigh': weight > 0.6 |
| | | }" |
| | | >{{ riskGradeAndAdvice.riskGrade }} |
| | | </span> |
| | | </div> |
| | | |
| | | <div class="risk-advice"> |
| | |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="showAll ?4: 5" > |
| | | <el-col :span="showAll ? 4 : 5"> |
| | | <el-card shadow="never" class="card-height"> |
| | | <template #header> |
| | | <span class="title-16">风险详情</span> |
| | |
| | | <el-form> |
| | | <el-form-item label="最大值:"> {{ bill.max }} mg/m³ </el-form-item> |
| | | <el-form-item label="最小值:"> {{ bill.min }} mg/m³ </el-form-item> |
| | | <el-form-item label="数据有效率:"> {{ bill.online*100 }}% </el-form-item> |
| | | <el-form-item label="数据在线率:"> {{ bill.valid*100 }}% </el-form-item> |
| | | <el-form-item label="数据超标率:"> {{ bill.exceeding*100 }}% </el-form-item> |
| | | <el-form-item label="数据有效率:"> {{ bill.online * 100 }}% </el-form-item> |
| | | <el-form-item label="数据在线率:"> {{ bill.valid * 100 }}% </el-form-item> |
| | | <el-form-item label="数据超标率:"> {{ bill.exceeding * 100 }}% </el-form-item> |
| | | <el-form-item label="异常类型聚集度:"> |
| | | {{ exceptionRisk.exceptionTypeAggregation * 100 }}% |
| | | </el-form-item> |
| | | |
| | | <el-tag :size="small" v-show="bill.exception">共出现了{{ bill.exception }}类异常</el-tag> |
| | | |
| | | <el-tag size="small" v-show="bill.exception" |
| | | >共出现了{{ bill.exception }}类异常</el-tag |
| | | > |
| | | |
| | | <el-form-item label="典型异常复现率:"> |
| | | {{ exceptionRisk.typicalExceptionRepetitionRate * 100 }}% |
| | | </el-form-item> |
| | | |
| | | |
| | | <div> |
| | | <el-tag :size="small" v-show="bill.mutationCount">量级突变异常:{{ bill.mutationCount }}条</el-tag> |
| | | <el-tag size="small" v-show="bill.mutationCount" |
| | | >量级突变异常:{{ bill.mutationCount }}条</el-tag |
| | | > |
| | | </div> |
| | | |
| | | <div> |
| | | <el-tag :size="small" v-show="bill.exceedingNearCount">临近超标异常:{{ bill.exceedingNearCount }}条</el-tag> |
| | | <el-tag size="small" v-show="bill.exceedingNearCount" |
| | | >临近超标异常:{{ bill.exceedingNearCount }}条</el-tag |
| | | > |
| | | </div> |
| | | |
| | | <div> |
| | | <el-tag :size="small" |
| | | v-show="bill.exceedingCriticalDegree" |
| | | <el-tag size="small" v-show="bill.exceedingCriticalDegree" |
| | | >单日超标次数临界异常:{{ bill.exceedingCriticalDegree }}条</el-tag |
| | | > |
| | | </div> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-card shadow="never" class="card-value"> |
| | | <FYLineChart |
| | | title="日均值" |
| | | :chartData="chartData1" |
| | | yName="mg/m³" |
| | | seriesName="日均值" |
| | | :areaColor="areaColor" |
| | | > |
| | | </FYLineChart> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-card shadow="never" class="card-value"> |
| | | <FYLineChart |
| | | title="日有效率" |
| | | :chartData="chartData3" |
| | | yName="%" |
| | | seriesName="日有效率" |
| | | :areaColor="areaColor" |
| | | > |
| | | </FYLineChart> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <CompDailyStatistic :fetch-params="form" /> |
| | | </div> |
| | | </div> |
| | | <el-empty description="暂无数据" v-show="isNoData" :image-size="200" /> |