<%@ Page Language="C#" MasterPageFile="Main.Master" AutoEventWireup="true" CodeFile="ReportItems.aspx.cs" Inherits="eFrameWork.Manage.ReportItems" %>
<%@ Register Src="GroupMenu.ascx" TagPrefix="uc1" TagName="GroupMenu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<uc1:GroupMenu runat="server" ID="GroupMenu" />
<div class="nav">您当前位置：<a href="Default.aspx">首页</a> -> 报表</div>
 <script>var ReportID = "<%=ReportID%>";</script>
  <script src="javascript/columns.js?ver=<%=Common.Version %>"></script>
<%if (eRegisterInfo.Base == 0 && eRegisterInfo.Loaded)
  { %>
    <div style="margin:6px;line-height:25px;font-size:13px;">
<div class="tips" style="margin-bottom:6px;"><b>未授权提示</b><br><a href="http://frame.eketeam.com/getSerialNumber.html" style="color:#ff0000;" target="_blank">申请临时授权</a>,享更多功能。</div>
   </div>
 <%} %>
<script>
function setMC(obj) {
    $(obj).parent().parent().find("h1 span").html(obj.value);
};
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>
<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>
<div id="divloading" class="divloading" style="display:none;">&nbsp;</div>
<div style="margin:6px;line-height:23px; font-weight:bold;font-size:15px; "><%=row["mc"].ToString()%></div>

<div style="margin:6px;">
<dl class="ePanel">
<dt><h1 onclick="showPanel(this);"><a href="javascript:;" class="cur" onfocus="this.blur();"></a><span>基础</span></h1></dt>
<dd style="display:none;">
<div class="tips" style="margin-bottom:8px;">
<b>变量说明</b><br>
{year}&nbsp;引用当前数据的年,&nbsp;&nbsp;
{month}&nbsp;引用当前数据的月,&nbsp;&nbsp;
{data:value}&nbsp;引用Y轴的值,&nbsp;&nbsp;
{data:sum}&nbsp;汇总列。
</div>
报表标题：<input reload="false" class="text" type="text" value="<%= row["title"].ToString() %>" style="width:450px;" oldvalue="<%= row["title"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','title');"><br />
报表类型：<select style="width:110px;" onchange="setReport(this,'<%=ReportID%>','ControlType');">
    <%= eBase.getReportControlType(row["ControlType"].ToString())%>
    </select><br />
报表简介：<br /><textarea reload="false" type="text" style="width:450px;" oldvalue="<%= row["Introduce"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','introduce');"><%= row["Introduce"].ToString() %></textarea><br />
报表宽度：<input reload="false" class="text" type="text" style="width:70px;" value="<%= row["width"].ToString() %>" oldvalue="<%= row["width"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','width');">
&nbsp;&nbsp;报表高度：<input reload="false" class="text" type="text" style="width:70px;" value="<%= row["height"].ToString() %>" oldvalue="<%= row["height"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','height');">
&nbsp;&nbsp;报表高度(M)：<input reload="false" class="text" type="text" style="width:70px;" value="<%= row["mheight"].ToString() %>" oldvalue="<%= row["mheight"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','mheight');"><br />
<label><input type="checkbox" onclick="setReport(this,'<%=ReportID%>','swap');"<%= eBase.parseBool( row["swap"]) ? " checked=\"true\"" : "" %> />数据反转</label><span style="vertical-align:middle;color:#777;">将Y轴和X轴对换</span><br />
定时刷新：<input reload="false" class="text" type="text" style="width:60px;" value="<%= row["Interval"].ToString() %>" oldvalue="<%= row["Interval"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','interval');"> <span style="vertical-align:middle;color:#777;">单位：秒</span><br />
</dd>
 </dl>  
</div>
<div id="content" style="position:relative;margin:6px;border:0px solid #ff0000; -webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;">
<asp:PlaceHolder ID="ControlGroup" runat="server">
<dl class="ePanel">
<dt><h1 onclick="showPanel(this);"><a href="javascript:;" class="" onfocus="this.blur();"></a><span>数据</span></h1></dt>
<dd style="">
<div>数据SQL：</div>
<textarea name="textarea" onBlur="setReport(this,'<%=ReportID%>','DataSQL');" style="width:80%;"><%= row["DataSQL"].ToString().HtmlEncode() %></textarea>
<h1>一维</h1>
<b>表格属性</b>&nbsp;&nbsp;名称：<input reload="false" class="text" type="text" value="<%= row["YName"].ToString() %>" style="width:150px;" oldvalue="<%= row["YName"].ToString() %>" onBlur="setReport(this,'<%=ReportID%>','yname');">
&nbsp;&nbsp;宽度：<input reload="false" class="text" type="text" value="<%= row["ywidth"].ToString() %>" style="width:150px;" 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>


