فهرست منبع

boman-report 4

shiqian 3 سال پیش
والد
کامیت
cdb6623168

+ 2 - 2
boman-report/src/main/resources/static/jmreport/desreport_/js/biz/view.js

@@ -872,8 +872,8 @@ let xs = null;
      // 字典数据处理
      //dictDataHandler(strObj);
      //console.log('----------------------------')
-     console.log('数据对象',strObj)
-     console.log('解析后内容',JSON.stringify(strObj.rows));
+     // console.log('数据对象',strObj)
+     // console.log('解析后内容',JSON.stringify(strObj.rows));
      //console.log('----------------------------')
      return strObj;
  }

+ 2 - 2
boman-report/src/main/resources/templates/jmreport/desreport/list.ftl

@@ -29,7 +29,7 @@
 </script>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width">
-<title>在线设计哈哈</title>
+<title>在线设计</title>
     <#include "common/resource.ftl">
     <link rel="stylesheet" href="${base}${customPrePath}/jmreport/desreport_/corelib/cust.css?${CACHE_VERSION}">
     <link rel="shortcut icon" href="${base}${customPrePath}/jmreport/desreport_/corelib/logo.png?${CACHE_VERSION}" type="image/x-ico">
@@ -145,7 +145,7 @@
                 <div slot="trigger"></div>
             </Sider>
             <Tabs value="name1" style="width: 100%" @on-click="tabsClick">
-                <tab-pane icon="md-desktop" label="报表设计111111" name="name1" class="jimu-tab">
+                <tab-pane icon="md-desktop" label="报表设计" name="name1" class="jimu-tab">
                   <div style="display: flex;justify-content:space-between;margin-left:16px;margin-right: 38px;">
                     <div>
                       <i-input size="small" v-model="name" @keyup.enter.native="enterSearchClick" placeholder="回车搜索报表名称"></i-input>

+ 17 - 9
boman-report/src/main/resources/templates/jmreport/desreport/template/components/data_source_setting.ftl

@@ -690,6 +690,7 @@
                 },
                 sqlForm: {
                     dbCode: "",
+                    tableName: "",
                     tableComment: "",
                     dbChName: "",
                     dbDynSql: "",
@@ -1129,6 +1130,10 @@
                         }
                         let tabId = this.genTable.selectParamTables;
                         reportNewDb.dbChName = tabId[0].tableComment;
+                        reportNewDb.dbCode = tabId[0].tableName;
+                        let dbDynSql = "select * from " + tabId[0].tableName;
+                        reportNewDb.dbDynSql = dbDynSql;
+                        debugger
                         $http.post({
                             url: api.saveDb,
                             contentType:'json',
@@ -1963,16 +1968,19 @@
                         })
                     }});
             },
-            initTables(){
-                let config={
-                    url:api.initTables,
-                    data: JSON.stringify({"pageCurrent": this.genTable.pageCurrent, "pageSize": this.genTable.pageSize}),
-                    method:'post',
-                    headers: {"Content-Type":"application/json;charset=UTF-8"}
+            initTables() {
+                let config = {
+                    url: api.initTables,
+                    data: JSON.stringify({
+                        "pageCurrent": this.genTable.pageCurrent,
+                        "pageSize": this.genTable.pageSize
+                    }),
+                    method: 'post',
+                    headers: {"Content-Type": "application/json;charset=UTF-8"}
                 }
                 axios.request(config).then((res) => {
-                    if (res.data.success){
-                        if(!res){
+                    if (res.data.success) {
+                        if (!res) {
                             return;
                         }
                         this.nowData = res.data.result;
@@ -1980,7 +1988,7 @@
                         this.changepage(1);
                     }
 
-                }).catch(function (error){
+                }).catch(function (error) {
                     console.log(error);
                 });
             },