From 083a112e9552dd68ffde3b2481961aeebb1c2e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Thu, 31 Jul 2025 15:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=AF=BC=E5=85=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8E=A5=E6=94=B6=E6=96=B9=E5=BC=8Fsse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scImport/index.vue | 35 ++++++++++++++++--- src/views/cost/feeRecords/index.vue | 1 + src/views/earlyManager/exclude.vue | 1 + src/views/earlyManager/list.vue | 1 + src/views/inventory/inoutRecord/index.vue | 1 + src/views/order/inventoryList/index.vue | 1 + src/views/order/inventoryStatistics/index.vue | 1 + src/views/order/orderList/index.vue | 1 + src/views/order/repairList/index.vue | 1 + src/views/reports/keepRepairReports/index.vue | 1 + src/views/reports/shipmentReports/index.vue | 1 + src/views/setting/advanced/setup/material.vue | 1 + src/views/setting/advanced/setup/region.vue | 1 + .../setting/advanced/setup/spareParts.vue | 1 + src/views/setting/bom/index.vue | 1 + src/views/setting/company/index.vue | 1 + .../setting/partsMag/components/info.vue | 1 + .../setting/partsMag/components/library.vue | 1 + src/views/setting/user/index.vue | 1 + .../shipment/shipmentDataConfirm/index.vue | 1 + src/views/shipment/shipmentList/list.vue | 1 + .../shipment/shipmentStatistics/index.vue | 1 + 22 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/components/scImport/index.vue b/src/components/scImport/index.vue index 672f982..18eada3 100644 --- a/src/components/scImport/index.vue +++ b/src/components/scImport/index.vue @@ -42,10 +42,14 @@ +
导入进度
+
+
正在解析...
+
@@ -74,7 +78,7 @@ export default { size:{type:String, default:'small'}, title:{type:String, default: ""}, type:{type:[String, Number], default: ""}, - httpDisabled:{type:Boolean, default:false} + httpDisabled:{type:Boolean, default:false}, }, data(){ return{ @@ -88,6 +92,7 @@ export default { fileShow:false, params:{}, + analysisShow:false, importDis:false, importTrue:false, progressShow:false, @@ -106,19 +111,21 @@ export default { }, mounted() { - eventBus.$on('sockBack', this.getWsResult); + // eventBus.$on('sockBack', this.getWsResult); - // eventBus.$on('sseBack', this.getWsResult); + eventBus.$on('sseBack', this.getWsResult); }, unmounted() { - eventBus.$off('sockBack', this.getWsResult); + // eventBus.$off('sockBack', this.getWsResult); - // eventBus.$off('sseBack', this.getWsResult); + eventBus.$off('sseBack', this.getWsResult); }, methods:{ getWsResult(res){ if(res.data && (res.data.type == 4 || res.data.type == 5 || res.data.type == 10 || res.data.type == 17 || res.data.type == 18 || res.data.type == 27 || res.data.type == 28 || res.data.type == 31 || res.data.type == 42 || res.data.type == 44 || res.data.type == 45 || res.data.type == 48 || res.data.type == 49 || res.data.type == 50 || res.data.type == 51)){ if(this.type == res.data.type){ + this.analysisShow = false; + this.importInfo = res.data; this.progressShow = true; this.progressTrue = true; @@ -140,6 +147,10 @@ export default { } }, + setAnalysisShow(params){ + this.analysisShow = params; + }, + // 导入文件 importFile(){ this.visible = true; @@ -274,6 +285,20 @@ export default { font-size: 10px; } } + .primaryText{ + margin: 15px 0 0 0; + padding: 10px; + border-radius: 6px; + background: var(--el-color-primary-light-9); + ::v-deep .text{ + font-size: 12px; + line-height: 20px; + text-align: left; + } + .text{ + color: var(--el-color-primary) + } + } .errText{ margin: 15px 0 0 0; padding: 10px; diff --git a/src/views/cost/feeRecords/index.vue b/src/views/cost/feeRecords/index.vue index 11722d4..8ff2a39 100644 --- a/src/views/cost/feeRecords/index.vue +++ b/src/views/cost/feeRecords/index.vue @@ -234,6 +234,7 @@ export default { this.httpDisabled = true; const res = await this.$API.finance.cost.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/earlyManager/exclude.vue b/src/views/earlyManager/exclude.vue index 183cf9f..a9b6a76 100644 --- a/src/views/earlyManager/exclude.vue +++ b/src/views/earlyManager/exclude.vue @@ -239,6 +239,7 @@ export default { this.httpDisabled = true; const res = await this.$API.early.exclude.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/earlyManager/list.vue b/src/views/earlyManager/list.vue index f2e208a..10f9e70 100644 --- a/src/views/earlyManager/list.vue +++ b/src/views/earlyManager/list.vue @@ -337,6 +337,7 @@ export default { this.httpDisabled = true; const res = await this.$API.early.earlyWarn.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/inventory/inoutRecord/index.vue b/src/views/inventory/inoutRecord/index.vue index 87d4e47..1fdb2be 100644 --- a/src/views/inventory/inoutRecord/index.vue +++ b/src/views/inventory/inoutRecord/index.vue @@ -175,6 +175,7 @@ export default { async importUpload(params) { const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/order/inventoryList/index.vue b/src/views/order/inventoryList/index.vue index 568b3e2..0e0a856 100644 --- a/src/views/order/inventoryList/index.vue +++ b/src/views/order/inventoryList/index.vue @@ -220,6 +220,7 @@ export default { this.httpDisabled = true; const res = await this.$API.orders.order.sock.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/order/inventoryStatistics/index.vue b/src/views/order/inventoryStatistics/index.vue index cfee0a4..f9dd155 100644 --- a/src/views/order/inventoryStatistics/index.vue +++ b/src/views/order/inventoryStatistics/index.vue @@ -176,6 +176,7 @@ export default { async importUpload(params) { const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/order/orderList/index.vue b/src/views/order/orderList/index.vue index 5cfec71..495aa27 100644 --- a/src/views/order/orderList/index.vue +++ b/src/views/order/orderList/index.vue @@ -303,6 +303,7 @@ export default { this.httpDisabled = true; const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/order/repairList/index.vue b/src/views/order/repairList/index.vue index c8ae2ee..34d1811 100644 --- a/src/views/order/repairList/index.vue +++ b/src/views/order/repairList/index.vue @@ -303,6 +303,7 @@ export default { this.httpDisabled = true; const res = await this.$API.orders.order.repair.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/reports/keepRepairReports/index.vue b/src/views/reports/keepRepairReports/index.vue index 57dc297..08a9362 100644 --- a/src/views/reports/keepRepairReports/index.vue +++ b/src/views/reports/keepRepairReports/index.vue @@ -175,6 +175,7 @@ export default { async importUpload(params) { const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/reports/shipmentReports/index.vue b/src/views/reports/shipmentReports/index.vue index 57dc297..08a9362 100644 --- a/src/views/reports/shipmentReports/index.vue +++ b/src/views/reports/shipmentReports/index.vue @@ -175,6 +175,7 @@ export default { async importUpload(params) { const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/advanced/setup/material.vue b/src/views/setting/advanced/setup/material.vue index 1d706f0..8478abf 100644 --- a/src/views/setting/advanced/setup/material.vue +++ b/src/views/setting/advanced/setup/material.vue @@ -111,6 +111,7 @@ export default { this.httpDisabled = true; const res = await this.$API.setup.material.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/advanced/setup/region.vue b/src/views/setting/advanced/setup/region.vue index cbb427a..4af7dee 100644 --- a/src/views/setting/advanced/setup/region.vue +++ b/src/views/setting/advanced/setup/region.vue @@ -128,6 +128,7 @@ export default { this.httpDisabled = true; const res = await this.$API.setup.regional.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/advanced/setup/spareParts.vue b/src/views/setting/advanced/setup/spareParts.vue index cd6e5f6..63ff37e 100644 --- a/src/views/setting/advanced/setup/spareParts.vue +++ b/src/views/setting/advanced/setup/spareParts.vue @@ -106,6 +106,7 @@ export default { this.httpDisabled = true; const res = await this.$API.setup.spare.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/bom/index.vue b/src/views/setting/bom/index.vue index cb4f12e..fec0cfe 100644 --- a/src/views/setting/bom/index.vue +++ b/src/views/setting/bom/index.vue @@ -208,6 +208,7 @@ export default { this.httpDisabled = true; const res = await this.$API.setup.bom.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/company/index.vue b/src/views/setting/company/index.vue index a0b9a67..378c43f 100644 --- a/src/views/setting/company/index.vue +++ b/src/views/setting/company/index.vue @@ -282,6 +282,7 @@ export default { this.httpDisabled = true; const res = await this.$API.system.company.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/partsMag/components/info.vue b/src/views/setting/partsMag/components/info.vue index 6b18811..db16b47 100644 --- a/src/views/setting/partsMag/components/info.vue +++ b/src/views/setting/partsMag/components/info.vue @@ -244,6 +244,7 @@ export default { this.httpDisabled = true; const res = await this.$API.system.spareInfo.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/partsMag/components/library.vue b/src/views/setting/partsMag/components/library.vue index 374131b..8a41d83 100644 --- a/src/views/setting/partsMag/components/library.vue +++ b/src/views/setting/partsMag/components/library.vue @@ -246,6 +246,7 @@ export default { this.httpDisabled = true; const res = await this.$API.system.spare.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/setting/user/index.vue b/src/views/setting/user/index.vue index 3cc1077..4a5f9bd 100644 --- a/src/views/setting/user/index.vue +++ b/src/views/setting/user/index.vue @@ -300,6 +300,7 @@ this.httpDisabled = true; const res = await this.$API.system.user.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/shipment/shipmentDataConfirm/index.vue b/src/views/shipment/shipmentDataConfirm/index.vue index dcbc1ba..0fcda32 100644 --- a/src/views/shipment/shipmentDataConfirm/index.vue +++ b/src/views/shipment/shipmentDataConfirm/index.vue @@ -176,6 +176,7 @@ export default { async importUpload(params) { const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/shipment/shipmentList/list.vue b/src/views/shipment/shipmentList/list.vue index 5841804..42b17b7 100644 --- a/src/views/shipment/shipmentList/list.vue +++ b/src/views/shipment/shipmentList/list.vue @@ -238,6 +238,7 @@ export default { this.httpDisabled = true; const res = await this.$API.shipment.out.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } }, diff --git a/src/views/shipment/shipmentStatistics/index.vue b/src/views/shipment/shipmentStatistics/index.vue index 66fae5f..4594d1d 100644 --- a/src/views/shipment/shipmentStatistics/index.vue +++ b/src/views/shipment/shipmentStatistics/index.vue @@ -176,6 +176,7 @@ export default { async importUpload(params) { const res = await this.$API.orders.order.maintenance.import.post(params); if(res.code == 200){ + this.$refs.scImport.setAnalysisShow(true); this.$message.success('上传成功,开始导入数据'); } },