山东移动新增需求
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
<template>
|
||||
<div class="AppReturnHomeRegister">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
<ai-list class="AppReturnHomeRegister" v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="返乡登记" :isShowBottomBorder="false" :fullname.sync="areaName" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Detail v-else-if="componentName === 'Detail'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List.vue'
|
||||
import Detail from './components/Detail.vue'
|
||||
import AbnormalList from './components/AbnormalList.vue'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppReturnHomeRegister',
|
||||
@@ -16,7 +26,8 @@
|
||||
|
||||
components: {
|
||||
List,
|
||||
Detail
|
||||
Detail,
|
||||
AbnormalList
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -25,13 +36,35 @@
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
tabs () {
|
||||
const tabList = [
|
||||
{label: '返乡登记', name: 'List', comp: List, permission: ''},
|
||||
{label: '历史异常人员', name: 'AbnormalList', comp: AbnormalList, permission: ''}
|
||||
]
|
||||
|
||||
return tabList
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
activeName: 'JoinEvent',
|
||||
currIndex: '0',
|
||||
component: 'List',
|
||||
params: {}
|
||||
params: {},
|
||||
areaId: '',
|
||||
isShowDetail: false,
|
||||
areaName: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.areaId = this.user.info.areaId
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
@@ -39,9 +72,15 @@
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
if (data.type === 'AbnormalList') {
|
||||
this.component = 'AbnormalList'
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === 'list') {
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
@@ -50,6 +89,10 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onAreaChange () {
|
||||
this.$refs[this.currIndex][0].changeArea()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
200
packages/3.0.0/AppReturnHomeRegister/components/AbnormalList.vue
vendored
Normal file
200
packages/3.0.0/AppReturnHomeRegister/components/AbnormalList.vue
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<ai-list isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.status"
|
||||
clearable
|
||||
placeholder="请选择健康状态"
|
||||
:selectList="dictList"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
<ai-download :instance="instance" url="/app/appepidemicbackhomerecord/export" :params="param" fileName="返乡登记" :disabled="tableData.length == 0">
|
||||
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
|
||||
</ai-download>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
v-loading="loading"
|
||||
style="margin-top: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'AbnormalList',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
arriveAreaId: '',
|
||||
status: ''
|
||||
},
|
||||
dictList: [{
|
||||
dictName: '异常',
|
||||
dictValue: '0'
|
||||
}, {
|
||||
dictName: '正常',
|
||||
dictValue: '1'
|
||||
}],
|
||||
info: {},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'phone', align: 'center', label: '手机号码' },
|
||||
{ prop: 'startTime', align: 'center', label: '出发时间', formart: v => v.substr(0, v.length - 3) },
|
||||
{
|
||||
prop: 'startAreaName',
|
||||
align: 'center',
|
||||
label: '出发地区'
|
||||
},
|
||||
{ prop: 'arriveTime', align: 'center', label: '到达时间', formart: v => v.substr(0, v.length - 3) },
|
||||
{
|
||||
prop: 'arriveAreaName',
|
||||
align: 'center',
|
||||
label: '到达地区'
|
||||
},
|
||||
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v.split(' ')[0] },
|
||||
{
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
label: '健康状态',
|
||||
render: (h, {row}) => {
|
||||
return h('span', {
|
||||
style: {
|
||||
color: row.status === '0' ? 'red' : '#333'
|
||||
}
|
||||
}, row.status === '0' ? '异常' : '正常')
|
||||
}
|
||||
}
|
||||
],
|
||||
ids: [],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
disabledLevel: 0
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return this.search
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.disabledLevel = this.user.info.areaList.length - 1
|
||||
this.search.arriveAreaId = this.user.info.areaId
|
||||
this.loading = true
|
||||
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
this.getTotalInfo()
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
changeArea () {
|
||||
this.search.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
this.getTotalInfo()
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getTotalInfo()
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
getTotalInfo () {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/statistic`, null, {
|
||||
params: {
|
||||
areaId: this.search.arriveAreaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@@ -258,7 +258,7 @@
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
type: 'List',
|
||||
isRefresh: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="返乡登记" v-if="search.arriveAreaId" isShowBottomBorder :instance="instance" :disabledLevel="disabledLevel" isShowArea v-model="search.arriveAreaId" @change="changeArea"></ai-title>
|
||||
<ai-list class="list" isTabs>
|
||||
<template slot="content">
|
||||
<div class="statistics-top">
|
||||
<div class="statistics-top__item">
|
||||
@@ -80,7 +79,8 @@
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
dict: Object,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data () {
|
||||
@@ -89,7 +89,6 @@
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
arriveAreaId: '',
|
||||
status: ''
|
||||
},
|
||||
dictList: [{
|
||||
@@ -147,7 +146,6 @@
|
||||
|
||||
created () {
|
||||
this.disabledLevel = this.user.info.areaList.length - 1
|
||||
this.search.arriveAreaId = this.user.info.areaId
|
||||
this.loading = true
|
||||
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
|
||||
this.getList()
|
||||
@@ -158,7 +156,8 @@
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
...this.search,
|
||||
arriveAreaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -230,7 +229,7 @@
|
||||
background: transparent!important;
|
||||
box-shadow: none!important;
|
||||
margin: 0!important;
|
||||
padding: 12px 16px 12px!important;
|
||||
padding: 0 0 0!important;
|
||||
}
|
||||
}
|
||||
.statistics-top {
|
||||
|
||||
@@ -91,28 +91,28 @@
|
||||
</ai-card>
|
||||
<ai-card title="参会名单">
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<el-select v-model="search.joinStatus" placeholder="确认状态" size="small" clearable class="vc-input-160"
|
||||
@change="searchMeetinguser">
|
||||
<el-select v-model="search.joinStatus" placeholder="确认状态" size="small" clearable class="vc-input-160" @change="searchMeetinguser">
|
||||
<el-option
|
||||
v-for="(item,k) in confirmStatus"
|
||||
:key="k"
|
||||
:label="item.label"
|
||||
:value="k">
|
||||
v-for="(item,k) in confirmStatus"
|
||||
:key="k"
|
||||
:label="item.label"
|
||||
:value="k">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- <template #right>-->
|
||||
<!-- <el-input v-model="search.param" placeholder="姓名/手机号" @change="searchMeetinguser()"-->
|
||||
<!-- size="small" suffix-icon="iconfont iconSearch" clearable/>-->
|
||||
<!-- </template>-->
|
||||
<template #right>
|
||||
<ai-download :instance="instance" url="/app/appepidemicbackhomerecord/export" fileName="参会名单">
|
||||
<el-button icon="iconfont iconExported">导出</el-button>
|
||||
</ai-download>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="info.attendees"
|
||||
:colConfigs="colConfigs"
|
||||
:isShowPagination="false"
|
||||
>
|
||||
:tableData="info.attendees"
|
||||
:colConfigs="colConfigs"
|
||||
style="margin-top: 12px;"
|
||||
:isShowPagination="false">
|
||||
<el-table-column slot="meetingUserName"
|
||||
label="姓名"
|
||||
align="center"
|
||||
@@ -195,17 +195,13 @@ export default {
|
||||
{
|
||||
slot: 'meetingUserName'
|
||||
},
|
||||
// {
|
||||
// prop: 'meetingUserPhone',
|
||||
// align: 'center',
|
||||
// label: '手机号码',
|
||||
// },
|
||||
{
|
||||
slot: 'meetingUnitName'
|
||||
},
|
||||
{
|
||||
slot: 'joinStatus',
|
||||
},
|
||||
{ prop: 'checkTime', align: 'center', label: '签到' },
|
||||
{
|
||||
slot: 'option',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user