fix : 修复save无法刷新界面问题 修改一些样式
This commit is contained in:
@@ -35,6 +35,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.check-month_box{
|
||||
.el-form-item__content{
|
||||
.el-checkbox-button{
|
||||
width: calc(100% / 7);
|
||||
.el-checkbox-button__inner{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.start_at{
|
||||
.el-form-item__content{
|
||||
.el-date-editor--date{
|
||||
|
||||
@@ -126,19 +126,11 @@ export default {
|
||||
|
||||
mounted () {
|
||||
this.getTableData()
|
||||
this.monitoring()
|
||||
},
|
||||
|
||||
methods: {
|
||||
monitoring () {
|
||||
this.$on('getData', (res) => {
|
||||
console.log('getdata')
|
||||
this.getTableData()
|
||||
this.$forceUpdate();
|
||||
// window.location.reload()
|
||||
})
|
||||
},
|
||||
async getTableData () {
|
||||
async getTableData (item) {
|
||||
if(!item){
|
||||
await get('/sys/backup').then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data) {
|
||||
@@ -162,6 +154,20 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
await get('/sys/backup').then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data) {
|
||||
this.tableData[0].retention = res.data.retention
|
||||
this.tableData[0].state = res.data.state
|
||||
this.switchStatus = res.data.state === 1
|
||||
for (const i in res.data.schedule) {
|
||||
this.tableData[0].schedule[i] = res.data.schedule[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
backupNow (item) {
|
||||
post('/sys/backup').then((res) => {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
>
|
||||
<template v-slot="slotProps">
|
||||
<backups-table
|
||||
ref="backupsTable"
|
||||
ref="backupsTable1"
|
||||
:custom-table-title="customTableTitle"
|
||||
:is-configurations="true"
|
||||
:is-state ='isState'
|
||||
@@ -33,7 +33,7 @@
|
||||
>
|
||||
<template v-slot="slotProps">
|
||||
<backups-table
|
||||
ref="backupsTable"
|
||||
ref="backupsTable2"
|
||||
:custom-table-title="customTableTitle2"
|
||||
:is-configurations="false"
|
||||
>
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
},
|
||||
closeRightBox (refresh) {
|
||||
if (refresh) {
|
||||
this.$refs.backupsTable.$emit('getData')
|
||||
this.$refs.backupsTable1.getTableData('backupsTable1')
|
||||
}
|
||||
this.rightBoxshow = false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user