From d49589e9ec774919e720a83d5915a252e73db080 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: Mon, 23 Sep 2024 14:33:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=91=E6=8D=A2=E7=A7=AF=E5=88=86=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E9=87=91=E9=A2=9D=EF=BC=8C=E5=8D=B7=EF=BC=8C=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E9=A1=B9=E7=9B=AE=E7=AD=89=E7=AD=89=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MemberManagement.vue | 4 +- .../modules/volunteer/activityArchive/add.vue | 10 +- .../volunteer/activityArchive/realselect.vue | 2 +- .../volunteer/activityArchive/select.vue | 492 ++++++++++++------ .../volunteer/pointsRedemption/add.vue | 9 +- 5 files changed, 352 insertions(+), 165 deletions(-) diff --git a/src/views/modules/volunteer/VoluntaryOrganization/MemberManagement.vue b/src/views/modules/volunteer/VoluntaryOrganization/MemberManagement.vue index 23d61c8fb..041c2c416 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/MemberManagement.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/MemberManagement.vue @@ -93,7 +93,7 @@ async getlist() { const url = "/voluntary/volunteerInfo/page"; let params={ - id:this.list.id, + // id:this.list.id, name:this.formData.name, mobile:this.formData.mobile, // description:this.description, @@ -102,7 +102,7 @@ pageSize:this.pageSize, // pointsDelta:this.Positive+this.integralnum, // primaryPoints:this.tableData.points - volunteerOrgId:this.formData.volunteerOrgId, + volunteerOrgId:this.list.id, startTime:this.formData.startTime, endTime:this.formData.endTime } diff --git a/src/views/modules/volunteer/activityArchive/add.vue b/src/views/modules/volunteer/activityArchive/add.vue index 93e6c95a3..f271800e1 100644 --- a/src/views/modules/volunteer/activityArchive/add.vue +++ b/src/views/modules/volunteer/activityArchive/add.vue @@ -456,15 +456,7 @@ export default { 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 "); }, diff --git a/src/views/modules/volunteer/activityArchive/realselect.vue b/src/views/modules/volunteer/activityArchive/realselect.vue index 231d7d7cd..fc266b06b 100644 --- a/src/views/modules/volunteer/activityArchive/realselect.vue +++ b/src/views/modules/volunteer/activityArchive/realselect.vue @@ -87,7 +87,7 @@ - {{ formData.projectTitle }} + {{ formData.projectTitle}} diff --git a/src/views/modules/volunteer/activityArchive/select.vue b/src/views/modules/volunteer/activityArchive/select.vue index ba9da1895..5fab32b58 100644 --- a/src/views/modules/volunteer/activityArchive/select.vue +++ b/src/views/modules/volunteer/activityArchive/select.vue @@ -2,129 +2,216 @@
-
- - - - - - - - - -
- -
-
- -
- - -
-
- - - - - - - -
- - 不限名额 -
-
- - - - - - - - - - - - -
-
-
- -
- - + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 不限名额 +
+
+
+ + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 至 + format="yyyy-MM-dd HH:mm:ss" placeholder="开始时间" style="width:195px"> + + format="yyyy-MM-dd HH:mm:ss" placeholder="结束时间" style="width:195px" @change="controlTime "> - - - + + + + + +
+ +
+
+
+ + + + + + + + +
+ + + + +
+
+
+
+ + + -
- -
- - - - -
-
-
-
-
-
- - - - - - - + + + + +
+ + +
+ +
+ + + + + + + + + + + + + +
+
+
+ + + + +
+
+
-
- -
- - -
+ + +
+ +
取 消 @@ -151,8 +238,24 @@ var geocoder // 新建一个正逆地址解析类 export default { data () { return { + serviceLevelList: [ + { + id: 0, + name: "区级" + }, + { + id: 1, + name: "街道级" + }, + { + id: 2, + name: "社区级" + } + + ], loading: false, searchOptions: [], + ServicetypeListName:[], orgOptionProps: { value: 'agencyId', label: 'agencyName', @@ -160,55 +263,59 @@ export default { emitPath: false, multiple: false, checkStrictly: true - }, - customerId: localStorage.getItem('customerId'), - uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', - orgOptions:[], + }, + customerId: localStorage.getItem('customerId'), + uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', + orgOptions: [], resultList: [], - btnDisable: false, - searchValue:"", + btnDisable: false, + searchValue: "", formData: { - title:"", - agencyId:"", - projectId:"", - content:"", - points:10, - imgs:"", - deadline:"", - strTime:"", - endTime:"", - signInTime:"", - signOutTime:"", - quota:'', - conditions:"", - notQuota:'', - linkman:"", - linkMobile:"", - address:"", - longitude: this.$store.state.user.longitude, //经度 - latitude: this.$store.state.user.latitude,//纬度 - type:"", - online:0, - sponsors:[ - ] + typeName:"", + serviceLevel: '', + projectTitle: "", + title: "", + agencyId: "", + projectId: "", + content: "", + points: 10, + imgs: "", + deadline: "", + strTime: "", + endTime: "", + signInTime: "", + signOutTime: "", + quota: '', + conditions: "", + notQuota: '', + linkman: "", + linkMobile: "", + address: "", + longitude: this.$store.state.user.longitude, //经度 + latitude: this.$store.state.user.latitude,//纬度 + type: "", + online: 0, + sponsors: [ + ] }, - activityImgs:[],//图片 - typeList:[ - { - id:"1", - name:"线上活动" - }, - { - id:"2", - name:"线下活动" - } - ], + activityImgs: [],//图片 + typeList: [ + { + id: "1", + name: "线上活动" + }, + { + id: "2", + name: "线下活动" + } + ], + typeList1: [],//所属项目 uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', - tableDate:{}, - rules: { - linkMobile: [ + tableDate: {}, + rules: { + linkMobile: [ { required: true, message: '联系电话不能为空', trigger: 'blur' }, { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' } ], @@ -218,7 +325,7 @@ export default { content: [ { required: true, message: '活动详情不能为空', trigger: 'blur' }, ], - + type: [ { required: true, message: '活动类型不能为空', trigger: 'blur' }, ], @@ -247,15 +354,80 @@ export default { }, components: { fileList,Tinymce,UploadImage}, async mounted () { + this.getTableData2() + this.volunteerservicetype() this.getTableData() // this.startLoading() // await this.loadInfo() // this.endLoading() this.getOrgTreeList() + }, methods: { + // 获取志愿组织服务类型 + 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(this.ServicetypeListName, " this.ServicetypeListName "); + }, + //活动级别调取积分 + handeleserviceLevel() { + console.log(this.formData.serviceLevel, "this.formData.serviceLevel"); + this.getintegralComputation() + }, + //服务时长调取积分 + handeleserviceTime() { + console.log(this.formData.serviceTime, "this.formData.serviceLevel"); + this.getintegralComputation() + }, + //计算积分 + async getintegralComputation() { + const url = "/voluntary/activityInfo/integralComputation"; + let params = { + level: this.formData.serviceLevel, + serviceTime: this.formData.serviceTime, + } + requestGet(url, params).then(res => { + console.log(res, "res"); + this.formData.points = res.data + }) + + + }, + //获取projectId + handleClickKey1(index) { + console.log(index); + this.formData.projectId = index + + }, + //查询所属项目 + async getTableData2() { + const url = "/voluntary/project/admin/list"; + let params = { + projectTitle: this.formData.projectTitle, + pageSize: 9999, + pageNo: 1, + onlineStatus: 1 + // ...this.formData + } + const { data, code, msg } = await requestGet(url, params); + if (code === 0) { + console.log("列表请求成功!!!!!!!!!!!!!!"); + this.total = data.total || 0; + this.typeList1 = data.list + } else { + } + }, //删除动态 removeDomain(item) { if (item.id) { @@ -284,6 +456,22 @@ export default { this.formData.sponsors=res.data.sponsors, this.searchValue=res.data.address this.formData.activityImgs=[{url:res.data.imgs}] + this.typeList1.forEach(item => { + console.log(item,"item"); + console.log(item.label,"item.label111"); + if (item.id == this.formData.projectId) { + console.log(item.projectTitle,"item.label"); + this.formData.projectTitle=item.projectTitle + } + }); + this.ServicetypeListName.forEach(item => { + console.log(item,"item"); + console.log(item.value,this.formData.type.toString(),"item.lsdfsfsabel111"); + if (item.value == this.formData.type.toString()) { + console.log(item.projectTitle,"item.label"); + this.formData.typeName=item.label + } + }); } else { this.$message.error(res.msg); diff --git a/src/views/modules/volunteer/pointsRedemption/add.vue b/src/views/modules/volunteer/pointsRedemption/add.vue index 6b0154e55..5fabc40ec 100644 --- a/src/views/modules/volunteer/pointsRedemption/add.vue +++ b/src/views/modules/volunteer/pointsRedemption/add.vue @@ -88,8 +88,15 @@
+ -
+
+
+
+ +
+
+