first commit
This commit is contained in:
@@ -0,0 +1,228 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.infoPop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="会员查询"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
@input="doSearch"
|
||||
:show-action="true"
|
||||
maxlength="10"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch"
|
||||
v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 112px;">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<van-cell-group @click="viewInfo(o.id)" inset>
|
||||
<van-cell :border="false" title="姓名">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="性别">{{o.sex}}</van-cell>
|
||||
<van-cell :border="false" title="出生年月">{{o.birthday}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="人员类型">{{o.personType}}</van-cell>-->
|
||||
<van-cell :border="false" title="联系电话">{{o.mobile}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.unionname}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length === 0" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<div :style="{color:themeColor}"
|
||||
style="text-align: right;position: fixed;bottom: 20px;right: 20px">
|
||||
<van-button :color="themeColor" hairline size="mini" type="primary">
|
||||
总:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup class="infoPop" v-model="infoShow" position="right">
|
||||
<van-nav-bar @click-left="infoShow = false" fixed left-arrow placeholder safe-area-inset-top
|
||||
title="会员详细信息"></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.unitname }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.zc }}</van-cell>
|
||||
<van-cell title="职务">{{ viewData.zw }}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
个人简历
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<template>
|
||||
<div v-html="viewData.grjl" v-if="viewData.grjl!=null"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
pageForm: {
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/member/getMemberData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
async viewInfo(id) {
|
||||
const resp = await $.post('/mobile/member/viewInfo', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.infoShow = true
|
||||
}
|
||||
},
|
||||
async initUnion() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList = await getUnionList(null)
|
||||
} else {
|
||||
this.unionList = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList.unshift({text: "全部工会", value: null})
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async initUnit(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true' && this.pageForm.unionId === null) {
|
||||
this.unitList.unshift({text: "全部单位", value: null})
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.initUnit("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user