| | |
| | | }, |
| | | created() { |
| | | this.saveQueue = Promise.resolve(); |
| | | let { sonLaboratory, orderId, state, inspectorList, typeSource } = |
| | | this.$route.query; |
| | | this.sonLaboratory = sonLaboratory; |
| | | this.orderId = orderId; |
| | | this.id = this.orderId; |
| | | this.state = state; |
| | | this.inspectorList = inspectorList; |
| | | this.typeSource = typeSource; |
| | | this.syncRouteContext(); |
| | | }, |
| | | mounted() { |
| | | this.getTypeDicts(); // 获取紧急程度下拉框选项 |
| | |
| | | this.scrollInit(); |
| | | }, |
| | | activated() { |
| | | this.syncRouteContext(); |
| | | this.getTypeDicts(); // 获取紧急程度下拉框选项 |
| | | this.getInsStateDicts(); |
| | | this.getComparisonList(); |
| | |
| | | this.stopWorker(); |
| | | }, |
| | | methods: { |
| | | syncRouteContext() { |
| | | const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query; |
| | | const orderChanged = this.id !== orderId; |
| | | this.sonLaboratory = sonLaboratory; |
| | | this.orderId = orderId; |
| | | this.state = state; |
| | | this.inspectorList = inspectorList; |
| | | this.typeSource = typeSource; |
| | | if (orderChanged) { |
| | | this.tableLists = []; |
| | | this.tableList = []; |
| | | this.sampleProduct = []; |
| | | this.currentSample = {}; |
| | | this.currentTable = null; |
| | | this.id = orderId; |
| | | } |
| | | }, |
| | | // 文件管理--开始 |
| | | getList() { |
| | | this.tableLoading = true; |
| | |
| | | repetitionTag: this.repetitionTag |
| | | }); |
| | | this.tableLoading = false; |
| | | if (res.data.length > 0) { |
| | | return res.data; |
| | | } |
| | | return Array.isArray(res.data) ? res.data : []; |
| | | }, |
| | | // 切换样品 |
| | | async handleChangeSample(row, column, event) { |