This commit is contained in:
罗松柏 2021-07-09 18:15:09 +08:00
parent 0de72a3421
commit 72409f49cc
4 changed files with 45 additions and 22 deletions

View File

@ -25,8 +25,11 @@
<div class="sqlquery-table-box">
<div class="table-sql-box">
<div class="table-sql-box-con">
</div>
<table class="table-fenxi-box">
<thead>
<!-- <thead>
<tr class="table-fenxi-th">
<th>序号</th>
<th>group_0</th>
@ -34,8 +37,8 @@
<th>total_amount</th>
<th>group_num</th>
</tr>
</thead>
<tbody class="table-fenxi-td">
</thead> -->
<!-- <tbody class="table-fenxi-td">
<tr >
<td>1</td>
<td>10001->0~150</td>
@ -43,7 +46,7 @@
<td>2799227.0</td>
<td>2</td>
</tr>
</tbody>
</tbody> -->
</table>
</div>
</div>

28
web/src/x.min.js vendored
View File

@ -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;
// }
}
};

View File

@ -472,6 +472,10 @@
itemStyle: {
color: colordata[i]
},
label: {
show:true,
position: 'center'
},
lineStyle: {
color: 'source',
opacity: 0.6

View File

@ -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;
// }
}
};