243 lines
10 KiB
HTML
243 lines
10 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
|
|
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
|
|
<guava ref="guava">
|
|
|
|
<el-card shadow="never">
|
|
<div class="search">
|
|
<div class="search-item">
|
|
<div class="search-item-label">年度:</div>
|
|
<div class="search-item-option">
|
|
<el-date-picker
|
|
placeholder="选择年度"
|
|
type="year" style="width: 100%"
|
|
v-model="pageForm.year"
|
|
value-format="yyyy">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
<div class="search-item">
|
|
<div class="search-item-label">名称:</div>
|
|
<div class="search-item-option">
|
|
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入名称"
|
|
clearable
|
|
style="width: 100%" v-model="pageForm.name">
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
<div class="search-query">
|
|
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card class="mt10" shadow="never">
|
|
<el-table :data="tableData" :size="tableSize">
|
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
|
width="80px"></el-table-column>
|
|
<el-table-column
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
align="center"
|
|
header-align="center"
|
|
show-overflow-tooltip
|
|
v-for="column in tableColumns"
|
|
>
|
|
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="350px">
|
|
<template scope="{row}">
|
|
<el-button @click="openUserData(row)" size="mini" type="primary">查看人员明细</el-button>
|
|
<el-button @click="doExport(row)" size="mini" type="primary">导出</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
|
|
<template #view>
|
|
<el-card shadow="never">
|
|
<div class="btn-group tool-button">
|
|
<el-input placeholder="请输入内容" v-model="userPageForm.searchKeyword">
|
|
<el-select v-model="userPageForm.searchName" slot="prepend" placeholder="查询"
|
|
style="width: 100px;">
|
|
<el-option label="工号" value="u.loginname"></el-option>
|
|
<el-option label="姓名" value="u.username"></el-option>
|
|
</el-select>
|
|
</el-input>
|
|
</div>
|
|
<div class="btn-group tool-button">
|
|
<el-select v-model="userPageForm.unionId" @change="unionChange" filterable clearable
|
|
placeholder="请选择工会">
|
|
<el-option v-for="item in unionList" :label="item.unionname"
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="btn-group tool-button">
|
|
<el-select v-model="userPageForm.unitId" filterable clearable placeholder="请选择单位">
|
|
<el-option
|
|
v-for="item in unitList"
|
|
:label="item.name"
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="btn-group tool-button">
|
|
<el-button @click="doUserSearch()"
|
|
icon="el-icon-search" type="primary"></el-button>
|
|
</div>
|
|
</el-card>
|
|
<el-card shadow="never" class="mt10">
|
|
<el-table :data="userTableData">
|
|
<el-table-column align="center" header-align="center" sortable prop="loginname"
|
|
label="工号"></el-table-column>
|
|
<el-table-column align="center" header-align="center" sortable prop="username"
|
|
label="姓名"></el-table-column>
|
|
<el-table-column align="center" header-align="center" sortable prop="sex"
|
|
label="性别"></el-table-column>
|
|
<el-table-column align="center" header-align="center" sortable prop="unitname"
|
|
label="所属单位"></el-table-column>
|
|
<el-table-column align="center" header-align="center" sortable prop="unionname"
|
|
label="所属工会"></el-table-column>
|
|
<el-table-column align="center" header-align="center" sortable prop="mobile"
|
|
label="手机号码"></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<el-button @click="doDeleteUser(scope.row)" size="mini" type="danger"
|
|
icon="el-icon-delete"></el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-row class="el-pagination-container">
|
|
<el-pagination
|
|
@size-change="userPageSizeChange"
|
|
@current-change="userPageNumberChange"
|
|
:current-page="userPageForm.pageNumber"
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
:page-size="userPageForm.pageSize"
|
|
layout="total, sizes, prev, pager, next"
|
|
:total="userPageForm.totalCount">
|
|
</el-pagination>
|
|
</el-row>
|
|
</el-card>
|
|
|
|
</template>
|
|
|
|
</guava>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
let E = window.wangEditor
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
userTableData: [],
|
|
unionList: [],
|
|
unitList: [],
|
|
tableColumns: [
|
|
{label: '名称', prop: 'name'},
|
|
{label: '开始时间', prop: 'startTime'},
|
|
{label: '结束时间', prop: 'endTime'},
|
|
{label: '登记范围', prop: 'activityGroupName'},
|
|
{label: '选择人数', prop: 'chooseCount'},
|
|
],
|
|
userPageForm: {
|
|
searchName: "u.username",
|
|
searchKeyword: "",
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
pageOrderName: "",
|
|
pageOrderBy: ""
|
|
},
|
|
}
|
|
},
|
|
methods: {
|
|
doExport(row) {
|
|
location.href = '/platform/insurance/summary/doExport?id=' + row.id
|
|
},
|
|
async doDeleteUser(row) {
|
|
const confirm = await this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm === "confirm") {
|
|
const resp = await $.post('/platform/insurance/summary/doDeleteUser', {
|
|
id: row.id
|
|
})
|
|
this.$message.success(resp.msg)
|
|
this.doUserSearch()
|
|
}
|
|
},
|
|
async unionChange() {
|
|
this.$set(this.userPageForm, "unitId", "")
|
|
//this.userPageForm.unitId = ''
|
|
this.unitList = await getUnits(this.userPageForm.unionId)
|
|
},
|
|
async openUserData(row) {
|
|
this.userClickRow = row
|
|
this.doUserSearch()
|
|
},
|
|
async userPageData() {
|
|
this.userPageForm.insuranceId = this.userClickRow.id
|
|
const resp = await $.post('/platform/insurance/summary/userPageData', this.userPageForm)
|
|
if (resp.code === 0) {
|
|
this.userTableData = resp.data.list
|
|
this.userPageForm.totalCount = resp.data.totalCount
|
|
this.$refs.guava.view()
|
|
} else {
|
|
this.userTableData = []
|
|
}
|
|
},
|
|
doUserSearch() {
|
|
this.userPageForm.pageNumber = 1
|
|
this.userPageData()
|
|
},
|
|
userPageOrder(column) {
|
|
this.userPageForm.pageOrderName = column.prop
|
|
this.userPageForm.pageOrderBy = column.order
|
|
this.userPageData()
|
|
},
|
|
userPageNumberChange(val) {
|
|
this.userPageForm.pageNumber = val
|
|
this.userPageData()
|
|
},
|
|
userPageSizeChange(val) {
|
|
this.userPageForm.pageSize = val
|
|
this.userPageData()
|
|
},
|
|
async pageData() {
|
|
const resp = await $.post('/platform/insurance/summary/pageData', this.pageForm)
|
|
if (resp.code === 0) {
|
|
this.tableData = resp.data.list;
|
|
this.pageForm.totalCount = resp.data.totalCount;
|
|
} else {
|
|
this.tableData = []
|
|
}
|
|
},
|
|
},
|
|
async created() {
|
|
this.unionList = await getUnions()
|
|
await this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|
|
|