240 lines
11 KiB
HTML
240 lines
11 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
.el-form .el-select {
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<transition name="el-zoom-in-center">
|
|
<div v-show="tabShow">
|
|
<el-card shadow="never">
|
|
<div class="btn-group tool-button">
|
|
<el-input clearable placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
|
<el-select placeholder="查询" slot="prepend" style="width: 100px;"
|
|
v-model="pageForm.searchName">
|
|
<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 @change="jdhChange" clearable filterable placeholder="请选择届次"
|
|
v-model="pageForm.jdhid">
|
|
<el-option
|
|
:key="item.id"
|
|
:label="item.jdhallname"
|
|
:value="item.id"
|
|
v-for="item in jdhList">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="btn-group tool-button">
|
|
<el-select @change="delegationChange" clearable filterable placeholder="请选择代表团"
|
|
v-model="pageForm.dbtid">
|
|
<el-option
|
|
:key="item.id"
|
|
:label="item.dbtname"
|
|
:value="item.id"
|
|
v-for="item in delegations">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
|
|
<div class="btn-group tool-button">
|
|
<el-select
|
|
@change="unitList = allUnitList.filter(v => pageForm.unionid?v.unionid === pageForm.unionid:true)"
|
|
clearable filterable placeholder="请选择工会"
|
|
v-model="pageForm.unionid">
|
|
<el-option
|
|
:key="item.id"
|
|
:label="item.unionname"
|
|
:value="item.id"
|
|
v-for="item in unionList">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
<div class="btn-group tool-button">
|
|
<el-select clearable filterable placeholder="请选择单位" v-model="pageForm.unitid">
|
|
<el-option
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:value="item.id"
|
|
v-for="item in unitList">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
<div class="btn-group tool-button">
|
|
<el-select clearable placeholder="请选择代表身份" v-model="pageForm.dbsf">
|
|
<el-option label="正式代表" value="正式代表"></el-option>
|
|
<el-option label="列席代表" value="列席代表"></el-option>
|
|
<el-option label="特邀代表" value="特邀代表"></el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
<div class="btn-group tool-button">
|
|
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
|
</div>
|
|
|
|
<el-row class="mt5 mb5">
|
|
<template
|
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('tamange')}">
|
|
<div class="btn-group tool-button">
|
|
<el-button @click="exportList" icon="el-icon-download" size="medium">导出Excel</el-button>
|
|
<el-button @click="downloadCommand({id:pageForm.jdhid})" icon="el-icon-download">
|
|
导出名单
|
|
</el-button>
|
|
<!-- <el-dropdown @command="downloadCommand">-->
|
|
<!-- <el-button icon="el-icon-download">导出名单 <i class="el-icon-arrow-down el-icon--right"></i>-->
|
|
<!-- </el-button>-->
|
|
<!-- <el-dropdown-menu slot="dropdown">-->
|
|
<!-- <el-dropdown-item v-for="item in jdhList" :command="{id:item.id}">{{item.jdhallname}}-->
|
|
<!-- </el-dropdown-item>-->
|
|
<!-- </el-dropdown-menu>-->
|
|
<!-- </el-dropdown>-->
|
|
|
|
</div>
|
|
</template>
|
|
</el-row>
|
|
|
|
</el-card>
|
|
<el-card class="mt20" shadow="never">
|
|
<el-table :data="tableData" @sort-change='pageOrder'>
|
|
<el-table-column align="center" header-align="center" label="序号" type="index">
|
|
<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" label="工号"
|
|
prop="loginname"></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="姓名" prop="username"
|
|
sortable></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="性别" prop="sex"
|
|
sortable></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="联系方式"
|
|
prop="mobile"></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="代表团" prop="dbtname"
|
|
show-overflow-tooltip></el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="所属工会" prop="dbunitname"
|
|
show-overflow-tooltip sortable>
|
|
<template scope="scope">
|
|
{{scope.row.unionname}}({{scope.row.unioncode}})
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" header-align="center" label="所属单位" prop="dbunitname"
|
|
show-overflow-tooltip
|
|
sortable>
|
|
<template scope="scope">
|
|
{{scope.row.dbunitname}}({{scope.row.dbunitid}})
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" header-align="center" label="届次" prop="jdhallname"
|
|
sortable></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="代表身份"
|
|
prop="rolename"></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="操作" width="100">
|
|
<template slot-scope="{row}">
|
|
<el-button @click="openView(row)" size="mini">查看</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</div>
|
|
</transition>
|
|
|
|
<template #view>
|
|
<db-info :active="'1'" ref="DbInfo"></db-info>
|
|
</template>
|
|
</guava>
|
|
|
|
</div>
|
|
<script>
|
|
let vue = new Vue({
|
|
el: '#app',
|
|
data() {
|
|
return {
|
|
tabShow: true,
|
|
dbtList: [],
|
|
jdhList: [],
|
|
unitList: [],
|
|
allUnitList: [],
|
|
unionList: [],
|
|
tableData: [],
|
|
delegations: [],
|
|
pageForm: {
|
|
...getPageForm(),
|
|
jdhid: '',
|
|
unitid: '',
|
|
searchName: 'u.username',
|
|
dbtid: '',
|
|
dbsf: ''
|
|
},
|
|
dbModal: false,
|
|
uid: ''
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'db-info': httpVueLoader('/components/jdh/dbinfo.vue')
|
|
},
|
|
methods: {
|
|
async delegationChange(val) {
|
|
this.pageForm.unionid = ''
|
|
this.pageForm.unitid = ''
|
|
this.unionList = await getUnions(val)
|
|
},
|
|
|
|
exportList() {
|
|
if (!this.pageForm.jdhid) {
|
|
this.$notify({
|
|
title: '警告',
|
|
message: '请选择教代会',
|
|
type: 'warning'
|
|
});
|
|
return
|
|
}
|
|
location.href = '/platform/jdh/db/dbyl/exportList?jdhid=' + this.pageForm.jdhid + '&dbtid=' + this.pageForm.dbtid
|
|
},
|
|
downloadCommand(command) {
|
|
const {id} = command
|
|
location.href = '/platform/jdh/db/dbyl/downloadDbList?jdh_id=' + id
|
|
},
|
|
openView(row) {
|
|
const {dbid} = row
|
|
this.$refs.DbInfo.openView(dbid)
|
|
this.$refs.guava.view()
|
|
},
|
|
async jdhChange(val) {
|
|
this.delegations = await getDbt(val)
|
|
},
|
|
handleSelectionChange(val) {
|
|
this.selection = val
|
|
},
|
|
...pageSomeThing
|
|
},
|
|
async created() {
|
|
this.jdhList = await getAllJdh()
|
|
if (this.jdhList.length > 0) {
|
|
this.pageForm.jdhid = this.jdhList[0].id
|
|
this.delegations = await getDbt(this.jdhList[0].id)
|
|
this.pageData()
|
|
}
|
|
this.unionList = await getUnion();
|
|
this.allUnitList = await getUnit();
|
|
this.unitList = clone(this.allUnitList);
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|