移动端返回

This commit is contained in:
Paidax
2025-04-03 17:51:01 +08:00
parent 45a16bf564
commit 3a2f108c42
74 changed files with 2859 additions and 3654 deletions
+60 -101
View File
@@ -8,7 +8,7 @@ layout("/mobile/platform.html"){
.cell-card {
padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 90%;
margin: 20px auto;
border-radius: 20px;
@@ -24,67 +24,47 @@ layout("/mobile/platform.html"){
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>
<van-nav-bar title="提案列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-search
v-model="pageForm.searchKeyWord"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询"
>
</van-search>
v-model="pageForm.searchKeyWord"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询"
></van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList" @change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="active" @click="onClickActive">
<van-tab title="未审核">
<div>
<van-list
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad"
>
<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,o.secondedId)">
<div style="display: flex">
<div style="width: 75%">
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
{{o.proposalName}}
</div>
<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 style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
</div>
<div style="width: 25%;display: flex;align-items: center;">
<div style="width: 25%; display: flex; align-items: center">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</div>
</div>
<van-divider></van-divider>
<div style="display: flex;font-size: 12px">
<div style="display: flex; font-size: 12px">
<div style="width: 38%">
<div style="color: gray">教代会届次</div>
<div class="text-overflow ">{{o.meetingName}}</div>
<div class="text-overflow">{{o.meetingName}}</div>
</div>
<div style="width: 38%">
<div style="color: gray">提案类型</div>
@@ -97,42 +77,30 @@ layout("/mobile/platform.html"){
</div>
</van-cell>
</van-list>
<van-empty
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
</div>
</van-tab>
<van-tab title="已审核">
<div>
<van-list
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad"
>
<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,o.secondedId)">
<div style="display: flex">
<div style="width: 75%">
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
{{o.proposalName}}
</div>
<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 style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
</div>
<div style="width: 25%;display: flex;align-items: center;">
<div style="width: 25%; display: flex; align-items: center">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</div>
</div>
<van-divider></van-divider>
<div style="display: flex;font-size: 12px">
<div style="display: flex; font-size: 12px">
<div style="width: 38%">
<div style="color: gray">教代会届次</div>
<div class="text-overflow ">{{o.meetingName}}</div>
<div class="text-overflow">{{o.meetingName}}</div>
</div>
<div style="width: 38%">
<div style="color: gray">提案类型</div>
@@ -145,22 +113,15 @@ layout("/mobile/platform.html"){
</div>
</van-cell>
</van-list>
<van-empty
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
</div>
</van-tab>
</van-tabs>
</div>
<script>
const vue = new Vue({
el: '#app',
el: "#app",
mixins: [mobileMixins],
data() {
return {
@@ -169,7 +130,7 @@ layout("/mobile/platform.html"){
isAudit: false
},
list: [],
state: '0',
state: "0",
loading: false,
finished: false,
refreshing: false,
@@ -178,8 +139,9 @@ layout("/mobile/platform.html"){
proposalTypeList: [],
resultList: [],
isAuditList: [
{"text": "未审核", "value": false},
{"text": "已审核", "value": true}]
{ text: "未审核", value: false },
{ text: "已审核", value: true }
]
}
},
methods: {
@@ -194,20 +156,18 @@ layout("/mobile/platform.html"){
setTimeout(() => {
this.refreshing = false
}, 1000)
},
doSearch() {
this.onLoad()
},
onClickActive(name) {
this.$set(this.pageForm, "isAudit", name)
this.onLoad()
},
async onLoad() {
this.tableData = []
this.loading = true
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => {
$.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)
@@ -221,46 +181,47 @@ layout("/mobile/platform.html"){
})
},
doAudit(flag, row) {
const {id, secondedId} = row
let res = flag === true ? '通过' : '拒绝'
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(() => {
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, secondedId) {
// window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
window.location.href = '/platform/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true
window.location.href = "/platform/mobile/proposal/seconded/view?biz_key=" + secondedId + "&proposal_id=" + id + "&mobile=" + true
}
},
async created() {
this.sessionList = await mProposal.getAllSession()
const a = await getProposalType()
if (a) {
a.forEach(v => {
this.proposalTypeList.push({"text": v.typeName, "value": v.id})
a.forEach((v) => {
this.proposalTypeList.push({ text: v.typeName, value: v.id })
})
this.proposalTypeList.unshift({"text": "所有类型", "value": null})
this.proposalTypeList.unshift({ text: "所有类型", value: null })
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
}
if (this.sessionList && this.sessionList.length > 0) {
@@ -269,19 +230,17 @@ layout("/mobile/platform.html"){
if (this.delegationList) {
this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
}
}
const aa = await getDictOptions("proposal_result")
console.log(aa)
if (a) {
aa.forEach(v => {
this.resultList.push({"text": v.name, "value": v.code})
aa.forEach((v) => {
this.resultList.push({ text: v.name, value: v.code })
})
this.resultList.unshift({"text": "所有结果", "value": null})
this.resultList.unshift({ text: "所有结果", value: null })
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
}
},
}
})
</script>