8/31 dev 权限,sse,账单,bug

This commit is contained in:
Zy
2026-08-31 18:00:11 +08:00
parent 466ec4675e
commit de4bae3bc1
51 changed files with 575 additions and 591 deletions

View File

@@ -174,7 +174,6 @@ function handleSelectionChange(selection: BillUserlist[]) {
const uniqueMap = new Map();
finalSelection.forEach((item) => uniqueMap.set(item.parkingId, item));
multipleSelection.value = Array.from(uniqueMap.values());
console.log(multipleSelection.value.map((item) => item.parkingId));
} else {
// --- 单选逻辑 ---
if (selection.length > 0) {

View File

@@ -166,7 +166,6 @@ function handleSelectionChange(selection: AppUserList[]) {
const uniqueMap = new Map();
finalSelection.forEach((item) => uniqueMap.set(item.user_id, item));
multipleSelection.value = Array.from(uniqueMap.values());
console.log(multipleSelection.value.map((item) => item.user_id));
} else {
// --- 单选逻辑 ---
if (selection.length > 0) {

View File

@@ -141,7 +141,6 @@ const isMultiple = computed(() => props.isMultiple ?? false);
// 优化 handleUserSelection,避免重复查找
const handleUserSelection = () => {
isFetching.value = true;
console.log('获取列表');
if (tableData.value.length <= 0 || !multipleTableRef.value) {
isFetching.value = false;
return;
@@ -239,8 +238,6 @@ function handleSelectionChange(selection: tableType[]) {
multipleSelection.value = [];
}
}
console.log('handleSelectionChange', selection);
}
// 重置查询
function resetQuery() {

View File

@@ -262,7 +262,6 @@ function handleSelectionChange(selection: BillHouse[]) {
const uniqueMap = new Map();
finalSelection.forEach((item) => uniqueMap.set(item.houseId, item));
multipleSelection.value = Array.from(uniqueMap.values());
console.log(multipleSelection.value.map((item) => item.houseId));
} else {
// ✅ 补充:单选模式下,selection-change 触发时,直接取最新的一项
// 这样配合 handleRowClick 的 clearSelection + toggle 就能实现完美单选

View File

@@ -2,7 +2,7 @@
<slot v-if="$slots.default" />
<div v-else class="residentBox" @click="choiceResidentFun">
<div class="defaultbox" v-if="multipleSelection.length === 0">
<div v-if="multipleSelection.length === 0" class="defaultbox">
<span>请选择</span>
<el-icon><Search /></el-icon>
</div>
@@ -11,7 +11,7 @@
</div>
</div>
<el-dialog @close="conBack" append-to-body v-model="dialog.dialogVisible" :title="dialog.dialogTitle" width="1050">
<el-dialog v-model="dialog.dialogVisible" :title="dialog.dialogTitle" append-to-body width="1050" @close="conBack">
<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>-->
@@ -24,7 +24,7 @@
<!-- </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="请输入住户姓名" />
<el-input v-model="queryParams.name" clearable maxlength="30" placeholder="请输入住户姓名" />
</div>
<div>
<el-button type="primary" @click="getList">查询</el-button>
@@ -32,28 +32,28 @@
</div>
</nav>
<el-table ref="multipleTableRef" row-key="id" :data="tableData" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="55" type="index" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="类型" align="center" width="85" prop="type">
<el-table ref="multipleTableRef" :data="tableData" border row-key="id" @selection-change="handleSelectionChange">
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column align="center" label="姓名" prop="name" />
<el-table-column align="center" label="类型" prop="type" width="85">
<template #default="{ row }">
<dict-tag :options="com_resident_type" :value="row.type" />
</template>
</el-table-column>
<el-table-column label="与业主关系" align="center" width="95" prop="ownerRelationship">
<el-table-column align="center" label="与业主关系" prop="ownerRelationship" width="95">
<template #default="{ row }">
<dict-tag :options="com_resident_relationship" :value="row.ownerRelationship" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" width="85" prop="status">
<el-table-column align="center" label="状态" prop="status" width="85">
<template #default="{ row }">
<dict-tag :options="com_certification_status" :value="row.status" />
</template>
</el-table-column>
<el-table-column label="证件号码" width="165" align="center" prop="idCard" />
<el-table-column label="手机号码" align="center" prop="phone" />
<el-table-column label="房间" show-overflow-tooltip align="center">
<el-table-column align="center" label="证件号码" prop="idCard" width="165" />
<el-table-column align="center" label="手机号码" prop="phone" />
<el-table-column align="center" label="房间" show-overflow-tooltip>
<template #default="{ row }">
{{ row.houseName }}
</template>
@@ -63,11 +63,11 @@
<template #footer>
<div class="dialog-footer flex flex-items-center flex-justify-between">
<pagination
style="margin-top: 0"
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
style="margin-top: 0"
@pagination="getList"
/>
<div>
@@ -79,7 +79,7 @@
</el-dialog>
</template>
<script setup lang="ts">
<script lang="ts" setup>
import { listResident } from '@/api/system/residentReviewProcess/resident';
import { ResidentQuery, ResidentVO } from '@/api/system/residentReviewProcess/resident/type';
import { ref, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
@@ -275,7 +275,6 @@ function confirm() {
}
} else {
// 单选
console.log(multipleSelection.value[0], multipleSelection.value);
if (returnvalue.value === '*') {
// ✅ 返回整个对象
emit('change', multipleSelection.value[0]);
@@ -309,7 +308,7 @@ defineExpose({
});
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.residentBox {
width: 385px;
height: 35px;

View File

@@ -140,7 +140,6 @@ const isMultiple = computed(() => props.isMultiple ?? false);
// 优化 handleUserSelection,避免重复查找
const handleUserSelection = () => {
isFetching.value = true;
console.log('获取列表');
if (tableData.value.length <= 0 || !multipleTableRef.value) {
isFetching.value = false;
return;
@@ -222,7 +221,6 @@ function handleSelectionChange(selection: tableType[]) {
const uniqueMap = new Map();
finalSelection.forEach((item) => uniqueMap.set(item.id, item));
multipleSelection.value = Array.from(uniqueMap.values());
console.log(multipleSelection.value.map((item) => item.id));
} else {
// --- 单选逻辑 ---
if (selection.length > 0) {

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script lang="ts" setup>
import AMapLoader from '@amap/amap-jsapi-loader';
import { getVillageByIdAPI } from '@/api/system/community';
import { onUnmounted, ref, watch, onMounted, nextTick } from 'vue';
@@ -320,7 +320,6 @@ onMounted(async () => {
// 禁用状态不开启绘制/点击
if (!props.disabled) {
console.log(props.clickOrDraw);
props.clickOrDraw ? handleMap() : MapDrawLine();
}
} catch (err) {
@@ -355,10 +354,10 @@ onUnmounted(() => {
</script>
<template>
<div v-loading="mapLoading" class="map" id="GD-Map"></div>
<div id="GD-Map" v-loading="mapLoading" class="map"></div>
</template>
<style scoped lang="scss">
<style lang="scss" scoped>
.map {
width: 100%;
min-height: 450px;

View File

@@ -5,18 +5,18 @@
<div class="quarter-panel">
<!-- 年份切换 -->
<div class="year-header">
<el-button icon="ArrowLeft" size="small" circle @click="prevYear" />
<el-button circle icon="ArrowLeft" size="small" @click="prevYear" />
<span class="current-year">{{ currentYear }}年</span>
<el-button icon="ArrowRight" size="small" circle @click="nextYear" />
<el-button circle icon="ArrowRight" size="small" @click="nextYear" />
</div>
<!-- 四个季度按钮 -->
<div class="quarter-buttons">
<el-button
v-for="q in 4"
:key="q"
style="margin: 0"
:type="isSelected(currentYear, q) ? 'primary' : ''"
:disabled="isDisabledQuarter(currentYear, q)"
:type="isSelected(currentYear, q) ? 'primary' : ''"
style="margin: 0"
@click="handleSelect(currentYear, q)"
>
第{{ q }}季度
@@ -27,19 +27,19 @@
<template #reference>
<el-input
:model-value="displayText"
clearable
placeholder="请选择季度"
readonly
suffix-icon="Calendar"
@click="popoverVisible = true"
clearable
@clear="handleClear"
@click="popoverVisible = true"
/>
</template>
</el-popover>
</div>
</template>
<script setup lang="ts">
<script lang="ts" setup>
import { ref, computed } from 'vue';
// 外部v‑model绑定
@@ -63,7 +63,6 @@ const parseQuarter = (str) => {
const { year: initYear } = parseQuarter(props.modelValue);
const currentYear = ref(initYear);
console.log(currentYear.value, typeof currentYear.value);
// 输入框展示文本
const displayText = computed(() => {