8/19 report
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<div style="width: 50px; text-align: right; padding-right: 10px">单元</div>
|
||||
<div class="flex-1">
|
||||
<el-select @change="handleChangeUnit" clearable style="width: 120px" v-model="queryParams.unitNoId">
|
||||
<el-option v-for="(item, index) in unitlist" :key="index" :label="item.unitNoName" :value="item.unitNoId"></el-option>
|
||||
<el-option v-for="(item, index) in unitList" :key="index" :label="item.unitNoName" :value="item.unitNoId"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,8 +119,6 @@ const props = defineProps({
|
||||
|
||||
const { titleName, returnvalue } = toRefs(props);
|
||||
|
||||
const showids = ref([]);
|
||||
|
||||
// ✅ 手动设置默认值(替代 withDefaults)
|
||||
const emit = defineEmits<{
|
||||
change: [value: string | number | (string | number)[] | BillHouse | BillHouse[]]; // 支持返回数组
|
||||
@@ -201,7 +199,7 @@ function getList() {
|
||||
/** 楼栋列表 */
|
||||
const buildingList = ref([]);
|
||||
/** 房屋列表 */
|
||||
const unitlist = ref([]);
|
||||
const unitList = ref([]);
|
||||
|
||||
/** 获取楼栋 列表 */
|
||||
function handleChangeHouse() {
|
||||
@@ -209,6 +207,11 @@ function handleChangeHouse() {
|
||||
buildingList.value = res.data;
|
||||
});
|
||||
}
|
||||
function handleChangeHouseUseType() {
|
||||
listHouseUseType_add_house().then((res) => {
|
||||
houseUseTypeList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function handleClear() {
|
||||
queryParams.value.residentName = '';
|
||||
@@ -220,11 +223,11 @@ function handleHouseUseChange() {
|
||||
/** 单元列表 */
|
||||
function handleChangeBuilding(val: string) {
|
||||
queryParams.value.unitNoId = null;
|
||||
unitlist.value = [];
|
||||
unitList.value = [];
|
||||
|
||||
if (queryParams.value.buildingId) {
|
||||
getHouselistAPI(val).then((res) => {
|
||||
unitlist.value = res.data.units;
|
||||
unitList.value = res.data.units;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
@@ -299,7 +302,7 @@ function conBack() {
|
||||
}
|
||||
|
||||
// ==============================================
|
||||
// ✅ 核心修改:根据 returnvalue 返回对应的值
|
||||
// ✅ 核心修改:根据 returnValue 返回对应的值
|
||||
// ==============================================
|
||||
function confirm() {
|
||||
dialog.value.dialogVisible = false;
|
||||
@@ -331,23 +334,33 @@ function confirm() {
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open: (showidArray: string[] = []) => {
|
||||
/**
|
||||
* @description 打开弹窗
|
||||
* @param { string[] } showIdArray 显示的房屋ID数组
|
||||
* @param { object } params 额外查询参数对象
|
||||
* */
|
||||
open: (showIdArray: string[] = [], params: object = {}) => {
|
||||
multipleSelection.value = [];
|
||||
showids.value = showidArray;
|
||||
if (showidArray && showidArray.length > 0) {
|
||||
multipleSelection.value = showidArray.map(
|
||||
if (Object.keys(params).length > 0) {
|
||||
queryParams.value = Object.assign({}, queryParams.value, params);
|
||||
}
|
||||
// 显示的房屋ID数组
|
||||
if (showIdArray && showIdArray.length > 0) {
|
||||
multipleSelection.value = showIdArray.map(
|
||||
(id) =>
|
||||
({
|
||||
houseId: id
|
||||
}) as BillHouse
|
||||
);
|
||||
}
|
||||
// 刷新列表
|
||||
getList();
|
||||
dialog.value.dialogVisible = true;
|
||||
listHouseUseType_add_house().then((res) => {
|
||||
houseUseTypeList.value = res.data;
|
||||
});
|
||||
// 刷新房屋用途类型列表
|
||||
handleChangeHouseUseType();
|
||||
// 刷新房屋用途类型列表
|
||||
handleChangeHouse();
|
||||
// 显示弹窗
|
||||
dialog.value.dialogVisible = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user