|
@@ -5,6 +5,7 @@
|
|
|
<template #tableHeader>
|
|
|
<el-button type="primary" @click="backup()"> 备份文件 </el-button>
|
|
|
<el-button type="primary" icon="Download" plain @click="downloadFile"> 导出 </el-button>
|
|
|
+ <el-button type="primary" v-auth="['manage:faultCase:add']" icon="Refresh" @click="syncFileData()"> 同步文件至服务器 </el-button>
|
|
|
</template>
|
|
|
<!-- 表格操作 -->
|
|
|
<template #operation="scope">
|
|
@@ -25,7 +26,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import ProTable from '@/components/ProTable/index.vue'
|
|
|
import FormDialog from '@/components/FormDialog/index.vue'
|
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
|
-import { listBackupRestoreLogApi, exportBackupRestoreLogApi, backupApi, restoreApi } from '@/api/modules/manage/backupRestoreLog'
|
|
|
+import { listBackupRestoreLogApi, exportBackupRestoreLogApi, backupApi, restoreApi, syncFileDataApi } from '@/api/modules/manage/backupRestoreLog'
|
|
|
|
|
|
// ProTable 实例
|
|
|
const proTable = ref<ProTableInstance>()
|
|
@@ -58,6 +59,16 @@ const restore = () => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+const syncFileData = () => {
|
|
|
+ syncFileDataApi({}).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ ElMessage.success('同步成功')
|
|
|
+ proTable.value?.getTableList()
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
// 导出备份恢复日志列表
|
|
|
const downloadFile = async () => {
|