diff --git a/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html b/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html
index 7879f634..d885c3fe 100644
--- a/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html
+++ b/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
活动项目
+ style="width: 100%" @change="doSearch">
+
+
+
+
+
+
@@ -125,7 +170,7 @@ layout("/layouts/platform.html"){
- 临时获奖人员添加
+ 临时获奖人员添加
确 定
@@ -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()
}
})