add
This commit is contained in:
parent
0119870a32
commit
5564df2f7f
7
src/api/villageInfo.ts
Normal file
7
src/api/villageInfo.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 提现申请列表
|
||||
export function apivillageInfoLists(params: any) {
|
||||
return request.get({ url: '/user.user/villageInfoList',params })
|
||||
}
|
||||
|
@ -140,6 +140,8 @@ import EditAdminPopup from "./edit_admin.vue";
|
||||
import EditVillagePopup from "./edit_village.vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { taskList } from "@/api/newTask"
|
||||
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
const datalist = ref([]);
|
||||
// 是否显示编辑框
|
||||
@ -214,6 +216,7 @@ dictDataLists({ type_id: 10 }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
getLists();
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.formtabel {
|
||||
|
220
src/views/villageInfoList/detail.vue
Normal file
220
src/views/villageInfoList/detail.vue
Normal file
@ -0,0 +1,220 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData">
|
||||
<el-descriptions :column="3" title="基本信息" border>
|
||||
<el-descriptions-item label="户主姓名" label-align="left">
|
||||
{{ formData.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式" label-align="left">
|
||||
{{ formData.contact }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭人数" label-align="left">
|
||||
{{ formData.family_count }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭地址" label-align="left">
|
||||
{{ formData.address }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="房子出租" border v-if="formData.house_rent_info.area">
|
||||
<el-descriptions-item label="面积" label-align="left">
|
||||
{{ formData.house_rent_info.area }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出租年限" label-align="left">
|
||||
{{ formData.house_rent_info.ageLimit }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出租要求" label-align="left">
|
||||
{{ formData.house_rent_info.request }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主题结构是否完成" label-align="left">
|
||||
{{ formData.house_rent_info.isFinish }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否允许装修" label-align="left">
|
||||
{{ formData.house_rent_info.fitment }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="空闲土地出租" border v-if="formData.land_rent_info.isBreeding">
|
||||
<el-descriptions-item label="面是否可以种养积" label-align="left">
|
||||
{{ formData.land_rent_info.isBreeding}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="面积" label-align="left">
|
||||
{{ formData.land_rent_info.area }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="种养要求" label-align="left">
|
||||
{{ formData.land_rent_info.request}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="租金和支付方式" label-align="left">
|
||||
{{ formData.land_rent_info.payInfo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="土地优势" label-align="left">
|
||||
{{ formData.land_rent_info.advantage }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="土地缺点" label-align="left">
|
||||
{{ formData.land_rent_info.shortcoming }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="闲置原因" label-align="left">
|
||||
{{ formData.land_rent_info.reson }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="使用年限" label-align="left">
|
||||
{{formData.land_rent_info.ageLimit }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="农副产品出售" border v-if="formData.product_info.type">
|
||||
<el-descriptions-item label="种养类型" label-align="left">
|
||||
{{ formData.product_info.type }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="种养面积" label-align="left">
|
||||
{{ formData.product_info.area}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="土地性质" label-align="left">
|
||||
{{ formData.product_info.quality}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="种养方式" label-align="left">
|
||||
{{ formData.product_info.manner}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="成熟周期" label-align="left">
|
||||
{{ formData.product_info.maturationCycle}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最近成熟时间" label-align="left">
|
||||
{{ formData.product_info.maturationTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年产量" label-align="left">
|
||||
{{ formData.product_info.yield}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="自己消化/市场销售" label-align="left">
|
||||
{{ formData.product_info.sellType}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="销售方式" label-align="left">
|
||||
{{ formData.product_info.sellMethods}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年销量" label-align="left">
|
||||
{{ formData.product_info.Sales}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="优势" label-align="left">
|
||||
{{ formData.product_info.productName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称" label-align="left">
|
||||
{{ formData.product_info.advantage}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品有无品牌" label-align="left">
|
||||
{{ formData.product_info.isBrand}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否进行粗加工" label-align="left">
|
||||
{{ formData.product_info.isBrand}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品诉求" label-align="left">
|
||||
{{ formData.product_info.isDemands}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="急需解决的问题" label-align="left">
|
||||
{{ formData.product_info.quesition}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="空闲资产出租/出售" border v-if="formData.idle_asset_rent_info.area">
|
||||
<el-descriptions-item label="资产名称" label-align="left">
|
||||
{{ formData.idle_asset_rent_info.area }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="资产优势" label-align="left">
|
||||
{{ formData.idle_asset_rent_info.advantage}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数量" label-align="left">
|
||||
{{ formData.idle_asset_rent_info.num}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="增收方式" label-align="left">
|
||||
{{ formData.idle_asset_rent_info.type}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他可变现" label-align="left">
|
||||
{{ formData.idle_asset_rent_info.other}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="房屋装饰建设" border v-if="formData.house_decoration_construction.area">
|
||||
<el-descriptions-item label="施工地点" label-align="left">
|
||||
{{ formData.house_decoration_construction.area }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间" label-align="left">
|
||||
{{ formData.house_decoration_construction.startTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="修/建标准" label-align="left">
|
||||
{{ formData.house_decoration_construction.standard }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="事主要求" label-align="left">
|
||||
{{ formData.house_decoration_construction.ask}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="房屋建设时长" label-align="left">
|
||||
{{ formData.house_decoration_construction.time}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设计服务" label-align="left">
|
||||
{{ formData.house_decoration_construction.serve}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
toParse( ['house_decoration_construction','house_rent_info','idle_asset_rent_info','land_rent_info','product_info'] )
|
||||
console.log(formData, "fromdar")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
//转json
|
||||
const toParse=(key) => {
|
||||
for (let i = 0; i < key.length; i++) {
|
||||
formData[key[i]] = JSON.parse(formData[key[i]])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
95
src/views/villageInfoList/index.vue
Normal file
95
src/views/villageInfoList/index.vue
Normal file
@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="户主姓名" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable
|
||||
placeholder="请输入户主姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="contact">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contact" type="number" clearable
|
||||
placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="户主姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="联系方式" prop="contact" show-overflow-tooltip />
|
||||
<el-table-column label="家庭人数" prop="family_count" show-overflow-tooltip />
|
||||
<el-table-column label="家庭地址" prop="address" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link
|
||||
@click="handledetail(row)" type="primary">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<!-- <pagination v-model="pager" @change="getLists" /> -->
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<detail-popup v-if="showDtail" ref="detailRef" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { apivillageInfoLists } from "@/api/villageInfo"
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import DetailPopup from './detail.vue'
|
||||
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
// 是否显示编辑框
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name:"",
|
||||
contact:""
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apivillageInfoLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
// let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
getLists()
|
||||
|
||||
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user