Commit b0c326b6 by wuchao

优化页面

parent b640816a
...@@ -827,24 +827,24 @@ export default { ...@@ -827,24 +827,24 @@ export default {
'km': '/keyPerson/keyPersonVisitRecordKm' // 重点未成年人 'km': '/keyPerson/keyPersonVisitRecordKm' // 重点未成年人
} }
// 根据状态类型确定查询参数 // 根据状态类型确定查询参数(传递 visit_status 用于自动设置回访状态筛选)
let query = {} let query = {}
switch (statusType) { switch (statusType) {
case 'completed': case 'completed':
// 已办:do_status=1 // 已办:不设置 visit_status,因为已办是已完成的状态
query = { do_status: '1' } query = {}
break break
case 'uncompleted': case 'uncompleted':
// 待办:do_status=0 // 正常待办 -> 正常待访:visit_status=1
query = { do_status: '0' } query = { visit_status: '1' }
break break
case 'nearOverdue': case 'nearOverdue':
// 临期待办:do_status=0&is_overdue=1 // 临期待办 -> 临期待访:visit_status=2
query = { do_status: '0', is_overdue: '1' } query = { visit_status: '2' }
break break
case 'overdue': case 'overdue':
// 超期未办:do_status=2 // 超期未办 -> 超期待访:visit_status=3
query = { do_status: '2' } query = { visit_status: '3' }
break break
} }
......
...@@ -49,8 +49,9 @@ ...@@ -49,8 +49,9 @@
</Select> </Select>
</Col> </Col>
<Col span="8" class="text-right"> <Col span="8" class="text-right">
<Button type="primary" class="mr10" @click="handleSearch">搜索</Button> <Button type="primary" style="margin-right: 10px" @click="handleSearch">搜索</Button>
<Button @click="handleReset">重置</Button> <Button style="margin-right: 10px" @click="handleReset">重置</Button>
<Button @click="handleBackToStatistics">返回重点人员统计</Button>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
<span>{{ renderVisitStatus(row.visit_status) }}</span> <span>{{ renderVisitStatus(row.visit_status) }}</span>
</template> </template>
<template slot="action" slot-scope="{ row }"> <template slot="action" slot-scope="{ row }">
<Button size="small" type="primary" class="mr10" @click="openVisitModal(row)">回访</Button> <Button size="small" type="primary" style="margin-right: 10px" @click="openVisitModal(row)">回访</Button>
<Button size="small" @click="openHistoryModal(row)">回访历史</Button> <Button size="small" @click="openHistoryModal(row)">回访历史</Button>
</template> </template>
</Table> </Table>
...@@ -247,6 +248,11 @@ export default { ...@@ -247,6 +248,11 @@ export default {
} }
}, },
created () { created () {
// 从路由参数中读取 visit_status,用于自动设置回访状态筛选
const routeQuery = this.$route.query || {}
if (routeQuery.visit_status) {
this.filters.visit_status = routeQuery.visit_status
}
this.init() this.init()
}, },
methods: { methods: {
...@@ -355,6 +361,11 @@ export default { ...@@ -355,6 +361,11 @@ export default {
this.pager.pageNo = 1 this.pager.pageNo = 1
this.loadList() this.loadList()
}, },
handleBackToStatistics () {
this.$router.push({
path: '/keyPerson/statistics'
})
},
async loadList () { async loadList () {
this.loading = true this.loading = true
try { try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论