走访慰问、居民档案
This commit is contained in:
62
packages/2.0.5/AppVisitVondolence/AppVisitVondolence.vue
vendored
Normal file
62
packages/2.0.5/AppVisitVondolence/AppVisitVondolence.vue
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<div class="AppVisitVondolence">
|
||||||
|
<keep-alive :include="['List']">
|
||||||
|
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||||
|
</keep-alive>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import List from './components/List.vue'
|
||||||
|
import Detail from './components/Detail.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AppVisitVondolence',
|
||||||
|
label: '走访慰问',
|
||||||
|
|
||||||
|
components: {
|
||||||
|
List,
|
||||||
|
Detail
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
permissions: Function
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
component: 'List',
|
||||||
|
params: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onChange (data) {
|
||||||
|
if (data.type === 'Detail') {
|
||||||
|
this.component = 'Detail'
|
||||||
|
this.isShowDetail = true
|
||||||
|
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" scoped>
|
||||||
|
.AppVisitVondolence {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
72
packages/2.0.5/AppVisitVondolence/components/Detail.vue
vendored
Normal file
72
packages/2.0.5/AppVisitVondolence/components/Detail.vue
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<ai-detail>
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||||
|
</ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-card title="基本信息">
|
||||||
|
<template #content>
|
||||||
|
<ai-wrapper
|
||||||
|
label-width="120px">
|
||||||
|
<ai-info-item label="标题" :value="info.title"></ai-info-item>
|
||||||
|
<ai-info-item label="描述" isLine :value="info.description"></ai-info-item>
|
||||||
|
<ai-info-item label="图片" isLine :value="info.idNumber">
|
||||||
|
<ai-uploader v-model="info.images" :instance="instance" :limit="9" disabled/>
|
||||||
|
</ai-info-item>
|
||||||
|
<ai-info-item label="现实状态" isLine :value="dict.getLabel('visitCondolenceReality', info.reality)"></ai-info-item>
|
||||||
|
<ai-info-item label="走访人" :value="info.createUserName"></ai-info-item>
|
||||||
|
<ai-info-item label="走访时间" :value="info.visitTime"></ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
</template>
|
||||||
|
</ai-detail>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Detail',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
params: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
info: {},
|
||||||
|
id: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created () {
|
||||||
|
this.id = this.params.id
|
||||||
|
this.dict.load(['visitCondolenceReality']).then(() => {
|
||||||
|
this.getInfo(this.params.id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getInfo (id) {
|
||||||
|
this.instance.post(`/app/appvisitvondolence/queryDetailById?id=${id}`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.info = res.data
|
||||||
|
this.info.images = res.data.images ? JSON.parse(res.data.images) : []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel (isRefresh) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'list',
|
||||||
|
isRefresh: !!isRefresh
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
155
packages/2.0.5/AppVisitVondolence/components/List.vue
vendored
Normal file
155
packages/2.0.5/AppVisitVondolence/components/List.vue
vendored
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="list">
|
||||||
|
<ai-title slot="title" title="走访慰问" isShowBottomBorder></ai-title>
|
||||||
|
<template slot="content">
|
||||||
|
<div class="content">
|
||||||
|
<ai-search-bar bottomBorder>
|
||||||
|
<template #left>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.menuLevel3Name"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择对象类型"
|
||||||
|
:selectList="dictList"
|
||||||
|
@change="search.current = 1, getList()">
|
||||||
|
</ai-select>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.reality"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择现实状态"
|
||||||
|
:selectList="dict.getDict('visitCondolenceReality')"
|
||||||
|
@change="search.current = 1, getList()">
|
||||||
|
</ai-select>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<el-input
|
||||||
|
v-model="search.title"
|
||||||
|
size="small"
|
||||||
|
placeholder="标题、慰问对象、走访人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="search.current = 1, getList()"
|
||||||
|
@clear="search.current = 1, search.title = '', getList()"
|
||||||
|
suffix-icon="iconfont iconSearch">
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-table
|
||||||
|
:tableData="tableData"
|
||||||
|
:col-configs="colConfigs"
|
||||||
|
:total="total"
|
||||||
|
style="margin-top: 16px;"
|
||||||
|
:current.sync="search.current"
|
||||||
|
:size.sync="search.size"
|
||||||
|
@getList="getList">
|
||||||
|
<el-table-column slot="options" width="120px" 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>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
title: '',
|
||||||
|
reality: '',
|
||||||
|
menuLevel3Name: ''
|
||||||
|
},
|
||||||
|
dictList: [],
|
||||||
|
info: {},
|
||||||
|
colConfigs: [
|
||||||
|
{ prop: 'title', label: '标题' },
|
||||||
|
{ prop: 'visitTime', align: 'center', label: '时间' },
|
||||||
|
{ prop: 'name', align: 'center', label: '慰问对象' },
|
||||||
|
{ prop: 'menuLevel3Name', align: 'center', label: '对象类型' },
|
||||||
|
{ prop: 'reality', align: 'center', label: '现实状态', formart: v => v ? this.dict.getLabel('visitCondolenceReality', v) : '-' },
|
||||||
|
{ prop: 'createUserName', align: 'center', label: '走访人' }
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
total: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState(['user'])
|
||||||
|
},
|
||||||
|
|
||||||
|
created () {
|
||||||
|
this.getDictList()
|
||||||
|
this.dict.load(['visitCondolenceReality']).then(() => {
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getList () {
|
||||||
|
this.instance.post(`/app/appvisitvondolence/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getDictList () {
|
||||||
|
this.instance.post(`/app/appapplicationinfo/queryApplicationListByType`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.dictList = res.data.map(v => {
|
||||||
|
return {
|
||||||
|
dictValue: v.id,
|
||||||
|
dictName: v.applicationName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`/app/appvisitvondolence/delete?ids=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
toDetail (id) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Detail',
|
||||||
|
params: {
|
||||||
|
id: id || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.list {
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -516,6 +516,20 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
<ai-card v-for="(item, index) in baseInfo.tsrqInfos" :key="index" :title="item.applicationName">
|
||||||
|
<ai-wrapper
|
||||||
|
slot="content"
|
||||||
|
label-width="120px">
|
||||||
|
<ai-info-item
|
||||||
|
v-for="(filed, i) in item.tableInfos"
|
||||||
|
:label="filed.fieldName"
|
||||||
|
:key="i"
|
||||||
|
:isLine="filed.grid === '1'">
|
||||||
|
<ai-file-list :fileList="formData[item.fieldDbName]" v-if="item.type == 'upload'" :fileOps="{name: 'name', size: 'fileSizeStr'}"></ai-file-list>
|
||||||
|
<div v-else>{{ filed.fieldValue || '-' }}</div>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
</ai-card>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="!showDetail" #footer>
|
<template v-if="!showDetail" #footer>
|
||||||
@@ -694,7 +708,8 @@ export default {
|
|||||||
phone: "",
|
phone: "",
|
||||||
photo: "",
|
photo: "",
|
||||||
politicsStatus: "",
|
politicsStatus: "",
|
||||||
sex: ""
|
sex: "",
|
||||||
|
tsrqInfos: []
|
||||||
},
|
},
|
||||||
family: [],
|
family: [],
|
||||||
familyDialog: false,
|
familyDialog: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user