first commit
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
@click-left="location.href='/mobile/index/toHome?type=民主管理'"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="代表查询"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="sessionList" @change="sessionChange"
|
||||
v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="delegationList" @change="doSearch"
|
||||
v-model="pageForm.delegationId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="delegateTypeList" @change="doSearch"
|
||||
v-model="pageForm.delegateTypeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 120px;">
|
||||
<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.dbid)" 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.dbtname}}</van-cell>
|
||||
<van-cell :border="false" title="代表身份">{{o.rolename}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
sessionId: '',
|
||||
delegationId: '',
|
||||
delegateTypeId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
delegateTypeList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async sessionChange() {
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/proposal/delegate/pageData', 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)
|
||||
},
|
||||
viewInfo(id) {
|
||||
// window.open('/mobile/proposal/delegate/viewInfo?id='+id)
|
||||
window.location.href = '/mobile/proposal/delegate/viewInfo?id=' + id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.delegateTypeList = await mProposal.getDelegateType()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionList[0].value
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
if (this.delegateTypeList && this.delegateTypeList.length > 0) {
|
||||
this.pageForm.delegateTypeId = this.delegateTypeList[0].value
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user