refactor: sql取消执行逻辑调整、前端使用vueuse重构部分代码

This commit is contained in:
meilin.huang
2023-12-09 16:17:26 +08:00
parent 59a7ff9ac7
commit 6709135a0b
29 changed files with 630 additions and 677 deletions

View File

@@ -197,9 +197,17 @@ export class DbInst {
* @param remark 执行备注
*/
async runSql(dbName: string, sql: string, remark: string = '', key: string = '') {
if (key) {
return await dbApi.sqlExec.allowCancelReq(key, {
id: this.id,
db: dbName,
sql: sql.trim(),
remark,
});
}
return await dbApi.sqlExec.request({
id: this.id,
execId: key,
db: dbName,
sql: sql.trim(),
remark,