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

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

@ -6657,6 +6657,10 @@ var X = window.X || {
itemStyle: { itemStyle: {
color: colordata[i] color: colordata[i]
}, },
label: {
show:true,
position: 'center'
},
lineStyle: { lineStyle: {
color: 'source', color: 'source',
opacity: 0.6 opacity: 0.6
@ -7209,18 +7213,24 @@ var X = window.X || {
$(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){ $(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){
var txt = $('.sql-textarea').val(); 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) { // function EncodeURIFilter(str) {
if(str != null && str != "") { // if(str != null && str != "") {
str = str.replace(/\+/g, "%2B"); // str = str.replace(/\+/g, "%2B");
str = str.replace(/\&/g, "%26"); // str = str.replace(/\&/g, "%26");
} // }
return str; // return str;
} // }
} }
}; };

View File

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

View File

@ -4,18 +4,24 @@
$(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){ $(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){
var txt = $('.sql-textarea').val(); 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) { // function EncodeURIFilter(str) {
if(str != null && str != "") { // if(str != null && str != "") {
str = str.replace(/\+/g, "%2B"); // str = str.replace(/\+/g, "%2B");
str = str.replace(/\&/g, "%26"); // str = str.replace(/\&/g, "%26");
} // }
return str; // return str;
} // }
} }
}; };