| | |
| | | return data.label.includes(value) |
| | | } |
| | | |
| | | // let xAxisData = [] |
| | | let xAxisData = [] |
| | | |
| | | /** 查询列表 */ |
| | | const getList = async (isClear = true) => { |
| | |
| | | formData.value.predictTime = data.predictTime; |
| | | formData.value.startTime = data.startTime |
| | | formData.value.endTime = data.endTime |
| | | |
| | | // 默认影响时间 |
| | | changeInfluenceFactorTime(data.predictTime); |
| | | |
| | | // 获取影响因素结果列表 |
| | | influenceFactorResultList.value = await influenceFactorApi.getResultList({ |
| | | outIds: outIds, |
| | | startTime: data.startTime, |
| | | endTime: data.endTime |
| | | }) |
| | | |
| | | // 获取影响因素结果列表 |
| | | influenceFactorList.value = await influenceFactorApi.getListByOutId(formData.value.checkedItemData.id) |
| | | if (influenceFactorList.value && influenceFactorList.value.length > 0) { |
| | | // 根据factorOutputId去重,因为不同的统计规则会有重复的影响因素 |
| | | influenceFactorList.value = Array.from(new Map(influenceFactorList.value.map(item => [item.factorOutputId, item])).values()); |
| | | // 默认选中第一个影响因素 |
| | | influenceFactor.value = influenceFactorList.value?.[0]?.factorOutputId |
| | | getInfluenceFactorChart(influenceFactorList.value?.[0]?.factorOutputId) |
| | | } |
| | | |
| | | |
| | | const paramsAlarm = reactive({ |
| | |
| | | symbol: ['circle', 'none'], |
| | | }, |
| | | }); |
| | | itemDataObject.value = {} |
| | | yAxisData.push({ |
| | | type: 'value', |
| | | name: "累计值", |
| | |
| | | }) |
| | | for (let i = 0; i < data.dataViewList.length; i++) { |
| | | let dataView = data.dataViewList[i] |
| | | itemDataObject.value[dataView.outId] = dataView; |
| | | let maxValue = dataView.maxValue; |
| | | let minValue = dataView.minValue; |
| | | yAxisIndex = (formData.value.isMultipleY ? i : 0) + 1; |
| | |
| | | function changeInfluenceFactorTime(time) { |
| | | if (time && new Date(time)?.getTime()) { |
| | | influenceFactorResultTime.value = time |
| | | influenceFactorResult.value = influenceFactorResultList.value?.[formData.value.checkedItemData?.id]?.filter(e => e.time === new Date(time).getTime()).sort((a, b) => b.value - a.value) || []; |
| | | influenceFactorResult.value = influenceFactorResultList.value?.[calRateForm.value.calItem]?.filter(e => e.time === new Date(time).getTime()).sort((a, b) => b.value - a.value) || []; |
| | | } |
| | | }// 选择影响因素 |
| | | function changeInfluenceFactor(value) { |
| | |
| | | if (checked.checkedNodes) { |
| | | let cns = [...checked.checkedNodes] |
| | | for (let i = 0; i < cns.length; i++) { |
| | | if (cns[i].id.indexOf('-') !== -1) { |
| | | if (cns[i].disabled) { |
| | | continue |
| | | } |
| | | formData.value.checkedItemData.push(cns[i]) |
| | |
| | | }, wait) |
| | | } |
| | | |
| | | function calItemBaseVale() { |
| | | const calItemBaseVale = async () => { |
| | | if (!calRateForm.value.calItem) { |
| | | calRateForm.value.itemPreMax = 0; |
| | | calRateForm.value.itemPreMin = 0; |
| | |
| | | calDeviation(dataView.cumulantRealData,dataView.cumulantPreData,'deviationCumulant') |
| | | calAccuracyRate() |
| | | |
| | | // 影响因素 |
| | | // 获取影响因素结果列表 |
| | | influenceFactorList.value = influenceFactorApi.getListByOutId(formData.value.checkedItemData.id) |
| | | // 根据factorOutputId去重,因为不同的统计规则会有重复的影响因素 |
| | | influenceFactorList.value = Array.from(new Map(influenceFactorList.value.map(item => [item.factorOutputId, item])).values()); |
| | | const outPutId = calRateForm.value.calItem |
| | | influenceFactorResultList.value = await influenceFactorApi.getResultList({ |
| | | outIds: [outPutId], |
| | | startTime: formData.value.startTime, |
| | | endTime: formData.value.endTime |
| | | }) |
| | | |
| | | // 默认影响时间 |
| | | changeInfluenceFactorTime(formData.value.predictTime); |
| | | |
| | | // 获取影响因素列表 |
| | | influenceFactorList.value = await influenceFactorApi.getListByOutId(outPutId) |
| | | if (influenceFactorList.value && influenceFactorList.value.length > 0) { |
| | | // 根据factorOutputId去重,因为不同的统计规则会有重复的影响因素 |
| | | influenceFactorList.value = Array.from(new Map(influenceFactorList.value.map(item => [item.factorOutputId, item])).values()); |
| | | // 默认选中第一个影响因素 |
| | | influenceFactor.value = influenceFactorList.value?.[0]?.factorOutputId |
| | | getInfluenceFactorChart(influenceFactorList.value?.[0]?.factorOutputId) |
| | | }else { |
| | | // 清除历史 |
| | | influenceFactor.value = undefined |
| | | myInfluenceFactorChart.clear() |
| | | } |
| | | } |
| | | } |
| | | |