0

我有一个获取查询的函数(像这样):

function createQueryCityName(strUser) { 
        var query = new google.visualization.Query ("http://127.0.0.1:8000/ecobayes_reporting/default/call/json/get_data_physics");
        //var query = new google.visualization.Query ("http://api.batisense.com/batisense/datasource?table=montmorin");
        console.log(query);
        query.setQuery("select building_name");
        console.log(query);
        //return query;
        //query.send(drawTable);
}

并在将(查询)发送到另一个函数之后,如下所示:

function drawTable(query) {
   /* if (query.isError()) {
    alert('Error in query: ' + query.getMessage() + ' ' + query.getDetailedMessage());
    return;
    }
    */
    console.log(query);
    var data = query.getDataTable();
    //var data = new google.visualization.DataTable();
    var table = new google.visualization.Table(document.getElementById('table_div'));
    table.draw(data);


} 

但我不知道为什么它不起作用????在我的控制台中我有这个:

GET http://127.0.0.1:8000/ecobayes_reporting/static/js/jquery-1.10.0.min.map 404 (NOT FOUND) index:198
ls {jf: "auto", tj: false, Mg: Object, sj: false, rj: "http://api.batisense.com/batisense/datasource?table=montmorin"…}
 PhysicsReports.js:38
ls {jf: "auto", tj: false, Mg: Object, sj: false, rj: "http://api.batisense.com/batisense/datasource?table=montmorin"…}
 PhysicsReports.js:40
Event {clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: document, defaultPrevented: false…}
 PhysicsReports.js:51
Uncaught TypeError: Object #<Event> has no method 'getDataTable' PhysicsReports.js:52
4

0 回答 0