This commit is contained in:
Paidax
2024-07-23 09:52:35 +08:00
parent f734d9511c
commit e2f6a9f4b1
221 changed files with 12004 additions and 14330 deletions
@@ -3,8 +3,8 @@ layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<div class="platform" id="app" v-cloak>
<guava padding="0 5%" ref="guava">
<template>
<el-card shadow="never">
<div class="search">
@@ -15,8 +15,8 @@ layout("/layouts/platform.html"){
:clearable="true"
@change="yearChange"
placeholder="选择年"
type="year"
style="width: 100%;"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
@@ -39,13 +39,13 @@ layout("/layouts/platform.html"){
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
<el-select :clearable="clearable" @change="doSearch();getUnionGroup();"
filterable="true"
placeholder="请选择所属工会"
style="width: 100%;"
:clearable="clearable"
@change="doSearch();getUnionGroup();"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></el-option>
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
@@ -69,7 +69,7 @@ layout("/layouts/platform.html"){
</div>-->
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
</el-button>
</div>
@@ -77,42 +77,61 @@ layout("/layouts/platform.html"){
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="工会列表" :app="this" ref="table_tool">
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="工会列表" ref="table_tool">
<template #func>
<template
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
<el-button :disabled="!pageForm.projectId" type="primary"
size="small"
icon="el-icon-printer"
@click="exportReceiveDetail()">按分工会导出已选名单
</el-button>
<template v-if="projectInfo.healthCheckupType==='jzg'">
<el-button :disabled="!pageForm.projectId"
@click="exportReceiveDetail(true)"
icon="el-icon-printer"
<el-button :disabled="!pageForm.projectId" type="primary"
size="small"
size="small"
type="primary">导出教职工已选名单
</el-button>
<el-button :disabled="!pageForm.projectId"
@click="exportReceiveDetail(false)"
icon="el-icon-printer"
size="small"
type="primary"
v-if="projectInfo.healthCheckupType==='jzg'">导出教职工未选名单
</el-button>
<el-button @click="selectOptionByAdmin"
icon="el-icon-printer"
size="small"
type="primary"
v-if="${@shiro.hasRole('sysadmin')}">管理员代选择
</el-button>
</template>
<el-button :disabled="!pageForm.projectId"
@click="exportUserCompanion()"
icon="el-icon-printer"
@click="exportUserCompanion()">导出家属名单
size="small"
type="primary"
v-if="projectInfo.healthCheckupType==='js'">导出家属名单
</el-button>
</template>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder" :size="tableSize"
v-loading="tableLoading" ref="table" class="vi-table"
show-summary :summary-method="getSummaries">
<el-table-column align="center" header-align="center" type="index"
:index="indexMethod" label="序号"
<el-table :data="tableData" :size="tableSize" :summary-method="getSummaries"
@sort-change="pageOrder" class="vi-table"
ref="table" row-key="id" show-summary
style="width: 100%" v-loading="tableLoading">
<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"
:width="column.width"
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:sortable="column.sortable"
:label="column.label"
:prop="column.prop" :width="column.width" min-width="100px">
min-width="100px" show-overflow-tooltip v-for="column in tableColumns">
<!--<template scope="{row}" v-if="column.prop=='unionname'">
({{row.unioncode}}){{row.unionname}}
@@ -124,13 +143,13 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作" width="200px"
fixed="right">
<el-table-column align="center" fixed="right" header-align="center"
label="操作" prop="userOnline"
width="200px">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}"
type="primary">
type="primary"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
查看已选人员
</el-button>
</template>
@@ -145,12 +164,12 @@ layout("/layouts/platform.html"){
<div class="search">
<div class="search-item">
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable
<el-input clearable placeholder="请输入内容"
v-model="pageFormUnion.searchKeyword">
<el-select v-model="pageFormUnion.searchName" slot="prepend"
placeholder="查询类型"
@keyup.enter.native="doUnionSearch"
style="width: 80px;">
<el-select @keyup.enter.native="doUnionSearch" placeholder="查询类型"
slot="prepend"
style="width: 80px;"
v-model="pageFormUnion.searchName">
<el-option label="姓名" value="u.username"></el-option>
<el-option label="工号" value="u.loginname"></el-option>
</el-select>
@@ -159,7 +178,7 @@ layout("/layouts/platform.html"){
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doUnionSearch">搜索
<el-button @click="doUnionSearch" icon="el-icon-search" type="primary">搜索
</el-button>
</div>
</div>
@@ -169,24 +188,24 @@ layout("/layouts/platform.html"){
icon="el-icon-printer"
@click="exportReceiveDetailByUnionId(true)">导出已选名单
</el-button>-->
<el-card shadow="never" class="mt10">
<el-card class="mt10" shadow="never">
<div v-if="pageFormUnion.isSelected=='0'">
<vi-title title="已选人员"></vi-title>
</div>
<div v-else>
<vi-title title="未选人员"></vi-title>
</div>
<el-table :data="receive_tableData" style="width: 100%;height: 700px" row-key="id"
<el-table :data="receive_tableData" :size="tableSize" class="vi-table"
height="100%"
v-loading="tableLoading" class="vi-table" :size="tableSize">
row-key="id" style="width: 100%;height: 700px" v-loading="tableLoading">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column
align="center"
v-for="column in receive_tableColumns"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
show-overflow-tooltip
v-for="column in receive_tableColumns"
>
</el-table-column>
</el-table>
@@ -194,18 +213,43 @@ layout("/layouts/platform.html"){
<el-row class="el-pagination-container" style="margin-bottom: 0px">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageFormUnion.pageNumber"
:page-sizes="[5,10, 20, 30, 50]"
:page-size="pageFormUnion.pageSize"
layout="total, sizes, prev, pager, next"
:total="pageFormUnion.totalCount">
:page-sizes="[5,10, 20, 30, 50]"
:total="pageFormUnion.totalCount"
@current-change="pageNumberChange"
@size-change="pageSizeChange"
layout="total, sizes, prev, pager, next">
</el-pagination>
</el-row>
</template>
</guava>
<el-dialog :visible.sync="selectByAdminDialogVisible" title="管理员代选体检项目"
width="35%">
<el-form label-position="right" label-width="120px">
<el-form-item label="体检项目">
<el-select style="width: 100%" v-model="noSelectOptionId">
<el-option :key="item.id" :label="item.optionName" :value="item.id"
v-for="item in projectSubjectOptions"></el-option>
</el-select>
</el-form-item>
<el-form-item
label="院区"
prop="campus">
<el-select style="width: 100%" v-model="campus">
<el-option :key="item.id" :label="item.campusName" :value="item.id"
v-for="item in campusOptions"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<el-button @click="selectByAdminDialogVisible=false">取消</el-button>
<el-button @click="doSelectByAdmin" type="primary" :loading="loading">提交</el-button>
</el-row>
</el-dialog>
</div>
<script>
@@ -236,9 +280,52 @@ layout("/layouts/platform.html"){
{prop: 'sumCount', label: '本次体检人数'},
],
unioncode: null,
projectInfo: {},
selectByAdminDialogVisible: false,
projectSubjectOptions: [],
campusOptions: [],
noSelectOptionId: null,
campus: null,
loading:false,
}
},
methods: {
async doSelectByAdmin() {
if (!this.noSelectOptionId || !this.campus) {
this.notifyWarning('请选择套餐/院区')
return
}
const {optionName} = this.projectSubjectOptions.find(v => v.id === this.noSelectOptionId)
const confirm = await this.$confirm('请确定是否把【' + optionName + '】福利赋给未选择的教职工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
this.loading = true
const resp = await $.get(loc() + '/doSelectByAdmin', {
optionId: this.noSelectOptionId,
campus: this.campus,
projectId: this.pageForm.projectId
})
if (resp.code === 0) {
this.doSearch()
this.loading = false
this.selectByAdminDialogVisible = false
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
},
selectOptionByAdmin() {
this.noSelectOptionId = null
this.selectByAdminDialogVisible = true
},
async yearChange() {
const resp = await $.get("/platform/healthCheckup/project/mange/getHealthCheckupProject", {year: this.pageForm.year})
if (resp.code === 0) {
@@ -258,6 +345,7 @@ layout("/layouts/platform.html"){
const resp = await $.get("/platform/healthCheckup/project/mange/findOne", {id: this.pageForm.projectId})
if (resp.code === 0) {
if (resp.data) {
this.projectInfo = resp.data
this.projectSubjectOptions = resp.data.healthCheckupProjectSubjects
}
} else {
@@ -265,6 +353,14 @@ layout("/layouts/platform.html"){
}
this.doSearch()
},
async getCampus() {
const resp = await $.get("/mobile/healthCheckup/getCampus")
if (resp.code === 0) {
this.campusOptions = resp.data
} else {
this.notifyError(resp.msg)
}
},
async getUnionGroup() {
if (this.pageForm.unionId) {
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
@@ -323,14 +419,13 @@ layout("/layouts/platform.html"){
await this.getUnionGroup()
if ("${@shiro.hasRole('ghxzzz')}" === 'true') {
this.$set(this.pageForm, "unionGroupId", this.unionGroups[0].id)
} else {
this.clearable = true
}
} else {
this.unions = await getUnions(null)
this.clearable = true
}
await this.yearChange()
await this.getCampus()
},
//查看未选择人数
async openUnclaimed(unionId) {
@@ -359,9 +454,10 @@ layout("/layouts/platform.html"){
this.pageFormUnion.pageNumber = 1
this.pageUnionData();
},
//按分工会导出已选名单
exportReceiveDetail(flag) {
const {year,projectId, unionId} = this.pageForm
const {year, projectId, unionId} = this.pageForm
window.open(loc() + '/exportReceiveDetail?year=' + year + '&projectId=' + projectId + '&unionId=' + (unionId ? unionId : '') + '&flag=' + flag)
},
//导出家属信息
@@ -369,7 +465,7 @@ layout("/layouts/platform.html"){
const {year, projectId, unionId} = this.pageForm
window.open(loc() + '/exportUserCompanion?year=' + year + '&projectId=' + projectId + '&unionId=' + (unionId ? unionId : ''))
},
getSummaries(param){
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {