bonus-ui/src/views/system/log/logCapacity/index.vue

64 lines
1.6 KiB
Vue
Raw Normal View History

2024-07-17 14:35:04 +08:00
<template>
<div class="app-container">
<el-form :model="capacityForm"
ref="capacityForm"
size="small" :inline="true"
label-width="100px">
<el-form-item label="日志容量配置" prop="logCapacity">
<el-input
v-model="capacityForm.logCapacity"
placeholder="请输入关键字"
clearable
style="width: 240px"
/>
<span style="margin-left: 10px;">MB</span>
</el-form-item>
2024-07-28 13:19:11 +08:00
2024-07-17 14:35:04 +08:00
<el-button type="primary" size="mini" style="margin-left: 20px;" @click="submit">确定</el-button
>
</el-form>
</div>
</template>
2024-07-28 13:19:11 +08:00
2024-07-17 14:35:04 +08:00
<script>
import { getLogSize,updateLogSize } from '@/api/system/log'
export default {
data() {
return {
capacityForm:{
logCapacity:1024
}
}
},
created() {
this.getSize()
},
methods: {
getSize(){
getLogSize().then((response) => {
this.capacityForm.logCapacity = response.data;
})
},
submit(){
2024-07-28 13:19:11 +08:00
let params={
capacity: this.capacityForm.logCapacity
}
updateLogSize(params).then(response => {
if(response.code==200){
this.$message({
showClose: true,
message: response.msg,
type: 'success',
duration: 2000
})
}
})
2024-07-17 14:35:04 +08:00
},
2024-07-28 13:19:11 +08:00
2024-07-17 14:35:04 +08:00
}
}
</script>