<div class="p" ng-show="defineList.length>0 || addFirst">
	<div class="conditionBox clearfix p pb20">
		<div class="left">
			<div class="selList" ng-class="{'active':selme,'noright':hasEditPower()}" ng-click="selme=!selme;" ng-mouseleave="selme=false;">
			  	<span ng-if="(currentDefine.id || currentDefine.id==0 || !showEventWin) && !showTempLook">{{define.name}}</span>
			  	<span class="ckhand dark" ng-if="(!currentDefine.id && currentDefine.id!=0 && showEventWin) || showTempLook">{{addTitName}}</span>
			  	<div class="arrowIcon"></div>
			  	<div class="optionList even" ng-show="selme"  style="width:320px;z-index:7;">
		  			<dl class="dlOperTitle bbb" ng-if="hasEditPower()">
		  				<dd ng-click="addComplexEvent(0)" ng-class="{'active':isShowCache}">{{addTitName}}</dd>
		  			</dl>
			  		<div ng-show="defineList.length>5" class="searchWrap ml10 searchSpec clearfix" style="float:none;width:300px;" stop-event>
				        <input type="text" class="searchIpt selectIpt" style="width:300px;" ng-model="seatxt" placeholder="关键字搜索">
				    </div>
				    <ul>
			            <li ng-repeat="m in defineList | filter:{'name':seatxt} track by $index" ng-click="clickDefine(m)" ng-class="{'active':m.id == define.id && !isShowCache}" title="{{m.name}}" class="p">
			              {{m.name}}<span class="delIcon s1" ng-click="deleteDefine(m)" stop-event  ng-if="hasEditPower()"></span>
			            </li>
			        </ul>
			  	</div>
			</div>
			<div class="btn8 dark btnblock btnNo" ng-class="{'active':currentDefine.id && showEventWin,'dis':(!define.id && !isShowCache) || (!isEditInfo && !isShowCache)}" ng-click="addComplexEvent(1,(!currentDefine.id && currentDefine.id!=0 && showEventWin) || showTempLook)"  ng-show="hasEditPower()">编辑</div>
		</div>
		
		<div class="right">
			<!-- range-days="7" -->
			<my-datepicker class="dateRange rightDate" init-day="date"  operation-sel="define.id>0 || isShowCache"><span>{{datestr}}</span></my-datepicker>
		</div>
		<div class="conditionWin eventBox" ng-show="showEventWin" ng-class="{'edit':currentDefine.id}" id="evtBox" style="z-index:6;">
			<div class="sanicon"></div>
			<span style="position: absolute;left:40px;top:25px;">显示</span> 
			<div class="p mb20" ng-repeat="ex in currentEvent track by $index" ng-show="ex.show!=false">
			    <span class="ml27"></span>
			    <span class="changeIcon" ng-click="changeForm(ex)"></span>
			    <span style="position:relative;">
					<input type="text" class="iptform" id="expression_{{$index}}" ng-model="ex.expressionName" style="width:500px;" ng-click="changeExpression(ex,$index)" stop-event ng-show="ex.expression" ng-style="{'border-color': ex.error || ex.extip?'#e74646':''}" ng-mousedown="getMouseXY($event)" ng-keydown="watchKey(ex,$event)">
					<span class="error" style="position: absolute;left: 0px;top:27px;">{{ex.extip}}</span>
				</span>
				<select-t-list meau-info="eventList" meau-id2="ex.eventId" meau-data="ex.eventInit" meau-name="eventinitname"  meau-typekey="['nature','virtual']" meau-typename="['自然事件','虚拟事件']" keyid="id" keyname="name" meau-refresh="ex.evtrefresh" ng-show="!ex.expression" meau-red="ex.eventerror"></select-t-list>
				<select-list meau-info="ex.epropertyList" meau-id2="ex.propertyId" meau-data="ex.propertyinit" meau-name="ex.propertyinitname"  keyid="id" keyname="name" meau-refresh="ex.prorefresh" ng-show="!ex.expression && ex.propertyShow" meau-red="ex.proerror"></select-list>
				<select-list meau-info="ex.targetList" meau-id2="ex.targetId" meau-data="ex.targetinit" meau-name="ex.targetinitname"  keyid="id" keyname="name" meau-refresh="ex.tarrefresh" ng-show="!ex.expression && ex.targetShow" meau-red="ex.tarerror"></select-list>
				<span class="ml20 mr5">命名为</span>
				<span style="position:relative;">
					<input type="text" class="iptform" ng-model="ex.name" placeholder="请输入指标的名称" ng-style="{'border-color': ex.nameerror?'#e74646':''}">
					<span class="error" style="position: absolute;left: 0px;top:27px;">{{ex.tip.name.txt}}</span>
				</span>
				<span class="ml20 mr5" ng-show="ex.expression">以</span>
				<select-list ng-show="ex.expression" meau-info="formatList" meau-id2="ex.format_id" meau-data="ex.formatInit" meau-name="formatinitname" keyid="format" keyname="name" style="width:80px;" meau-refresh="evtrefresh"></select-list>
				<span class="ml5" ng-show="ex.expression">显示</span>
				<span class="deleteIcon" ng-show="getEventNum()>1" ng-click="removeEvent(ex)"></span>
			</div>
			<div id="optionList" class="optionList" style="width:200px;min-width:200px;max-width:200px;" ng-show="showProList && epropertyList.length>0">
				<ul>
					<div ng-show="epropertyList.length>5" class="searchWrap" style="width: 100%;margin-top:5px;margin-bottom: 5px;float:left;box-sizing: border-box;padding:0px 5px;" stop-event>
			          <input type="text" class="searchIpt selectIpt" ng-model="filterSearch" placeholder="关键字搜索" style="width:100%;border:1px solid #c9c9c9;">
		        	</div>
		        	<div ng-repeat="type in typeKey track by $index" ng-class="{'border':$index>0 && haslist(type)}" ng-show="haslist(type) && typeKey.length>0">
			        	<div class="liTypeTitle" ng-if="typeName[$index]!='' && ((virtual==type || nature==type) || !filterSearch)">{{typeName[$index]}}</div>
						<li ng-repeat="event in epropertyList | filter:{'name':filterSearch}" ng-click="getProperty(event)" ng-if="event.type == type || event.dimensionType == type" ng-class="{'active':$index==eventIndex}">{{event.name}}</li>
					</div>
					<li ng-repeat="event in epropertyList | filter:{'name':filterSearch}" ng-click="getProperty(event)" ng-style="{'border-bottom': event.border?'1px solid #dcdcdc':'','height':'35px'}" ng-show="event.type!='nature' && event.type!='virtual'" ng-class="{'active':$index==eventIndex}">{{event.name}}</li>
				</ul>
			</div>
			<div class="addAttrBtn" style="border-bottom: 1px solid #dcdcdc;padding-left: 40px;padding-bottom: 20px;" ng-class="{'dis':getEventNum()>=10}">
			    <span ng-click="addEvents()"><span class="addAttrIcon"></span><span class="ckhand">新增</span></span>
			</div>
			<div class="p mb20 mt20" style="border-bottom: 1px solid #dcdcdc;padding-left: 40px;padding-bottom: 20px;">
			    <span class="mr10">按</span>
			    <input type="text" class="iptform" value="总体" disabled="true">
			    <span class="ml10">查看</span>
			    <span class="newaddIcon" ng-class="{'adddis':getGroupByNum()>=3}" ng-click="addGroupby()"></span>
				<div class="p mb20 mt20" ng-repeat="gby in groupbys track by $index" ng-show="gby.show!=false">
					<span class="mr10">按</span>
					<select-t-list meau-info="dimensionList" meau-id2="gby.dimensionId" meau-name="dimensionname"  meau-typekey="['event','profile']" meau-typename="['事件属性','用户属性']" meau-data="gby.dimenInit" meau-type="gby.type" keyid="param" keyname="alias" meau-red="gby.groerror" ></select-t-list>
					<span class="ml10">查看</span>
					<span class="deleteIcon" ng-click="removeGroupby(gby)"></span>
				</div>
			</div>
			<div style="padding-bottom: 20px;" ng-class="{'conditionEventItem':event.params && getEventParamsNum(event)>5 && showFlow}">
				<div class="profileItemWrap p" ng-mouseleave="changeFlow()">
	                <div class="operInfo" style="bottom:35px;" ng-show="event.params && getEventParamsNum(event)>1">
	                    <div class="operBtn" ng-click="changeRel()">{{eventRel}}</div>
	                </div>
	                <div class="profileItem" ng-repeat="item in event.params track by $index" ng-show="item.show!=false">
	                    <profile-item info-list="event.paramsList" item-info="item" item-type="event" item-event="eventId" common="true" ng-click="changeFlow(1)"></profile-item>
	                    <span class="deleteIcon" ng-click="removeEventParams(event,item)"></span>
	                </div>
		            <div class="addAttrBtn" ng-class="{'dis':getEventParamsNum(event)>=maxparams}">
		                <span ng-click="addEventParams(event)"><span class="addAttrIcon"></span><span class="ckhand">添加事件属性筛选</span></span>
		            </div>
	            </div>
		        
			</div>
            <div class="conditionBoxBottom">
                <div class="left mt20" ng-show="!isShowCache && currentDefine.id">
					<span style="margin-left: -20px;margin-right:10px;">事件分析名称</span>  
					<input type="text" class="iptform" ng-model="ename" placeholder="请输入事件分析名称" ng-style="{'border-color': enameerror?'#e74646':''}">              	
                </div>
            	<div class="right mt50">
            		<span class="ckhand mr10" ng-click="initCondition()">重置条件</span>
            		<div class="btnMoreGroup">
            			<div class="btn btnblock ml10 mybtn h30" ng-click="closeAddWin()">关闭</div>
            		</div>
            		<span class="btnMoreGroup" ng-show="!currentDefine.id">
            			<div class="btn btnblock mr10 mybtn h30" ng-click="nameWin()">保存</div>
            			<div class="btn3 btnblock mybtn h30" ng-click="lookReport()">查看</div>
            		</span>
            		<div class="btnMoreGroup" ng-show="currentDefine.id" ng-mouseenter="bgroup=true" ng-mouseleave="bgroup=false;">
            			<div class="primaryBtn" ng-click="save()">保存</div>
            			<div class="primarySelBtn"></div>
            			<ul class="btnMenu" ng-show="bgroup && event.id">
            				<li ng-click="save()">保存</li>
            				<li ng-click="save(2)">另存为</li>
            			</ul>
            		</div>
            	</div>
            </div>
		</div>
	</div>
	<div class="conditionAlpha" ng-show="showEventWin" ng-click="closeAddWin()"></div>

	<div class="chartWrap bar one clearfix" style="margin-top: 0px;"  ng-show="defineList.length>0 || showTempLook">
	    <div class="chartWrapItem titleChart">
	    	<div class="chartModule">
				<span>{{getTrendTitle()}}</span>
				<div class="right p mr10" style="z-index: 1;">
				    <select-list style="margin-top: 8px;height: 31px;line-height: 31px;margin-right: 0px;width:80px;background-color:#ffffff;color: #999;" meau-info="chartList" meau-id="chartTypeId" meau-spe="group_List.length == 0" meau-data="chartTypeInit" operation-sel="!eventChartLoading"></select-list>
				</div>
				<div class="right p mr10" style="z-index: 1;" ng-mouseleave="showDrop=false" >
					<div class="btn" style="margin-top: 8px;height: 31px;line-height: 31px;margin-right: 0px;color: #999;background-color: #ffffff;" ng-click="showDrop=true;" ng-class="{'active':showDrop}">
					<span class="mr10">显示设置</span>
					<div class="arrowIcon" style="margin-right:0px;"></div>
					</div>
					<div class="rateWrap" ng-show="showDrop">
						<ul class="titWrap">
							<li ng-class="{'active':rateFlag==1}" ng-click="rateFlag=1">显示指标</li>
							<li ng-class="{'active':rateFlag==2}" ng-click="rateFlag=2">显示分组</li>
						</ul>
						<ul class="rateInfo" ng-show="rateFlag==1">
							<li ng-repeat="rate in rateList track  by $index" ng-click="changeRate(rate)" ng-class="{'dis':!canAdd(1,rate)}">
								<span class="checkbox" ng-class="{'active':rateListed.indexOf(rate)>-1}"></span>{{substrName(rate)}}
							</li>
						</ul>
						<ul class="rateInfo" ng-show="rateFlag==2">
						    <li ng-show="group_List.length>1 && chartType=='pie'">
						      <span  ng-click="checkAll()">
						        <span class="checkbox" ng-class="{'active':ischeckall}" style="margin-right: 6px;"></span>全选
						      </span>
						    </li>
							<li ng-if="group_List.length==0">当前没有分组</li>
							<li ng-repeat="group in group_List track  by $index" ng-click="changeGroup(group)" ng-class="{'dis':!canAdd(2,group)}" title="{{group}}">
								<span class="checkbox" ng-class="{'active':grouped_List.indexOf(group)>-1}"></span>{{group}}
							</li>
						</ul>
					</div>
				</div>
				<div class="right rigthM">
					<ul class="btnGroup">
						<!-- <li ng-class="{'active':timeFlag=='hour','dis':disTimeFlag.indexOf('hour')>-1}" ng-click="changeTimeFlag('hour')">时</li> -->
						<li ng-class="{'active':timeFlag=='day','dis':disTimeFlag.indexOf('day')>-1}" ng-click="changeTimeFlag('day')">天</li>
						<li ng-class="{'active':timeFlag=='week','dis':disTimeFlag.indexOf('week')>-1}" ng-click="changeTimeFlag('week')">周</li>
						<li ng-class="{'active':timeFlag=='month','dis':disTimeFlag.indexOf('month')>-1}" ng-click="changeTimeFlag('month')">月</li>
					</ul>
				</div>
			</div>
	        <div class="chartItem p">
	        	<div ng-class="{'lengedChart':dimenId && dimenId!='-all'}">
	        		<min-chart chart-data="myChartData" chart-tp="chartType" chart-config="eventChartConfig" chart-loading="eventChartLoading" chart-resize="yes"></min-chart>
	        		<div style="color:#999;font-size: 13px;" ng-if="chartType=='pie'">
	        			<span ng-show="!eventChartLoading" ng-repeat="key in myChartData.key" ng-style="{'padding-left':(myChartData.key.length>1 && $index==0?panelw/4:panelw/2-($index==1?getwidth(myChartData.key[0])/2:0))-getwidth(key)/2+'px'}">{{substrName(key)}}</span>
	        		</div>
	        	</div>
	        </div>
	    </div>
	</div>

	<div class="chartWrap clearfix" ng-show="defineList.length>0 || showTempLook">
	    <div class="chartWrapItem grayhm titleChart nothborder">
	    	<div class="chartModule">
				<span>{{getTrendTitle()}}详情</span>
				<export-button export-condition="myChartDataCondition" ng-if="infoList.length>0 && !istranfer"></export-button>
				<div class="right mr10" style="padding-top: 10px;" ng-show="infoList.length>0">
					<ul class="btnGroup">
						<li ng-class="{'active':istranfer}" ng-click="changeFlag(1)">转换</li>
						<li ng-class="{'active':ispercent}" ng-click="changeFlag(2)" ng-if="group_List.length>0 || istranfer">
							<span ng-if="istranfer">环比</span>
							<span ng-if="!istranfer">占比</span>
						</li>
					</ul>
				</div>
				<div class="eptWrap right mt10 big" ng-show="!istranfer && !isShowCache && define.id && condList.length>2" ng-click="showOrderList()">
					<span class="orderIcon"></span>
				</div>
			    <div class="right condiTitleWrap" style="padding-top: 9px;" ng-show="infoList.length>0 && !istranfer">
			    	<span class="hand" ng-click="isshowTotal = !isshowTotal">
			    		<span class="checkbox mr5" ng-class="{'active':isshowTotal}"></span>
			    		<span class="label">显示合计</span>
			    	</span>
			    </div>
			</div>
	        <is-loading ng-if="chartListLoading"></is-loading>
	        <div class="tableList yeswrap hm-scroll" ng-show="!chartListLoading" style="max-height: inherit;">
	            <table title-name="listname"  fix-firtd="1" fix-list="flipPage" ng-show="infoList.length>0">
	            	<thead>
		                <tr>
		                	<th>
		                		{{listname[0]}}
		                    	<span class="sortWrap" ng-click="reverse1=!reverse1;order(listkey[0], reverse1,0)">
		                    		<span class="ascIcon" ng-class="{'active':sortCol1==listkey[0] && !reverse1}"></span>
		                    		<span class="descIcon" ng-class="{'active':sortCol1==listkey[0] && reverse1}"></span>
		                    	</span>
		                	</th>
		                    <th ng-repeat="title in listname track by $index" ng-show="$index>0">
		                    	{{title}}
		                    	<span class="sortWrap" ng-click="reverse=!reverse;order(listkey[$index], reverse,$index)">
		                    		<span class="ascIcon" ng-class="{'active':(sortCol==listkey[$index] || sortCol1==listkey[$index]) && !reverse}"></span>
		                    		<span class="descIcon" ng-class="{'active':(sortCol==listkey[$index] || sortCol1==listkey[$index]) && reverse}"></span>
		                    	</span>
		                    </th>
		                </tr>
	                </thead>
	                <tr ng-repeat="info in totalList track by $index" ng-init="len = totalList.length" ng-if="!istranfer && isshowTotal">
	                	<td ng-if="$index==0" rowspan="{{len}}" style="background-color: #fff;">{{info[listkey[0]]}}</td>
	                    <td ng-repeat="col in listkey track by $index" ng-if="$index>0" style="padding-right: 10px;" ng-class="{'txright':($index>grouplen && !istranfer) || ($index > grouplen && istranfer)}">
	                    	{{info[col] | formatRate:col:trendList.format:info._myzb}}
	                    	<span ng-if="ispercent && info[percentPre+col]"  ng-class="{false:'red',true:'green'}[info[percentPre+col]>0]"><br/>{{info[percentPre+col] | numFixed}}%</span>
	                    </td>
	                </tr>
	                <tr ng-repeat="info in currentDetailList track by $index">
	                	<td ng-if="info.isrs && !istranfer" rowspan="{{info.rsnum}}" style="background-color: #fff;">{{info[listkey[0]]}}</td>

	                	<td ng-if="info.isrs && istranfer" ng-repeat="g in trendList.groupfield track by $index" rowspan="{{info.rsnum}}" style="background-color: #fff;">{{info[listkey[$index]]}}</td>

	                    <td ng-repeat="col in listkey track by $index" ng-if="($index>0 && !istranfer) || (istranfer && $index>=grouplen)" style="padding-right: 10px;" ng-class="{'txright':($index>grouplen && !istranfer) || ($index > grouplen && istranfer)}">
	                    	{{info[col] | formatRate:col:trendList.format:info._myzb}}
	                    	<span ng-if="ispercent && info[percentPre+col]" ng-class="{false:'red',true:'green'}[info[percentPre+col]>0]"><br/>{{info[percentPre+col] | numFixed}}%</span>
	                    </td>
	                </tr>
	            </table>
				<no-data ng-if="infoList.length==0"></no-data>
	        </div>
	        <flip-info list-info="pageAllList"  list-refresh="listf5"></flip-info> 
	    </div>
	</div>
