同步6/16

This commit is contained in:
Zy
2026-06-01 18:12:58 +08:00
parent 38274ab612
commit 50e7b14fd6
183 changed files with 8956 additions and 4803 deletions

View File

@@ -30,14 +30,14 @@
<div class="title_item">住户类型:</div>
<DictTag :options="com_resident_relationship" :value="userInfo.type"></DictTag>
</div>
<div class="userinfo_item">
<!-- <div class="userinfo_item">
<div class="title_item">住户来源:</div>
<span> {{ userInfo.name }} </span>
</div>
<div class="userinfo_item">
</div> -->
<!-- <div class="userinfo_item">
<div class="title_item">注册时间:</div>
<span> {{ userInfo.name }} </span>
</div>
</div> -->
<div class="userinfo_item img">
<div class="title_item">身份证正面:</div>
<div class="userinfo_itme_img">
@@ -58,21 +58,19 @@
<div class="title_item">证件号码:</div>
<span> {{ userInfo.idCard }} </span>
</div>
<div class="userinfo_item">
<div class="title_item">备注:</div>
<span> {{ userInfo.remark ?? '无' }} </span>
</div>
<div class="userinfo_item">
<div class="title_item">提交审核时间:</div>
<span> 去丽丽 </span>
</div>
<div class="userinfo_item img">
<div class="title_item">身份证背面:</div>
<div class="userinfo_itme_img">
<el-image class="w-full h-full" fit="fill" :src="`/${userInfo.cardImageFront}`"></el-image>
<el-image class="w-full h-full" fit="fill" :src="userInfo.cardImageBack"></el-image>
</div>
</div>
</el-col>
<el-col :span="24">
<div class="userinfo_item">
<div class="title_item">备注:</div>
<span> {{ userInfo.remark ?? '无' }} </span>
</div>
</el-col>
</el-row>
</div>
</el-card>
@@ -143,7 +141,6 @@ import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getResident, getresidentReviewlistAPI, UpdateResidentReviewAPI } from '@/api/system/resident';
import { ResidentVO } from '@/api/system/resident/type';
import { splitImages } from '@/utils';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));
@@ -156,6 +153,7 @@ const userInfo = ref<ResidentVO>({
villageId: '',
buildingId: '',
userId: null,
nickName: '',
'id': null,
'name': '',
'type': null,
@@ -270,9 +268,7 @@ function update() {
}
const router = useRouter();
function backRoute() {
router.push({
path: '/house/resident'
});
router.back();
}
</script>

View File

@@ -37,8 +37,8 @@
<el-row>
<el-col :span="11">
<el-form-item label="与业主的关系" prop="type">
<el-select v-model.number="form.type" class="m-2" placeholder="请选择">
<el-form-item label="与业主的关系" prop="ownerRelationship">
<el-select v-model="form.ownerRelationship" class="m-2" placeholder="请选择">
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@@ -127,7 +127,7 @@ const form = ref<ResidentForm>({
name: '',
gender: '0',
idCard: '',
type: '0', // 与业主关系 0业主
ownerRelationship: '0', // 与业主关系
phone: null, //手机号
cardImageFront: '',
cardImageBack: '',
@@ -148,7 +148,7 @@ const rules = ref({
trigger: 'blur'
}
],
type: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }],
ownerRelationship: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{
@@ -199,6 +199,10 @@ const handleAvatarSuccess: UploadProps['onSuccess'] = (response, uploadFile) =>
}
};
const handleAvatar2Success: UploadProps['onSuccess'] = (response, uploadFile) => {
if (response.code === 500 && response.msg == '不允许重复提交,请稍候再试') {
ElMessage.error('上传频率过快,稍后再试');
return;
}
if (response.data && response.data.url) {
form.value.cardImageBack = response.data.url;
}

View File

@@ -4,9 +4,9 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="住户类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请输入住户类型" style="width: 240px">
<el-form ref="queryFormRef" label-width="120" label-position="left" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="与主业主关系" prop="ownerRelationship">
<el-select v-model="queryParams.ownerRelationship" placeholder="请选择与主业主关系" style="width: 240px">
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@@ -62,12 +62,18 @@
<el-table class="tablebox" v-loading="loading" border :data="residentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="姓名" min-width="120" align="center" prop="name" />
<el-table-column label="类型" min-width="120" align="center" prop="type">
<el-table-column label="类型" width="100" align="center" prop="type">
<template #default="scope">
<DictTag :value="scope.row.type" :options="com_resident_relationship"></DictTag>
<el-tag v-if="scope.row.type === '0'" type="success">业主</el-tag>
<el-tag v-else type="danger">租户</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" min-width="120" align="center" prop="status">
<el-table-column label="与主业主关系" min-width="120" align="center" prop="ownerRelationship">
<template #default="scope">
<DictTag :value="scope.row.ownerRelationship" :options="com_resident_relationship"></DictTag>
</template>
</el-table-column>
<el-table-column label="状态" width="120" align="center" prop="status">
<template #default="scope">
<DictTag :value="scope.row.status" :options="com_review"></DictTag>
</template>
@@ -154,7 +160,7 @@ const queryFormRef = ref<ElFormInstance>();
const initFormData: ResidentForm = {
code: undefined,
name: undefined,
type: undefined,
ownerRelationship: undefined,
gender: undefined,
idCard: undefined,
phone: undefined,
@@ -173,63 +179,14 @@ const data = reactive<PageData<ResidentForm, ResidentQuery>>({
pageNum: 1,
pageSize: 10,
date: '',
type: null,
ownerRelationship: null,
status: null,
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
}
});
const disabledDate = (time: Date) => {
return time.getTime() > Date.now();
};
const shortcuts = [
{
text: '今天',
value: new Date()
},
{
text: '昨天',
value: () => {
const date = new Date();
date.setDate(date.getDate() - 1);
return date;
}
},
{
text: ' 近3天',
value: () => {
const date = new Date();
date.setDate(date.getDate() - 3);
return date;
}
},
{
text: '最近一周',
value: () => {
const date = new Date();
date.setDate(date.getDate() - 7);
return date;
}
},
{
text: '最近一个月',
value: () => {
const date = new Date();
date.setMonth(date.getMonth() - 1);
return date;
}
},
{
text: '最近三个月',
value: () => {
const date = new Date();
date.setMonth(date.getMonth() - 3); // 真正减3个月,不是90天!
return date;
}
}
];
const { queryParams, form } = toRefs(data);
@@ -245,7 +202,7 @@ const handleNodeClick = (data: Tree, node) => {
const obj2 = {
[data.type]: data.value
};
if (data.type === 'unitNo') {
if (data.type === 'unitNoId') {
obj2[node.parent.data.type] = node.parent.data.value;
}
queryParams.value = {
@@ -253,7 +210,7 @@ const handleNodeClick = (data: Tree, node) => {
...{
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
},
...obj2
};
@@ -279,14 +236,18 @@ gettree();
const getList = async () => {
loading.value = true;
residentList.value = [];
const res = await listResident(queryParams.value);
residentList.value = res.rows;
residentList.value.forEach((item) => {
const arr = getHousePathById(treedata.value, item.houseId, 'label');
item.houseAddress = arr.join(' ');
});
total.value = res.total;
loading.value = false;
listResident(queryParams.value)
.then((res) => {
residentList.value = res.rows;
residentList.value.forEach((item) => {
const arr = getHousePathById(treedata.value, item.houseId, 'label');
item.houseAddress = arr.join(' ');
});
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
getList();
@@ -299,7 +260,7 @@ const handleQuery = () => {
...{
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
}
};
getList();
@@ -313,7 +274,7 @@ const resetQuery = () => {
...{
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
}
};
handleQuery();
@@ -335,7 +296,7 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ResidentVO) => {
const _id = row.id || ids.value[0];
const _id = row?.id || ids.value[0];
router.push({
path: '/house/editResident',
query: {