diff --git a/CellData.sql b/CellData.sql
index 97be136..a8e7480 100644
--- a/CellData.sql
+++ b/CellData.sql
@@ -1 +1,15 @@
-# demo
\ No newline at end of file
+SELECT * FROM `cellinfo`;
+DROP TABLE IF EXISTS `4G`;
+DROP TABLE IF EXISTS `5G`;
+DROP TABLE IF EXISTS `4G_Date`;
+DROP TABLE IF EXISTS `4G_MAX`;
+DROP TABLE IF EXISTS `CCE_MAX`;
+DROP TABLE IF EXISTS `ULPRB_MAX`;
+DROP TABLE IF EXISTS `DLPRB_MAX`;
+DROP TABLE IF EXISTS `4G_MAX_IDX`;
+DROP TABLE IF EXISTS `CCE_MAX_IDX`;
+DROP TABLE IF EXISTS `ULPRB_MAX_IDX`;
+DROP TABLE IF EXISTS `DLPRB_MAX_IDX`;
+DROP TABLE IF EXISTS `日流量`;
+DROP TABLE IF EXISTS `4G日均流量`;
+DROP TABLE IF EXISTS `4G_结果表`;
diff --git a/frontend/src/components/ScriptPanel.vue b/frontend/src/components/ScriptPanel.vue
index 50204a6..0864325 100644
--- a/frontend/src/components/ScriptPanel.vue
+++ b/frontend/src/components/ScriptPanel.vue
@@ -5,17 +5,15 @@
-
-
-
+
{{ statusText }}
+
+
+ 刷新
+
-
-
+
+
@@ -48,6 +46,7 @@ import {
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
import 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution';
+import { language as mysqlLanguage } from 'monaco-editor/esm/vs/basic-languages/mysql/mysql.js';
import { apiPost } from '../api/client';
import type { ApiMessage, ScriptContent, TaskStatus } from '../types';
@@ -220,6 +219,42 @@ function createEditor() {
void saveScript();
});
+ const completionItems: Array<{ label: string; kind: monaco.languages.CompletionItemKind }> = [];
+ const seen = new Set();
+ const add = (list: string[] | undefined, kind: monaco.languages.CompletionItemKind) => {
+ for (const item of list || []) {
+ const upper = item.toUpperCase();
+ if (!seen.has(upper)) {
+ seen.add(upper);
+ completionItems.push({ label: upper, kind });
+ }
+ }
+ };
+ add(mysqlLanguage.keywords as string[], monaco.languages.CompletionItemKind.Keyword);
+ add(mysqlLanguage.operators as string[], monaco.languages.CompletionItemKind.Operator);
+ add(mysqlLanguage.builtinFunctions as string[], monaco.languages.CompletionItemKind.Function);
+ disposables.push(
+ monaco.languages.registerCompletionItemProvider('sql', {
+ provideCompletionItems(model, position) {
+ const word = model.getWordUntilPosition(position);
+ const range = {
+ startLineNumber: position.lineNumber,
+ endLineNumber: position.lineNumber,
+ startColumn: word.startColumn,
+ endColumn: word.endColumn,
+ };
+ return {
+ suggestions: completionItems.map(item => ({
+ label: item.label,
+ kind: item.kind,
+ insertText: item.label,
+ range,
+ })),
+ };
+ },
+ })
+ );
+
updateCursor();
}
diff --git a/frontend/src/styles.css b/frontend/src/styles.css
index dbdced1..d163dc9 100644
--- a/frontend/src/styles.css
+++ b/frontend/src/styles.css
@@ -2248,28 +2248,13 @@ select {
}
.script-process-section {
- flex: 0 1 clamp(168px, 26vh, 280px);
- min-height: 148px;
+ flex: 0 0 auto;
margin: 8px 16px 0;
- overflow: hidden;
}
-.script-process-card {
- display: flex;
- height: 100%;
- min-height: 0;
- flex-direction: column;
-}
-
-.script-process-section .card-body {
- flex: 1;
- min-height: 0;
- padding: 12px 16px 16px;
-}
-
-.script-log {
- height: 100%;
- min-height: 0;
+.script-process-section .script-log {
+ max-height: clamp(140px, 22vh, 240px);
+ overflow: auto;
}
/* ==================== Responsive ==================== */