<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModelItems_ReportItems.aspx.cs" Inherits="Manage_ModelItems_ReportItems" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>报表数据选项</title>
    <link href="../Plugins/layui226/css/layui.css?ver=<%=Common.Version %>" rel="stylesheet" type="text/css" />     
    <link href="../Plugins/eControls/default/style.css?ver=<%=Common.Version %>" rel="stylesheet" type="text/css" />   
    <link href="../Plugins/Theme/default/style.css?ver=<%=Common.Version %>" rel="stylesheet" type="text/css" />   
	<link href="../Plugins/Theme/manage/style.css?ver=<%=Common.Version %>" rel="stylesheet" type="text/css" />
	<script src="../Scripts/Init.js?ver=<%=Common.Version %>"></script>
    <script>var ReportID = "<%=ReportID%>";</script>
    <script src="javascript/columns.js?ver=<%=Common.Version %>"></script>
    <%=Common.LoadJS %>
</head>
<style>
h1 {font-size:16px;}
.text{text-indent:5px;display:inline-block;width:100%;border:1px solid #ccc;font-size:12px;height:23px;line-height:23px;color:#333;}
.divloading{filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5; opacity: 0.5; position:fixed;width:100%;height:100%;top:0px;left:0px;background:#cccccc url(images/loading.gif) no-repeat center center;}
.btnaddb {display:inline-block;width:30px;height:30px;font-size:1px;background:url(images/btn_add.png) center center no-repeat;background-size:100% 100%;}
textarea {padding:6px;text-indent:0px;border:1px solid #ccc;font-size:12px;line-height:23px;color:#333;}
label, input {vertical-align:middle;display:inline-block;}
</style>
<script>
    /* 和ReportItems.aspx 功能相同，应同步修改 */ 
    function loadData()
    {
        showloading();
        var url = "?ReportID=" + ReportID + "&act=getdata&t=" + now();
        $.ajax({
            type: "GET", async: true,
            url: url,
            dataType: "html",
            success: function (data) {
                hideloading();
                $("#content").html(data);
                bindEvent();
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                hideloading();
            }
        });
    };
    function bindEvent()
    {
        $(".eDataTable").each(function (index, note) {
            var id=$(note).attr("id");
            var tb = new eDataTable(id, 1);
            tb.moveRow = function (index, nindex) {
                $("#" + id + " tbody tr td:last-child").each(function (index1, obj) {
                    $(obj).html(1 + index1);
                });
                var ids = "";
                $("#" + id + " tbody tr td:nth-child(1)").each(function (index1, obj) {
                    if (index1 > 0) { ids += ","; }
                    ids += $(obj).parent().attr("erowid");
                });
                if (ids.length == 0) { return; }
                showloading();
                var url = "?act=setorders&ReportID=" + ReportID + "&t=" + now();
                $.ajax({
                    type: "POST", async: true,
                    data: { ids: ids },
                    url: url,
                    dataType: "html",
                    success: function (data) {
                        hideloading();
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        hideloading();
                    }
                });
            };

        });

    };
    $(document).ready(function () {
        bindEvent();
    });
</script>
<body>
<div id="divloading" class="divloading" style="display:none;">&nbsp;</div>
<div class="tips" style="margin:8px;">
<b>变量说明</b><br>
{year}&nbsp;引用当前数据的年,&nbsp;&nbsp;
{month}&nbsp;引用当前数据的月,&nbsp;&nbsp;
{data:value}&nbsp;引用Y轴的值,&nbsp;&nbsp;
{data:sum}&nbsp;汇总列。
</div>
<div id="content" style="margin:8px;">
<asp:PlaceHolder ID="ControlGroup" runat="server">
<%if(row["controltype"].ToString()=="table"){ %>
<h1>表格属性</h1>
<div style="margin:6px 0px 6px 0px;">
名称：<input reload="false" class="text" type="text" value="<%= row["YName"].ToString() %>" style="width:100px;" oldvalue="<%= row["YName"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','yname');">
&nbsp;&nbsp;宽度：<input reload="false" class="text" type="text" value="<%= row["ywidth"].ToString() %>" style="width:80px;" oldvalue="<%= row["ywidth"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','ywidth');">
&nbsp;&nbsp;标题对齐：<select style="width:60px;" onchange="setReport(this,'<%=ReportID%>','ytitlealign');">
        <option value="left"<%= row["ytitlealign"].ToString() == "left" ? " selected=\"true\"" : ""%>>左</option>
        <option value="center"<%= row["ytitlealign"].ToString() == "center" ? " selected=\"true\"" : ""%>>中</option>
        <option value="right"<%= row["ytitlealign"].ToString() == "right" ? " selected=\"true\"" : ""%>>右</option>
    </select>
&nbsp;&nbsp;内容对齐：<select style="width:60px;" onchange="setReport(this,'<%=ReportID%>','ybodyalign');">
        <option value="left"<%= row["ybodyalign"].ToString() == "left" ? " selected=\"true\"" : ""%>>左</option>
        <option value="center"<%= row["ybodyalign"].ToString() == "center" ? " selected=\"true\"" : ""%>>中</option>
        <option value="right"<%= row["ybodyalign"].ToString() == "right" ? " selected=\"true\"" : ""%>>右</option>
    </select>
</div>
<%} %>
图表类型：<select style="width:110px;" onchange="setReport(this,'<%=ReportID%>','ControlType');">
      <%= eBase.getReportControlType(row["ControlType"].ToString())%>
    </select>
<label><input id="chkswap" type="checkbox" onclick="setReport(this,'<%=ReportID%>','swap');"<%= eBase.parseBool( row["swap"]) ? " checked=\"true\"" : "" %> />数据反转</label>
<dl class="ePanel" style="margin-top:8px;">
<dt><h1 onclick="showPanel(this);"><a href="javascript:;" class="" onfocus="this.blur();"></a>数据</h1></dt>
<dd style="">

<div>数据SQL：</div>
<textarea name="textarea" onBlur="setReport(this,'<%=ReportID%>','DataSQL');" style="width:80%;"><%= row["DataSQL"].ToString().HtmlEncode() %></textarea> <br />
<h1>一维</h1>
<asp:Repeater id="RepY" runat="server" >
<headertemplate>
<table id="eDataTable_Itemsy" class="eDataTable" border="0" cellpadding="0" cellspacing="1" widt4h="100%" style="margin-top:6px;margin-bottom:6px;min-width:<%=(row["controltype"].ToString()=="table" ? "1220px" : "1020px")%>;">
<thead>
<tr bgcolor="#f2f2f2">
<td height="25" width="30" align="center"><a title="添加列" href="javascript:;" onclick="addReportItem(this,'Y');"><img width="16" height="16" src="images/add.png" border="0"></a></td>
<td width="40">显示</td>
<td width="120">名称</td>
<%if(row["controltype"].ToString()=="table"){ %>
<td width="60">宽度</td>
<td width="70">标题对齐</td>
<td width="70">内容对齐</td>
<%} %>
<td width="80">固定值</td>
<td width="75">数据源</td>
<td width="300">取值</td>
<td width="300">取名称</td>
<td width="100">时间轴</td>
<td width="50">顺序</td>
</tr>
</thead>
<tbody eSize="false" eMove="true">
</headertemplate>
<itemtemplate>
<tr erowid="<%#Eval("ReportItemID")%>">
<td height="26" align="center">
<a title="删除列" href="javascript:;" onclick="delReportItem(this,'<%# Eval("ReportItemID") %>');"><img width="16" height="16" src="images/del.png" border="0"></a></td>
<td><input reload="false" type="checkbox" onclick="setReportItem(this,'<%# Eval("ReportItemID") %>','show');"<%# (eBase.parseBool(Eval("show"))? " checked" : "") %> /></td>
<td><input style="width:100px;" reload="false" class="text" type="text" value="<%# Eval("MC").ToString().HtmlEncode()  %>" oldvalue="<%# Eval("MC").ToString().HtmlEncode() %>" ondblclick="dblClick(this,'名称');" onBlur="setReportItem(this,'<%#Eval("ReportItemID") %>','mc');"></td>
<%if(row["controltype"].ToString()=="table"){ %>
<td><input style="width:40px;" class="text" type="text" value="<%# Eval("width").ToString()%>" oldvalue="<%# Eval("width").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','width');"></td>
<td>
    <select style="width:60px;" onchange="setReportItem(this,'<%# Eval("ReportItemID") %>','titlealign');">
        <option value="left"<%# Eval("titlealign").ToString() == "left" ? " selected=\"true\"" : ""%>>左</option>
        <option value="center"<%# Eval("titlealign").ToString() == "center" ? " selected=\"true\"" : ""%>>中</option>
        <option value="right"<%# Eval("titlealign").ToString() == "right" ? " selected=\"true\"" : ""%>>右</option>
    </select>
</td>
<td>
    <select style="width:60px;" onchange="setReportItem(this,'<%# Eval("ReportItemID") %>','bodyalign');">
        <option value="left"<%# Eval("bodyalign").ToString() == "left" ? " selected=\"true\"" : ""%>>左</option>
        <option value="center"<%# Eval("bodyalign").ToString() == "center" ? " selected=\"true\"" : ""%>>中</option>
        <option value="right"<%# Eval("bodyalign").ToString() == "right" ? " selected=\"true\"" : ""%>>右</option>
    </select>
</td>
<%} %>
<td><input style="width:60px;" class="text" type="text" value="<%# Eval("value").ToString()%>" oldvalue="<%# Eval("value").ToString()%>" ondblclick="dblClick(this,'固定值');" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','value');"></td>
<td><select onChange="setReportItem(this,'<%# Eval("ReportItemID")%>','datasourceid');" style="width:60px;">
     <option value="">无</option>
    <option value="maindb"<%# (Eval("DataSourceID").ToString()=="maindb" ? " selected=\"true\"" : "")%>>主库</option>
    <%# eBase.DataBase.getOptions("SELECT DataSourceID as value,MC as text FROM a_eke_sysDataSources where delTag=0 order by addTime", "text", "value", Eval("DataSourceID").ToString())%>
    </select>
    </td>
<td><input style="width:280px;" class="text" type="text" value="<%# Eval("valuesql").ToString().HtmlEncode()%>" oldvalue="<%# Eval("valuesql").ToString().HtmlEncode()%>" ondblclick="dblClick(this,'取值');" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','valuesql');"></td>
<td><input style="width:280px;" class="text" type="text" value="<%# Eval("bindsql").ToString().HtmlEncode()%>" oldvalue="<%# Eval("bindsql").ToString().HtmlEncode()%>" ondblclick="dblClick(this,'取名称');" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','bindsql');"></td>
<td>
    <select reload="true" style="width:60px;" onchange="setReportItem(this,'<%# Eval("ReportItemID") %>','timetype');">
        <option value="">无</option>
        <option value="year"<%# Eval("timetype").ToString() == "year" ? " selected=\"true\"" : ""%>>年</option>
        <option value="quarter"<%# Eval("timetype").ToString() == "quarter" ? " selected=\"true\"" : ""%>>季度</option>
        <option value="month"<%# Eval("timetype").ToString() == "month" ? " selected=\"true\"" : ""%>>月</option>
        <option value="day"<%# Eval("timetype").ToString() == "day" ? " selected=\"true\"" : ""%>>日</option>
    </select><br />
    <span style="display:<%# Eval("timetype").ToString().Length == 0 ? "none" : "" %>;">
    起始年：<input class="text" type="text" style="width:35px;" value="<%# Eval("minyear").ToString()%>" oldvalue="<%# Eval("minyear").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','minyear');"><br />
    结束年：<input class="text" type="text" style="width:35px;" value="<%# Eval("maxyear").ToString()%>" oldvalue="<%# Eval("maxyear").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','maxyear');"><br />
    默认年：<input class="text" type="text" style="width:35px;" value="<%# Eval("defaultyear").ToString()%>" oldvalue="<%# Eval("defaultyear").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','defaultyear');"><br />
    默认月：<input class="text" type="text" style="width:35px;" value="<%# Eval("defaultmonth").ToString()%>" oldvalue="<%# Eval("defaultmonth").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','defaultmonth');"><br />
    </span>
</td>

<td style="cursor:move;"><%# (Container.ItemIndex + 1)%></td>
</tr>    
</itemtemplate>
<footertemplate></tbody></table></footertemplate>
</asp:Repeater>

<h1>二维</h1>
<asp:Repeater id="RepX" runat="server" >
<headertemplate>
<table id="eDataTable_Itemsx" class="eDataTable" border="0" cellpadding="0" cellspacing="1" wi4dth="100%" style="margin-top:6px;min-width:<%=(row["controltype"].ToString()=="table" ? "970px" : "770px")%>;">
<thead>
<tr bgcolor="#f2f2f2">
<td height="25" width="30" align="center"><a title="添加列" href="javascript:;" onclick="addReportItem(this,'X');"><img width="16" height="16" src="images/add.png" border="0"></a></td>
<td width="40">显示</td>
<td width="120">名称</td>
<%if(row["controltype"].ToString()=="table"){ %>
<td width="60">宽度</td>
<td width="70">标题对齐</td>
<td width="70">内容对齐</td>
<%} %>
<td width="80">固定值</td>
<td width="75">数据源</td>
<td width="450">取值</td>
<td width="50">顺序</td>
</tr>
</thead>
<tbody eSize="false" eMove="true">
</headertemplate>
<itemtemplate>
<tr erowid="<%#Eval("ReportItemID")%>">
<td height="26" align="center">
<a title="删除列" href="javascript:;" onclick="delReportItem(this,'<%# Eval("ReportItemID") %>');"><img width="16" height="16" src="images/del.png" border="0"></a></td>
<td><input reload="false" type="checkbox" onclick="setReportItem(this,'<%# Eval("ReportItemID") %>    ','show');"<%# (eBase.parseBool( Eval("show")) ? " checked" : "") %> /></td>
<td><input style="width:100px;" reload="false" class="text" type="text" value="<%# Eval("MC").ToString().HtmlEncode()  %>" oldvalue="<%# Eval("MC").ToString().HtmlEncode()  %>" ondblclick="dblClick(this,'名称');" onBlur="setReportItem(this,'<%#Eval("ReportItemID") %>','mc');"></td>
<%if(row["controltype"].ToString()=="table"){ %>
<td><input style="width:40px;" class="text" type="text" value="<%# Eval("width").ToString()%>" oldvalue="<%# Eval("width").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','width');"></td>
<td>
    <select style="width:60px;" onchange="setReportItem(this,'<%# Eval("ReportItemID") %>','titlealign');">
        <option value="left"<%# Eval("titlealign").ToString() == "left" ? " selected=\"true\"" : ""%>>左</option>
        <option value="center"<%# Eval("titlealign").ToString() == "center" ? " selected=\"true\"" : ""%>>中</option>
        <option value="right"<%# Eval("titlealign").ToString() == "right" ? " selected=\"true\"" : ""%>>右</option>
    </select>
</td>
<td>
    <select style="width:60px;" onchange="setReportItem(this,'<%# Eval("ReportItemID") %>','bodyalign');">
        <option value="left"<%# Eval("bodyalign").ToString() == "left" ? " selected=\"true\"" : ""%>>左</option>
        <option value="center"<%# Eval("bodyalign").ToString() == "center" ? " selected=\"true\"" : ""%>>中</option>
        <option value="right"<%# Eval("bodyalign").ToString() == "right" ? " selected=\"true\"" : ""%>>右</option>
    </select>
</td>
<%} %>
<td><input style="width:60px;" class="text" type="text" value="<%# Eval("value").ToString()%>" oldvalue="<%# Eval("value").ToString()%>" ondblclick="dblClick(this,'固定值');" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','value');"></td>
<td><select onChange="setReportItem(this,'<%# Eval("ReportItemID")%>','datasourceid');" style="width:60px;">
     <option value="">无</option>
    <option value="maindb"<%# (Eval("DataSourceID").ToString()=="maindb" ? " selected=\"true\"" : "")%>>主库</option>
    <%# eBase.DataBase.getOptions("SELECT DataSourceID as value,MC as text FROM a_eke_sysDataSources where delTag=0 order by addTime", "text", "value", Eval("DataSourceID").ToString())%>
    </select>
    </td>
<td><input style="width:430px;" class="text" type="text" value="<%# Eval("valuesql").ToString().HtmlEncode()%>" oldvalue="<%# Eval("valuesql").ToString().HtmlEncode()%>" ondblclick="dblClick(this,'取值');" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','valuesql');"></td>
<td style="cursor:move;"><%# (Container.ItemIndex + 1)%></td>
</tr>    
</itemtemplate>
<footertemplate></tbody></table></footertemplate>
</asp:Repeater>

</dd>
</dl>

<dl class="ePanel" style="margin-top:8px;">
<dt><h1 onclick="showPanel(this);"><a href="javascript:;" class="cur" onfocus="this.blur();"></a>细节</h1></dt>
<dd style="display:none;">
<h1>标题</h1>
    <label><input type="checkbox" onclick="setReport(this,'<%=ReportID%>','titleShow');"<%= eBase.parseBool(row["titleShow"]) ? " checked=\"true\"" : "" %> />显示</label>
    位置：顶
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["titleTop"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','titleTop');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>
    左
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["titleLeft"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','titleLeft');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>
    右
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["titleRight"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','titleRight');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>
    底
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["titleBottom"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','titleBottom');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>

<h1>工具栏</h1>
<h1>网格</h1>
    位置：顶 <input class="text" type="text" value="<%= row["gridTop"].ToString() %>" style="width:50px;" oldvalue="<%= row["gridTop"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','gridTop');">
    左 <input class="text" type="text" value="<%= row["gridLeft"].ToString() %>" style="width:50px;" oldvalue="<%= row["gridLeft"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','gridLeft');">
    右 <input class="text" type="text" value="<%= row["gridRight"].ToString() %>" style="width:50px;" oldvalue="<%= row["gridRight"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','gridRight');">
    底 <input class="text" type="text" value="<%= row["gridBottom"].ToString() %>" style="width:50px;" oldvalue="<%= row["gridBottom"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','gridBottom');">
<h1>图例</h1>
     <label><input type="checkbox" onclick="setReport(this,'<%=ReportID%>','legendShow');"<%= eBase.parseBool(row["legendShow"]) ? " checked=\"true\"" : "" %> />显示</label>
     方向：
    <select style="width:80px;" onchange="setReport(this,'<%=ReportID%>','legendOrient');">
        <option value="horizontal"<% =row["legendOrient"].ToString()  == "horizontal" ? " selected=\"true\"" : ""%>>横向</option>
        <option value="vertical"<%=row["legendOrient"].ToString()  == "vertical" ? " selected=\"true\"" : ""%>>纵向</option>
    </select>
     位置：顶
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["legendTop"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','legendTop');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>
    左
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["legendLeft"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','legendLeft');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>
    右
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["legendRight"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','legendRight');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>
    底
    <span class="selInput" onclick="show_selText(this);" style="z-index: 1;">
<input class="text" type="text" value="<% =row["legendBottom"].ToString()%>" style="width:50px;" onBlur="setReport(this,'<%=ReportID%>','legendBottom');" />
<ul style="display: none;">
<li value="top" onclick="set_selText(this);">顶部</li>
<li value="center" onclick="set_selText(this);">居中</li>
<li value="right" onclick="set_selText(this);">右侧</li>
<li value="left" onclick="set_selText(this);">左侧</li>
<li value="bottom" onclick="set_selText(this);">底部</li>
</ul>
</span>


<h1>标签</h1>
    <label><input type="checkbox" onclick="setReport(this,'<%=ReportID%>','labelShow');"<%= eBase.parseBool(row["labelShow"]) ? " checked=\"true\"" : "" %> />显示</label>
     对齐：
    <select style="width:80px;" onchange="setReport(this,'<%=ReportID%>','labelPosition');">
        <option value="top"<% =row["labelPosition"].ToString()  == "top" ? " selected=\"true\"" : ""%>>顶部</option>
        <option value="center"<%=row["labelPosition"].ToString()  == "center" ? " selected=\"true\"" : ""%>>居中</option>
        <option value="right"<%=row["labelPosition"].ToString()  == "right" ? " selected=\"true\"" : ""%>>右侧</option>
        <option value="left"<%=row["labelPosition"].ToString()  == "left" ? " selected=\"true\"" : ""%>>左侧</option>
        <option value="bottom"<%=row["labelPosition"].ToString()  == "bottom" ? " selected=\"true\"" : ""%>>底部</option>
        <option value="inside"<%=row["labelPosition"].ToString()  == "inside" ? " selected=\"true\"" : ""%>>内部</option>
        <option value="outside"<%=row["labelPosition"].ToString()  == "outside" ? " selected=\"true\"" : ""%>>外部</option>
    </select>

</dd>
</dl>

<dl class="ePanel" style="margin-top:8px;">
<dt><h1 onclick="showPanel(this);"><a href="javascript:;" class="cur" onfocus="this.blur();"></a>输出</h1></dt>
<dd style="display:none;">
    默认输出：<a href="javascript:;" onclick="reloadReportOut();">重新加载</a> <br />
<textarea name="defout" id="defout" readonly="readonly"  style="width:80%;min-height:120px;"><%=eBase.getReportOut(row["ReportID"].ToString(),null,true).HtmlEncode() %></textarea><br />
   自定义输出： <br />
    <textarea name="cusout" id="cusout" onBlur="setReport(this,'<%=ReportID%>','CustomOut');" style="color:#333;width:80%;min-height:120px;"><%= HttpUtility.HtmlEncode(row["CustomOut"].ToString()) %></textarea> <br />

</dd>
</dl>

<script>
    function viewReport()
    {
        var url="ReportItems.aspx?ReportID=" + ReportID;
        url= url.addquerystring("act","viewreport");
        $.ajax({
            type: 'get',
            url: url,
            dataType: "json",
            success: function(data)
            {
                $("#reportbody").html('');
                $("#reportbody").html(data.chart);
                $("#repordatabody").html(data.html);
            }
        });
    };
</script>
<a class="button" href="javascript:;" onclick="viewReport();" style="margin-top:10px;"><span><i class="search">预览</i></span></a>

<table border="0" cellspacing="0" cellpadding="0">
   <tr valign="top">
    <td width="600"><h2 style="margin-top:15px;">数据</h2>
        <div id="repordatabody" style="box-shadow: 0 0 6px 0 #ccc;border-radius: 5px;padding:10px;margin-top:15px;max-width:600px;min-height:390px;"></div>
    </td>
    <td width="30">&nbsp;</td>
    <td width="600">
        <h2 style="margin-top:15px;">图示</h2>
         <div id="reportbody" style="box-shadow: 0 0 6px 0 #ccc;border-radius: 5px;padding:10px;margin-top:15px;max-width:600px;min-height:390px;"></div>
    </td>
  </tr>
</table>
</asp:PlaceHolder>
</div>
</body>
</html>
