update:表单搜索优化

This commit is contained in:
2025-12-23 14:54:15 +08:00
parent f60dce3114
commit a79325e292
5 changed files with 32 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ const remoteList = {
localPath: './dist',
},
};
console.log('打包环境:', remoteName);
const config = remoteList[remoteName];
if (!remoteName || !config) {
console.error('找不到对应环境!');

View File

@@ -102,7 +102,7 @@ watch(
watch(
() => props.searchParams,
() => {
searchForm.value = { ...props.searchParams, ...props.defaultSearchParams };
searchForm.value = { ...props.defaultSearchParams, ...props.searchParams };
},
{ deep: true }
);

View File

@@ -7,7 +7,7 @@
fullHeight
showCheckbox
v-model:searchParams="searchParams"
:defaultSearchParams="{ fileSizeUnit: 'TB'}"
:defaultSearchParams="{ fileSizeUnit: 'TB' }"
:actionList="actionList"
@checkbox-all="checkboxChangeFun"
@checkbox-change="checkboxChangeFun"
@@ -19,7 +19,9 @@
</el-select>
</template>
<template #leftOptions>
<el-button type="primary" @click="clickDeleteFun" :disabled="chosenData.length === 0">批量删除</el-button>
<el-button type="primary" @click="clickDeleteFun" :disabled="chosenData.length === 0"
>批量删除</el-button
>
</template>
</BaseTable>
</div>
@@ -72,46 +74,44 @@ const unitList = ref(['TB', 'GB', 'MB', 'KB']);
// 点击批量删除
const clickDeleteFun = () => {
ElMessageBox.confirm('是否确认删除该配置?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
deleteFileBatchFun();
});
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
deleteFileBatchFun();
});
};
// 批量删除操作
const deleteFileBatchFun = async () => {
const param = chosenData.value.map((item:any) => {
const param = chosenData.value.map((item: any) => {
return item.id;
});
const res:any = await batchDeleteBigFileApi(param.join(','));
const res: any = await batchDeleteBigFileApi(param.join(','));
if (res && res.code === 200) {
ElMessage.success('删除成功');
baseTableRef.value.resetFun({}); // 刷新数据
}
};
// 单个删除操作
const deleteFileFun = async (row:any) => {
const deleteFileFun = async (row: any) => {
const param = [row.id];
const res:any = await batchDeleteBigFileApi(param);
const res: any = await batchDeleteBigFileApi(param);
if (res && res.code === 200) {
ElMessage.success('删除成功');
baseTableRef.value.resetFun({}); // 刷新数据
}
};
</script>
<style lang="scss" scoped>
.setting-page{
.setting-page {
width: 100%;
height: 100%;
margin-bottom: 0 !important;
.w80{
.w80 {
width: 100px;
}
.mr5{
.mr5 {
margin-right: 5px;
}
}

View File

@@ -41,11 +41,11 @@ const currentComponent = computed(() => componentsMap[currentTab.value]);
height: 100%;
background-color: var(--el-bg-color);
padding: 10px;
.page-title{
.page-title {
width: 100%;
height: 50px;
}
.page-content{
.page-content {
width: 100%;
height: calc(100% - 50px);
}

View File

@@ -38,4 +38,14 @@
####attrs说明####
:formAttrstableForm绑定属性
:searchAttrstableSearch绑定属性
####attrs说明####
####attrs说明####
####table图标规范####
日期 Calendar
人员 User
文件 Document
文件夹 Folder
项目 MessageBox
节点 Share
任务 Document
####table图标规范####