This commit is contained in:
Paidax
2024-11-22 16:56:54 +08:00
parent 9c21da4f0f
commit f5d37974cd
146 changed files with 8256 additions and 7800 deletions
@@ -27,46 +27,36 @@ layout("/mobile/platform.html"){
</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>
<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>
@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-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;">
<div style="margin-top: 112px">
<van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
:immediate-check="false"
@load="pageData"
v-model="loading">
: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 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>
@@ -81,21 +71,15 @@ layout("/mobile/platform.html"){
<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 :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>
<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 class="van-sidebar-item van-sidebar-item--select">基本信息</div>
</div>
<van-cell-group>
<van-field :value="viewData.loginname" label="工号" left-icon="contact"></van-field>
@@ -131,7 +115,6 @@ layout("/mobile/platform.html"){
<div v-html="viewData.vita"></div>
</template>
</van-field>
</div>
</van-cell-group>
<van-cell-group class="mt10 up_down">
@@ -151,13 +134,12 @@ layout("/mobile/platform.html"){
<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-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>
@@ -170,7 +152,7 @@ layout("/mobile/platform.html"){
<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">
<div style="font-weight: 700; display: flex; justify-content: space-between">
<span>成员{{ toChinesNum(i + 1) }}</span>
</div>
<van-form readonly input-align="right">
@@ -182,26 +164,22 @@ layout("/mobile/platform.html"){
</van-form>
</div>
</div>
<div v-else style="height: 100px">
暂无家庭成员信息
</div>
<div v-else style="height: 100px">暂无家庭成员信息</div>
</div>
</van-cell-group>
</van-popup>
</div>
<script>
const vue = new Vue({
el: '#app',
el: "#app",
mixins: [mobileMixins],
data() {
return {
infoShow: false,
pageForm: {
unionId: '',
unitId: '',
unionId: "",
unitId: "",
pageNumber: 1,
pageSize: 10
},
@@ -224,7 +202,7 @@ layout("/mobile/platform.html"){
},
async pageData() {
this.loading = true
const {data} = await $.get('/mobile/member/getMemberData', this.pageForm)
const { data } = await $.get("/mobile/member/getMemberData", this.pageForm)
setTimeout(() => {
this.tableData = this.tableData.concat(data.list)
if (this.tableData.length === data.totalCount) {
@@ -237,7 +215,7 @@ layout("/mobile/platform.html"){
}, 300)
},
async viewInfo(id) {
const resp = await $.post('/platform/member/common/userInfo', {userId: 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)
@@ -245,17 +223,17 @@ layout("/mobile/platform.html"){
}
},
async initUnion() {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
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 => {
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 ("${@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)
@@ -263,24 +241,24 @@ layout("/mobile/platform.html"){
},
async initUnit(unionId) {
this.unitList = await getUnits(unionId)
this.unitList.forEach(v => {
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 ("${@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') {
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