This commit is contained in:
dong_bo0602 2020-06-20 15:04:00 +08:00
parent 481f06841b
commit 73514c88a1
2 changed files with 104 additions and 9 deletions

View File

@ -146,6 +146,22 @@
</tr>
<tr>
<td width="30%">服务区域</td>
<td width="70%">
<select v-model="volunteerRegisterInfo.serviceCity" @change="getVolunteerCounty">
<option :value="area.dictionaryId" v-for="(area,idx) in volunteerCity" :key="idx">{{area.dictionaryName}}</option>
</select>
</td>
</tr>
<tr>
<td width="30%">县区</td>
<td width="70%">
<select v-model="volunteerRegisterInfo.serviceCounty" @change="getVolunteerArea">
<option :value="area.dictionaryId" v-for="(area,idx) in volunteerCounty" :key="idx">{{area.dictionaryName}}</option>
</select>
</td>
</tr>
<tr>
<td width="30%">村乡</td>
<td width="70%">
<select v-model="volunteerRegisterInfo.serviceArea">
<option :value="area.dictionaryId" v-for="(area,idx) in volunteerArea" :key="idx">{{area.dictionaryName}}</option>
@ -208,8 +224,24 @@
<tr>
<td width="20%">所属区域</td>
<td width="80%">
<select v-model="volunteerTeamRegister.teamCity" @change="getVolunteerCounty">
<option :value="area.dictionaryId" v-for="(area,idx) in teamCity" :key="idx">{{area.dictionaryName}}</option>
</select>
</td>
</tr>
<tr>
<td width="30%">县区</td>
<td width="70%">
<select v-model="volunteerTeamRegister.teamCounty" @change="getVolunteerArea">
<option :value="area.dictionaryId" v-for="(area,idx) in teamCounty" :key="idx">{{area.dictionaryName}}</option>
</select>
</td>
</tr>
<tr>
<td width="30%">村乡</td>
<td width="70%">
<select v-model="volunteerTeamRegister.teamArea">
<option :value="area.dictionaryId" v-for="(area,idx) in volunteerArea" :key="idx">{{area.dictionaryName}}</option>
<option :value="area.dictionaryId" v-for="(area,idx) in teamArea" :key="idx">{{area.dictionaryName}}</option>
</select>
</td>
</tr>
@ -611,12 +643,16 @@ export default {
token: window.sessionStorage.getItem('token'),
history: [],
isVolunteer: false,
volunteerCity: [],
volunteerCounty: [],
volunteerArea: [],
volunteerType: [],
volunteerIndustry: [],
volunteerRegisterInfo: {
agree: true,
openExperience: '1',
serviceCity: '',
serviceCounty: '',
serviceArea: '',
serviceType: '',
serviceIndustry: ''
@ -628,7 +664,9 @@ export default {
photo: '',
teamArea: '',
teamName: '',
teamWatchword: ''
teamWatchword: '',
teamCity: '',
teamCounty: ''
},
myTeam: [],
checkTeamDetail: false,
@ -639,7 +677,10 @@ export default {
otherTeamDetail: [],
signedActivity: [],
signedVolunteer: [],
isLoading: false
isLoading: false,
teamCity: [],
teamCounty: [],
teamArea: []
}
},
computed: {
@ -674,12 +715,15 @@ export default {
this.getVenueTicket()
} else if (tab === 3) {
this.userIsVolunteer()
this.getVolunteerArea()
this.getVolunteerCity()
} else if (tab === 5) {
this.page.rows = 7
this.getMyTeam()
} else if (tab === 4) {
this.getVolunteerArea()
this.volunteerTeamRegister.teamArea = ''
this.volunteerTeamRegister.teamCity = ''
this.volunteerTeamRegister.teamCounty = ''
this.getVolunteerCity()
} else if (tab === 6) {
this.page.rows = 10
this.getOtherTeamList()
@ -881,14 +925,60 @@ export default {
}
},
//
getVolunteerArea: function () {
getVolunteerCity: function () {
var self = this
axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/761d8633-3c2f-4e92-b32d-fb50d3dc07b7', {
axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/4a03e904-81e2-48e9-9006-e15ea4a6bc69', {
headers: {
token: self.token
}
}).then(function (res) {
self.volunteerArea = res.data
if (self.tab === 3) {
self.volunteerCity = res.data
} else if (self.tab === 4) {
self.teamCity = res.data
}
})
},
//
getVolunteerCounty: function () {
var self = this
var county
if (self.tab === 3) {
county = self.volunteerRegisterInfo.serviceCity
} else if (self.tab === 4) {
county = self.volunteerTeamRegister.teamCity
}
axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/' + county, {
headers: {
token: self.token
}
}).then(function (res) {
if (self.tab === 3) {
self.volunteerCounty = res.data
} else if (self.tab === 4) {
self.teamCounty = res.data
}
})
},
//
getVolunteerArea: function () {
var self = this
var area
if (self.tab === 3) {
area = self.volunteerRegisterInfo.serviceCounty
} else if (self.tab === 4) {
area = self.volunteerTeamRegister.teamCounty
}
axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/' + area, {
headers: {
token: self.token
}
}).then(function (res) {
if (self.tab === 3) {
self.volunteerArea = res.data
} else if (self.tab === 4) {
self.teamArea = res.data
}
})
},
//
@ -925,7 +1015,7 @@ export default {
self.isVolunteer = true
self.getVolunteerInfo()
}
self.getVolunteerArea()
self.getVolunteerCity()
self.getVolunteerType()
self.getVolunteerIndustry()
})
@ -953,10 +1043,14 @@ export default {
}
}).then(function (res) {
self.volunteerRegisterInfo.openExperience = res.data.openExperience
self.volunteerRegisterInfo.serviceCity = res.data.serviceCity
self.volunteerRegisterInfo.serviceCounty = res.data.serviceCounty
self.volunteerRegisterInfo.serviceArea = res.data.serviceArea
self.volunteerRegisterInfo.serviceIndustry = res.data.serviceIndustry
self.volunteerRegisterInfo.serviceType = res.data.serviceType
self.volunteerId = res.data.volunteerId
self.getVolunteerCounty()
self.getVolunteerArea()
})
},
//

View File

@ -17,6 +17,7 @@
</div>
<div class="venue-info">
<h3>{{volunteerDetail.serviceName}}</h3>
<p>活动地址{{volunteerDetail.address}}</p>
<p>活动时间{{volunteerDetail.startTime}}{{volunteerDetail.endTime}}</p>
<p>招募人数{{volunteerDetail.count}}</p>
<p>服务要求{{volunteerDetail.serviceRequirement}}</p>