|
|
|
@ -25,10 +25,6 @@ |
|
|
|
|
:value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
<div class="tool"> |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li> |
|
|
|
|
<label>签到情况:</label> |
|
|
|
|
<el-select v-model="form.signInStatus" |
|
|
|
@ -151,8 +147,8 @@ |
|
|
|
|
style="width: 100%"> |
|
|
|
|
<el-option v-for="(item, i) in orgs" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.schoolName" |
|
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
|
:label="item.organizationName" |
|
|
|
|
:value="item.teamId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item v-if="memberForm.id" |
|
|
|
@ -160,6 +156,7 @@ |
|
|
|
|
label="签到时间"> |
|
|
|
|
<el-date-picker v-model="memberForm.signInTime" |
|
|
|
|
style="width: 100%" |
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
type="datetime" |
|
|
|
|
placeholder="请选择"> |
|
|
|
|
</el-date-picker> |
|
|
|
@ -177,14 +174,14 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import Util from "@/libs/util"; |
|
|
|
|
import axios from 'axios' |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
export default { |
|
|
|
|
name: "matchSignup", |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
token: util.local.get(Setting.tokenKey), |
|
|
|
|
token: Util.local.get(Setting.tokenKey), |
|
|
|
|
id: this.$route.query.id, |
|
|
|
|
teamId: this.$route.query.teamId, |
|
|
|
|
form: { |
|
|
|
@ -316,13 +313,11 @@ export default { |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.$post(`${this.api.delActivityApplicant}?id=${row.id}`).then(res => { |
|
|
|
|
util.successMsg("删除成功"); |
|
|
|
|
Util.successMsg("删除成功"); |
|
|
|
|
this.getData(); |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
}).catch(res => { }); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
}); |
|
|
|
|
.catch(() => { }); |
|
|
|
|
}, |
|
|
|
|
// 排序回调 |
|
|
|
|
sortChange (column) { |
|
|
|
@ -341,7 +336,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
responseType: 'blob' |
|
|
|
|
}).then((res) => { |
|
|
|
|
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) |
|
|
|
|
Util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
} else { |
|
|
|
|
axios.get(`${this.api.excelExportCom}?competitionId=${this.id}`, { |
|
|
|
@ -350,7 +345,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
responseType: 'blob' |
|
|
|
|
}).then((res) => { |
|
|
|
|
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) |
|
|
|
|
Util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -361,7 +356,11 @@ export default { |
|
|
|
|
this.timer = setTimeout(async () => { |
|
|
|
|
const { data } = await this.$post(`${this.api.getOrganizationInformationByPhone}?phone=${val}`) |
|
|
|
|
const peoole = data.find(e => !e.organizationName) // 个人 |
|
|
|
|
const org = data.find(e => e.organizationName) // 组织 |
|
|
|
|
const orgs = data.filter(e => e.platformId === '幼儿园' || e.platformId === '供应商') // 组织 |
|
|
|
|
orgs.forEach(e => { |
|
|
|
|
if (!e.organizationName) e.organizationName = e.userName |
|
|
|
|
}) |
|
|
|
|
this.orgs = orgs |
|
|
|
|
this.memberForm.username = peoole.userName |
|
|
|
|
this.memberForm.accountId = peoole.accountId |
|
|
|
|
// this.memberForm.username = org.organizationName |
|
|
|
@ -369,11 +368,13 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 编辑 |
|
|
|
|
edit (row, disalbed) { |
|
|
|
|
async edit (row, disalbed) { |
|
|
|
|
// const res = await this.$post(`${this.api.detailsOfApplicants}?competitionId=${this.id}&accountId=${row.accountId}`) |
|
|
|
|
row.phone && this.phoneChange(row.phone) |
|
|
|
|
this.memberForm = { |
|
|
|
|
accountId: row.accountId, |
|
|
|
|
identification: 1, |
|
|
|
|
signInTime: row.createTime, |
|
|
|
|
signInTime: row.signInStatus === '待签到' ? '' : new Date(), |
|
|
|
|
teamId: '', |
|
|
|
|
phone: row.phone, |
|
|
|
|
username: row.username, |
|
|
|
@ -405,10 +406,12 @@ export default { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
this.submiting = true |
|
|
|
|
const form = this.memberForm |
|
|
|
|
const form = JSON.parse(JSON.stringify(this.memberForm)) |
|
|
|
|
form.competitionId = this.id |
|
|
|
|
if (!form.signInTime) form.signInTime = Util.formatDate('yyyy-MM-dd hh:mm:ss', new Date()) |
|
|
|
|
await this.$post(this.api[form.id ? 'editRegistrationInformation' : 'addNewApplicantsInTheBackground'], form) |
|
|
|
|
this.memberVisible = false |
|
|
|
|
this.submiting = false |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|