240 lines
11 KiB
HTML
240 lines
11 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
|
|
<template name="el-zoom-in-center">
|
|
<el-row class="header navbar bg-white shadow">
|
|
<div class="btn-group tool-button mt5">
|
|
<el-date-picker
|
|
v-model="pageForm.year"
|
|
type="year"
|
|
value-format="yyyy" style="width: 150px"
|
|
placeholder="选择年">
|
|
</el-date-picker>
|
|
</div>
|
|
<!--分工会查询-->
|
|
<div class="btn-group tool-button mt5">
|
|
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
|
clearable="true"
|
|
@change="flushUnits" @clear="flushUnits"
|
|
|
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
|
|
|
filterable="true">
|
|
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
<div class="btn-group tool-button mt5">
|
|
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
|
clearable="true"
|
|
filterable="true">
|
|
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
<div class="btn-group tool-button mt5">
|
|
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
|
@keyup.enter.native="$emit('search')">
|
|
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
|
style="width: 120px;">
|
|
<el-option label="姓名" value="username"></el-option>
|
|
<el-option label="工号" value="loginname"></el-option>
|
|
<el-option label="活动名称" value="activity_name"></el-option>
|
|
</el-select>
|
|
</el-input>
|
|
</div>
|
|
<div class="btn-group tool-button mt5">
|
|
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
|
</div>
|
|
|
|
<div class="pull-right offscreen-right mt5">
|
|
<el-button icon="el-icon-download" @click="download">导出名单</i>
|
|
</el-button>
|
|
</div>
|
|
</el-row>
|
|
|
|
|
|
<el-row class="el-table-container">
|
|
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
v-loading="tabLoading">
|
|
<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 label="申请人姓名" prop="user_name" header-align="center"
|
|
align="center"></el-table-column>
|
|
|
|
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
|
align="center"></el-table-column>
|
|
|
|
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
|
|
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
|
|
align="center">
|
|
<template scope="scope">
|
|
<el-link type="primary" @click="openView(scope.row)">
|
|
{{scope.row.activity_name}}
|
|
</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
|
|
<template scope="{row}">
|
|
<span v-if="row.activity_type==1">基层工会活动</span>
|
|
<span v-if="row.activity_type==2">校工会活动</span>
|
|
<span v-if="row.activity_type==3">协会(社团)活动</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
|
|
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
|
<template scope="scope">
|
|
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<!-- <el-table-column prop="userOnline" align="center" header-align="center" label="操作"-->
|
|
<!-- width="250px">-->
|
|
<!-- <template scope="{row}">-->
|
|
<!-- <el-button size="mini" @click="openView(row)">-->
|
|
<!-- 查看-->
|
|
<!-- </el-button>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
|
|
<!--下拉操作按钮-->
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
|
width="120px">
|
|
<template slot-scope="{row}">
|
|
<el-dropdown @command="dropdownCommand">
|
|
<el-button plain size="mini">
|
|
<i class="ti-settings"></i>
|
|
<span class="ti-angle-down"></span>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item :command="{type:'view',data:row}">
|
|
查看
|
|
</el-dropdown-item>
|
|
<el-dropdown-item v-if="[1060].includes(row.state_id)"
|
|
:command="{type:'exportWwj',data:row}">
|
|
导出
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-row>
|
|
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</template>
|
|
|
|
|
|
<template #view>
|
|
<activity-bx-info ref="act_info"></activity-bx-info>
|
|
</template>
|
|
|
|
</guava>
|
|
</div>
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
data() {
|
|
return {
|
|
unionOptions: [],
|
|
tabLoading: false,
|
|
tableData: [],
|
|
formData: {},
|
|
pageForm: {
|
|
...getPageForm(),
|
|
searchName: "username",
|
|
year: new Date().getFullYear() + ""
|
|
},
|
|
formRules: {
|
|
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
activity_content: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
},
|
|
unions: [],
|
|
units: [],
|
|
}
|
|
},
|
|
components: {
|
|
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
|
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
|
},
|
|
methods: {
|
|
dropdownCommand(command) {
|
|
//下拉菜单操作
|
|
const {type, data} = command
|
|
if (type == 'view') {
|
|
this.openView(data)
|
|
} else if (type == 'exportWwj') {
|
|
this.exportWwj(data.id)
|
|
}
|
|
},
|
|
exportWwj(id) {
|
|
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
|
|
},
|
|
download() {
|
|
if (!(this.pageForm.year && this.pageForm.year.length)) {
|
|
this.$message.error("请选择日期");
|
|
return
|
|
}
|
|
location.href = location.href + '/download?year=' + this.pageForm.year
|
|
},
|
|
/* getunion() {
|
|
$.get(base + "/platform/jf/activity_bx/reimbursementview/getunion", (data) => {
|
|
if (data.code == 0) {
|
|
this.unionOptions = data.data
|
|
}
|
|
}, "json");
|
|
},*/
|
|
openView(row) {
|
|
const {id} = row
|
|
this.$refs.act_info.getActInfo(id)
|
|
this.$refs.guava.view()
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", "")
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
} else {
|
|
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
|
}
|
|
},
|
|
|
|
...pageSomeThing
|
|
},
|
|
async created() {
|
|
this.unionOptions = await getUnions();
|
|
this.pageData();
|
|
this.unions = await getUnions()
|
|
this.flushUnits()
|
|
|
|
}
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<!--#
|
|
}
|
|
#-->
|