135 lines
4.0 KiB
Vue
135 lines
4.0 KiB
Vue
<template>
|
|
<div>
|
|
|
|
<el-card shadow="never" class="mt10">
|
|
<table-tool label="基层干部" :app="this">
|
|
<template #func>
|
|
<el-button size="small" @click="audit(true)" :disabled="!multipleSelection.length" type="primary"
|
|
icon="el-icon-check">通过
|
|
</el-button>
|
|
<el-button size="small" @click="audit(false)" :disabled="!multipleSelection.length" type="danger"
|
|
icon="el-icon-check">拒绝
|
|
</el-button>
|
|
</template>
|
|
</table-tool>
|
|
|
|
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
v-loading="tableLoading" :size="tableSize" class="vi-table" height="70vh"
|
|
@selection-change="handleSelectionChange">
|
|
|
|
<el-table-column
|
|
type="selection"
|
|
width="55">
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
|
width="80px"></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="column.sortable"
|
|
>
|
|
<template v-if="column.prop==='workersCongressSession'" scope="{row:{workersCongressSession}}">
|
|
第{{ workersCongressSession }}届
|
|
</template>
|
|
<template v-else-if="column.prop==='joining'" scope="{row:{joining}}">
|
|
<span v-if="joining" class="text-info">加入</span>
|
|
<span v-else class="text-danger">退出</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
|
<el-pagination
|
|
@size-change="pageSizeChange"
|
|
@current-change="pageNumberChange"
|
|
:current-page="pageForm.pageNumber"
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
:page-size="pageForm.pageSize"
|
|
layout="total, sizes, prev, pager, next"
|
|
:total="pageForm.totalCount">
|
|
</el-pagination>
|
|
</el-row>
|
|
</el-card>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
module.exports = {
|
|
mixins: [initTableMixins],
|
|
props: {
|
|
key: {
|
|
type: Number,
|
|
default: 0
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
tableColumns: [
|
|
{prop: 'username', label: '姓名'},
|
|
{prop: 'loginname', label: '工号'},
|
|
{prop: 'unionname', label: '所属工会'},
|
|
{prop: 'mobile', label: '联系方式'},
|
|
{prop: 'rolename', label: '职务'},
|
|
{prop: 'workersCongressSession', label: '届次'},
|
|
{prop: 'joining', label: '申请类型'},
|
|
],
|
|
multipleSelection: [],
|
|
}
|
|
},
|
|
methods: {
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = val;
|
|
},
|
|
audit(pass) {
|
|
this.$confirm('是否确认提交?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const ids = JSON.stringify(this.multipleSelection.map(v => v.id))
|
|
const resp = await $.post("/platform/union/cadre/audit", {ids, pass})
|
|
if (resp.code === 0) {
|
|
this.pageData()
|
|
this.$refs.table.clearSelection();
|
|
this.notifySuccess(resp.msg)
|
|
}else{
|
|
this.notifyError(resp.msg)
|
|
}
|
|
})
|
|
},
|
|
pageData() {
|
|
sublime.showLoadingbar();
|
|
this.tableLoading = true
|
|
$.post("/platform/union/cadre/audit/pageData", this.pageForm, (data) => {
|
|
sublime.closeLoadingbar();
|
|
this.tableLoading = false
|
|
if (data.code === 0) {
|
|
this.tableData = data.data.list;
|
|
this.pageForm.totalCount = data.data.totalCount;
|
|
} else {
|
|
this.$message.error(data.msg);
|
|
}
|
|
}, "json");
|
|
},
|
|
},
|
|
watch: {
|
|
key(val) {
|
|
this.doSearch()
|
|
}
|
|
},
|
|
created() {
|
|
this.doSearch()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |