commit
This commit is contained in:
@@ -99,30 +99,31 @@ module.exports = {
|
||||
},
|
||||
methods: {
|
||||
async isMaleFemale() {
|
||||
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableColumns2 = []
|
||||
this.tableColumns3 = []
|
||||
this.tableColumns4 = []
|
||||
this.tableColumns5 = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
|
||||
try {
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
}
|
||||
})
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}
|
||||
})
|
||||
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}catch ( e){
|
||||
this.$message.error(e.msg)
|
||||
}finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
compare(prop) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<el-table :data="tableData" style="width: 100%;height: 100%" stripe border
|
||||
ref="MaleFemaleTab"
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed >
|
||||
<!--:max-height="maxHeight"-->
|
||||
v-loading="tableLoading" size="mini" fixed>
|
||||
<!--:max-height="maxHeight"-->
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-table-column label="总分" prop="totalScore" header-align="center"
|
||||
align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="名次"
|
||||
width="80px" ></el-table-column>
|
||||
width="80px"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
@@ -41,12 +41,18 @@ module.exports = {
|
||||
methods: {
|
||||
async isScoreTopEight() {
|
||||
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
|
||||
try {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="tableLoading">
|
||||
<!-- <el-table :data="tableData" style="width: 100%" stripe border
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini">
|
||||
@@ -62,27 +62,27 @@ module.exports = {
|
||||
}).toString()
|
||||
},
|
||||
async isTopEight() {
|
||||
var loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在查询中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
try {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.tableData = data.eventList
|
||||
loading.close();
|
||||
this.tableData = data.eventList
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<slot></slot>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search', null)">搜索</el-button>
|
||||
</div>
|
||||
<div class="search">
|
||||
<slot></slot>
|
||||
<div class="search-query" v-if="isSearchButton">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search', null)">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "pageFormSearch"
|
||||
name: "pageFormSearch",
|
||||
props: {
|
||||
isSearchButton: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user