| | |
| | | </template> |
| | | <EChart :series="passRateSeries" :legend="{ show: false }" :chartStyle="{ height: '340px', width: '100%' }" /> |
| | | <div class="passrate-text"> |
| | | 当前合格率:<b>{{ (passRate * 100).toFixed(1) }}%</b> |
| | | 当前合格率:<b>{{ (passRate * 100).toFixed(4) }}%</b> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | progress: { show: true, width: 12 }, |
| | | axisLine: { lineStyle: { width: 12 } }, |
| | | pointer: { show: true }, |
| | | detail: { valueAnimation: true, formatter: (v) => `${(v * 100).toFixed(1)}%` }, |
| | | detail: { valueAnimation: true, formatter: (v) => `${(v * 100).toFixed(4)}%` }, |
| | | data: [{ value: passRate.value }], |
| | | }, |
| | | ]) |
| | |
| | | spcData.value.shift() |
| | | } |
| | | spcXAxis.value.push(`${spcXAxis.value.length + 1}`) |
| | | spcData.value.push(parseFloat(nextVal.toFixed(2))) |
| | | spcData.value.push(parseFloat(nextVal.toFixed(4))) |
| | | spcSeries.value[0].data = [...spcData.value] |
| | | spcSeries.value[1].data = new Array(spcData.value.length).fill(UCL.value) |
| | | spcSeries.value[2].data = new Array(spcData.value.length).fill(CL.value) |
| | |
| | | } |
| | | const last = spcData.value[spcData.value.length - 1] |
| | | if (last > UCL.value) { |
| | | speak(`预警,最新测量值 ${last.toFixed(2)} 超过上限`) |
| | | speak(`预警,最新测量值 ${last.toFixed(4)} 超过上限`) |
| | | } |
| | | if (last < LCL.value) { |
| | | speak(`预警,最新测量值 ${last.toFixed(2)} 低于下限`) |
| | | speak(`预警,最新测量值 ${last.toFixed(4)} 低于下限`) |
| | | } |
| | | } |
| | | |
| | |
| | | for (let i = 0; i < 20; i++) { |
| | | spcXAxis.value.push(`${i + 1}`) |
| | | const v = CL.value + (Math.random() - 0.5) * 6 |
| | | spcData.value.push(parseFloat(v.toFixed(2))) |
| | | spcData.value.push(parseFloat(v.toFixed(4))) |
| | | } |
| | | spcSeries.value[0].data = [...spcData.value] |
| | | spcSeries.value[1].data = new Array(spcData.value.length).fill(UCL.value) |