| | |
| | | import excelFunction from "@/utils/excelFountion"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import Big from "big.js"; |
| | | import InspectionWorker from "../../../workers/InspectionWorker.worker"; |
| | | import InspectionWorkerAsData from "../../../workers/InspectionWorkerAsData.worker"; |
| | | export default { |
| | | name: "Inspection", |
| | | components: { |
| | | limsTable, |
| | | }, |
| | |
| | | this.getComparisonList(); |
| | | this.getAuthorizedPerson(); |
| | | this.scrollInit(); |
| | | // this.getPower(); |
| | | this.startWorker(); |
| | | }, |
| | | watch: { |
| | |
| | | this.stopWorker(); // 确保之前的 Worker 已停止 |
| | | } |
| | | // 创建 Worker 实例 |
| | | this.worker = new Worker("/static/js/worker.js"); |
| | | this.worker = new InspectionWorker(); |
| | | if (this.worker0) { |
| | | this.stopWorker(); // 确保之前的 Worker 已停止 |
| | | } |
| | | // 创建 Worker 实例 |
| | | this.worker0 = new Worker("/static/js/worker0.js"); |
| | | this.worker0 = new InspectionWorkerAsData(); |
| | | }, |
| | | // 停止多线程 |
| | | stopWorker() { |
| | |
| | | ) |
| | | ) { |
| | | if (parseFloat(n.v.v) >= 100000) { |
| | | let num2 = new this.$Big(n.v.v); |
| | | let num2 = new Big(n.v.v); |
| | | n.v.v = num2.toExponential(); |
| | | } |
| | | } |