</div>

<div ng-show="defineList.length==0 && !addFirst">
	<div class="nodata">
		<h5>还未创建事件统计细分</h5>
	</div>
	<div class="btn3" style="float:none;width:180px;margin:0 auto;text-align: center;" ng-click="addFirstEvent()" ng-if="hasEditPower()">创建第一个事件统计细分</div>
	<dl class="tipsList statustip">
        <dt>1. 什么是“事件”？</dt>
        <dd>
        	事件是指用户在使用产品过程中发生的行为，如注册、登录、充值、付款等操作数据。
        </dd>
        <dt>2. 怎么使用事件分析？</dt>
        <dd>TrackingIO通过收集用户事件及对应属性，提供基于事件属性的事件及组合事件运算功能，用不同形式报表展现关注的单个事件或者多个事件经过数学运算后形成的新指标在不同维度的数据趋势。
        <br/>
        <br/>
        事件分析可以帮您回答不同地域的游戏用户充值虚拟金币的金额是多少，不同渠道的游戏用户消费道具的频次是怎样等问题。您可以根据您的产品特性及需求，进行合理配置。</dd>
    </dl>
</div>

<div class="openTipWin" ng-show="wantDelete">
    <div class="closeGray" ng-click="closeWin()"></div>
    <div class="tipCont">
       <span ng-show="custommenus.length>0">
	       报表“{{delDefine.name}}”正在被
	       <span ng-repeat="custommenu in custommenus" ng-click="gotoCustonMenu(custommenu.id)">
	       <span class="customname">{{custommenu.name}}</span>
	       <span ng-show="!$last">、</span></span>
	       {{custommenus.length}}个看单使用<br/>
	       删除后对应看单将不会再显示该报表，是否确认删除？
       </span>
       <span ng-show="!custommenus">
	       您正在删除报表“{{delDefine.name}}”，是否确认删除？
       </span>
    </div>
    <div class="openBtnGroup clearfix">
        <div class="btn8 mr20" ng-click="closeWin()">取消</div>
        <div class="btn8" ng-click="doDelete()">确定</div>
    </div>
