12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- @{
- ViewBag.Title = "Statistics";
- Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
- }
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div data-options="region:'west',title:'报表名称',split:true" style="width: 200px">
- <ul id="tt"></ul>
- </div>
- <div data-options="region:'center',border:false">
- <div id="tab" class="easyui-tabs" fit="true">
- </div>
- </div>
- </div>
- <script>
- var channel = ""
- $(function () {
- $('#tt').tree({
- url: "/Problem/GetList",
- loadFilter: function (data) {
- if (data.d) {
- return data.d;
- } else {
- channel = data[0].渠道id
- return data;
- }
- },
- onClick: function (node) {
- if (node.url != null) {
- addTab(node.text, node.url, node.file)
- }
- }
- });
- })
- function addTab(title, url, fileName) {
- if ($('#tab').tabs('exists', title)) {
- $('#tab').tabs('select', title);
- } else {
- var realURL = url
- if (fileName != "") {
- var realURL = "/WebForms/WebReportView.aspx?reportName=" + fileName + "&channelid=" + channel
- }
- var content = '<iframe scrolling="auto" frameborder="0" src="' + realURL +
- '" style="width:100%;height:98%;"></iframe>';
- $('#tab').tabs('add', {
- title: title,
- content: content,
- closable: true
- })
- }
- }
- </script>
|