|
@ -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="多点登录拦截"> |
|
@ -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: { |
|
@ -120,37 +120,39 @@ export default { |
|
|
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', |
|
|
|
|
|
message: '配置文件设置成功' |
|
|
|
|
|
}) |
|
|
|
|
|
await this.initForm() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
type: "success", |
|
|
|
|
|
message: "配置文件设置成功" |
|
|
|
|
|
}); |
|
|
|
|
|
await this.initForm(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
<style lang="scss"> |
|
|
<style lang="scss"> |
|
|
|
|
|
.system { |
|
|
h2 { |
|
|
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> |