first commit
This commit is contained in:
@@ -0,0 +1,413 @@
|
||||
<!--#
|
||||
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
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,272 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">关键字:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.selectStatus">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<el-radio-button :label="-1">未选择</el-radio-button>
|
||||
<el-radio-button :label="1">已选择</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row:{signUpMode}}" v-else-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--# if(@shiro.hasRole('H04')){ #-->
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<template v-if="row.signUpMode===1 && row.createMode===2">
|
||||
<el-button @click="openSetLineTime(row)" size="mini" type="primary" v-if="!row.isSelect">
|
||||
选择
|
||||
</el-button>
|
||||
<el-button @click="openSetLineTime(row)" size="mini" type="primary" v-if="row.isSelect">修改
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- <el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--# } #-->
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setLineTimeDialog" title="设置本部门工会线路时间信息" width="30%">
|
||||
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
|
||||
<el-form-item label="线路名称">
|
||||
{{formData.lineName}}
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报名开始时间" prop="signUpStartTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.signUpStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报名截至时间" prop="signUpEndTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.signUpEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更截至时间" prop="changeEndTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="setLineTimeDialog=false">取消</el-button>
|
||||
<el-button @click="doSelect" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let lineContentEditor = null
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
const validateSignUpEndTime = (rule, value, callback) => {
|
||||
console.log(value)
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const validateChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于报名截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '编号', prop: 'serialNumber'},
|
||||
{label: '线路名称', prop: 'lineName'},
|
||||
{label: '旅行社名称', prop: 'travelAgencyName'},
|
||||
{label: '区域性质', prop: 'regionalNature'},
|
||||
{label: '最少成团人数', prop: 'minimumGroupSize'},
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '创建工会', prop: 'createUnionName'},
|
||||
{label: '创建人', prop: 'createUserName'},
|
||||
{label: '创建模式', prop: 'createMode'},
|
||||
{label: '报名模式', prop: 'signUpMode'},
|
||||
],
|
||||
rules: {
|
||||
signUpStartTime: [{
|
||||
required: true,
|
||||
message: '请选择报名开始时间',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||
},
|
||||
viewData: {},
|
||||
formData: {
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null,
|
||||
changeEndTime: null,
|
||||
id: null,
|
||||
lineId: null
|
||||
},
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: new Date().getFullYear().toString(),
|
||||
selectStatus: 0
|
||||
},
|
||||
createModeList: [],
|
||||
signUpModeList: [],
|
||||
setLineTimeDialog: false
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewLineInfo.openView(id)
|
||||
},
|
||||
async openSetLineTime({id, lineName}) {
|
||||
console.log(id)
|
||||
this.formData.lineId = id
|
||||
this.setLineTimeDialog = true
|
||||
const resp = await $.post(loc() + '/selectLineInfo/' + id)
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.formData = resp.data
|
||||
}
|
||||
this.$set(this.formData, 'lineName', lineName)
|
||||
},
|
||||
async doSelect() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const msg = this.formData.id ? '您确定要修改时间吗?' : '您确认选择此条线路吗?'
|
||||
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/selectLine', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.setLineTimeDialog = false
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
}
|
||||
},
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,129 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.center-col {
|
||||
background-color: white;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: calc((100% - (20px * 2)) / 2);
|
||||
}
|
||||
|
||||
.col-title {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 100%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-radio-group @change="doSearch()" v-model="regionalNature">
|
||||
<el-radio-button label="省内">省内({{snNum}})人</el-radio-button>
|
||||
<el-radio-button label="省外">省外({{swNum}})人</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="never" class="mr5 mt20">
|
||||
<div class="col-title">线路报名人数</div>
|
||||
<div id="lineBar"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="never" class="ml5 mt20">
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const chart = {
|
||||
lineBar: undefined
|
||||
}
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
snNum: 0,
|
||||
swNum: 0,
|
||||
year: moment().format('YYYY'),
|
||||
regionalNature: '省内'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSearch() {
|
||||
await this.getLineBar()
|
||||
await this.getSnSwNum()
|
||||
},
|
||||
async getLineBar() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getLineBar", {regionalNature: this.regionalNature, year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({lineName: v.lineName, lineNum: (v.enrollNum + v.companionNum)})
|
||||
})
|
||||
if (chart.lineBar) {
|
||||
chart.lineBar.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.lineBar = new G2Plot.Bar(document.getElementById("lineBar"), {
|
||||
data,
|
||||
xField: 'lineNum',
|
||||
yField: 'lineName',
|
||||
meta: {
|
||||
lineName: {
|
||||
alias: '线路名称',
|
||||
},
|
||||
lineNum: {
|
||||
alias: '报名人数',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.lineBar.render();
|
||||
}, 300)
|
||||
},
|
||||
async getSnSwNum() {
|
||||
const {data} = await $.post(loc() + "/getSnSwNum", {year: this.year})
|
||||
this.snNum = data.snNum
|
||||
this.swNum = data.snNum
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
await this.getLineBar()
|
||||
await this.getSnSwNum()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user