update:表单搜索优化
This commit is contained in:
@@ -20,7 +20,7 @@ const remoteList = {
|
||||
localPath: './dist',
|
||||
},
|
||||
};
|
||||
|
||||
console.log('打包环境:', remoteName);
|
||||
const config = remoteList[remoteName];
|
||||
if (!remoteName || !config) {
|
||||
console.error('找不到对应环境!');
|
||||
|
||||
@@ -102,7 +102,7 @@ watch(
|
||||
watch(
|
||||
() => props.searchParams,
|
||||
() => {
|
||||
searchForm.value = { ...props.searchParams, ...props.defaultSearchParams };
|
||||
searchForm.value = { ...props.defaultSearchParams, ...props.searchParams };
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user