From 1ec68d3439cf13c015b6a2cfcb57af7b4e736286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Thu, 10 Oct 2024 15:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=B4=BB=E5=9C=88=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=A4=A9=E6=95=B0=E6=8D=AE=E7=9A=84=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../volunteer/LifeCircleManagement/add.vue | 29 +++++++------------ .../volunteer/LifeCircleManagement/index.vue | 16 +++++----- .../modules/volunteer/Venuemanagement/add.vue | 4 ++- .../volunteer/Venuemanagement/info.vue | 14 ++++----- 4 files changed, 28 insertions(+), 35 deletions(-) diff --git a/src/views/modules/volunteer/LifeCircleManagement/add.vue b/src/views/modules/volunteer/LifeCircleManagement/add.vue index c39bec473..ee206136d 100644 --- a/src/views/modules/volunteer/LifeCircleManagement/add.vue +++ b/src/views/modules/volunteer/LifeCircleManagement/add.vue @@ -451,12 +451,11 @@ let url = `/voluntary/sphereLife/detail/${id}`; console.log(url,"url"); requestGet(url).then((res) => { - console.log(res); if (res.code == 0) { this.formData = res.data this.fileList=[{fileUrl:res.data.attrs[0].url}] this.searchValue=res.data.address - console.log(this.formData,"this.formData"); + this.formData.tags1=res.data.tags.split(',').map(item => ({ tab: item.trim() })); } else { this.$message.error(res.msg) } @@ -466,8 +465,10 @@ }, //添加标签 addDomain() { + + if (this.formData.tags1.length < 4) { - this.formData.tags1.push({ name: '', tab: '' }); + this.formData.tags1.push({tab: '' }); }else{ this.$message.error("最多添加4个标签"); @@ -546,18 +547,7 @@ removedImg() { this.formData.coverPic = '' }, - // onChangeFileList(e) { - // console.log(e, 'sssssb'); - // this.fileList = e.length > 0 ? e.map(item => ({ - // fileType: '0', - // fileUrl: item.response.data.url - // })) : []; // 当e为空时清空fileList - // if (e.length > 0) { - // this.formData.qualification = e[0].response.data.url; - // } else { - // this.formData.qualification = ''; - // } - // }, + onChangeImgs(e, rowIndex = 0) { console.log('onChangeFileList', e) @@ -594,9 +584,12 @@ async handleComfirm() { - let one=this.formData.tags1.map(item => item.tab).join(', ') - this.formData.tags=one; - console.log(this.formData,"this.formData"); + if (this.formData.tags1) { + let one=this.formData.tags1.map(item => item.tab).join(', ') + this.formData.tags=one; + console.log(this.formData,"this.formData"); + } + // console.log(this.formData.tags.map(item => item.tab).join(', ')," this.formData"); // if (!this.formData.type) { diff --git a/src/views/modules/volunteer/LifeCircleManagement/index.vue b/src/views/modules/volunteer/LifeCircleManagement/index.vue index 60120ce53..90fe3a357 100644 --- a/src/views/modules/volunteer/LifeCircleManagement/index.vue +++ b/src/views/modules/volunteer/LifeCircleManagement/index.vue @@ -359,7 +359,6 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.OrganizationaltypeList = data; - console.log(this.OrganizationaltypeList,"his.Organizationaltype"); } else { this.$message.error(msg) @@ -369,7 +368,7 @@ export default { handleprocessl(row){ this.showprocess=true this.EditList=row - console.log(row,this.fmData,"row"); + }, //关闭审查 @@ -379,7 +378,7 @@ export default { }, //成员管理 handleshowMember(row){ - console.log (row,this.fmData,"row"); + this.showMember=true this.fmData=row @@ -392,8 +391,8 @@ export default { //修改 handleEdit(row){ this.showAdd=true - this.formTitle="新增" - console.log(row,"row"); + this.formTitle="修改" + this.$nextTick(() => { this.$refs.ref_form.initForm("edit", row.id); }); @@ -452,8 +451,8 @@ if (code === 0) { this.tableData.forEach(item => { this.options.forEach(item1 => { - console.log(item1, "item1"); - console.log(item1.children, "item1.children"); + + if (Array.isArray(item1.children)) { item1.children.forEach(item2 => { if (item2.value.toString() == item.type) { @@ -464,8 +463,7 @@ if (code === 0) { } }); }); - - console.log(this.tableData, "this.tableData"); + } else { // 错误处理逻辑 } diff --git a/src/views/modules/volunteer/Venuemanagement/add.vue b/src/views/modules/volunteer/Venuemanagement/add.vue index 74a1d6297..97fd60dd0 100644 --- a/src/views/modules/volunteer/Venuemanagement/add.vue +++ b/src/views/modules/volunteer/Venuemanagement/add.vue @@ -460,7 +460,6 @@ async remoteMethod(query) { console.log(query, "sfsvsdv"); if (query !== '') { - const { msg, data } = await map.searchNearby(query); this.resultList = [] @@ -495,7 +494,10 @@ map.setMarker(lonlat[1], lonlat[0]); this.formData.latitude = lonlat[1]; this.formData.longitude = lonlat[0]; + this.formData.address=selPosition.address + selPosition.nam this.searchValue = selPosition.address + selPosition.name + console.log(this.formData.address," this.formData.address "); + }, diff --git a/src/views/modules/volunteer/Venuemanagement/info.vue b/src/views/modules/volunteer/Venuemanagement/info.vue index 4f3b87d02..efaa7e7c4 100644 --- a/src/views/modules/volunteer/Venuemanagement/info.vue +++ b/src/views/modules/volunteer/Venuemanagement/info.vue @@ -53,7 +53,7 @@ - { console.log(res); if (res.code == 0) { - this.tableData1 = res.data - + this.tableData1 = res.data.list + l } else { this.$message.error(res.msg)