change
This commit is contained in:
+155
@@ -0,0 +1,155 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="pageForm.searchKeyword" clearable
|
||||
placeholder="请输入姓名或工号"
|
||||
@keyup.enter.native="doSearch"></el-input>
|
||||
</search-item>
|
||||
<search-item label="教代会">
|
||||
<el-select v-model="pageForm.sessionId" clearable filterable
|
||||
placeholder="请选择教代会" style="width: 100%">
|
||||
<el-option v-for="item in sessionOptions" :key="item.id"
|
||||
:label="item.fullName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" clearable filterable
|
||||
placeholder="请选择所属工会" style="width: 100%"
|
||||
@change="handleUnionChange">
|
||||
<el-option v-for="item in unionOptions" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId" clearable filterable
|
||||
placeholder="请选择所属单位" style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="代表变动记录"></table-tool>
|
||||
<el-table v-loading="tableLoading" :data="tableData"
|
||||
@sort-change="pageOrder" row-key="id" ref="tableRef"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" :index="indexMethod" label="序号"
|
||||
align="center" header-align="center" width="70"></el-table-column>
|
||||
<el-table-column label="姓名" prop="username" sortable="custom"
|
||||
align="center" header-align="center" min-width="110"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginname" sortable="custom"
|
||||
align="center" header-align="center" min-width="110"></el-table-column>
|
||||
<el-table-column label="原教代会" prop="oldJdhName" sortable="custom"
|
||||
align="center" header-align="center" min-width="130"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="新教代会" prop="newJdhName" sortable="custom"
|
||||
align="center" header-align="center" min-width="130"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="原单位" prop="oldUnitName" sortable="custom"
|
||||
align="center" header-align="center" min-width="180"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="新单位" prop="newUnitName" sortable="custom"
|
||||
align="center" header-align="center" min-width="180"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="原代表团" prop="oldDbtName" sortable="custom"
|
||||
align="center" header-align="center" min-width="140"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="新代表团" prop="newDbtName" sortable="custom"
|
||||
align="center" header-align="center" min-width="140"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchKeyword: "",
|
||||
sessionId: "",
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
sessionOptions: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
pageRequestSequence: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询分页数据;快速连续查询时只接收最后一次请求结果。 */
|
||||
pageData() {
|
||||
const requestSequence = ++this.pageRequestSequence
|
||||
this.tableData = []
|
||||
this.tableLoading = true
|
||||
this.$axios.post(loc() + "/pageData", {
|
||||
pageForm: JSON.stringify(this.pageForm)
|
||||
}).then((res) => {
|
||||
if (requestSequence !== this.pageRequestSequence) {
|
||||
return
|
||||
}
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list || []
|
||||
this.pageForm.totalCount = res.data.totalCount || 0
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
if (requestSequence === this.pageRequestSequence) {
|
||||
this.tableLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 切换工会时清空原单位条件,并重新加载该工会下的单位。 */
|
||||
handleUnionChange() {
|
||||
this.pageForm.unitId = ""
|
||||
this.listUnit()
|
||||
},
|
||||
/** 加载教代会届次选项。 */
|
||||
listSession() {
|
||||
this.$axios.post("/platform/teacherCongress/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data || []
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 加载当前账号可见的工会选项。 */
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((data) => {
|
||||
this.unionOptions = data || []
|
||||
})
|
||||
},
|
||||
/** 按当前工会条件加载单位选项。 */
|
||||
listUnit() {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.unitOptions = data || []
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
this.listUnion()
|
||||
this.listUnit()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user