-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
@@ -37,7 +36,7 @@
-
@@ -49,60 +48,62 @@
-
-
-
-
-
+
-
+
-
+
+
-
-
+
+
diff --git a/src/views/modules/volunteer/VolunteerProjects/add.vue b/src/views/modules/volunteer/VolunteerProjects/add.vue
index 7e3d8e7d7..47b527465 100644
--- a/src/views/modules/volunteer/VolunteerProjects/add.vue
+++ b/src/views/modules/volunteer/VolunteerProjects/add.vue
@@ -20,21 +20,21 @@
-
-
+
-
-
+
-
+
-
+
@@ -48,96 +48,51 @@
-
-
-
+
+
+
-
-
+
-
+
-
+
-
-
+
至
-
-
-
+
+
-
-
取 消
- 确 定
@@ -169,54 +124,42 @@
activityImgs: [],//活动照片
fileList:[],
searchValue:"",
- ServicetypeList:[
- { label: "敬老爱老", value: 1 },
- { label: "助残帮困", value: 2 },
- { label: "扶贫帮困", value: 3 },
- { label: "环保绿化", value: 4 },
- { label: "文化教育", value: 5 },
- { label: "扶贫帮困", value: 6 },
- { label: "其他", value: 7 },
- ],
- Organizationaltype:[
- { label: "社区", value: 1 },
- { label: "企业", value: 2 },
- { label: "学校", value: 3 },
+ ServicetypeListName:[
+
],
+ // Organizationaltype:[
+ // { label: "省", value: 1 },
+ // { label: "市", value: 2 },
+ // { label: "区", value: 3 },
+ // { label: "街道", value: 4 },
+ // { label: "社区", value: 5 },
+ // { label: "网格", value: 6 },
+
+ // ],
formData:
- {
- Servicelevel:"",//服务等级
- VolunteerPic:"",//品牌图片
- Volunteerbrand:"",//志愿品牌
- Organizational:"",//组织介绍
- fileList: [],//封面图片
- AdministratorIDCard:"",//身份证信息
- Administratorphone:"",//管理员电话
- AdministratorName:"",//管理员姓名
- Organizationaltype:"",//组织类型
- Servicetype:"",//服务类型
- OrganizationName:"",//组织名称
- agencyName:"",//所属组织
- Servicetype:[],
- id: "",
- typeId: "",
- activityName: "",//活动名称
- status: 0,//状态
- assistingParty: "",//协办方
- startTime: "",//开始时间
- endTime: "",//结束时间
- coverPic: "",//封面图片地址
- 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,//纬度
+ {serviceTimeFrom:"",//服务时间
+ serviceTimeTo:"",//服务时间
+ onlineStatus:"",//上线状态
+ serviceClasses:[],//服务类型
+ 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:"",//项目标题
+ projectLevel:'',//项目级别
+ projectScopeOrgId:"",//服务范围ID
+ publishUnitName:"",//发布单位名称
+
},
corganizerList: [],
@@ -229,15 +172,26 @@
components: { Tinymce, UploadImage },
mounted() {
+ this.volunteerservicetype()
console.log(this.$store.state.user,"this.$store.state.user");
-
+ this.formData.projectScopeOrgId=this.$store.state.user.agencyId
this.formData.agencyName=this.$store.state.user.agencyName
- if (this.$store.state.user.level=="district") {
+ this.formData.projectLevel=this.$store.state.user.levelCode
+ this.formData.publishUnitName=this.$store.state.user.agencyName
+ console.log( this.formData.projectLevel,"this.formData.projectLevel");
+ if (this.formData.projectLevel===3) {
+ console.log("sd;,flk ");
this.formData.Servicelevel="区级"
-
+ } else if (this.formData.projectLevel==4) {
+ this.formData.Servicelevel="街道"
+ }
+ else if (this.formData.projectLevel==5) {
+ this.formData.Servicelevel="社区"
+ }
+ else if (this.formData.projectLevel==6) {
+ this.formData.Servicelevel="网格"
}
this.activityType()
- this.listServerOrg()
},
methods: {
@@ -262,6 +216,28 @@
div.innerHTML = html;
return div.textContent || div.innerText || '';
},
+ // 获取志愿组织服务类型
+ volunteerservicetype() {
+ console.log("skldfjlsdfjlksjfd");
+ const url = "/sys/dict/data/dictlist"
+ let params = {
+ dictType: 'voluntary_project_service_class'
+ }
+ requestPost(url, params).then(res=>{
+ console.log(res,"res");
+ this.ServicetypeListName=res.data
+ })
+ // console.log(data,"sdlkfjlsdkf");
+
+ // if (code === 0) {
+ // this.ServicetypeListName = data;
+
+
+ // } else {
+ // this.$message.error(msg)
+ // }
+ console.log(this.ServicetypeListName," this.ServicetypeListName ");
+ },
// 上传成功
handleImgSuccess(res, file, fileList) {
@@ -381,31 +357,36 @@
this.formData.coverPic = ''
},
onChangeFileList(e) {
- console.log(e, 'sssssb');
+ console.log(e, e.length, '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
+
+ console.log(this.fileList, e,'sssssb');
+
if (e.length > 0) {
- this.formData.coverPic = e[0].response.data.url;
+ // this.formData.attachments= this.fileList
+ console.log(this.formData.attachments, 'sssssb');
} else {
- this.formData.coverPic = '';
}
},
- onChangeImgs(e, rowIndex = 0) {
- console.log('onChangeFileList', e)
- if (e.length > 0) {
- this.activityImgs = []
- e.forEach(item => {
- let ob = {
- fileType: '0',
- fileUrl: item.response.data.url
- }
- this.activityImgs.push(ob)
- })
- }
- },
+ // onChangeImgs(e, rowIndex = 0) {
+ // console.log('onChangeFileList', e)
+ // if (e.length > 0) {
+ // this.activityImgs = []
+ // e.forEach(item => {
+ // let ob = {
+ // fileType: '0',
+ // fileUrl: item.response.data.url
+ // }
+ // this.activityImgs.push(ob)
+ // })
+ // }
+ // },
// onChangeImgs(e) {
// this.activityImgs = [];
@@ -438,44 +419,44 @@
}
},
- async initForm(type, activityId) {
- this.startLoading()
- this.formType = type
- if (type === 'edit') {
- if (activityId.activityImgs || activityId.sumUp) {
- this.records = true
- } else {
- this.records = false
- }
- this.formData = activityId
- this.timeRange = [this.formData.startTime, this.formData.endTime]
- console.log(activityId,"activityId");
+ // async initForm(type, activityId) {
+ // this.startLoading()
+ // this.formType = type
+ // if (type === 'edit') {
+ // if (activityId.activityImgs || activityId.sumUp) {
+ // this.records = true
+ // } else {
+ // this.records = false
+ // }
+ // this.formData = activityId
+ // this.timeRange = [this.formData.startTime, this.formData.endTime]
+ // console.log(activityId,"activityId");
- if (activityId.coverPic) {
- let ob = {
- fileType: '0',
- fileUrl: activityId.coverPic
- };
- this.fileList = [ob];
- this.formData.coverPic = ob.fileUrl;
- if (this.formData.online == 1) {
- this.online = true
- }
- }
- } else if (type === 'records') {
- this.records = true
- } else if (type === 'summary') {
- this.formData = activityId
- this.formData.activityImgs = []
- console.log("this.formData", this.formData)
- this.records = true
- this.summary = false
- } else {
- this.records = false
- }
- this.endLoading()
+ // if (activityId.coverPic) {
+ // let ob = {
+ // fileType: '0',
+ // fileUrl: activityId.coverPic
+ // };
+ // this.fileList = [ob];
+ // this.formData.coverPic = ob.fileUrl;
+ // if (this.formData.online == 1) {
+ // this.online = true
+ // }
+ // }
+ // } else if (type === 'records') {
+ // this.records = true
+ // } else if (type === 'summary') {
+ // this.formData = activityId
+ // this.formData.activityImgs = []
+ // console.log("this.formData", this.formData)
+ // this.records = true
+ // this.summary = false
+ // } else {
+ // this.records = false
+ // }
+ // this.endLoading()
- },
+ // },
async getDemandOptions() {
this.$http
@@ -564,73 +545,59 @@
},
async handleComfirm() {
- if (!this.formData.agencyName) {
- this.$message.error('请选择所属组织');
- return;
- }
+ // if (!this.formData.agencyName) {
+ // this.$message.error('请选择所属组织');
+ // return;
+ // }
- if (!this.formData.Organizational) {
- this.$message.error('请填写项目介绍');
- return;
- }
-
- if (this.fileList.length === 0) {
- this.$message.error('请上传封面图片');
- return;
- }
-
- if (!this.formData.AdministratorIDCard) {
- this.$message.error('请输入身份证信息');
- return;
- }
-
- if (!this.formData.Administratorphone) {
- this.$message.error('请输入管理员电话');
- return;
- }
-
- if (!this.formData.AdministratorName) {
- this.$message.error('请输入管理员姓名');
- return;
- }
-
- if (!this.formData.Organizationaltype) {
- this.$message.error('请输入组织类型');
- return;
- }
-
- if (!this.formData.Servicetype) {
- this.$message.error('请输入服务类型');
- return;
- }
-
- if (!this.formData.OrganizationName) {
- this.$message.error('请填写发布单位');
- return;
- }
+ // if (!this.formData.Organizational) {
+ // this.$message.error('请填写项目介绍');
+ // return;
+ // }
+
+ // if (this.fileList.length === 0) {
+ // this.$message.error('请上传封面图片');
+ // return;
+ // }
+
+ // if (!this.formData.AdministratorIDCard) {
+ // this.$message.error('请输入身份证信息');
+ // return;
+ // }
+
+ // if (!this.formData.Administratorphone) {
+ // this.$message.error('请输入管理员电话');
+ // return;
+ // }
+
+ // if (!this.formData.AdministratorName) {
+ // this.$message.error('请输入管理员姓名');
+ // return;
+ // }
+
+ // if (!this.formData.Organizationaltype) {
+ // this.$message.error('请输入组织类型');
+ // return;
+ // }
+
+ // if (!this.formData.Servicetype) {
+ // this.$message.error('请输入服务类型');
+ // return;
+ // }
+
+ // if (!this.formData.OrganizationName) {
+ // this.$message.error('请填写发布单位');
+ // return;
+ // }
console.log(this.formData,"this.formData");
this.addActivity()
},
async addActivity() {
- if (this.formType === 'edit' || this.formType === 'summary') {
- let url = '/actual/base/communityActivity/update'
- const { data, code, msg } = await requestPost(url, this.formData)
- if (code === 0) {
- this.$message({
- type: 'success',
- message: '操作成功'
- })
- this.resetData()
- this.$emit('dialogOk')
- this.btnDisable = false
- } else {
- this.btnDisable = false
- this.$message.error(msg)
- }
- } else {
- let url = '/actual/base/communityActivity/save'
+ let url = '/voluntary/project/admin/create'
+ console.log(this.formData,"this.formData");
+
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
@@ -638,13 +605,13 @@
message: '操作成功'
})
this.resetData()
- this.$emit('dialogOk')
+ this.$emit('showAddClose')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
- }
+
},
@@ -764,7 +731,6 @@
assistingParty: "",//协办方
startTime: "",//开始时间
endTime: "",//结束时间
- coverPic: "",//封面图片地址
content: "",//活动内容
address: "",//地址
online: 0,//开关
diff --git a/src/views/modules/volunteer/VolunteerProjects/edit.vue b/src/views/modules/volunteer/VolunteerProjects/edit.vue
index 696183c03..c31d0a93f 100644
--- a/src/views/modules/volunteer/VolunteerProjects/edit.vue
+++ b/src/views/modules/volunteer/VolunteerProjects/edit.vue
@@ -3,38 +3,38 @@
-
-
-
+
-
-
+
-
-
+
-
-
+
-
+
-
+
@@ -48,106 +48,62 @@
-
-
-
+
+
+
-
-
+
-
+
-
+
-
-
+
至
-
-
-
+
+
-
-
取 消
- 确 定