提交 631a4ada 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

system组件修复

上级 838fa279
<template> <template>
<div> <div class="system">
<el-form :model="config" label-width="100px" ref="form" class="system"> <el-form :model="config" label-width="100px" ref="form" class="system">
<h2>系统配置</h2> <h2>系统配置</h2>
<el-form-item label="多点登录拦截"> <el-form-item label="多点登录拦截">
...@@ -104,9 +104,9 @@ ...@@ -104,9 +104,9 @@
</template> </template>
<script> <script>
import { getSystemConfig, setSystemConfig } from '@/api/system' import { getSystemConfig, setSystemConfig } from "@/api/system";
export default { export default {
name: 'Config', name: "Config",
data() { data() {
return { return {
config: { config: {
...@@ -117,40 +117,42 @@ export default { ...@@ -117,40 +117,42 @@ export default {
sqlite: {}, sqlite: {},
redis: {}, redis: {},
qiniu: {}, qiniu: {},
captcha:{}, captcha: {},
log:{} log: {}
}
} }
};
}, },
async created() { async created() {
await this.initForm() await this.initForm();
}, },
methods: { methods: {
async initForm() { async initForm() {
const res = await getSystemConfig() const res = await getSystemConfig();
if (res.code == 0) { if (res.code == 0) {
this.config = res.data.config this.config = res.data.config;
} }
}, },
reload() {}, reload() {},
async update() { async update() {
const res = await setSystemConfig({ config: this.config }) const res = await setSystemConfig({ config: this.config });
if (res.code == 0) { if (res.code == 0) {
this.$message({ this.$message({
type: 'success', type: "success",
message: '配置文件设置成功' message: "配置文件设置成功"
}) });
await this.initForm() await this.initForm();
} }
} }
} }
} };
</script> </script>
<style lang="scss"> <style lang="scss">
h2 { .system {
h2 {
padding: 10px; padding: 10px;
margin: 10px 0; margin: 10px 0;
font-size: 16px; font-size: 16px;
box-shadow:-4px 1px 3px 0px #e7e8e8 box-shadow: -4px 1px 3px 0px #e7e8e8;
}
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册