6/22完善引入,

This commit is contained in:
Zy
2026-06-22 08:14:35 +08:00
parent ea8129216b
commit 826bf3c782
208 changed files with 1122 additions and 1685 deletions

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 && props.username === null">
<div class="defaultBox" v-if="multipleSelection.length === 0 && props.username === null">
<span>请选择</span>
<el-icon><Search /></el-icon>
</div>
@@ -26,7 +26,7 @@
</div>
</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>
@@ -52,10 +52,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>
@@ -159,9 +159,6 @@ const handleUserSelection = () => {
// 监听
// 监听优化:只在 userid 变化时触发
watch(userid, handleUserSelection, { immediate: true });
// watch(tableData, () => {
// if (userid.value) handleUserSelection(); // 仅在有 userid 时重新处理
// });
// ====================== 方法 ======================
// 打开选择框
@@ -177,11 +174,11 @@ function choiceResidentFun() {
} else if (Array.isArray(props.userid)) {
multipleSelection.value = props.userid.map((id) => ({ userId: id })) as tableType[];
}
getlist();
getList();
}
// 获取列表
function getlist() {
function getList() {
loading.value = true;
getUserByRoleKey(userType.value)
.then((res) => {
@@ -244,11 +241,11 @@ function resetQuery() {
nickName: null,
phonenumber: null
};
getlist();
getList();
}
// 退出
function conback() {
function conBack() {
dialog.value.dialogVisible = false;
resetQuery();
}
@@ -288,7 +285,7 @@ onMounted(() => {
defineExpose({
open: () => {
dialog.value.dialogVisible = true;
getlist();
getList();
}
});
</script>
@@ -301,7 +298,7 @@ defineExpose({
border: 1px solid #ccc;
border-radius: 5px;
padding: 0 10px;
.defaultbox {
.defaultBox {
display: flex;
align-items: center;
justify-content: space-between;