mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 12:39:01 +08:00
fix: 解决 PostgreSQL 上传恢复报错的问题 (#3560)
This commit is contained in:
parent
3ffae2a9d4
commit
4591e44a62
@ -21,7 +21,11 @@
|
||||
:stroke-width="12"
|
||||
:percentage="uploadPercent"
|
||||
></el-progress>
|
||||
<div v-if="type === 'mysql'" style="width: 80%" class="el-upload__tip">
|
||||
<div
|
||||
v-if="type === 'mysql' || type === 'mariadb' || type === 'postgresql'"
|
||||
style="width: 80%"
|
||||
class="el-upload__tip"
|
||||
>
|
||||
<span class="input-help">{{ $t('database.supportUpType') }}</span>
|
||||
<span class="input-help">
|
||||
{{ $t('database.zipFormat') }}
|
||||
@ -130,20 +134,24 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
|
||||
remark.value = params.remark;
|
||||
|
||||
const pathRes = await loadBaseDir();
|
||||
if (type.value === 'mysql') {
|
||||
title.value = name.value + ' [ ' + detailName.value + ' ]';
|
||||
}
|
||||
if (type.value === 'website' || type.value === 'app') {
|
||||
title.value = name.value;
|
||||
}
|
||||
let dir = type.value === 'mysql' || type.value === 'mariadb' ? 'database/' + type.value : type.value;
|
||||
if (detailName.value) {
|
||||
baseDir.value = `${pathRes.data}/uploads/${dir}/${name.value}/${detailName.value}/`;
|
||||
} else {
|
||||
baseDir.value = `${pathRes.data}/uploads/${dir}/${name.value}/`;
|
||||
}
|
||||
if (type.value === 'website') {
|
||||
baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${detailName.value}/`;
|
||||
switch (type.value) {
|
||||
case 'mysql':
|
||||
case 'mariadb':
|
||||
case 'postgresql':
|
||||
title.value = name.value + ' [ ' + detailName.value + ' ]';
|
||||
if (detailName.value) {
|
||||
baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${name.value}/${detailName.value}/`;
|
||||
} else {
|
||||
baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${name.value}/`;
|
||||
}
|
||||
break;
|
||||
case 'website':
|
||||
title.value = name.value;
|
||||
baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${detailName.value}/`;
|
||||
break;
|
||||
case 'app':
|
||||
title.value = name.value;
|
||||
baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${name.value}/`;
|
||||
}
|
||||
upVisible.value = true;
|
||||
search();
|
||||
|
Loading…
Reference in New Issue
Block a user