diff --git a/src/views/modules/volunteer/VoluntaryOrganization/add.vue b/src/views/modules/volunteer/VoluntaryOrganization/add.vue
index 43cd604fb..0a5e3de57 100644
--- a/src/views/modules/volunteer/VoluntaryOrganization/add.vue
+++ b/src/views/modules/volunteer/VoluntaryOrganization/add.vue
@@ -66,7 +66,7 @@
-
+
@@ -299,21 +299,6 @@
this.formData.online = 0;
}
},
-
- // onChangeFileList(e) {
- // if (e.length > 0) {
- // let item = e[0];
- // let ob = {
- // fileType: '0',
- // fileUrl: item.response.data.url
- // };
- // this.fileList = [ob];
- // this.formData.coverPic = ob.fileUrl;
- // }
- // },
- removedImg() {
- this.formData.coverPic = ''
- },
onChangeFileList(e) {
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
@@ -321,11 +306,27 @@
fileUrl: item.response.data.url
})) : []; // 当e为空时清空fileList
if (e.length > 0) {
- this.formData.qualification = e[0].response.data.url;
+ this.formData.coverPic = e[0].response.data.url;
} else {
- this.formData.qualification = '';
+ this.formData.coverPic = '';
}
},
+
+ 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 = '';
+ // }
+ // },
onChangeFileList1(e) {
console.log(e, 'sssssb');
this.fileList1 = e.length > 0 ? e.map(item => ({
diff --git a/src/views/modules/volunteer/VolunteerProjects/add.vue b/src/views/modules/volunteer/VolunteerProjects/add.vue
index 47b527465..6f46dff99 100644
--- a/src/views/modules/volunteer/VolunteerProjects/add.vue
+++ b/src/views/modules/volunteer/VolunteerProjects/add.vue
@@ -40,8 +40,8 @@
-
-
+
+
@@ -144,15 +144,6 @@
recruitDeadline:"",//招募截止时间,
recruitRequirement:"",//招募要求
attachments:[
- {format: "png",
- name:"banner.png",
- type: "image",
- url: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20240912/36cbe79b43cd45d381e3c8e4f92e1c3d.png"
- }
-
-
-
-
],//附件
description:"",//项目简介
projectTitle:"",//项目标题
@@ -341,7 +332,40 @@
this.formData.online = 0;
}
},
-
+ onChangeFileList(e) {
+ console.log(e, 'sssssb');
+ this.fileList = e.length > 0 ? e.map(item => ({
+ fileType: '0',
+ fileUrl: item.response.data.url,
+ name: item.response.data.fileName,
+ url: item.response.data.url,
+ type: "image",
+ format: item.raw.name.split('.').pop(),
+ })) : []; // 当e为空时清空fileList
+ if (e.length > 0) {
+ this.formData.coverPic = e[0].response.data.url;
+ console.log( this.fileList, 'sssssb');
+ this.formData.attachments= this.fileList
+ } else {
+ this.formData.coverPic = '';
+ }
+ },
+ // onChangeFileList(e) {
+ // console.log(e, 'sssssb');
+ // this.fileList = e.length > 0 ? e.map(item => ({
+ // name: item.response.data.fileName,
+ // url: item.response.data.url,
+ // type: "image",
+ // format: item.raw.name.split('.').pop(),
+ // })) : []; // 当e为空时清空fileList
+ // if (e.length > 0) {
+ // this.formData.coverPic = e[0].response.data.url;
+ // console.log(this.fileList, 'sssssb');
+
+ // } else {
+ // this.formData.coverPic = '';
+ // }
+ // },
// onChangeFileList(e) {
// if (e.length > 0) {
// let item = e[0];
@@ -356,23 +380,23 @@
removedImg() {
this.formData.coverPic = ''
},
- onChangeFileList(e) {
- console.log(e, e.length, 'sssssb');
- this.fileList = e.length > 0 ? e.map(item => ({
- name: item.response.data.fileName,
- url: item.response.data.url,
- type:"image",
- format: item.raw.name.split('.').pop(),
- })) : []; // 当e为空时清空fileList
+ // onChangeFileList(e) {
+ // console.log(e, e.length, 'sssssb');
+ // this.fileList = e.length > 0 ? e.map(item => ({
+ // name: item.response.data.fileName,
+ // url: item.response.data.url,
+ // type:"image",
+ // format: item.raw.name.split('.').pop(),
+ // })) : []; // 当e为空时清空fileList
- console.log(this.fileList, e,'sssssb');
+ // console.log(this.fileList, e,'sssssb');
- if (e.length > 0) {
- // this.formData.attachments= this.fileList
- console.log(this.formData.attachments, 'sssssb');
- } else {
- }
- },
+ // if (e.length > 0) {
+ // // this.formData.attachments= this.fileList
+ // console.log(this.formData.attachments, 'sssssb');
+ // } else {
+ // }
+ // },
// onChangeImgs(e, rowIndex = 0) {
// console.log('onChangeFileList', e)
@@ -711,44 +735,7 @@
this.formData.longitude = lonlat[0];
this.searchValue = selPosition.address + selPosition.name
},
-
- resetData() {
- this.timeRange = []
- this.fileList = []
- this.searchValue = ''
- this.searchOptions = []
- this.resultList = []
- this.activityId = ''
- this.keyWords = ''
- this.online = false
- this.formType = ''
- this.summary = true
- this.formData = {
- id: "",
- typeId: "",
- activityName: "",//活动名称
- status: 0,//状态
- assistingParty: "",//协办方
- startTime: "",//开始时间
- endTime: "",//结束时间
- content: "",//活动内容
- address: "",//地址
- online: 0,//开关
- cutOffTime: "",//截止时间
- points: 0,//积分
- participants: 0,//活动人数
- sendMessage: 0,//推送数
- sumUp: "",//活动总结
- activityImgs: [],//图片列表
- longitude: this.$store.state.user.longitude, //经度
- latitude: this.$store.state.user.latitude//纬度
- // longitude: null, //经度
- // latitude: null//纬度
- }
- map=""
-
-
- },
+
// 开启加载动画
startLoading() {
loading = Loading.service({
diff --git a/src/views/modules/volunteer/VolunteerProjects/edit.vue b/src/views/modules/volunteer/VolunteerProjects/edit.vue
index c31d0a93f..052b6de7e 100644
--- a/src/views/modules/volunteer/VolunteerProjects/edit.vue
+++ b/src/views/modules/volunteer/VolunteerProjects/edit.vue
@@ -42,7 +42,7 @@
-
@@ -157,19 +157,16 @@
type: "image",
url: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20240912/36cbe79b43cd45d381e3c8e4f92e1c3d.png"
}
-
-
-
-
],//附件
description:"",//项目简介
projectTitle:"",//项目标题
projectLevel:'',//项目级别
projectScopeOrgId:"",//服务范围ID
publishUnitName:"",//发布单位名称
-
},
+ fileList1:[],
+
corganizerList: [],
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
customerId: localStorage.getItem('customerId'),
@@ -180,18 +177,23 @@
components: { Tinymce, UploadImage },
mounted() {
-
console.log(this.VolunteerList,"this.VolunteerList");
// this.formData = this.VolunteerList
-
this.formData.agencyName=this.$store.state.user.agencyName
if (this.$store.state.user.level=="district") {
this.formData.Servicelevel="区级"
-
}
this.getDetail()
this.volunteerservicetype()
},
+ watch: {
+ fileList1: {
+ handler(newValue, oldValue) {
+ console.log('fileList changed:', newValue);
+ },
+ deep: true // 开启深度监听
+ }
+ },
methods: {
// 获取志愿组织服务类型
@@ -349,10 +351,19 @@
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
- fileUrl: item.response.data.url
+ fileUrl: item.response.data.url,
+ name: item.response.data.fileName,
+ url: item.response.data.url,
+ type: "image",
+ format: item.raw.name.split('.').pop(),
})) : []; // 当e为空时清空fileList
if (e.length > 0) {
this.formData.coverPic = e[0].response.data.url;
+ console.log(this.fileList, 'sssssb');
+ this.formData.attachments= this.fileList
+
+ console.log(this.formData.attachments, 'sssssb');
+
} else {
this.formData.coverPic = '';
}
@@ -400,7 +411,12 @@
if (code === 0) {
this.formData = data
console.log(this.formData,"lkjsdlkdcjkl");
-
+ console.log(this.formData.attachments[0].url,"lkjsdlkdzxczccjk");
+ this.fileList1.push({fileUrl:this.formData.attachments[0].url})
+ // this.fileList.push(url)
+ debugger
+ console.log(this.fileList1,"lkjsdlkdzxczccfsdfdsjk");
+ debugger
} else {
this.$message.error(msg)
}
diff --git a/src/views/modules/volunteer/VolunteerProjects/index.vue b/src/views/modules/volunteer/VolunteerProjects/index.vue
index 0241c328c..cf113bdda 100644
--- a/src/views/modules/volunteer/VolunteerProjects/index.vue
+++ b/src/views/modules/volunteer/VolunteerProjects/index.vue
@@ -297,7 +297,6 @@ export default {
//关闭新增
showAddClose(){
console.log("sdlkfjklsdf1");
-
this.showAdd=false
this.getTableData()
},
diff --git a/src/views/modules/volunteer/VolunteerProjects/record.vue b/src/views/modules/volunteer/VolunteerProjects/record.vue
index 35bcd8859..28507a82c 100644
--- a/src/views/modules/volunteer/VolunteerProjects/record.vue
+++ b/src/views/modules/volunteer/VolunteerProjects/record.vue
@@ -50,8 +50,11 @@
- 查看
-
+
+
+
+
@@ -202,6 +205,8 @@
if (code === 0) {
this.tableData=data.list
this.total=data.total
+ console.log(this.tableData,"列表请求成功!!!!!!!!!!!!!!");
+
console.log("列表请求成功!!!!!!!!!!!!!!");
// console.log("列表请求成功!!!!!!!!!!!!!!");