| | |
| | | <div class="his-body"> |
| | | <div class="his-body-left"> |
| | | <div class="his-body-tree"> |
| | | <el-input |
| | | v-model="filterText" |
| | | class="mb-2" |
| | | placeholder="Filter" |
| | | /> |
| | | <el-tree |
| | | :data="treeData" |
| | | show-checkbox |
| | | node-key="id" |
| | | ref="tree" |
| | | ref="treeRef" |
| | | highlight-current |
| | | :props="defaultProps" |
| | | :filter-node-method="filterNode" |
| | | @check="onCheckTree"/> |
| | | </div> |
| | | </div> |
| | |
| | | {{ calRateForm.preCumulant }} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="平均绝对误差:" label-width="110px"> |
| | | {{ calRateForm.deviation }} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | |
| | | <el-col :span="4"> |
| | | <el-form-item label="真实累积量:"> |
| | | {{ calRateForm.realCumulant }} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="累积量平均绝对误差:" label-width="152px"> |
| | | {{ calRateForm.deviationCumulant }} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | itemPreMax: 0, |
| | | itemPreMin: 0, |
| | | preCumulant: 0, |
| | | realCumulant: 0 |
| | | realCumulant: 0, |
| | | deviation: 0, //平均绝对误差 |
| | | deviationCumulant: 0, //累积量平均绝对误差 |
| | | }) |
| | | let itemData = ref({ |
| | | currentTreeList: [], |
| | |
| | | IN_DEVIATION: [{required: true, message: '精准度偏差不能为空', trigger: 'blur'}], |
| | | OUT_DEVIATION: [{required: true, message: '不可信率偏差不能为空', trigger: 'blur'}], |
| | | }) |
| | | |
| | | // 树形过滤 |
| | | const filterText = ref('') |
| | | const treeRef = ref() |
| | | watch(filterText, (val) => { |
| | | treeRef.value!.filter(val) |
| | | }) |
| | | const filterNode = (value: string, data) => { |
| | | if (!value) return true |
| | | return data.label.includes(value) |
| | | } |
| | | |
| | | /** 查询列表 */ |
| | | const getList = async (isClear = true) => { |
| | |
| | | calRateForm.value.itemMin = dataView.hisMin; |
| | | calRateForm.value.itemAvg = dataView.hisAvg; |
| | | calRateForm.value.realCumulant = dataView.hisCumulant; |
| | | calDeviation(dataView.realData,dataView.preDataL,'deviation') |
| | | calDeviation(dataView.cumulantRealData,dataView.cumulantPreData,'deviationCumulant') |
| | | } |
| | | calAccuracyRate() |
| | | } |
| | |
| | | calRateForm.value.IN_ACCURACY_RATE = Number(rateIn); |
| | | calRateForm.value.OUT_ACCURACY_RATE = Number(rateOut); |
| | | loading2.value = false; |
| | | } |
| | | |
| | | function calDeviation(realData,preDataL,key) { |
| | | if (realData == null || preDataL == null || realData.length === 0 || preDataL.length === 0) { |
| | | return; |
| | | } |
| | | const realObj = {} |
| | | realData.map(e => realObj[e[0]] = e[1]) |
| | | |
| | | let sum = 0; |
| | | let index = 0; |
| | | preDataL.forEach(e => { |
| | | if (realObj[e[0]] != undefined) { |
| | | sum += Math.abs(e[1] - realObj[e[0]]) |
| | | index++ |
| | | } |
| | | }) |
| | | calRateForm.value[key] = Number((sum / index).toFixed(2)) |
| | | } |
| | | |
| | | function rightSearchDataByRange() { |
| | |
| | | itemPreMax: 0, |
| | | itemPreMin: 0, |
| | | preCumulant: 0, |
| | | realCumulant: 0 |
| | | realCumulant: 0, |
| | | deviation: 0, //平均绝对误差 |
| | | deviationCumulant: 0, //累积量平均绝对误差 |
| | | } |
| | | calRateFormRef.value?.resetFields() |
| | | } |