From 965b85e25a4f1c046a72caf9a0c6af475bf1398a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=87?= <2433098676@qq.com> Date: Tue, 15 Aug 2023 10:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/purchase/cert/supCertAddDialog.vue | 46 ++++++++++--------- .../company/supCompanyAduditDialog.vue | 24 +++++----- .../purchase/company/supCompanyEditDialog.vue | 28 +++++------ .../supManufacturerAuditDialog.vue | 29 ++++++------ .../supManufacturerEditDialog.vue | 1 - .../product/supProductAuditDialog.vue | 24 +++++----- .../purchase/product/supProductEditDialog.vue | 28 +++++------ 7 files changed, 96 insertions(+), 84 deletions(-) diff --git a/src/views/purchase/cert/supCertAddDialog.vue b/src/views/purchase/cert/supCertAddDialog.vue index 94b216c8..3e9f5859 100644 --- a/src/views/purchase/cert/supCertAddDialog.vue +++ b/src/views/purchase/cert/supCertAddDialog.vue @@ -209,12 +209,11 @@ export default { }; }, components: { - draggable, - ElImageViewer + // draggable, + // ElImageViewer }, methods: { submitUpload() { - this.$refs["dataForm"].validate(valid => { if (valid) { if (this.formData.auditStatus == 1) { @@ -239,22 +238,25 @@ export default { onConfirmSubmit(val) { this.formData.repeatUpload = val; console.log(this.formData) - if (this.$isNotBlank(this.formData.filePath)) { - if (this.$refs.upload.uploadFiles.length > 0) { - this.$refs.upload.submit(); - this.onSubmit(); - } else { - this.onSubmit(); - } - - } else { - console.log(this.$refs.upload.uploadFiles.length); - if (this.$refs.upload.uploadFiles.length > 0) { - this.$refs.upload.submit(); - } else { - this.$message.warning(`请选择文件`); - } - } + this.onSubmit(); + // this.formData.repeatUpload = val; + // console.log(this.formData) + // if (this.$isNotBlank(this.formData.filePath)) { + // if (this.$refs.upload.uploadFiles.length > 0) { + // this.$refs.upload.submit(); + // this.onSubmit(); + // } else { + // this.onSubmit(); + // } + // + // } else { + // console.log(this.$refs.upload.uploadFiles.length); + // if (this.$refs.upload.uploadFiles.length > 0) { + // this.$refs.upload.submit(); + // } else { + // this.$message.warning(`请选择文件`); + // } + // } }, @@ -271,9 +273,11 @@ export default { this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk; this.formData.productIdFk = this.inputQuery.productId; } - if (this.formData.auditStatus != 1) + if (this.formData.auditStatus != 1){ this.formData.auditStatus = "6"; - this.formData.filePath = this.$refs.editorRef.html + this.formData.filePath = this.$refs.editorRef.html + } + if (this.editTye == 1) { insertCompanyCert(this.formData).then(response => { this.loading = false; diff --git a/src/views/purchase/company/supCompanyAduditDialog.vue b/src/views/purchase/company/supCompanyAduditDialog.vue index 18370670..57a1417c 100644 --- a/src/views/purchase/company/supCompanyAduditDialog.vue +++ b/src/views/purchase/company/supCompanyAduditDialog.vue @@ -515,17 +515,19 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1; }, showImgViewer(row){ - this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - this.imgList=[]; - previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { - if (response.code === 20000) { - this.imgList=response.data; - } - }); - this.imgViewerVisible = true; - const m = (e) => { e.preventDefault() }; - document.body.style.overflow = 'hidden'; - document.addEventListener("touchmove", m, false); // 禁止页面滑动 + let newWindow = window.open(); + newWindow.document.write(row.filePath) + // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + // this.imgList=[]; + // previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { + // if (response.code === 20000) { + // this.imgList=response.data; + // } + // }); + // this.imgViewerVisible = true; + // const m = (e) => { e.preventDefault() }; + // document.body.style.overflow = 'hidden'; + // document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false; diff --git a/src/views/purchase/company/supCompanyEditDialog.vue b/src/views/purchase/company/supCompanyEditDialog.vue index e524b787..84da9f11 100644 --- a/src/views/purchase/company/supCompanyEditDialog.vue +++ b/src/views/purchase/company/supCompanyEditDialog.vue @@ -493,19 +493,21 @@ export default { } , showImgViewer(row) { - this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - this.imgList = []; - previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { - if (response.code === 20000) { - this.imgList=response.data; - } - }); - this.imgViewerVisible = true; - const m = (e) => { - e.preventDefault() - }; - document.body.style.overflow = 'hidden'; - document.addEventListener("touchmove", m, false); // 禁止页面滑动 + let newWindow = window.open(); + newWindow.document.write(row.filePath) + // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + // this.imgList = []; + // previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { + // if (response.code === 20000) { + // this.imgList=response.data; + // } + // }); + // this.imgViewerVisible = true; + // const m = (e) => { + // e.preventDefault() + // }; + // document.body.style.overflow = 'hidden'; + // document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false; diff --git a/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue b/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue index 5f06891c..c8696b66 100644 --- a/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue +++ b/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue @@ -550,20 +550,21 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1; }, showImgViewer(row) { - - this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - this.imgList = []; - previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { - if (response.code === 20000) { - this.imgList=response.data; - } - }); - this.imgViewerVisible = true; - const m = (e) => { - e.preventDefault() - }; - document.body.style.overflow = 'hidden'; - document.addEventListener("touchmove", m, false); // 禁止页面滑动 + let newWindow = window.open(); + newWindow.document.write(row.filePath) + // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + // this.imgList = []; + // previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { + // if (response.code === 20000) { + // this.imgList=response.data; + // } + // }); + // this.imgViewerVisible = true; + // const m = (e) => { + // e.preventDefault() + // }; + // document.body.style.overflow = 'hidden'; + // document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false; diff --git a/src/views/purchase/manufacturer/supManufacturerEditDialog.vue b/src/views/purchase/manufacturer/supManufacturerEditDialog.vue index 9aabac5f..27889461 100644 --- a/src/views/purchase/manufacturer/supManufacturerEditDialog.vue +++ b/src/views/purchase/manufacturer/supManufacturerEditDialog.vue @@ -602,7 +602,6 @@ export default { showImgViewer(row) { let newWindow = window.open(); newWindow.document.write(row.filePath) - console.log(row.filePath) // this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' // this.imgList = [] // previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { diff --git a/src/views/purchase/product/supProductAuditDialog.vue b/src/views/purchase/product/supProductAuditDialog.vue index e1b0cb2c..10040ad6 100644 --- a/src/views/purchase/product/supProductAuditDialog.vue +++ b/src/views/purchase/product/supProductAuditDialog.vue @@ -560,17 +560,19 @@ export default { indexOf(ext.toLowerCase()) !== -1; }, showImgViewer(row){ - this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - this.imgList=[]; - previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { - if (response.code === 20000) { - this.imgList=response.data; - } - }); - this.imgViewerVisible = true; - const m = (e) => { e.preventDefault() }; - document.body.style.overflow = 'hidden'; - document.addEventListener("touchmove", m, false); // 禁止页面滑动 + let newWindow = window.open(); + newWindow.document.write(row.filePath) + // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + // this.imgList=[]; + // previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { + // if (response.code === 20000) { + // this.imgList=response.data; + // } + // }); + // this.imgViewerVisible = true; + // const m = (e) => { e.preventDefault() }; + // document.body.style.overflow = 'hidden'; + // document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer(){ this.imgViewerVisible = false; diff --git a/src/views/purchase/product/supProductEditDialog.vue b/src/views/purchase/product/supProductEditDialog.vue index aa59deaa..fa8774d7 100644 --- a/src/views/purchase/product/supProductEditDialog.vue +++ b/src/views/purchase/product/supProductEditDialog.vue @@ -669,19 +669,21 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1 }, showImgViewer(row) { - this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' - this.imgList = [] - previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { - if (response.code === 20000) { - this.imgList = response.data - } - }) - this.imgViewerVisible = true - const m = (e) => { - e.preventDefault() - } - document.body.style.overflow = 'hidden' - document.addEventListener('touchmove', m, false) // 禁止页面滑动 + let newWindow = window.open(); + newWindow.document.write(row.filePath) + // this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' + // this.imgList = [] + // previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { + // if (response.code === 20000) { + // this.imgList = response.data + // } + // }) + // this.imgViewerVisible = true + // const m = (e) => { + // e.preventDefault() + // } + // document.body.style.overflow = 'hidden' + // document.addEventListener('touchmove', m, false) // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false