From 72409f49ccee00d73cf8ec8a21cf89de5ef5e0d6 Mon Sep 17 00:00:00 2001
From: luosongbai <15272473386@163.com>
Date: Fri, 9 Jul 2021 18:15:09 +0800
Subject: [PATCH] sql
---
web/pages/sqlquery.html | 11 +++++++----
web/src/x.min.js | 28 +++++++++++++++++++---------
web/srczip/logic/routeanalysis.js | 4 ++++
web/srczip/logic/sqlquery.js | 24 +++++++++++++++---------
4 files changed, 45 insertions(+), 22 deletions(-)
diff --git a/web/pages/sqlquery.html b/web/pages/sqlquery.html
index 85c81aa..cc9e70f 100644
--- a/web/pages/sqlquery.html
+++ b/web/pages/sqlquery.html
@@ -25,8 +25,11 @@
diff --git a/web/src/x.min.js b/web/src/x.min.js
index 123346a..21da09b 100644
--- a/web/src/x.min.js
+++ b/web/src/x.min.js
@@ -6657,6 +6657,10 @@ var X = window.X || {
itemStyle: {
color: colordata[i]
},
+ label: {
+ show:true,
+ position: 'center'
+ },
lineStyle: {
color: 'source',
opacity: 0.6
@@ -7209,18 +7213,24 @@ var X = window.X || {
$(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){
var txt = $('.sql-textarea').val();
- console.log(EncodeURIFilter(txt));
+ // console.log(EncodeURIFilter(txt));
+
+ X.api("ck/sql","post",{"sql": txt},function(d){
+ console.log(JSON.stringify(d));
+ $('.table-sql-box-con').html(JSON.stringify(d));
+ })
+
})
- function EncodeURIFilter(str) {
- if(str != null && str != "") {
- str = str.replace(/\+/g, "%2B");
- str = str.replace(/\&/g, "%26");
- }
- return str;
- }
+ // function EncodeURIFilter(str) {
+ // if(str != null && str != "") {
+ // str = str.replace(/\+/g, "%2B");
+ // str = str.replace(/\&/g, "%26");
+ // }
+ // return str;
+ // }
+
-
}
};
diff --git a/web/srczip/logic/routeanalysis.js b/web/srczip/logic/routeanalysis.js
index 960a8de..2e0ecde 100644
--- a/web/srczip/logic/routeanalysis.js
+++ b/web/srczip/logic/routeanalysis.js
@@ -472,6 +472,10 @@
itemStyle: {
color: colordata[i]
},
+ label: {
+ show:true,
+ position: 'center'
+ },
lineStyle: {
color: 'source',
opacity: 0.6
diff --git a/web/srczip/logic/sqlquery.js b/web/srczip/logic/sqlquery.js
index 2ea059e..49f4819 100644
--- a/web/srczip/logic/sqlquery.js
+++ b/web/srczip/logic/sqlquery.js
@@ -4,18 +4,24 @@
$(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){
var txt = $('.sql-textarea').val();
- console.log(EncodeURIFilter(txt));
+ // console.log(EncodeURIFilter(txt));
+
+ X.api("ck/sql","post",{"sql": txt},function(d){
+ console.log(JSON.stringify(d));
+ $('.table-sql-box-con').html(JSON.stringify(d));
+ })
+
})
- function EncodeURIFilter(str) {
- if(str != null && str != "") {
- str = str.replace(/\+/g, "%2B");
- str = str.replace(/\&/g, "%26");
- }
- return str;
- }
+ // function EncodeURIFilter(str) {
+ // if(str != null && str != "") {
+ // str = str.replace(/\+/g, "%2B");
+ // str = str.replace(/\&/g, "%26");
+ // }
+ // return str;
+ // }
+
-
}
};