Browse Source

system组件修复

main
QM303176530 5 years ago
parent
commit
631a4ada75
  1. 44
      web/src/view/systemTools/system/system.vue

44
web/src/view/systemTools/system/system.vue

@ -1,5 +1,5 @@
<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="多点登录拦截">
@ -88,7 +88,7 @@
<el-form-item label="imgHeight"> <el-form-item label="imgHeight">
<el-input v-model.number="config.captcha.imgHeight"></el-input> <el-input v-model.number="config.captcha.imgHeight"></el-input>
</el-form-item> </el-form-item>
<h2>日志配置</h2>
<h2>日志配置</h2>
<el-form-item label="prefix"> <el-form-item label="prefix">
<el-input v-model.number="config.log.prefix"></el-input> <el-input v-model.number="config.log.prefix"></el-input>
</el-form-item> </el-form-item>
@ -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 {
sqlite: {}, sqlite: {},
redis: {}, redis: {},
qiniu: {}, qiniu: {},
captcha:{},
log:{}
captcha: {},
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',
message: '配置文件设置成功'
})
await this.initForm()
type: "success",
message: "配置文件设置成功"
});
await this.initForm();
} }
} }
} }
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
h2 {
padding: 10px;
margin: 10px 0;
font-size: 16px;
box-shadow:-4px 1px 3px 0px #e7e8e8
.system {
h2 {
padding: 10px;
margin: 10px 0;
font-size: 16px;
box-shadow: -4px 1px 3px 0px #e7e8e8;
}
} }
</style> </style>
Loading…
Cancel
Save