<asp:Repeater id="RepY" runat="server" >
<headertemplate>
<table id="eDataTable_Itemsy" class="eDataTable" border="0" cellpadding="0" cellspacing="1" wi4dth="100%" style="margin-top:6px;">
<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="160">名称</td>
<td width="120">宽度</td>
<td width="90">标题对齐</td>
<td width="90">内容对齐</td>
<td width="150">固定值</td>
<td width="75">数据源</td>
<td width="300">取值</td>
<td width="300">取名称</td>
<td width="180">时间轴</td>
<td width="60">顺序</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 reload="false" class="text" type="text" value="<%# Eval("MC").ToString().HtmlEncode()  %>" oldvalue="<%# Eval("MC").ToString().HtmlEncode()  %>" onBlur="setReportItem(this,'<%#Eval("ReportItemID") %>','mc');"></td>
<td><input 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 class="text" type="text" value="<%# Eval("value").ToString()%>" oldvalue="<%# Eval("value").ToString()%>" 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 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 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 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:40px;" value="<%# Eval("minyear").ToString()%>" oldvalue="<%# Eval("minyear").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','minyear');"><br />
    结束年：<input class="text" type="text" style="width:40px;" value="<%# Eval("maxyear").ToString()%>" oldvalue="<%# Eval("maxyear").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','maxyear');"><br />
    默认年：<input class="text" type="text" style="width:40px;" value="<%# Eval("defaultyear").ToString()%>" oldvalue="<%# Eval("defaultyear").ToString()%>" onBlur="setReportItem(this,'<%# Eval("ReportItemID") %>','defaultyear');"><br />
    默认月：<input class="text" type="text" style="width:40px;" 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;">
<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="160" style="min-width:100px; width:auto;">名称</td>
<td width="120">宽度</td>
<td width="90">标题对齐</td>
<td width="90">内容对齐</td>
<td width="80">固定值</td>
<td width="75">数据源</td>
<td width="450">取值</td>
<td width="60">顺序</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 reload="false" class="text" type="text" value="<%# Eval("MC").ToString().HtmlEncode()  %>" oldvalue="<%# Eval("MC").ToString().HtmlEncode()  %>" onBlur="setReportItem(this,'<%#Eval("ReportItemID") %>','mc');"></td>
<td><input 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 class="text" type="text" value="<%# Eval("value").ToString()%>" oldvalue="<%# Eval("value").ToString()%>" 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 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 id="defout" name="defout" readonly="readonly"  style="width:80%;min-height:120px;"><%=eBase.getReportOut(row["ReportID"].ToString(),null,true).HtmlEncode() %></textarea><br />
    自定义输出： <br />
    <textarea id="cusout" name="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=document.location.href.addquerystring("act","viewreport");
        $.ajax({
            type: 'get',
            url: url,
            dataType: "json",
            success: function(data)
            {
                if($("#reportbody").find(".eReportItem").length>0)
                {
                   

                    //var id=$("#reportbody").find(".eReportItem").attr('id').replace('_box','');
                    //$("#reportbody").find(".eReportItem").removeAttr('_echarts_instance_').empty();
                    //eval('if('+id+' != null && '+id+'.dispose){'+id+'.dispose();'+id+'=null;'+id+'_option=null;}');
                    //eval('if('+id+' != null && '+id+'.clear){'+id+'.clear();'+id+'.dispose();'+id+'=null;}');
                 
                    //eval(''+id+'.dispose();');
                    
                    //alert($("#reportbody").find(".eReportItem").attr('id').replace('_box',''));
                }

                $("#reportbody").html('');
                $("#reportbody").html(data.chart);
                $("#repordatabody").html(data.html);
            }
        });
    };
</script>
<a class="button" href="javascript:;" onclick="viewReport();"><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>
</asp:Content>
