feat: 完成 mysql、redis 配置文件修改

This commit is contained in:
ssongliu
2022-11-02 18:30:22 +08:00
committed by ssongliu
parent b3bc8769b3
commit bfe2b95334
13 changed files with 357 additions and 206 deletions

View File

@@ -65,11 +65,7 @@
v-model="mysqlConf"
:readOnly="true"
/>
<el-button
type="primary"
style="width: 120px; margin-top: 10px"
@click="onSave(panelFormRef, 'remoteAccess', baseInfo.port)"
>
<el-button type="primary" style="width: 120px; margin-top: 10px" @click="onSaveFile()">
{{ $t('commons.button.save') }}
</el-button>
</el-collapse-item>
@@ -324,6 +320,7 @@ import {
loadMysqlBaseInfo,
loadMysqlStatus,
loadMysqlVariables,
updateMysqlConfByFile,
updateMysqlDBInfo,
updateMysqlVariables,
} from '@/api/modules/database';
@@ -447,6 +444,15 @@ function callback(error: any) {
}
}
const onSaveFile = async () => {
let param = {
mysqlName: mysqlName.value,
file: mysqlConf.value,
};
await updateMysqlConfByFile(param);
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
};
const loadBaseInfo = async () => {
const res = await loadMysqlBaseInfo(mysqlName.value);
baseInfo.name = res.data?.name;