|
@@ -23,6 +23,9 @@ const housingActiveIndex = ref(0);
|
|
|
const stationVisible = ref(false);
|
|
|
const checkList = ref([]);
|
|
|
const stationList = ref([]);
|
|
|
+const searchVal = ref('');
|
|
|
+const pumpingStationId = ref('');
|
|
|
+const pumpLoading = ref(false);
|
|
|
|
|
|
const housingFormData = ref({
|
|
|
name: '',
|
|
@@ -65,7 +68,7 @@ const housingRules = reactive({
|
|
|
});
|
|
|
|
|
|
const floorList = computed(() => {
|
|
|
- return dialogDataSource.value[housingActiveIndex.value]?.neighbourhoodNumberAndAddFlags;
|
|
|
+ return dialogDataSource.value[housingActiveIndex.value]?.neighbourhoodNumberAndAddFlags || [];
|
|
|
})
|
|
|
|
|
|
// 关联数据
|
|
@@ -265,20 +268,28 @@ const onPumpDialogConfirm = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const test = () => {
|
|
|
+ openRelationDialog();
|
|
|
+}
|
|
|
+
|
|
|
// 显示 关联小区 - dialog
|
|
|
const handleRelation = ({ id }) => {
|
|
|
relationVisible.value = true;
|
|
|
+ pumpingStationId.value = id;
|
|
|
openRelationDialog(id);
|
|
|
}
|
|
|
|
|
|
// dialog - 关联小区 - 打开
|
|
|
-const openRelationDialog = (pumpingStationId) => {
|
|
|
- servicesApi.getSimpleNeighbourhoodList({ pumpingStationId }).then(({ data }) => {
|
|
|
+const openRelationDialog = () => {
|
|
|
+ pumpLoading.value = true;
|
|
|
+ servicesApi.getSimpleNeighbourhoodList({ pumpingStationId: pumpingStationId.value, name: searchVal.value }).then(({ data }) => {
|
|
|
dialogDataSource.value = data.map(item => {
|
|
|
item.checkList = item.neighbourhoodNumberAndAddFlags.filter(item => item.addStatus == 2)
|
|
|
return item;
|
|
|
});
|
|
|
+ console.log( "floorList", floorList );
|
|
|
checkList.value = floorList.value.filter(item => item.addStatus == 2).map(item => item.buildingId);
|
|
|
+ pumpLoading.value = false;
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -332,6 +343,7 @@ const onRelationCancel = () => {
|
|
|
relationVisible.value = false;
|
|
|
checkList.value = [];
|
|
|
dialogDataSource.value = [];
|
|
|
+ searchVal.value = '';
|
|
|
}
|
|
|
|
|
|
// table数据
|
|
@@ -612,12 +624,12 @@ onMounted(() => {
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
- <div class="relation-dialog-body space-x-[16px]">
|
|
|
+ <div class="relation-dialog-body space-x-[16px]" >
|
|
|
<div class="dialog-inner_left">
|
|
|
<div class="header">
|
|
|
- <el-input :suffix-icon="Search"></el-input>
|
|
|
+ <el-input :suffix-icon="Search" v-model="searchVal" @change="test"></el-input>
|
|
|
</div>
|
|
|
- <div class="body">
|
|
|
+ <div class="body" v-loading="pumpLoading">
|
|
|
<div class="body-inner_left">
|
|
|
<el-scrollbar style="height: 100%;">
|
|
|
<ul class="housing-list">
|
|
@@ -636,6 +648,7 @@ onMounted(() => {
|
|
|
</el-tooltip>
|
|
|
</li>
|
|
|
</ul>
|
|
|
+ <div class="flex items-center justify-center pt-[40px]" v-show="dialogDataSource.length == 0">暂无数据</div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
<div class="body-inner_right">
|
|
@@ -656,7 +669,7 @@ onMounted(() => {
|
|
|
<div class="header">
|
|
|
已选小区
|
|
|
</div>
|
|
|
- <div class="body">
|
|
|
+ <div class="body" v-loading="pumpLoading">
|
|
|
<el-scrollbar style="height: 100%;">
|
|
|
<ul class="body_inner space-y-[10px]">
|
|
|
<li v-for="item, index in contactCheckData" :key="index">
|