Merge branch 'main' of https://dd3skj.picp.vip/JyuHsin/zhgh_cug_v4
This commit is contained in:
+103
-39
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">活动项目</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%" @change="doSearchS">
|
||||
style="width: 100%" @change="doSearch">
|
||||
<el-option
|
||||
v-for="item in events"
|
||||
:key="item.eventId"
|
||||
@@ -49,6 +49,51 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">男子女子</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.isMenWomen" placeholder="请选择男子女子" clearable
|
||||
style="width: 100%" @change="doSearch">
|
||||
<el-option
|
||||
v-for="item in menWomenList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">项目类型</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.projectType" placeholder="请选择项目类型" clearable
|
||||
style="width: 100%" @change="doSearch">
|
||||
<el-option
|
||||
v-for="item in projectTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">比赛组别</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.competitionCategory" placeholder="请选择比赛组别" filterable clearable
|
||||
style="width: 100%" @change="doSearch">
|
||||
<el-option
|
||||
v-for="item in groupList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -125,7 +170,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="openAdd" v-if="awardsMode==1">临时获奖人员添加</el-button>
|
||||
<el-button type="primary" @click="openAdd">临时获奖人员添加</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</template>
|
||||
|
||||
@@ -431,11 +476,14 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
|
||||
userOptions: [],
|
||||
groupList: [
|
||||
{value: 1, name: "甲组"},
|
||||
{value: 2, name: "乙组"},
|
||||
{value: 3, name: "丙组"},
|
||||
{value: 4, name: "丁组"}
|
||||
groupList: [],
|
||||
menWomenList: [
|
||||
{id: 1, name: "男子"},
|
||||
{id: 2, name: "女子"}
|
||||
],
|
||||
projectTypeList: [
|
||||
{id: "1", name: "单项"},
|
||||
{id: "2", name: "团体"}
|
||||
],
|
||||
dialogVisible: false,
|
||||
viewData: [],
|
||||
@@ -465,7 +513,9 @@ layout("/layouts/platform.html"){
|
||||
{name: "第八名", id: 8}],
|
||||
sexList: [{sex: "男", id: 1}, {sex: "女", id: 2}],
|
||||
pageForm: {
|
||||
isMenWomen: [],
|
||||
isMenWomen: "",
|
||||
projectType: "",
|
||||
competitionCategory: "",
|
||||
year: new Date().getFullYear() + "",
|
||||
},
|
||||
formRules: {
|
||||
@@ -511,7 +561,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async unitChange() {
|
||||
const unit = this.unitOptions.find(v => v.id === this.formData.unitId)
|
||||
this.$set(this.formData, "unionId", unit.id)
|
||||
this.$set(this.formData, "unionId", unit.unionId)
|
||||
this.$set(this.formData, "unionname", unit.unionName)
|
||||
this.$set(this.formData, "unitname", unit.name)
|
||||
},
|
||||
@@ -545,8 +595,14 @@ layout("/layouts/platform.html"){
|
||||
pageForm.identity = JSON.stringify(this.formData.identity)
|
||||
const resp = await this.$axios.post(loc() + "/doAddUser", pageForm)
|
||||
if (resp.code === 0) {
|
||||
await this.userChange()
|
||||
this.userDetailsChange()
|
||||
if (this.awardsMode == 2) {
|
||||
this.unionList = await this.getUnionList({activityId: this.activityId, eventId: this.eventId})
|
||||
this.userData = await this.getUnionData({activityId: this.activityId, eventId: this.eventId})
|
||||
await this.unionDetailsChange()
|
||||
} else {
|
||||
await this.userChange()
|
||||
this.userDetailsChange()
|
||||
}
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
@@ -554,21 +610,24 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
async yearChange() {
|
||||
yearChange() {
|
||||
this.activityList = []
|
||||
this.events = []
|
||||
this.$set(this.pageForm, "activityId", "")
|
||||
this.$set(this.pageForm, "eventId", "")
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
|
||||
this.activityList = data
|
||||
if (data.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
await this.doSearchS()
|
||||
this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year}).then((res) => {
|
||||
const data = res.data
|
||||
this.activityList = data
|
||||
if (data.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
this.doSearchS()
|
||||
})
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp.data
|
||||
changeActivit() {
|
||||
return this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId}).then((resp) => {
|
||||
this.events = resp.data
|
||||
})
|
||||
},
|
||||
async doAdd() {
|
||||
|
||||
@@ -802,25 +861,34 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
},
|
||||
async getActivitys() {
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
|
||||
return data;
|
||||
|
||||
getActivitys() {
|
||||
return this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year}).then((res) => {
|
||||
return res.data
|
||||
})
|
||||
},
|
||||
async doSearchS() {
|
||||
this.doSearch()
|
||||
await this.changeActivit()
|
||||
focusGroup() {
|
||||
this.$axios.post("/platform/activity/basic/event/focusGroup").then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.groupList = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearchS() {
|
||||
this.$set(this.pageForm, "eventId", "")
|
||||
this.changeActivit().then(() => {
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tabLoading = true
|
||||
this.tableLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
||||
this.$axios.post("/platform/activity/results/input/pageData", pageForm).then(resp => {
|
||||
this.tabLoading = false
|
||||
if (resp.code == 0) {
|
||||
this.tableData = resp.data.list;
|
||||
this.pageForm.totalCount = resp.data.totalCount;
|
||||
@@ -830,20 +898,16 @@ layout("/layouts/platform.html"){
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
async created() {
|
||||
created() {
|
||||
this.focusGroup()
|
||||
this.yearChange()
|
||||
// this.pageData()
|
||||
this.activityList = await this.getActivitys()
|
||||
if (this.activityList.length) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
await this.changeActivit()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user