智慧BI设定


Tableau和Powerbi的设定在"BI设定"中

Tableau高级设定

{
    "工号1":"Tableau帐号",
    "工号2":"Tableau帐号",
    "default":"Tableau帐号",
    "view":"tableau报表",
    "dataset":"在dataset中找到ID",
    "option":"参数1:'xxxx',参数2:'xxxxxx'"
}
//行级别控制说明
1. "数据集设定"中新增一个数据集, 
   sql写法 select 参数1,参数2... from xxx where xx = '$username'
2. tableau设定中将这个数据集ID,写到 dataset中对应

//关于默认参数
如默认当天
"option":"当天:(function(){var day1 = new Date();return day1.format('yyyyMMdd')})(),"
默认上一天
"option":"昨天:(function(){var day1=new Date();day1.setDate(day1.getDate()-1);return day1.format('yyyyMMdd')})(),"

PowerBI设定

{
"type":"report",  //dashboard or report
"reportid":"xxxxxx-xxxx-xxx-xxx-xxxxx",

//页面编号(可选)
"pageName": "xxxxxx", 

//行级别控制(可选)
"username":"xxxx",
"roles":"'xxxxx'",
"datasets":"xxxxx-xxx-xxxx-xxx-xxxxx",

//其它参数,手机端(可选)
"other":",settings:{layoutType: models.LayoutType.MobilePortrait,background: models.BackgroundType.Transparent}"

}

嵌入任意URL:

{
  "url" : "https://www.baidu.com"
}

与第三方系统对接:

{
  "url" : "https://xxxxxx",
  "postdata":{
    "xxx": "xxxx",
    "xxx": "xxxxx"
  }
}

会使用post方法把postdata传递给对接url, 并自动加上"username": "xxx"
第三方系统需返回json格式{"status":200, "url": "xxxxx"}
返回url为拼接好的完整的链接如: https://12.10.2.1:8081/xx?token=xxxx

与finebi/finereport对接:

{
"finebi":"v5/design/report/6aae904df9284bef823921fac05fb247/view", 
"username":""
}

username可为空则采用登录用户名

与永洪BI对接:

{
"yh":"xxxx.db", 
"username":""
}

username可为空则采用登录用户名