From 7fc85dce1cea4dc1a7accbc08e91339bbe22a9b1 Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Fri, 31 May 2024 10:09:38 +0800 Subject: [PATCH 1/2] 1 --- src/views/projectFront/laborManage/dataValidation.vue | 1 + src/views/projectFront/projectSummary/cooperationUnit.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/projectFront/laborManage/dataValidation.vue b/src/views/projectFront/laborManage/dataValidation.vue index faba54d9..71e82f79 100644 --- a/src/views/projectFront/laborManage/dataValidation.vue +++ b/src/views/projectFront/laborManage/dataValidation.vue @@ -104,6 +104,7 @@ export default { created() { this.projectSn = this.$store.state.projectSn; this.getAssessmentList(); + this.$message.success("1111"); //编辑成功! }, methods: { // 批量同步 || 同步 diff --git a/src/views/projectFront/projectSummary/cooperationUnit.vue b/src/views/projectFront/projectSummary/cooperationUnit.vue index 5a715bbf..356859ca 100644 --- a/src/views/projectFront/projectSummary/cooperationUnit.vue +++ b/src/views/projectFront/projectSummary/cooperationUnit.vue @@ -986,7 +986,7 @@ export default { } } - // console.log('==========',this.enterpriseForm.companyTypeName) + console.log('==========',this.enterpriseForm.companyTypeName) this.aptitudeFileList = []; this.logoFileList = []; this.layoutImageList = []; From 851f27d06331abe144d406bfb04c4e7058a25cc0 Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Fri, 31 May 2024 10:13:56 +0800 Subject: [PATCH 2/2] 1 --- .../projectSummary/cooperationUnit.vue | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/src/views/projectFront/projectSummary/cooperationUnit.vue b/src/views/projectFront/projectSummary/cooperationUnit.vue index 4d2a8a45..356859ca 100644 --- a/src/views/projectFront/projectSummary/cooperationUnit.vue +++ b/src/views/projectFront/projectSummary/cooperationUnit.vue @@ -343,7 +343,7 @@ - @@ -355,7 +355,7 @@ - @@ -460,7 +460,7 @@ - @@ -497,18 +497,19 @@ - + - {{ $t('message.laborMange.clickOnTheUpload') }} + @@ -516,7 +517,7 @@ - @@ -747,6 +748,16 @@ export default { this.getDictionaryByStructure(); this.getDicProjectTypeList(); }, + watch: { + addEnterpriseDialog: { + handler(newVal) { + this.$nextTick(() => { + this.$refs['enterpriseForm'] && this.$refs['enterpriseForm'].clearValidate(); + }) + }, + deep:true, + } + }, methods: { //获取经纬度 toGetLocalFn() { @@ -940,7 +951,7 @@ export default { enterpriseEmail: '', //企业邮箱 enterpriseLegalPerson: '', //法定代表人 enterpriseName: '', //企业名称 - companyTypeName: this.enterpriseForm.companyTypeName, + companyTypeName: "", enterpriseProperty: '', //单位性质 1.国有企业 2三资企业 3集体企业 4私营企业 enterpriseQualificationUrl: '', //企业资质图片地址 enterpriseSafeAllow: '', //企业安全生产许可证 @@ -985,7 +996,7 @@ export default { 'message.laborMange.theNewEnterprise' ) this.addEnterpriseDialog = true - this.enterpriseForm.enterpriseTypeId = Number(this.checkedId) + // this.enterpriseForm.enterpriseTypeId = Number(this.checkedId) }, //编辑按钮 editBtn(value) { @@ -1004,6 +1015,7 @@ export default { this.aptitudeFileList = [] this.logoFileList = [] this.enterpriseForm = { ...JSON.parse(JSON.stringify(value)) } + this.enterpriseForm.enterpriseTypeId = !value.enterpriseTypeId || value.enterpriseTypeId == 0 ? '' : value.enterpriseTypeId; let aptitude = this.enterpriseForm.enterpriseQualificationUrl ? this.enterpriseForm.enterpriseQualificationUrl.split(',') : [] @@ -1036,11 +1048,11 @@ export default { this.enterpriseForm.projectEnterprise = { ...projectEnterprise }; - this.layoutImageList = JSON.parse(this.enterpriseForm.projectEnterprise.layoutImage); - this.constructionMapUrlList = JSON.parse(this.enterpriseForm.projectEnterprise.constructionMapUrl); + this.layoutImageList = this.enterpriseForm.projectEnterprise.layoutImage && this.enterpriseForm.projectEnterprise.layoutImage != 'null' ? JSON.parse(this.enterpriseForm.projectEnterprise.layoutImage) : []; + this.constructionMapUrlList = this.enterpriseForm.projectEnterprise.constructionMapUrl && this.enterpriseForm.projectEnterprise.constructionMapUrl != 'null' ? JSON.parse(this.enterpriseForm.projectEnterprise.constructionMapUrl) : []; } }).finally(() => { - this.addEnterpriseDialog = true + this.addEnterpriseDialog = true; }) }, @@ -1069,8 +1081,8 @@ export default { } } - if (this.enterpriseForm.projectTel) { - if (!checkPhone(this.enterpriseForm.projectTel)) { + if (this.enterpriseForm.projectEnterprise.projectTel) { + if (!checkPhone(this.enterpriseForm.projectEnterprise.projectTel)) { this.$message.error('请输入正确的联系电话') return } @@ -1280,7 +1292,7 @@ export default { //文件上传成功 handleSuccess(file, type) { this.$message.success(this.$t('message.laborMange.uploadSuccessful')) - let data = { name: file.data[0].filename, url: file.data[0].imageUrl } + let data = { name: file.data[0].fileInfo.originalFilename ? file.data[0].fileInfo.originalFilename : file.data[0].filename, url: file.data[0].imageUrl } console.log(file); if (type == 1) { this.aptitudeFileList.push(data)