first commit
This commit is contained in:
@@ -0,0 +1,176 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.handleicon {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="提案列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="location.href='/mobile/index'"
|
||||
></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
>
|
||||
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{o.proposalName}}</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center" v-if="o.isAgree == undefined">
|
||||
<van-icon @click.stop="doAudit(false,o)" class="handleicon" name="close"
|
||||
size="30px" color="gray"></van-icon>
|
||||
<van-icon @click.stop="doAudit(true,o)" class="handleicon" name="passed"
|
||||
size="30px" color="#07c160"></van-icon>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;" v-else>
|
||||
<span style="color: #FF4949" v-if="!o.isAgree">不通过</span>
|
||||
<span style="color: #13CE66" v-if="o.isAgree">通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">提案状态</div>
|
||||
<div class="text-overflow">{{o.stateName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.finished = true
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doAudit(flag, row) {
|
||||
const {id, secondedId} = row
|
||||
let res = flag === true ? '通过' : '拒绝'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '吗?',
|
||||
}).then(() => {
|
||||
$.post('/platform/proposal/transact/seconded/doAudit', {
|
||||
secondedId: secondedId,
|
||||
proposalId: id,
|
||||
flag: flag
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('提交成功!')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user