From 57db14bb87fcb7c8509703002fb74ae71c5a71d7 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, 12 Sep 2024 17:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=EF=BC=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E5=8A=A8=E6=80=81=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/volunteer/Projectreview/index.vue | 495 ++++++ .../volunteer/Projectreview/process.vue | 146 ++ .../volunteer/VoluntaryOrganization/add.vue | 10 +- .../volunteer/VoluntaryOrganization/edit.vue | 38 +- .../volunteer/VoluntaryOrganization/index.vue | 28 +- .../volunteer/VoluntaryOrganization/info.vue | 1392 +++++++++-------- .../volunteer/VolunteerProjects/add.vue | 430 +++-- .../volunteer/VolunteerProjects/edit.vue | 529 +++---- .../volunteer/VolunteerProjects/index.vue | 328 +--- .../volunteer/VolunteerProjects/info.vue | 546 +++---- .../volunteer/VolunteerProjects/record.vue | 169 +- .../volunteer/VolunteerProjects/recruit.vue | 63 +- .../modules/volunteer/activityArchive/add.vue | 101 +- .../volunteer/activityArchive/select.vue | 93 +- .../volunteer/pointsRedemption/add.vue | 126 +- .../volunteer/pointsRedemption/update.vue | 57 +- 16 files changed, 2388 insertions(+), 2163 deletions(-) create mode 100644 src/views/modules/volunteer/Projectreview/index.vue create mode 100644 src/views/modules/volunteer/Projectreview/process.vue diff --git a/src/views/modules/volunteer/Projectreview/index.vue b/src/views/modules/volunteer/Projectreview/index.vue new file mode 100644 index 000000000..8d1a5acb5 --- /dev/null +++ b/src/views/modules/volunteer/Projectreview/index.vue @@ -0,0 +1,495 @@ + + + + + + \ No newline at end of file diff --git a/src/views/modules/volunteer/Projectreview/process.vue b/src/views/modules/volunteer/Projectreview/process.vue new file mode 100644 index 000000000..87a97df80 --- /dev/null +++ b/src/views/modules/volunteer/Projectreview/process.vue @@ -0,0 +1,146 @@ + + + \ No newline at end of file diff --git a/src/views/modules/volunteer/VoluntaryOrganization/add.vue b/src/views/modules/volunteer/VoluntaryOrganization/add.vue index 327822523..43cd604fb 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/add.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/add.vue @@ -27,8 +27,8 @@ - - + + @@ -505,7 +505,7 @@ const url = "/sys/dict/data/dictlist" let params = { - dictType: 'volunteer_org_service_type' + dictType: 'voluntary_project_service_class' } const { data, code, msg } = await requestPost(url, params) @@ -515,6 +515,8 @@ } else { this.$message.error(msg) } + console.log(this.ServicetypeListName); + }, //加载组织 async loadFormData() { @@ -575,7 +577,7 @@ return; } - if (!this.formData.Organizationaltype) { + if (!this.formData.orgType) { this.$message.error('请输入组织类型'); return; } diff --git a/src/views/modules/volunteer/VoluntaryOrganization/edit.vue b/src/views/modules/volunteer/VoluntaryOrganization/edit.vue index 633a68502..172f298ee 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/edit.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/edit.vue @@ -67,7 +67,7 @@ @@ -84,10 +84,11 @@ - + + @@ -322,11 +323,11 @@ 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 = ''; - } + // if (e.length > 0) { + // this.formData.qualification = e[0].response.data.url; + // } else { + // this.formData.qualification = ''; + // } }, onChangeFileList1(e) { console.log(e, 'sssssb'); @@ -494,11 +495,16 @@ } const { data, code, msg } = await requestPost(url, params) - if (code === 0) { + if (code === 0&&data) { this.formData = data[0]; this.searchValue= this.formData.address - this.formData.fileList=[{url:data[0].qualification}] + console.log(data[0].qualification,"sdlkfjlsdfj"); + this.fileList=[] + this.fileList.push({url:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20240911/056a2728afb34a9bbcecf14e8d3b08f2.jpg",type:"image"}) + this.fileList1.push({url:data[0].brandImgList}) console.log(this.formData,"this.formData"); + console.log(this.fileList,"this.fileList"); + } else { this.$message.error(msg) @@ -524,18 +530,16 @@ // 获取志愿组织服务类型 async volunteerservicetype () { const url = "/sys/dict/data/dictlist" - let params = { - dictType: 'volunteer_org_service_type' + dictType: 'voluntary_project_service_class' } - const { data, code, msg } = await requestPost(url, params) - if (code === 0) { this.ServicetypeListName = data; } else { this.$message.error(msg) } + }, //加载组织 async loadFormData() { @@ -596,7 +600,7 @@ return; } - if (!this.formData.Organizationaltype) { + if (!this.formData.orgType) { this.$message.error('请输入组织类型'); return; } @@ -622,7 +626,7 @@ message: '操作成功' }) // this.resetData() - this.$emit('showAddClose') + this.$emit('showEditClose') this.btnDisable = false } else { this.btnDisable = false @@ -636,7 +640,7 @@ handleCancle() { console.log("sdlkfjklsdf "); - this.$emit('showAddClose') + this.$emit('showEditClose') }, diff --git a/src/views/modules/volunteer/VoluntaryOrganization/index.vue b/src/views/modules/volunteer/VoluntaryOrganization/index.vue index 5e53def31..ae633f054 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/index.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/index.vue @@ -49,7 +49,7 @@ {{ scope.row.enabled === 1 ? '关闭' : '显示' }} --> - 导入记录中查看进度", duration: 3000 - }); + });debugger let than = this; console.log(than,"than"); - + debugger // document.getElementById('clickA').addEventListener('click', function () { // than.$router.replace('/main/importRecord-index'); // }); const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append('file', file.file); //添加文件对象 formData.append('code', ''); //添加文件对象 + debugger console.log(formData,"formData"); let url = '/voluntary/volunteerOrg/import' @@ -313,18 +315,24 @@ export default { } }, beforeExcelUpload(file) { - console.log(file,"file"); - const isType = file.type === 'application/vnd.ms-excel'; + console.log(file,"file1"); + debugger + const isType = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; + debugger const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; const fileType = isType || isTypeComputer; + debugger const isLt1M = file.size / 1024 / 1024 < 10; + debugger if (!fileType) { this.$message.error('上传文件只能是xls/xlsx格式!'); } - + debugger if (!isLt1M) { this.$message.error('上传文件大小不能超过 10MB!'); } + console.log(isLt1M,"isLt1M"); + debugger return fileType && isLt1M; }, handleDel(row){ diff --git a/src/views/modules/volunteer/VoluntaryOrganization/info.vue b/src/views/modules/volunteer/VoluntaryOrganization/info.vue index 1f2923dc6..3cf307e72 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/info.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/info.vue @@ -1,35 +1,34 @@ + 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 @@
- - - + + + - - + - +
- +
- - + - - - + + - -
取 消 - 确 定
+