取 消
@@ -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 @@
+
+
+