first commit
This commit is contained in:
@@ -0,0 +1,294 @@
|
||||
<!--#
|
||||
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>年  度:</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.startYear"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 38%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
<span>至</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.endYear"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 38%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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">
|
||||
<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.agencyId" filterable clearable placeholder="请选择旅行社"
|
||||
style="width: 80%" @change="getLines()">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<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.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
|
||||
<table-tool label="人员列表" :app="this">
|
||||
<template #func>
|
||||
</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" :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 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=='isTakePartIn'">
|
||||
{{row.isTakePartIn?'已参加':'未参加'}}
|
||||
</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>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo"></enroll-info>
|
||||
</template>
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
agencyLists: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
{prop: 'travelAgencyName', label: '旅行社'},
|
||||
{prop: 'lineName', label: '线路'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
{prop: 'signingUptime', label: '报名时间'},
|
||||
{prop: 'takePartInTime', label: '参加时间'},
|
||||
{prop: 'isTakePartIn', label: '是否参加'},
|
||||
],
|
||||
pageForm: {
|
||||
startYear: (moment().format('YYYY') - 2) + '',
|
||||
endYear: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
unionId: '',
|
||||
agencyId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/theRapyRecuperation/Enrollinfo.vue'),
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
async doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
await this.getAgencyList()
|
||||
|
||||
},
|
||||
async getLines() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/travelAgency/selectLineByAgencyId", {
|
||||
agencyId: this.pageForm.agencyId
|
||||
})
|
||||
this.takePartInLines = data
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
if (row.regionalNature === "省内") {
|
||||
this.$refs.viewLineInfo.findOne(row.takePartInLineId, null)
|
||||
} else {
|
||||
this.$refs.viewLineInfo.findOne(row.takePartInLineId, row.usUnionId)
|
||||
|
||||
}
|
||||
},
|
||||
async getAgencyList() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/travelAgency/selectTravelAgencyByYears", {
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear
|
||||
})
|
||||
this.agencyLists = data
|
||||
},
|
||||
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()}")
|
||||
}
|
||||
await this.doSearch()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
await this.getAgencyList()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user