8/25 dev bug

This commit is contained in:
Zy
2026-08-25 17:18:28 +08:00
parent 981d059ceb
commit b83735e993
37 changed files with 505 additions and 302 deletions

View File

@@ -11,19 +11,23 @@
</div>
</div>
<el-dialog @close="conback" append-to-body v-model="dialog.dialogVisible" :title="dialog.dialogTitle" width="1050">
<el-dialog @close="conBack" append-to-body v-model="dialog.dialogVisible" :title="dialog.dialogTitle" width="1050">
<nav class="flex flex-items-center mb-8" style="margin-bottom: 20px">
<div class="flex flex-items-center flex-1" style="max-width: 200px">
<div style="width: 120px">住户类型</div>
<el-select v-model="queryParams.ownerRelationship" placeholder="请选择" clearable>
<el-option v-for="dict in com_resident_relationship" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</div>
<div class="mr-5 flex-1" style="margin: 0 20px">
<!-- <div class="flex flex-items-center flex-1" style="max-width: 200px">-->
<!-- <div style="width: 120px">住户类型</div>-->
<!-- <el-select v-model="queryParams.ownerRelationship" placeholder="请选择" clearable>-->
<!-- <el-option v-for="dict in com_resident_relationship" :key="dict.value" :label="dict.label" :value="dict.value" />-->
<!-- </el-select>-->
<!-- </div>-->
<!-- <div class="mr-5 flex-1" style="margin: 0 20px">-->
<!-- <el-input maxlength="30" clearable v-model="queryParams.name" placeholder="请输入住户姓名" />-->
<!-- </div>-->
<div class="flex flex-items-center flex-1" style="max-width: 300px; margin: 0 20px">
<div style="width: 120px">住户姓名</div>
<el-input maxlength="30" clearable v-model="queryParams.name" placeholder="请输入住户姓名" />
</div>
<div>
<el-button type="primary" @click="getlist">查询</el-button>
<el-button type="primary" @click="getList">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</div>
</nav>
@@ -64,10 +68,10 @@
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getlist"
@pagination="getList"
/>
<div>
<el-button @click="conback">退出</el-button>
<el-button @click="conBack">退出</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</div>
</div>
@@ -77,19 +81,8 @@
<script setup lang="ts">
import { listResident } from '@/api/system/residentReviewProcess/resident';
import { ResidentVO } from '@/api/system/residentReviewProcess/resident/type';
import { ResidentQuery, ResidentVO } from '@/api/system/residentReviewProcess/resident/type';
import { ref, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
import { useHouseStore } from '@/store/modules/house';
const houseStore = useHouseStore();
const treedata = ref([]);
function init() {
houseStore.getCurrentVilageTreeHouse().then((res) => {
treedata.value = res;
});
}
init();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_resident_type } = toRefs<any>(proxy?.useDict('com_resident_type'));
@@ -198,7 +191,7 @@ const handleUserSelection = () => {
if (isMultiple.value && Array.isArray(props.userid)) {
// 多选回显
const selectedItems: tableType[] = [];
props.userid.forEach((id) => {
props.userid.forEach((id: string | number) => {
const findItem = tableData.value.find((item) => item.id == id || item.userId == id);
if (findItem) {
selectedItems.push(findItem);
@@ -222,12 +215,12 @@ const handleUserSelection = () => {
// 打开选择框
function choiceResidentFun() {
// 初始化
getlist();
getList();
dialog.value.dialogVisible = true;
}
// 获取列表
function getlist() {
function getList() {
loading.value = true;
listResident(queryParams.value)
.then((res) => {
@@ -253,11 +246,11 @@ function resetQuery() {
buildingId: null,
unitNo: null
};
getlist();
getList();
}
// 退出
function conback() {
function conBack() {
dialog.value.dialogVisible = false;
resetQuery();
}
@@ -297,7 +290,7 @@ function confirm() {
}
defineExpose({
open: (arr) => {
open: (arr?: string[], params: ResidentQuery | {} = {}) => {
if (arr && arr.length > 0) {
multipleSelection.value = arr.map((id) => ({
id: id
@@ -305,7 +298,12 @@ defineExpose({
} else {
multipleSelection.value = [];
}
getlist();
queryParams.value = {
...queryParams.value,
...params
};
console.log(queryParams.value);
getList();
dialog.value.dialogVisible = true;
}
});