社区管理
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div class="doc-circulation ailist-wrapper">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :moduleName="moduleName" :moduleId="moduleId" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Detail from './components/Detail'
|
||||
|
||||
export default {
|
||||
name: 'AppCommunityManagement',
|
||||
label: '社区管理',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
moduleId: '',
|
||||
include: [],
|
||||
moduleName: ''
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
Detail,
|
||||
List
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
this.component = 'Detail'
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.doc-circulation {
|
||||
height: 100%;
|
||||
background: #F3F6F9;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<ai-detail isHasSidebar>
|
||||
<template slot="title">
|
||||
<ai-title title="社区管理详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar>
|
||||
<div v-show="currIndex === 0">
|
||||
<ai-card title="基本信息" v-show="currIndex === 0">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="管理对象" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="对象类型" :value="dict.getLabel('EP_registerInfoType', info.infoType)"></ai-info-item>
|
||||
<ai-info-item label="身份证" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="手机号" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="所属地区" :value="info.areaName" isLine></ai-info-item>
|
||||
<ai-info-item label="居家状态" :value="dict.getLabel('EP_homeStatus2', info.homeStatus)"></ai-info-item>
|
||||
<ai-info-item label="隔离时间" :value="info.quarantineBeginTime + ' - ' + info.quarantineEndTime"></ai-info-item>
|
||||
<ai-info-item label="隔离策略 " :value="dict.getLabel('EP_quarantineStrategy', info.quarantineStrategy)"></ai-info-item>
|
||||
<ai-info-item label="管控人" :value="info.controllerUserName"></ai-info-item>
|
||||
<ai-info-item label="联系方式" :value="info.controllerUserPhone"></ai-info-item>
|
||||
<ai-info-item label="管理内容" isLine :value="info.controllerContent"></ai-info-item>
|
||||
<ai-info-item label="图片" isLine>
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
:value="info.fileList"
|
||||
disabled
|
||||
:limit="9">
|
||||
</ai-uploader>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</div>
|
||||
<div v-show="currIndex === 1">
|
||||
<ai-card title="核酸详情">
|
||||
<template #content>
|
||||
<ai-table
|
||||
:isShowPagination="false"
|
||||
tableSize="small"
|
||||
border
|
||||
:tableData="info.nucleicAcidSamplingList"
|
||||
:col-configs="colConfigs"
|
||||
@getList="() => {}">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
total: 0,
|
||||
info: {},
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
currIndex: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'createUserName', label: '采样人', align: 'center' },
|
||||
{ prop: 'createUserPhone', label: '联系方式', align: 'center'},
|
||||
{ prop: 'createTime', label: '采样时间', align: 'center' }
|
||||
],
|
||||
tabList: ['基本信息', '核酸详情']
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.$dict.load(['EP_CM_status', 'EP_registerInfoType', 'EP_homeStatus2', 'EP_quarantineStrategy']).then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
})
|
||||
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appepidemicpreventioncommunitymanagement/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicunusuallog/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
recordId: this.params.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.color-0{
|
||||
color: #42D784;
|
||||
}
|
||||
.color-1{
|
||||
color: #f46;
|
||||
}
|
||||
.color-2{
|
||||
color: #1365DD;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title title="社区管理" isShowBottomBorder></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.infoType"
|
||||
clearable
|
||||
placeholder="请选择对象类型"
|
||||
:selectList="dict.getDict('EP_registerInfoType')"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
<ai-select
|
||||
v-model="search.status"
|
||||
clearable
|
||||
placeholder="请选择现实状态"
|
||||
:selectList="dict.getDict('epidemicDangerousAreaLevel')"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
<ai-user-selecter :instance="instance" @change="onUserChange" :isMultiple="false" v-model="user">
|
||||
<div class="userSelcet">
|
||||
<span style="color: #606266;" v-if="search.controllerUserId">{{ name }}</span>
|
||||
<span v-else>管控人</span>
|
||||
<i class="el-icon-arrow-up" v-if="!search.controllerUserId"></i>
|
||||
<i class="el-icon-circle-close" v-if="search.controllerUserId" @click.stop="user = [], search.controllerUserId = '', name = '', search.current = 1, getList()"></i>
|
||||
</div>
|
||||
</ai-user-selecter>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="标题、排查对象、排查人"
|
||||
clearable
|
||||
@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"
|
||||
style="margin-top: 6px;"
|
||||
v-loading="isLoading"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="100px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDeital(row.id)">详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
infoType: '',
|
||||
controllerUserId: ''
|
||||
},
|
||||
user: [],
|
||||
name: '',
|
||||
img: '',
|
||||
isLoading: false,
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '管理对象', align: 'left' },
|
||||
{ prop: 'phone', label: '手机号', align: 'center' },
|
||||
{ prop: 'idNumber', label: '身份证号', align: 'center' },
|
||||
{ prop: 'createTime', label: '排查时间', align: 'center' },
|
||||
{ prop: 'areaName', label: '所属地区', align: 'center' },
|
||||
{ prop: 'status', label: '管理状态', align: 'center', formart: v => this.dict.getLabel('EP_CM_status', v) },
|
||||
{ prop: 'nucleicAcidSamplingCount', label: '核酸状态', align: 'center', formart: v => v > 0 ? `核酸采集${v}次` : '待采' },
|
||||
{ prop: 'infoType', label: '对象来源', align: 'center', formart: v => this.dict.getLabel('EP_registerInfoType', v) },
|
||||
{ prop: 'controllerUserName', label: '管控人', align: 'center' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.$dict.load(['EP_CM_status', 'EP_registerInfoType', 'EP_registerInfoType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appepidemicpreventioncommunitymanagement/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDeital (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onUserChange (e) {
|
||||
if (e.length) {
|
||||
this.name = e[0].name
|
||||
this.search.controllerUserId = e[0].openId
|
||||
} else {
|
||||
this.search.controllerUserId = ''
|
||||
this.name = ''
|
||||
}
|
||||
|
||||
this.search.current = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.notice {
|
||||
.userSelcet {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 215px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d0d4dc;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
|
||||
&:hover {
|
||||
border-color: #26f;
|
||||
}
|
||||
|
||||
i {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #d0d4dc;
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
|
||||
.el-icon-circle-close:hover {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
span {
|
||||
flex: 1;
|
||||
padding: 0 15px;
|
||||
font-size: 12px;
|
||||
color: $placeholderColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user