</div>
<div class="openTipWin orderWrap" ng-show="showOrderWin">
    <div class="closeGray" ng-click="closeOrder()"></div>
    <div class="tipCont">
    	<p style="font-size: 14px;">指标顺序调整</p>
    	<p class="lglabel mb20">拖动指标名称调整顺序，表格内指标将按照调整后顺序显示。</p>
        <ul class="orderUL">
        	<li ng-repeat="cond in condList track by cond.id">
        		<span>第{{cond.indexname}}列</span>
        		<div class="rate" drag-order drag-id="cond.id" drag-info="{{cond}}">{{cond.name}}</div>
        	</li>
        </ul>
    </div>
    <div class="openBtnGroup clearfix" style="width: 160px;">
        <div class="btn8 mr20" ng-click="closeOrder()">取消</div>
        <div class="btn9" ng-click="okOrderWin()">确定</div>
    </div>
</div>
<div class="openTipWin" ng-show="wantSave"> 
    <div class="closeGray" ng-click="closeWin(2)"></div>
    <div class="tipCont" style="text-align: left;">
        <p class="mb10">请输入事件统计细分名称：</p>
        <div>
        	<input type="text" class="iptform" ng-model="ename" style="width:300px;" placeholder="文字限定在20个汉字以内">
        	<div class="btn5 ml10 btnblock conwidth" ng-click="save(1)">保存</div>
        </div>
    </div>
</div>
<span id="ruler" style="display: none;"></span>