first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,422 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-tabs__content {
padding-top: 20px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">姓名工号:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 100%"
@keyup.enter.native="doSearch">
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
@change="getThreeUnits"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<template v-if="searchMore">
<div class="search-item">
<div class="search-item-label">工会小组:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionGroupId" style="width: 100%"
filterable
clearable
@change="getThreeUnits"
placeholder="请选择">
<el-option
v-for="item in unionGroups"
:key="item.id"
:label="item.groupName"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">组成科室:</div>
<div class="search-item-option">
<el-select v-model="pageForm.threeUnitId" style="width: 100%" filterable
clearable
placeholder="请选择">
<el-option
v-for="item in threeUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.personType" style="width: 100%" clearable
placeholder="人员类型"
code="UserType"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">在职状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.userState" style="width: 100%" clearable
placeholder="在职状态"
code="UserState"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">会员状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.memberStatus" style="width: 100%" clearable
placeholder="会员状态" code="memberStatusText"></dict-select>
</div>
</div>
</template>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
<more v-model="searchMore"></more>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<div class="search" style="position:relative;">
<div class="search-item">
<div class="search-item-label">工号开头:</div>
<div class="search-item-option">
<el-input v-model="pageForm.startLoginNames" maxLength="100"
placeholder="多个请用英文逗号分隔"></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">工号结尾:</div>
<div class="search-item-option">
<el-input v-model="pageForm.endLoginNames" maxLength="100"
placeholder="多个请用英文逗号分隔"></el-input>
</div>
</div>
<div class="search-item" style="width: calc(100% - 160px)">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<el-tag
style="margin-right: 10px;margin-bottom: 10px;cursor: pointer"
v-for="item in personTypeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="tagClick('personTypes',item.name)">
{{ item.name }}
</el-tag>
</div>
</div>
<div class="search-item" style="width: calc(100% - 160px)">
<div class="search-item-label">在职状态:</div>
<div class="search-item-option">
<el-tag
style="margin-right: 10px;margin-bottom: 10px;cursor: pointer"
v-for="item in userStateOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
@click="tagClick('userStates',item.name)">
{{ item.name }}
</el-tag>
</div>
</div>
<div class="search-query" style="position:absolute;right: 0;bottom: 0">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="会员列表" :app="this">
<template #func>
<el-button size="mini" @click="setBirthdayByIdCard" type="primary">
根据身份证设置生日
</el-button>
<el-button size="mini" @click="setMember" type="primary">
设置会员
</el-button>
<el-button size="mini" @click="setWelfareMember" type="primary">
设置福利会员
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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 v-if="column.prop=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
<template v-else-if="column.prop==='member'" scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
<template v-else-if="column.prop==='welfareMember'" scope="{row}">
<span v-if="row.welfareMember==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="userId" view></member>
</el-tab-pane>
<el-tab-pane label="变更记录" name="change">
<mem-change-records :userid="userId"></mem-change-records>
</el-tab-pane>
</el-tabs>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
submitLoading: false,
pageForm: {
userStates: [],
personTypes: [],
},
unionGroups:[],
threeUnits:[],
userId: "",
unions: [],
units: [],
active: 'info',
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'member', label: '是否会员', sortable: true},
{prop: 'welfareMember', label: '是否福利会员', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'birthday', label: '生日'},
{prop: 'campusName', label: '所属校区', sortable: true},
],
setMemberDialogVisible: false,
personTypeOptions: [],
userStateOptions: [],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
},
methods: {
async pageData() {
sublime.showLoadingbar()
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
const {data, code, msg} = await $.post(loc() + '/pageData', pageForm)
this.tableLoading = false
sublime.closeLoadingbar()
if (code === 0) {
this.tableData = data.list
this.pageForm.totalCount = data.totalCount
} else {
this.notifyWarning(msg)
}
},
setBirthdayByIdCard() {
this.$confirm('确定根据身份证设置生日吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post(loc() + "/setBirthdayByIdCard")
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
tagClick(key, val) {
const index = this.pageForm[key].findIndex(v => v === val)
if (index > -1) {
this.pageForm[key].splice(index, 1)
} else {
this.pageForm[key].push(val)
}
this.doSearch()
},
setMember() {
this.$confirm('确定根据以上筛选条件设置会员吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
const resp = await $.post(loc() + "/setMemberByCnd", pageForm)
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
setWelfareMember() {
this.$confirm('确定根据以上筛选条件设置福利会员吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
const resp = await $.post(loc() + "/setWelfareMemberByCnd", pageForm)
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
openView(userId) {
this.active = 'info'
this.userId = userId
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.$set(this.pageForm, "unionGroupId", null)
this.$set(this.pageForm, "threeUnitId", null)
this.units = []
this.unionGroups = []
this.threeUnits = []
if (this.pageForm.unionId) {
this.units = await getUnits(this.pageForm.unionId)
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
}
},
async getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
},
async created() {
this.pageData();
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
this.unions = await getUnions(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
}
})
</script>
<!--#
}
#-->