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

View File

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

View File

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

View File

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

View File

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