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