From 386e207d034bcc142764bf873d27634010b178f1 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 30 Jul 2025 15:04:31 +0800
Subject: [PATCH] refactor: remove log
---
frontend/public/assistant.js | 13 ++++++-------
frontend/src/components/filter-text/index.ts | 2 --
frontend/src/router/watch.ts | 2 +-
frontend/src/views/chat/answer/AnalysisAnswer.vue | 5 +----
frontend/src/views/chat/answer/ChartAnswer.vue | 5 +----
frontend/src/views/chat/answer/PredictAnswer.vue | 5 +----
frontend/src/views/chat/chat-block/UserChat.vue | 4 ++--
frontend/src/views/chat/index.vue | 4 ++--
.../views/dashboard/components/sq-text-t7/index.vue | 2 +-
frontend/src/views/ds/Datasource.vue | 4 ++--
frontend/src/views/setting/Professional.vue | 5 ++---
frontend/src/views/setting/index.vue | 2 +-
frontend/src/views/system/embedded/index.vue | 2 +-
frontend/src/views/system/model/Model.vue | 2 +-
.../system/permission/auth-tree/FilterFiled.vue | 2 +-
frontend/src/views/system/user/User.vue | 2 +-
frontend/src/views/system/user/index.vue | 8 ++++----
frontend/vite.config.ts | 4 ++--
g2-ssr/app.js | 5 +----
19 files changed, 31 insertions(+), 47 deletions(-)
diff --git a/frontend/public/assistant.js b/frontend/public/assistant.js
index cc0d7b2b..fd60c620 100644
--- a/frontend/public/assistant.js
+++ b/frontend/public/assistant.js
@@ -22,7 +22,7 @@
-
+
🌟 遇见问题,不再有障碍!
你好,我是你的智能小助手。
点我,开启高效解答模式,让问题变成过去式。
@@ -217,9 +217,9 @@
bottom: 0!important;
}
}
-
+
/* 引导 */
-
+
#sqlbot-assistant .sqlbot-assistant-mask {
position: fixed;
z-index: 10001;
@@ -289,7 +289,7 @@
right: 20px;
top: 20px;
cursor: pointer;
-
+
}
#sqlbot-assistant-chat-container {
width: 460px;
@@ -303,7 +303,7 @@
right: 0 !important;
}
}
-
+
#sqlbot-assistant .sqlbot-assistant-chat-button{
position: fixed;
${data.x_type}: ${data.x_value}px;
@@ -362,7 +362,7 @@
from {
height: 0;;
}
-
+
to {
height: 600px;
}
@@ -433,7 +433,6 @@
}
if (event.data?.busi == 'ready' && event.data?.ready) {
const certificate = parsrCertificate(data)
- console.log(certificate)
params = {
busi: 'certificate',
certificate,
diff --git a/frontend/src/components/filter-text/index.ts b/frontend/src/components/filter-text/index.ts
index 343a0af8..7f250759 100644
--- a/frontend/src/components/filter-text/index.ts
+++ b/frontend/src/components/filter-text/index.ts
@@ -58,8 +58,6 @@ const valueText = (field: string, val: string, options: any[]) => {
return val
}
export const convertFilterText = (conditions: any[], options: any[]) => {
- console.log('conditions', conditions, options)
-
const result: any[] = []
conditions.forEach((condition) => {
const field = condition.field
diff --git a/frontend/src/router/watch.ts b/frontend/src/router/watch.ts
index a5fc9c41..5ec611e0 100644
--- a/frontend/src/router/watch.ts
+++ b/frontend/src/router/watch.ts
@@ -31,7 +31,7 @@ export const watchRouter = (router: any) => {
return
}
if (to.path === '/login') {
- console.log(from)
+ console.info(from)
next('/chat')
} else {
next()
diff --git a/frontend/src/views/chat/answer/AnalysisAnswer.vue b/frontend/src/views/chat/answer/AnalysisAnswer.vue
index 764c8622..34358d5d 100644
--- a/frontend/src/views/chat/answer/AnalysisAnswer.vue
+++ b/frontend/src/views/chat/answer/AnalysisAnswer.vue
@@ -133,9 +133,6 @@ const sendMessage = async () => {
_list.push(line)
}
}
-
- // console.log(_list)
-
for (const str of _list) {
let data
try {
@@ -161,7 +158,7 @@ const sendMessage = async () => {
_currentChat.value.records[index.value].id = data.id
break
case 'info':
- console.log(data.msg)
+ console.info(data.msg)
break
case 'error':
currentRecord.error = data.content
diff --git a/frontend/src/views/chat/answer/ChartAnswer.vue b/frontend/src/views/chat/answer/ChartAnswer.vue
index 805a05f6..d87569fb 100644
--- a/frontend/src/views/chat/answer/ChartAnswer.vue
+++ b/frontend/src/views/chat/answer/ChartAnswer.vue
@@ -137,9 +137,6 @@ const sendMessage = async () => {
_list.push(line)
}
}
-
- // console.log(_list)
-
for (const str of _list) {
let data
try {
@@ -165,7 +162,7 @@ const sendMessage = async () => {
_currentChat.value.records[index.value].id = data.id
break
case 'info':
- console.log(data.msg)
+ console.info(data.msg)
break
case 'brief':
_currentChat.value.brief = data.brief
diff --git a/frontend/src/views/chat/answer/PredictAnswer.vue b/frontend/src/views/chat/answer/PredictAnswer.vue
index c2a4aaca..1bb339f8 100644
--- a/frontend/src/views/chat/answer/PredictAnswer.vue
+++ b/frontend/src/views/chat/answer/PredictAnswer.vue
@@ -133,9 +133,6 @@ const sendMessage = async () => {
_list.push(line)
}
}
-
- // console.log(_list)
-
for (const str of _list) {
let data
try {
@@ -160,7 +157,7 @@ const sendMessage = async () => {
_currentChat.value.records[index.value].id = data.id
break
case 'info':
- console.log(data.msg)
+ console.info(data.msg)
break
case 'error':
currentRecord.error = data.content
diff --git a/frontend/src/views/chat/chat-block/UserChat.vue b/frontend/src/views/chat/chat-block/UserChat.vue
index 13422d32..d360b948 100644
--- a/frontend/src/views/chat/chat-block/UserChat.vue
+++ b/frontend/src/views/chat/chat-block/UserChat.vue
@@ -8,10 +8,10 @@ const props = defineProps<{
const { t } = useI18n()
function clickAnalysis() {
- console.log('analysis_record_id: ' + props.message?.record?.analysis_record_id)
+ console.info('analysis_record_id: ' + props.message?.record?.analysis_record_id)
}
function clickPredict() {
- console.log('predict_record_id: ' + props.message?.record?.predict_record_id)
+ console.info('predict_record_id: ' + props.message?.record?.predict_record_id)
}
diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue
index 7e1e78e3..ecd89429 100644
--- a/frontend/src/views/chat/index.vue
+++ b/frontend/src/views/chat/index.vue
@@ -461,11 +461,11 @@ const currentChatEngineType = computed(() => {
})
function onChatDeleted(id: number) {
- console.log('deleted', id)
+ console.info('deleted', id)
}
function onChatRenamed(chat: Chat) {
- console.log('renamed', chat)
+ console.info('renamed', chat)
}
const chatListSideBarShow = ref(true)
diff --git a/frontend/src/views/dashboard/components/sq-text-t7/index.vue b/frontend/src/views/dashboard/components/sq-text-t7/index.vue
index b2070122..bf22fede 100644
--- a/frontend/src/views/dashboard/components/sq-text-t7/index.vue
+++ b/frontend/src/views/dashboard/components/sq-text-t7/index.vue
@@ -52,7 +52,7 @@ const initOptions = {
}
const handleInit = (editor: any) => {
editorRef.value = editor
- console.log('TinyMCE 初始化完成', editor)
+ console.info('TinyMCE 初始化完成', editor)
}
diff --git a/frontend/src/views/ds/Datasource.vue b/frontend/src/views/ds/Datasource.vue
index 0ad1aaa5..b1c0264e 100644
--- a/frontend/src/views/ds/Datasource.vue
+++ b/frontend/src/views/ds/Datasource.vue
@@ -122,11 +122,11 @@ const refreshData = () => {
}
const panelClick = () => {
- console.log('panelClick')
+ console.info('panelClick')
}
const smartClick = () => {
- console.log('smartClick')
+ console.info('smartClick')
}
const deleteHandler = (item: any) => {
diff --git a/frontend/src/views/setting/Professional.vue b/frontend/src/views/setting/Professional.vue
index bd19b976..4ab19613 100644
--- a/frontend/src/views/setting/Professional.vue
+++ b/frontend/src/views/setting/Professional.vue
@@ -114,11 +114,10 @@ const state = reactive({
},
})
const handleSearch = (e: any) => {
- console.log('search', e)
+ console.info('search', e)
}
const editHandler = (id: any) => {
termApi.query(id).then((res: any) => {
- console.log('term detail', res)
state.form = res
dialogFormVisible.value = true
})
@@ -181,7 +180,7 @@ const addTerm = () => {
}
const editTerm = () => {
termApi.edit(state.form).then((res: any) => {
- console.log('edit term', res)
+ console.info('edit term', res)
dialogFormVisible.value = false
search()
ElMessage({
diff --git a/frontend/src/views/setting/index.vue b/frontend/src/views/setting/index.vue
index 99496857..7ea3cbfa 100644
--- a/frontend/src/views/setting/index.vue
+++ b/frontend/src/views/setting/index.vue
@@ -31,7 +31,7 @@ import Professional from './Professional.vue'
const activeName = ref('0')
const handleClick = (tab: any, event: MouseEvent) => {
- console.log(tab, event)
+ console.info(tab, event)
}
diff --git a/frontend/src/views/system/embedded/index.vue b/frontend/src/views/system/embedded/index.vue
index 38bf6afd..dc357d4e 100644
--- a/frontend/src/views/system/embedded/index.vue
+++ b/frontend/src/views/system/embedded/index.vue
@@ -164,7 +164,7 @@ const beforeClose = () => {
}
const handleActive = (row: any) => {
- console.log('row', row)
+ console.info('row', row)
}
const handlePrivate = (row: any) => {
diff --git a/frontend/src/views/system/model/Model.vue b/frontend/src/views/system/model/Model.vue
index a9a12a5d..d0f70afd 100644
--- a/frontend/src/views/system/model/Model.vue
+++ b/frontend/src/views/system/model/Model.vue
@@ -170,7 +170,7 @@ const deleteHandler = (item: any) => {
customClass: 'confirm-no_icon',
autofocus: false,
callback: (val: string) => {
- console.log(val)
+ console.info(val)
},
})
return
diff --git a/frontend/src/views/system/permission/auth-tree/FilterFiled.vue b/frontend/src/views/system/permission/auth-tree/FilterFiled.vue
index 68b00675..c1068677 100644
--- a/frontend/src/views/system/permission/auth-tree/FilterFiled.vue
+++ b/frontend/src/views/system/permission/auth-tree/FilterFiled.vue
@@ -93,7 +93,7 @@ const filterTypeChange = () => {
initEnumOptions()
}
const initEnumOptions = () => {
- console.log('initEnumOptions')
+ console.info('initEnumOptions')
}
const selectItem = ({ field_name, id }: any) => {
diff --git a/frontend/src/views/system/user/User.vue b/frontend/src/views/system/user/User.vue
index 9c140a70..add0e20e 100644
--- a/frontend/src/views/system/user/User.vue
+++ b/frontend/src/views/system/user/User.vue
@@ -552,7 +552,7 @@ const handleEditPassword = (id: any) => {
const handleConfirmPassword = () => {
passwordRef.value.validate((val: any) => {
if (val) {
- console.log(val)
+ console.info(val)
}
})
dialogVisiblePassword.value = false
diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue
index 801fd1c2..d9e9e4e2 100644
--- a/frontend/src/views/system/user/index.vue
+++ b/frontend/src/views/system/user/index.vue
@@ -152,10 +152,10 @@ const state = reactive({
},
})
const handleSearch = (e: any) => {
- console.log('search', e)
+ console.info('search', e)
}
const editHandler = (id: any) => {
- console.log('editHandler', id)
+ console.info('editHandler', id)
/* userApi.query(id).then((res: any) => {
console.log('term detail', res)
state.form = res
@@ -163,7 +163,7 @@ const editHandler = (id: any) => {
}) */
}
const deleteHandler = (id: any) => {
- console.log('deleteHandler', id)
+ console.info('deleteHandler', id)
ElMessageBox.confirm('Are you sure to delete?', 'Warning', {
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
@@ -222,7 +222,7 @@ const addTerm = () => {
}
const editTerm = () => {
userApi.edit(state.form).then((res: any) => {
- console.log('edit term', res)
+ console.info('edit term', res)
dialogFormVisible.value = false
search()
ElMessage({
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 4749a7e2..c63a7c3a 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -7,8 +7,8 @@ import path from 'path'
import svgLoader from 'vite-svg-loader'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
- console.log(mode)
- console.log(env)
+ console.info(mode)
+ console.info(env)
return {
base: './',
plugins: [
diff --git a/g2-ssr/app.js b/g2-ssr/app.js
index 425419e3..9589e9b6 100644
--- a/g2-ssr/app.js
+++ b/g2-ssr/app.js
@@ -17,7 +17,7 @@ http.createServer((req, res) => {
toPost(req, res);
}
}).listen(port, () => {
- console.log(`Server listening on: http://localhost:${port}`);
+ console.info(`Server listening on: http://localhost:${port}`);
});
function getOptions(type, axis, data) {
@@ -50,9 +50,7 @@ function getOptions(type, axis, data) {
// 创建 Chart 和配置
async function GenerateCharts(obj) {
- console.log(obj)
const options = getOptions(obj.type, JSON.parse(obj.axis), JSON.parse(obj.data));
- console.log(options);
const chart = await createChart(options);
// 导出
@@ -69,7 +67,6 @@ async function GenerateCharts(obj) {
function toGet(req, res) {
let data = 'GET请求内容:\n' + util.inspect(url.parse(req.url));
res.end(data);
- console.log(data);
}
//获取POST请求内容、cookie