Files
UNION_NJUST/target/classes/views/platform/theRapyRecuperation/process/TheRapyQuery.html
T
2026-09-23 09:38:39 +08:00

413 lines
18 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.query-row {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.query-row .el-col {
overflow: hidden;
}
.query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
.query-row-title {
width: 120px;
}
.el-table-container {
padding-top: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<el-row align="middle" class="query-row" type="flex">
<el-col class="query-row-title"></el-col>
<el-col class="query-row-content">
<el-row>
<el-col :span="12">
<span>年&emsp;&emsp;度:</span>
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="选择年"
style="width: 80%" @change="doSearch">
</el-date-picker>
</el-col>
<el-col :span="12" v-if="pageForm.regionalNature==='省内'">
<span>查询类型:</span>
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 80%" @keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 110px;">
<el-option label="姓名" value="userName"></el-option>
<el-option label="工号" value="loginName"></el-option>
</el-select>
<el-button slot="append" @click="doSearch">搜索</el-button>
</el-input>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row align="middle" class="query-row" type="flex">
<el-col class="query-row-title"></el-col>
<el-col class="query-row-content">
<el-row>
<el-col :span="12">
<span>所属工会:</span>
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" @change="flushUnits"
@clear="flushUnits"
filterable clearable style="width: 80%">
<el-option
v-for="item in unionOptions"
:key="item.id"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12" v-if="pageForm.regionalNature==='省内'">
<span>所属单位:</span>
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" @change="doSearch"
filterable clearable style="width: 80%">
<el-option
v-for="item in unitOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row align="middle" class="query-row" type="flex">
<el-col class="query-row-title"></el-col>
<el-col class="query-row-content">
<el-row>
<el-col :span="12">
<span>选择路线:</span>
<el-select v-model="pageForm.takePartInLineId" filterable clearable placeholder="请选择线路"
style="width: 80%" @change="doSearch()">
<el-option v-for="item in takePartInLines"
:key="item.lineId"
:label="item.lineName"
:value="item.lineId">
</el-option>
</el-select>
</el-col>
</el-row>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :label="pageForm.regionalNature==='省内'?'人员列表':'线路列表'" :app="this">
<template #func>
<el-radio-group @change="doSearch()" size="medium" v-model="pageForm.regionalNature">
<el-radio-button label="省内">省内</el-radio-button>
<el-radio-button label="省外">省外</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%"
row-key="id" @sort-change="pageOrder"
v-loading="tableLoading">
<el-table-column align="center" header-align="center" type="index" label="序号"
width="80px">{{(pageFormUser.pageNumber - 1) * pageFormUser.pageSize + 1}}
</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 scope="{row}" v-if="column.prop=='lineName'">
<el-link type="primary" @click="openLine(row)">{{row.lineName}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isFamily'">
{{row.isFamily?'携带':'未携带'}}
</template>
<template scope="{row}" v-else-if="column.prop=='lineNum'">
<el-link type="primary" @click="openApplyUser(row)">{{row.lineNum}}</el-link>
</template>
</el-table-column>
<el-table-column label="操作" width="250px" v-if="pageForm.regionalNature==='省内'">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<el-card shadow="never">
<el-table :data="userTableData" style="width: 100%"
row-key="id" @sort-change="pageOrder"
v-loading="tableLoading">
<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 tableColumnUsers"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='isFamily'">
{{row.isFamily?'携带':'未携带'}}
</template>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container" style="margin-bottom: 0px">
<el-pagination
@size-change="pageSizeChangeUser"
@current-change="pageNumberChangeUser"
:current-page="pageFormUser.pageNumber"
:page-sizes="[5,10, 20, 30, 50]"
:page-size="pageFormUser.pageSize"
layout="total, sizes, prev, pager, next"
:total="pageFormUser.totalCount">
</el-pagination>
</el-row>
</el-card>
</template>
<template #public>
<line-info ref="viewLineInfo"></line-info>
</template>
</guava>
<el-dialog
title="查看个人信息"
:visible.sync="userFindDialogVisible"
width="60%">
<enroll-info ref="viewEnrollInfo"></enroll-info>
<span slot="footer" class="dialog-footer">
<el-button @click="userFindDialogVisible = false" type="primary">关闭</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
userFindDialogVisible: false,
userTableData: [],
unionOptions: [],
unitOptions: [],
takePartInLines: [],
pageFormUser: {
searchName: "",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
pageForm: {
regionalNature: "省外",
year: moment().format('YYYY'),
searchName: "userName",
unionId: ''
},
tableColumnUsers: [
{prop: 'loginName', label: '工号'},
{prop: 'userName', label: '姓名'},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '工会', sortable: true},
{prop: 'lineName', label: '线路'},
{prop: 'isFamily', label: '是否携带家属'},
],
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'lineName', label: '线路'},
{prop: 'travelAgencyName', label: '旅行社'},
{prop: 'contact', label: '联系人'},
{prop: 'contactMobileNumber', label: '联系方式'},
{prop: 'unionname', label: '所属部门工会'},
{prop: 'lineNum', label: '报名人数'}
]
}
},
components: {
'enroll-info': httpVueLoader('/components/theRapyRecuperation/Enrollinfo.vue'),
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
},
methods: {
async openView(row) {
this.userFindDialogVisible = true
setTimeout(() => {
this.$refs.viewEnrollInfo.openView(row.id)
}, 300)
},
pageSizeChangeUser(val) {
this.pageFormUser.pageSize = val;
this.openApplyUser();
},
pageNumberChangeUser(val) {
this.pageFormUser.pageNumber = val;
this.openApplyUser();
},
async openApplyUser(row) {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageFormUser)
pageForm.id = row.id
$.post("/platform/theRapyRecuperation/line/selectLineUser", pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code == 0) {
this.userTableData = data.data.list;
this.pageFormUser.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
this.$refs.guava.view()
},
openLine(row) {
this.$refs.guava.public()
if (row.regionalNature === "省内") {
this.$refs.viewLineInfo.findOne(row.takePartInLineId, null)
} else {
this.$refs.viewLineInfo.findOne(row.id, row.usUnionId)
}
},
doSearch() {
if (this.pageForm.regionalNature === "省外") {
this.getSwData()
this.tableColumns = [
{prop: 'year', label: '年度'},
{prop: 'lineName', label: '线路'},
{prop: 'travelAgencyName', label: '旅行社'},
{prop: 'contact', label: '联系人'},
{prop: 'contactMobileNumber', label: '联系方式'},
{prop: 'unionname', label: '所属部门工会'},
{prop: 'lineNum', label: '报名人数'}
]
} else {
this.getSnData()
this.tableColumns = [
{prop: 'loginName', label: '工号'},
{prop: 'userName', label: '姓名'},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '工会', sortable: true},
{prop: 'lineName', label: '线路'},
{prop: 'isFamily', label: '是否携带家属'},
]
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.unitOptions = await getUnits(this.pageForm.unionId)
} else {
this.unionOptions = this.unionOptions.filter(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
this.$set(this.pageForm, "unionId", this.unionOptions[0].id)
this.unitOptions = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
this.takePartInLines = await this.getXlByUnion()
if (this.pageForm.regionalNature === "省外") {
await this.getSwData()
} else {
await this.getSnData()
}
},
async getXlByUnion() {
const {data} = await $.post("/platform/theRapyRecuperation/TheRapyAudit/getXlByUnion", {
unionId: this.pageForm.unionId,
year: this.pageForm.year,
regionalNature: "省外"
})
return data
},
async getSwData() {
this.tableData = []
$.post(loc() + "/getSwData", 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");
},
async getSnData() {
this.tableData = []
$.post(loc() + "/getSnData", 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");
}
},
async created() {
this.unionOptions = await getUnions()
this.flushUnits()
this.doSearch()
}
})
</script>
<!--#
}
#-->