mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 07:50:25 +08:00
fix: sql执行记录根据关键词搜索问题修复等
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@logicflow/core": "^2.0.16",
|
||||
"@logicflow/extension": "^2.0.21",
|
||||
"@vueuse/core": "^13.3.0",
|
||||
"@vueuse/core": "^13.4.0",
|
||||
"@xterm/addon-fit": "^0.10.0",
|
||||
"@xterm/addon-search": "^0.15.0",
|
||||
"@xterm/addon-web-links": "^0.11.0",
|
||||
@@ -36,16 +36,16 @@
|
||||
"qrcode.vue": "^3.6.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.6",
|
||||
"sql-formatter": "^15.6.1",
|
||||
"sql-formatter": "^15.6.5",
|
||||
"trzsz": "^1.1.5",
|
||||
"uuid": "^9.0.1",
|
||||
"vue": "^3.5.16",
|
||||
"vue-i18n": "^11.1.5",
|
||||
"vue": "^3.5.17",
|
||||
"vue-i18n": "^11.1.6",
|
||||
"vue-router": "^4.5.1",
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.1.9",
|
||||
"@tailwindcss/vite": "^4.1.10",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/node": "^18.14.0",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
@@ -53,16 +53,16 @@
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||
"@typescript-eslint/parser": "^6.7.4",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/compiler-sfc": "^3.5.16",
|
||||
"@vue/compiler-sfc": "^3.5.17",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"code-inspector-plugin": "^0.20.9",
|
||||
"dotenv": "^16.3.1",
|
||||
"eslint": "^9.27.0",
|
||||
"eslint-plugin-vue": "^10.2.0",
|
||||
"postcss": "^8.5.4",
|
||||
"postcss": "^8.5.6",
|
||||
"prettier": "^3.5.3",
|
||||
"sass": "^1.89.2",
|
||||
"tailwindcss": "^4.1.9",
|
||||
"tailwindcss": "^4.1.10",
|
||||
"typescript": "^5.8.2",
|
||||
"vite": "npm:rolldown-vite@latest",
|
||||
"vite-plugin-progress": "0.0.7",
|
||||
|
||||
@@ -15,7 +15,7 @@ const config = {
|
||||
baseWsUrl: `${(window as any).globalConfig.BaseWsUrl || `${location.protocol == 'https:' ? 'wss:' : 'ws:'}//${getBaseApiUrl()}`}/api`,
|
||||
|
||||
// 系统版本
|
||||
version: 'v1.10.1',
|
||||
version: 'v1.10.2',
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
@@ -59,9 +59,16 @@
|
||||
<template #action="{ data }">
|
||||
<!-- 删除、启停用、编辑 -->
|
||||
<el-button v-if="actionBtns[perms.save]" @click="edit(data)" type="primary" link>{{ $t('common.edit') }}</el-button>
|
||||
<el-button v-if="actionBtns[perms.log]" type="warning" link @click="log(data)">{{ $t('db.log') }}</el-button>
|
||||
<el-button v-if="data.runningState === 1" @click="stop(data.id)" type="danger" link>{{ $t('db.stop') }}</el-button>
|
||||
<el-button v-if="actionBtns[perms.run] && data.runningState !== 1 && data.status === 1" type="success" link @click="reRun(data)">
|
||||
<el-button v-if="actionBtns[perms.log]" type="warning" link @click="onOpenLog(data)">{{ $t('db.log') }}</el-button>
|
||||
<el-button v-if="data.runningState === DbTransferRunningStateEnum.Running.value" @click="stop(data.id)" type="danger" link>
|
||||
{{ $t('db.stop') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="actionBtns[perms.run] && data.runningState !== DbTransferRunningStateEnum.Running.value && data.status === 1"
|
||||
type="success"
|
||||
link
|
||||
@click="onReRun(data)"
|
||||
>
|
||||
{{ $t('db.run') }}
|
||||
</el-button>
|
||||
<el-button v-if="actionBtns[perms.files] && data.mode === 2" type="success" link @click="openFiles(data)">{{ $t('db.file') }}</el-button>
|
||||
@@ -187,21 +194,20 @@ const stop = async (id: any) => {
|
||||
search();
|
||||
};
|
||||
|
||||
const log = (data: any) => {
|
||||
const onOpenLog = (data: any) => {
|
||||
state.logsDialog.logId = data.logId;
|
||||
state.logsDialog.visible = true;
|
||||
state.logsDialog.title = t('db.log');
|
||||
state.logsDialog.running = data.state === 1;
|
||||
state.logsDialog.running = data.state === DbTransferRunningStateEnum.Running.value;
|
||||
};
|
||||
|
||||
const reRun = async (data: any) => {
|
||||
const onReRun = async (data: any) => {
|
||||
await useI18nConfirm('db.runConfirm');
|
||||
try {
|
||||
let res = await dbApi.runDbTransferTask.request({ taskId: data.id });
|
||||
console.log(res);
|
||||
useI18nOperateSuccessMsg();
|
||||
// 拿到日志id之后,弹出日志弹窗
|
||||
log({ logId: res, state: 1 });
|
||||
onOpenLog({ logId: res, state: DbTransferRunningStateEnum.Running.value });
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ const runSql = async (sql: string, remark = '', newTab = false) => {
|
||||
}
|
||||
};
|
||||
|
||||
function splitSql(sql: string) {
|
||||
function splitSql(sql: string, delimiter: string = ';') {
|
||||
let state = 'normal';
|
||||
let buffer = '';
|
||||
let result = [];
|
||||
@@ -454,7 +454,7 @@ function splitSql(sql: string) {
|
||||
state = 'string';
|
||||
inString = char;
|
||||
buffer += char;
|
||||
} else if (char === ';') {
|
||||
} else if (char === delimiter) {
|
||||
if (buffer.trim()) {
|
||||
result.push(buffer.trim());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user