275 lines
12 KiB
HTML
275 lines
12 KiB
HTML
<!--#
|
|
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="pjaxReplace('/mobile/index')" 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-field :value="viewData.loginname" label="工号" left-icon="contact"></van-field>
|
|
<van-field label="姓名" :value="viewData.username" left-icon="contact"></van-field>
|
|
<van-field label="性别" :value="viewData.sex" left-icon="ellipsis"></van-field>
|
|
<van-field label="民族" left-icon="bar-chart-o" :value="viewData.nation"></van-field>
|
|
<van-field label="学历" left-icon="coupon-o" :value="viewData.education"></van-field>
|
|
<!-- <van-field label="学位" left-icon="comment-o" :value="viewData.academicDegree"></van-field>-->
|
|
<van-field label="政治面貌" left-icon="label-o" :value="viewData.political"></van-field>
|
|
<van-field label="婚否" left-icon="label-o" :value="viewData.marriage"></van-field>
|
|
<!-- <van-field :value="viewData.personType" label="人员类型" left-icon="label-o"></van-field>-->
|
|
<van-field label="身份证号码" left-icon="idcard" :value="viewData.idcard"></van-field>
|
|
<van-field label="联系电话" left-icon="phone-o" :value="viewData.mobile"></van-field>
|
|
<van-field label="户口所在地" left-icon="wap-home-o" :value="viewData.registeredResidence"></van-field>
|
|
<van-field label="现居住地" left-icon="home-o" :value="viewData.homeAddress"></van-field>
|
|
<van-field label="工作部门(学院)及岗位" left-icon="cluster-o" :value="viewData.unitname + '、' + viewData.jobTitle"></van-field>
|
|
</van-cell-group>
|
|
<van-cell-group class="mt10 up_down">
|
|
<div class="van-cell" style="flex-flow: column">
|
|
<div style="display: flex">
|
|
<div class="van-field__left-icon">
|
|
<i class="van-icon van-icon-notes-o"></i>
|
|
</div>
|
|
<div class="van-cell__title van-field__label">
|
|
<span>简历</span>
|
|
</div>
|
|
</div>
|
|
|
|
<van-divider></van-divider>
|
|
|
|
<van-field readonly>
|
|
<template #input>
|
|
<div v-html="viewData.vita"></div>
|
|
</template>
|
|
</van-field>
|
|
</div>
|
|
</van-cell-group>
|
|
<van-cell-group class="mt10 up_down">
|
|
<div class="van-cell" style="flex-flow: column">
|
|
<div style="display: flex">
|
|
<div class="van-field__left-icon">
|
|
<i class="van-icon van-icon-award-o"></i>
|
|
</div>
|
|
<div class="van-cell__title van-field__label">
|
|
<span>有何特长</span>
|
|
</div>
|
|
</div>
|
|
<van-divider></van-divider>
|
|
|
|
<van-field readonly>
|
|
<template #input>
|
|
<div v-html="viewData.specialSkill"></div>
|
|
</template>
|
|
</van-field>
|
|
</div>
|
|
</van-cell-group>
|
|
<van-cell-group class="mt10 up_down">
|
|
<div class="van-cell" style="flex-flow: column">
|
|
<div class="van-cell__title van-field__label" style="display: flex; justify-content: space-between">
|
|
<div style="display: flex">
|
|
<div class="van-field__left-icon">
|
|
<i class="van-icon van-icon-friends-o"></i>
|
|
</div>
|
|
<div class="van-cell__title van-field__label" style="width: auto">
|
|
<span>家庭成员</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<van-divider></van-divider>
|
|
|
|
<div v-if="family && family.length>0">
|
|
<div v-for="(o,i) in family" class="mt5">
|
|
<div style="font-weight: 700; display: flex; justify-content: space-between">
|
|
<span>成员{{ toChinesNum(i + 1) }}</span>
|
|
</div>
|
|
<van-form readonly input-align="right">
|
|
<van-field label="与本人关系" :value="o.relation" left-icon="exchange"></van-field>
|
|
<van-field label="姓名" :value="o.name" left-icon="user-o"></van-field>
|
|
<van-field label="是否慰问" :value="o.isCondolence" left-icon="shield-o"></van-field>
|
|
<van-field label="慰问时间" :value="o.condolenceTime" left-icon="guide-o"></van-field>
|
|
<van-field label="备注" :value="o.remark" left-icon="coupon-o"></van-field>
|
|
</van-form>
|
|
</div>
|
|
</div>
|
|
<div v-else style="height: 100px">暂无家庭成员信息</div>
|
|
</div>
|
|
</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: {},
|
|
family: []
|
|
}
|
|
},
|
|
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("/platform/member/common/userInfo", { userId: id })
|
|
if (resp.code === 0) {
|
|
this.viewData = resp.data
|
|
this.family = JSON.parse(resp.data.family)
|
|
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>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|