积分商城
This commit is contained in:
77
project/pingchang/apps/AppInterview/components/Detail.vue
Normal file
77
project/pingchang/apps/AppInterview/components/Detail.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<ai-detail isHasSidebar v-loading="isLoading">
|
||||
<template slot="title">
|
||||
<ai-title title="调查走访详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="标题" isLine :value="info.title"></ai-info-item>
|
||||
<ai-info-item label="描述" isLine :value="info.description"></ai-info-item>
|
||||
<ai-info-item label="图片">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
:value="info.files"
|
||||
disabled
|
||||
:limit="9">
|
||||
</ai-uploader>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="慰问对象" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="联系方式" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="走访区域" :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="所在位置" :value="info.address"></ai-info-item>
|
||||
<ai-info-item label="走访人" :value="info.name"></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: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appvisitvondolencepingchang/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
120
project/pingchang/apps/AppInterview/components/List.vue
Normal file
120
project/pingchang/apps/AppInterview/components/List.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="调查走访" isShowBottomBorder ></ai-title>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.title"
|
||||
size="small"
|
||||
placeholder="标题、慰问对象、走访人"
|
||||
clearable
|
||||
v-throttle="() => {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="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>
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'title', label: '标题' },
|
||||
{ prop: 'visitTime', align: 'center', label: '走访时间' },
|
||||
{ prop: 'name', align: 'center', label: '慰问对象' },
|
||||
{ prop: 'phone', align: 'center', label: '联系方式' },
|
||||
{
|
||||
prop: 'address',
|
||||
align: 'center',
|
||||
label: '所在位置'
|
||||
},
|
||||
{
|
||||
prop: 'createUserName',
|
||||
align: 'center',
|
||||
label: '走访人'
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appvisitvondolencepingchang/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appvisitvondolencepingchang/delete?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Reference in New Issue
Block a user