|
|
@ -22,7 +22,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {getNav, getTasks} from "@/api/gather/pool/pool";
|
|
|
|
import {getNav, getTasks, syncDB} from "@/api/gather/pool/pool";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'App',
|
|
|
|
name: 'App',
|
|
|
@ -197,9 +197,17 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 同步操作
|
|
|
|
// 同步操作
|
|
|
|
handleSync(row) {
|
|
|
|
handleSync(row) {
|
|
|
|
console.log('同步操作:', row);
|
|
|
|
const tableName = row.tableName;
|
|
|
|
// 实现同步逻辑
|
|
|
|
const dataSource = this.queryParams.name;
|
|
|
|
},
|
|
|
|
this.$modal.confirm(`确认要强制同步"${row.tableName}"表结构吗?`).then(() => {
|
|
|
|
|
|
|
|
return syncDB(tableName, dataSource);
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("同步成功");
|
|
|
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
|
|
|
console.error('同步失败:', e);
|
|
|
|
|
|
|
|
this.$modal.msgError("同步失败,请检查日志");
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|