0616
This commit is contained in:
parent
846548087e
commit
b6effdaedf
@ -124,7 +124,7 @@ export default {
|
||||
},
|
||||
checkLogin: function () {
|
||||
var self = this
|
||||
var token = localStorage.getItem('token')
|
||||
var token = window.sessionStorage.getItem('token')
|
||||
if (token) {
|
||||
axios.get('http://192.168.0.113:7001/usercenter/app/user/getappuser', {
|
||||
headers: {
|
||||
|
@ -153,7 +153,7 @@ export default {
|
||||
changeTab: function (tab) {
|
||||
var self = this
|
||||
if (tab > 1) {
|
||||
var token = localStorage.getItem('token')
|
||||
var token = window.sessionStorage.getItem('token')
|
||||
if (token) {
|
||||
this.tab = tab
|
||||
} else {
|
||||
@ -364,7 +364,7 @@ export default {
|
||||
phoneNumber: this.verificationCodeInfo.phone,
|
||||
smsCode: this.verificationCodeInfo.verificationCode
|
||||
}
|
||||
var token = localStorage.getItem('token')
|
||||
var token = window.sessionStorage.getItem('token')
|
||||
axios.post('http://192.168.0.109:8082/venuebooking/app/booking/savebookinginfo', orderInfo, {
|
||||
headers: {
|
||||
'token': token
|
||||
|
@ -47,7 +47,7 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.status === 200) {
|
||||
localStorage.setItem('token', res.data.data)
|
||||
window.sessionStorage.setItem('token', res.data.data)
|
||||
self.$layer.msg('登录成功')
|
||||
setTimeout(function () {
|
||||
self.$router.go(-1)
|
||||
|
@ -10,6 +10,7 @@
|
||||
<li :class="{active: tab == 3}" @click="changeTab(3)">志愿者注册</li>
|
||||
<li :class="{active: tab == 4}" @click="changeTab(4)">团队注册</li>
|
||||
<li :class="{active: tab == 5}" @click="changeTab(5)">我的团队</li>
|
||||
<li :class="{active: tab == 6}" @click="changeTab(6)">其他团队</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="info-right">
|
||||
@ -120,9 +121,6 @@
|
||||
</ul>
|
||||
<span @click="paging(page.page + 1)" v-if="page.page < page.totalPage">下一页</span>
|
||||
<span @click="paging(page.totalPage)">尾页</span>
|
||||
<input type="text" v-model="changePage" v-if="showJumpBtn">
|
||||
<i v-if="showJumpBtn">/{{page.totalPage}}页</i>
|
||||
<button v-if="showJumpBtn" @click="doJumpPage">跳转</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="volunteer-register" v-show="tab == 3">
|
||||
@ -229,7 +227,7 @@
|
||||
<span>我的团队</span>
|
||||
</div>
|
||||
<div class="my-team-box" v-if="!checkTeamDetail">
|
||||
<table>
|
||||
<table v-if="myTeam.length > 0">
|
||||
<tr>
|
||||
<th width="8%">序号</th>
|
||||
<th width="27%">团队名称</th>
|
||||
@ -252,7 +250,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="pager">
|
||||
<div class="pager" v-if="myTeam.length > 0">
|
||||
<span @click="paging(1)">首页</span>
|
||||
<span @click="paging(page.page - 1)" v-if="page.page > 1">上一页</span>
|
||||
<ul v-if="page.totalPage > 0 && page.totalPage <= 5">
|
||||
@ -273,9 +271,6 @@
|
||||
</ul>
|
||||
<span @click="paging(page.page + 1)" v-if="page.page < page.totalPage">下一页</span>
|
||||
<span @click="paging(page.totalPage)">尾页</span>
|
||||
<input type="text" v-model="changePage">
|
||||
<i>/{{page.totalPage}}页</i>
|
||||
<button @click="doJumpPage">跳转</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="team-detail" v-else>
|
||||
@ -297,6 +292,124 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="team-user">
|
||||
<h3>团队成员</h3>
|
||||
<table v-if="memberList.length > 0">
|
||||
<tr>
|
||||
<td width="10%">序号</td>
|
||||
<td width="30%">姓名</td>
|
||||
<td width="30%">加入时间</td>
|
||||
<td width="30%">成员类型</td>
|
||||
</tr>
|
||||
<tr v-for="(mumber, idx) in memberList" :key="idx">
|
||||
<td>{{idx+1}}</td>
|
||||
<td>{{mumber.memberName}}</td>
|
||||
<td>{{mumber.inputTime}}</td>
|
||||
<td v-if="mumber.status == 1">
|
||||
<span v-if="mumber.memberType == 1">成员</span>
|
||||
<span v-else>队长</span>
|
||||
</td>
|
||||
<td v-else-if="mumber.status == 0">
|
||||
申请加入
|
||||
<button @click="isAgreeJoin(mumber.teamMemberId, 1)">同意</button>
|
||||
<button @click="isAgreeJoin(mumber.teamMemberId, 2)">驳回</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p v-else>暂无成员</p>
|
||||
<div class="pager" v-if="memberList.length > 0">
|
||||
<span @click="paging(1)">首页</span>
|
||||
<span @click="paging(page.page - 1)" v-if="page.page > 1">上一页</span>
|
||||
<ul v-if="page.totalPage > 0 && page.totalPage <= 5">
|
||||
<li v-for="cpage in page.totalPage" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="page.totalPage > 5">
|
||||
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.totalPage - 5 + cpage}}
|
||||
</li>
|
||||
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.page - (3 - cpage)}}
|
||||
</li>
|
||||
</ul>
|
||||
<span @click="paging(page.page + 1)" v-if="page.page < page.totalPage">下一页</span>
|
||||
<span @click="paging(page.totalPage)">尾页</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="other-team" v-show="tab == 6">
|
||||
<div class="box-title">
|
||||
<span>其他团队</span>
|
||||
</div>
|
||||
<div class="other-team-box" v-if="!checkOtherTeam">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="8%">序号</td>
|
||||
<td width="25%">团队名</td>
|
||||
<td width="30%">团队口号</td>
|
||||
<td width="20%">所属区域</td>
|
||||
<td width="17%">操作</td>
|
||||
</tr>
|
||||
<tr v-for="(list,idx) in otherTeam" :key="idx">
|
||||
<td>{{idx+1}}</td>
|
||||
<td>{{list.teamName}}</td>
|
||||
<td>{{list.teamWatchword}}</td>
|
||||
<td>{{list.teamAreaDictionaryName}}</td>
|
||||
<td>
|
||||
<button @click="getTeamDetail(list.teamId)">查看详情</button>
|
||||
<button @click="applyJoin(list.teamId)" v-if="list.checkStatus == ''">申请加入</button>
|
||||
<button v-else-if="list.checkStatus == '0'" class="bad">已申请</button>
|
||||
<button v-else-if="list.checkStatus == '2'" class="bad">审核驳回</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="pager" v-if="otherTeam.length > 0">
|
||||
<span @click="paging(1)">首页</span>
|
||||
<span @click="paging(page.page - 1)" v-if="page.page > 1">上一页</span>
|
||||
<ul v-if="page.totalPage > 0 && page.totalPage <= 5">
|
||||
<li v-for="cpage in page.totalPage" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="page.totalPage > 5">
|
||||
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.totalPage - 5 + cpage}}
|
||||
</li>
|
||||
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.page - (3 - cpage)}}
|
||||
</li>
|
||||
</ul>
|
||||
<span @click="paging(page.page + 1)" v-if="page.page < page.totalPage">下一页</span>
|
||||
<span @click="paging(page.totalPage)">尾页</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="team-detail" v-else>
|
||||
<div class="back-list" @click="backToOtherTeam">返回</div>
|
||||
<div class="team-avatar-name">
|
||||
<img :src="'http://192.168.0.111:8888/volunteer/route/file/downloadfile/false/' + teamDetail.photo" alt="">{{teamDetail.teamName}}
|
||||
</div>
|
||||
<div class="team-info">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="15%">团队口号</td>
|
||||
<td width="35%">{{teamDetail.teamWatchword}}</td>
|
||||
<td width="15%">所属区域</td>
|
||||
<td width="35%">{{teamDetail.teamAreaDictionaryName}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>团队介绍</td>
|
||||
<td colspan="3" v-html="teamDetail.content"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="team-user">
|
||||
<h3>团队成员</h3>
|
||||
<table v-if="memberList.length > 0">
|
||||
@ -377,7 +490,7 @@ export default {
|
||||
rows: 3,
|
||||
totalPage: 1
|
||||
},
|
||||
token: localStorage.getItem('token'),
|
||||
token: window.sessionStorage.getItem('token'),
|
||||
history: [],
|
||||
isVolunteer: false,
|
||||
volunteerArea: [],
|
||||
@ -402,7 +515,10 @@ export default {
|
||||
myTeam: [],
|
||||
checkTeamDetail: false,
|
||||
teamDetail: {},
|
||||
memberList: []
|
||||
memberList: [],
|
||||
otherTeam: [],
|
||||
checkOtherTeam: false,
|
||||
otherTeamDetail: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -411,10 +527,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doJumpPage: function () {
|
||||
this.page.page = this.changePage
|
||||
this.getNews()
|
||||
},
|
||||
paging: function (page) {
|
||||
this.page.page = page
|
||||
if (this.tab === 2) {
|
||||
@ -423,6 +535,8 @@ export default {
|
||||
this.getMyTeam()
|
||||
} else if (this.tab === 5 && this.checkTeamDetail) {
|
||||
this.getTeamMember()
|
||||
} else if (this.tab === 6) {
|
||||
this.getOtherTeamList()
|
||||
}
|
||||
},
|
||||
// 切换选项卡
|
||||
@ -441,6 +555,8 @@ export default {
|
||||
this.getMyTeam()
|
||||
} else if (tab === 4) {
|
||||
this.getVolunteerArea()
|
||||
} else if (tab === 6) {
|
||||
this.getOtherTeamList()
|
||||
}
|
||||
},
|
||||
// 获取场馆,按门票
|
||||
@ -501,7 +617,7 @@ export default {
|
||||
token: self.token
|
||||
}
|
||||
}).then(function (res) {
|
||||
localStorage.setItem('token', res.data.data)
|
||||
window.sessionStorage.setItem('token', res.data.data)
|
||||
self.$layer.msg('保存成功')
|
||||
setTimeout(function () {
|
||||
location.reload()
|
||||
@ -744,8 +860,13 @@ export default {
|
||||
// 获取我的团队列表
|
||||
getMyTeam: function () {
|
||||
var self = this
|
||||
var info = {
|
||||
page: self.page.page,
|
||||
rows: self.page.rows,
|
||||
myTeam: true
|
||||
}
|
||||
axios.get('http://192.168.0.111:8888/volunteer/app/team/myjointeam', {
|
||||
params: self.page,
|
||||
params: info,
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
@ -774,7 +895,11 @@ export default {
|
||||
var self = this
|
||||
self.page.page = 1
|
||||
self.page.rows = 4
|
||||
self.checkTeamDetail = true
|
||||
if (self.tab === 5) {
|
||||
self.checkTeamDetail = true
|
||||
} else if (self.tab === 6) {
|
||||
self.checkOtherTeam = true
|
||||
}
|
||||
axios.get('http://192.168.0.111:8888/volunteer/app/team/getteambyid/' + id, {
|
||||
headers: {
|
||||
token: self.token
|
||||
@ -809,6 +934,67 @@ export default {
|
||||
this.page.page = 1
|
||||
this.page.rows = 7
|
||||
this.getMyTeam()
|
||||
},
|
||||
// 获取其他团队列表
|
||||
getOtherTeamList: function () {
|
||||
var self = this
|
||||
var info = {
|
||||
page: self.page.page,
|
||||
rows: self.page.rows,
|
||||
otherTeam: true
|
||||
}
|
||||
axios.get('http://192.168.0.111:8888/volunteer/app/team/otherteamm', {
|
||||
params: info,
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}).then(function (res) {
|
||||
console.log(res)
|
||||
self.otherTeam = res.data.rows
|
||||
self.page.totalPage = Math.ceil(res.data.total / self.page.rows)
|
||||
})
|
||||
},
|
||||
// 申请加入团队
|
||||
applyJoin: function (id) {
|
||||
var self = this
|
||||
axios.post('http://192.168.0.111:8888/volunteer/app/teammember/saveteammember', {
|
||||
teamId: id
|
||||
}, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}).then(function (res) {
|
||||
console.log(res)
|
||||
if (res.status === 200) {
|
||||
self.$layer.msg('申请成功!')
|
||||
self.getOtherTeamList()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 返回其他团队列表
|
||||
backToOtherTeam: function () {
|
||||
this.checkOtherTeam = false
|
||||
this.page.rows = 10
|
||||
this.page.page = 1
|
||||
this.getOtherTeamList()
|
||||
},
|
||||
// 审批加入/驳回
|
||||
isAgreeJoin: function (id, type) {
|
||||
var self = this
|
||||
axios.put('http://192.168.0.111:8888/volunteer/app/teammember/updateteammember/' + id, {
|
||||
status: type
|
||||
}, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}).then(function (res) {
|
||||
console.log(res)
|
||||
if (type === 1) {
|
||||
self.$layer.msg('审核通过!')
|
||||
} else {
|
||||
self.$layer.msg('已驳回!')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
@ -1235,6 +1421,42 @@ export default {
|
||||
padding 0 5px
|
||||
&:nth-child(odd)
|
||||
text-align center
|
||||
button
|
||||
border none
|
||||
outline none
|
||||
background $main-color
|
||||
border-radius 3px
|
||||
color #ffffff
|
||||
margin-left 5px
|
||||
cursor pointer
|
||||
height 30px
|
||||
vertical-align middle
|
||||
.other-team-box
|
||||
margin-top 20px
|
||||
table
|
||||
table-layout fixed
|
||||
width 100%
|
||||
td
|
||||
font-size 16px
|
||||
color #0a0a0a
|
||||
border 1px solid #DEDEDE
|
||||
text-align center
|
||||
height 40px
|
||||
padding 0 5px
|
||||
white-space nowrap
|
||||
overflow hidden
|
||||
text-overflow ellipsis
|
||||
button
|
||||
background $main-color
|
||||
color #ffffff
|
||||
border none
|
||||
outline none
|
||||
border-radius 3px
|
||||
cursor pointer
|
||||
height 30px
|
||||
width 48%
|
||||
&.bad
|
||||
background #DEDEDE
|
||||
input[type="number"]{ -moz-appearance: textfield; }
|
||||
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; }
|
||||
</style>
|
||||
|
@ -154,7 +154,7 @@ export default {
|
||||
},
|
||||
myTeam: [],
|
||||
showSelectTeam: false,
|
||||
token: localStorage.getItem('token'),
|
||||
token: window.sessionStorage.getItem('token'),
|
||||
comment: [],
|
||||
commentText: ''
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user