fix 修复 oss配置页 状态未从01改为YN导致的问题

This commit is contained in:
疯狂的狮子Li
2026-03-25 10:25:51 +08:00
parent a86557cc2a
commit 1442d539e8
2 changed files with 10 additions and 5 deletions
+7
View File
@@ -154,6 +154,13 @@
margin-left: 0 !important; margin-left: 0 !important;
} }
.el-dialog__footer .dialog-footer {
display: flex;
width: 100%;
justify-content: flex-end;
gap: 12px;
}
// refine element ui upload // refine element ui upload
.upload-container { .upload-container {
.el-upload { .el-upload {
+3 -5
View File
@@ -70,7 +70,7 @@
</el-table-column> </el-table-column>
<el-table-column v-if="columns[8].visible" label="是否默认" align="center" prop="status"> <el-table-column v-if="columns[8].visible" label="是否默认" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch> <el-switch v-model="scope.row.status" active-value="Y" inactive-value="N" @change="handleStatusChange(scope.row)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150" class-name="small-padding"> <el-table-column label="操作" fixed="right" align="center" width="150" class-name="small-padding">
@@ -323,16 +323,14 @@ const submitForm = () => {
}; };
/** 状态修改 */ /** 状态修改 */
const handleStatusChange = async (row: OssConfigVO) => { const handleStatusChange = async (row: OssConfigVO) => {
const text = row.status === '0' ? '启用' : '停用'; const text = row.status === 'Y' ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?'); await proxy?.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?');
await changeOssConfigStatus(row.ossConfigId, row.status, row.configKey); await changeOssConfigStatus(row.ossConfigId, row.status, row.configKey);
await getList(); await getList();
proxy?.$modal.msgSuccess(text + '成功'); proxy?.$modal.msgSuccess(text + '成功');
} catch { } catch {
return; row.status = row.status === 'Y' ? 'N' : 'Y';
} finally {
row.status = row.status === '0' ? '1' : '0';
} }
}; };
/** 删除按钮操作 */ /** 删除按钮操作 */