| | |
| | | url: 'FtpAction!openBackupFilePath', |
| | | data: 'json='+data |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * |
| | | * 立即备份 |
| | | * 参数 cfg_id |
| | | */ |
| | | backupNow (data) { |
| | | return axios({ |
| | | method: 'post', |
| | | url: 'Devdata_backup_cfgAction!overwrite', |
| | | data: 'json='+JSON.stringify(data) |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | <div slot="footer"> |
| | | <el-popover |
| | | placement="bottom" |
| | | :width="180" |
| | | :width="280" |
| | | trigger="click"> |
| | | <div class="center"> |
| | | <el-button type="primary" size="mini" @click="backupNow">立即备份</el-button> |
| | | <el-button type="primary" size="mini" @click="viewFolder">查看文件</el-button> |
| | | <el-button type="primary" size="mini" |
| | | v-if="$store.state.login.username == 'superuser'" |
| | |
| | | }, |
| | | mounted () { |
| | | this.getSysList(); |
| | | this.getParams(); |
| | | }, |
| | | methods: { |
| | | // 单个下载 |
| | |
| | | message: '复制成功', |
| | | }); |
| | | }, |
| | | // 立即备份 |
| | | backupNow () { |
| | | this.$api.file.backupNow({cfg_id: this.formFtp.data.cfg_id}).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | if (res.code) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '备份成功' |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '备份失败' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |