Files
UNION_NSI/target/classes/views/platform/manuscript/statisticsTable.html
T
2026-09-08 19:49:21 +08:00

154 lines
5.9 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="btn-group tool-button">
<el-date-picker
@change="isManuscriptTypeChange"
v-model="year"
type="year"
value-format="yyyy" style="width: 150px"
placeholder="选择年">
</el-date-picker>
</div>
<div class="btn-group tool-button">
<el-radio-group v-model="isManuscriptType" @change="isManuscriptTypeChange">
<el-radio-button :label="1">社团投稿数量</el-radio-button>
<el-radio-button :label="2">分工会投稿数量</el-radio-button>
<el-radio-button :label="3">校工会投稿数量</el-radio-button>
</el-radio-group>
</div>
</el-card>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
:show-summary="showSummary" :size="tableSize">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
sortable
>
<template v-if="column.prop=='unitname'" scope="{row}">
{{row.unitname}} ({{row.unitcode}})
</template>
<template v-else-if="column.prop=='unionname'" scope="{row}">
{{row.unionname}} ({{row.unioncode}})
</template>
<template v-else-if="column.prop=='manuscriptTypeName'" scope="{row}">
{{row.manuscriptTypeName}}({{row.manuscriptCode}})
</template>
<template v-else-if="column.prop=='type'" scope="{row}">
{{row.type==1?'社团投稿':row.type==2?'分工会投稿':'校工会投稿'}}
</template>
</el-table-column>
</el-table>
<template v-if="isManuscriptType==3">
<!--#include("/layouts/pagination.html"){}#-->
</template>
</el-card>
<template #view>
<info ref="info"></info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
year: new Date().getFullYear() + "",
showSummary: true,
isManuscriptType: 1,
tableColumns: [
{prop: 'clubname', label: '社团名称'},
{prop: 'manuscriptNum', label: '稿件数量'}
],
}
},
components: {},
methods: {
async getUnionTableNum() {
const {data} = await $.get(loc() + "/unionTableNum", {year: this.year})
this.tableColumns = [
{prop: 'unionName', label: '分工会名称'},
{prop: 'manuscriptNum', label: '稿件数量'}
]
this.tableData = data
},
async getClubTableNum() {
const {data} = await $.get(loc() + "/clubTableNum", {year: this.year})
this.tableColumns = [
{prop: 'clubname', label: '社团名称'},
{prop: 'manuscriptNum', label: '稿件数量'}
]
this.tableData = data
},
async pageData() {
const page = this.pageForm
page.isAudit = true
page.year = this.year
page.isManuscriptType = this.isManuscriptType
const data = await $.get("/platform/manuscript/audit/school/pageData", page)
this.tableColumns = [
{prop: 'username', label: '投稿人工号'},
{prop: 'loginname', label: '投稿人姓名'},
{prop: 'manuscriptName', label: '稿件名称'},
{prop: 'unitname', label: '投稿人单位'},
{prop: 'unionname', label: '投稿人工会'},
{prop: 'manuscriptTypeName', label: '稿件类型'},
{prop: 'type', label: '投稿类型'},
{prop: 'applyTime', label: '投稿时间'},
]
this.tableLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
},
async isManuscriptTypeChange() {
if (this.isManuscriptType == 1) {
this.showSummary = true
await this.getClubTableNum()
} else if (this.isManuscriptType == 2) {
this.showSummary = true
await this.getUnionTableNum()
} else {
this.showSummary = false
await this.pageData()
}
}
},
async created() {
await this.isManuscriptTypeChange()
}
})
</script>
<!--#
}
#-->