<div class="p">
	<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-class="{'dark ckhand':!isEditInfo && typesign=='define'}">{{typesname}}</span>
			  	<div class="arrowIcon"></div>
			  	<div class="optionList even" ng-show="selme"  style="width:320px;">
		  			<dl class="dlOperTitle bbb">
		  				<dd ng-click="clickType(type)" ng-repeat="type in typeList track by $index" ng-class="{'active':typesign == type.id && define.id==0}">{{type.name}}</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':isEditInfo==3 && showEventWin,'dis':!define || (define.id==0 && !isShowCache) || (isEditInfo==2 && !isShowCache)}" ng-click="addModel(1)"  ng-show="hasEditPower()">编辑</div>
		</div>
		
		<div class="right">
			<!-- <select-t-list meau-info="dimensionList" meau-id="dimensionId" meau-name="dimensionname"  meau-typekey="['whole','usergroup','population','source']" meau-typename="['','用户分群','人口维度','来源维度']" ng-show="showDemistion()"  meau-data="dimenInit" meau-refresh="dimenRmd"></select-t-list> -->
			<select-t-list meau-info="dimensionList" meau-id="dimensionId" meau-id2="dimenEventType" meau-name="dimensionname"  meau-typekey="['whole','usergroup','eventlist',null]" meau-typename="['','用户分群','事件属性','用户属性']" ng-show="typesign=='define' || typesign=='dau' || typesign=='install'"   meau-data="dimenInit" meau-refresh="dimenRmd"></select-t-list>
			<my-datepicker class="dateRange rightDate" init-day="date" max-day="-1" range-days2="rangday"><span>{{datestr}}</span></my-datepicker>
		</div>
		<div class="conditionWin eventBox" ng-show="showEventWin" ng-class="{'edit':isEditInfo==3}">
			<div class="sanicon"></div>
			<div class="funnelWrap clearfix" ng-repeat="event in eventInfo track by $index" ng-class="{'last':$index>0}" ng-show="event.show!=false">
				<div class="eventItem clearfix p" style="z-index:{{event.zidx}}">
	                <div class="label txtLabel">{{event.title}}：</div>
	                <select-list meau-info="eventList" meau-id2="event.eventid" meau-data="event.eventinit" meau-name="eventinitname" class="eventItemsel" keyid="eventName" keyname="eventNameAlias" meau-red="event.nullevent"></select-list>

	                <div class="profileItemWrap p">
	                    <div class="operInfo" style="bottom:35px;" ng-show="event.params && getEventParamsNum(event)>1">
	                        <div class="operBtn" ng-click="changeRel(event)">{{event.relation}}</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="event.event"></profile-item>
	                        <span class="removeSpan"  ng-click="removeEventParams(event,item)">取消</span>
	                    </div>

	                    <span class="ml10 addAttrBtn" ng-click="addEventParams(event)" ng-class="{'dis':getEventParamsNum(event)>=3}" style="display: inline-block;">
	                        <span class="addAttrIcon"></span><span class="ckhand">添加事件属性筛选</span>
	                    </span>
	                </div>
	            </div>
			</div>
	        <div class="conditionBoxBottom">
	        	<div class="right mt20">
	        		<span class="ckhand mr10" ng-class="{'dis':!canSave()}" ng-click="initCondition()">重置条件</span>
	        		<span ng-show="define.id==0">
	        			<div class="btn btnblock mr10 mybtn h30" ng-click="nameWin()" ng-class="{'disable':!canSave()}">保存</div>
	        			<div class="btn3 btnblock mybtn h30" ng-click="lookReport()" ng-class="{'disable':!canSave()}">查看</div>
	        		</span>
	        		<div class="btnMoreGroup" ng-show="define.id>0" ng-mouseenter="bgroup=true" ng-mouseleave="bgroup=false;">
	        			<div class="primaryBtn" ng-click="save()" ng-class="{'dis':!canSave()}">保存</div>
	        			<div class="primarySelBtn" ng-class="{'dis':!canSave()}"></div>
	        			<ul class="btnMenu" ng-show="bgroup && canSave()">
	        				<li ng-click="save()">保存</li>
	        				<li ng-click="nameWin(1)">另存为</li>
	        			</ul>
	        		</div>
	        	</div>
	        </div>
		</div>
	</div>
	<div class="conditionAlpha" ng-show="showEventWin" ng-click="closeAddWin(1)"></div>

	<div class="chartWrap chart300 one clearfix"  style="margin-top: 0px;">
	    <div class="chartWrapItem titleChart">
	    	<div class="chartModule">
	    		<span class="bigTips">{{define.name || typesname}}的留存趋势<help-tip class="help" dname="helpname" hidx="1"></help-tip></span>
				<div class="right rigthM">
					<!-- <select-list meau-info="deviceList" meau-id="deviceId" meau-data="deviceInit" class="whitebg" style="width:100px;"></select-list> -->
					<ul class="btnGroup">
						<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!='-all'}">
	        		<min-chart chart-data="myChartData" chart-type="line" chart-config="retetionConfig" chart-loading="retetionLoading" chart-resize="yes"></min-chart>
	        	</div>
	            <!-- <div class="lengedWrap" ng-show="dimenId && dimenId!='-all' && showDemistion()"> -->
	            <div class="lengedWrap" ng-show="dimenId!='-all'">
	            	<div class="searchWrap searchSpec clearfix" style="float:none;">
				        <input type="text" class="searchIpt selectIpt" ng-model="swtxt" placeholder="关键字搜索">
				    </div>
				    <ul class="hm-scroll">
				    	<li ng-repeat="name in lengedNames | filter:swtxt track by $index" ng-class="lengedClass(name)" ng-click="changeChartData(name)">
				    		<span class="sign" ng-style="lengedBgStyle(name)"></span>{{name}}
				    	</li>
				    </ul>
	            </div>
	        </div>
	    </div>
	</div>

	<div class="chartWrap clearfix">
	    <div class="chartWrapItem nothborder">
	    	<div class="chartModule">
				<span>{{define.name || typesname}}的留存趋势详情</span>
				<export-button export-condition="myChartDataCondition" ng-if="infolist.val && infolist.val.length>0"></export-button>
			</div>
	        <is-loading ng-if="infolistLoading"></is-loading>
	        <div class="tableList" ng-show="!infolistLoading" style="background-color: #fff;">
	            <table ng-show="infolist.val.length>0">
	                <tr>
	                    <th ng-repeat="title in infolist.name track by $index" class="p">
	                    	{{title}}
	                    </th>
	                </tr>
	                <tr ng-repeat="info in infolist.val track by $index" >
	                    <td ng-repeat="col in infolist.columnkey track by $index" ng-class="{'name':$index==0}" ng-click="subDetail(info,$index)" ng-style="getBgColor(info['rate_' + col],$index,1)">
		                    {{info[col]}}
		                    <p ng-if="$index>1">{{info['rate_' + col]}}%</p>
	                    </td>
	                </tr>
	            </table>
	            <no-data ng-if="!infolist.val || infolist.val.length==0"></no-data>
	        </div>
	    </div>
	</div>

	<div class="chartWrap clearfix" ng-show="showDetail">
	    <div class="chartWrapItem nothborder">
	    	<div class="chartModule">
				<span>{{define.name || typesname}}的留存明细</span>
	    		<em class="ml10" style="font-size: 14px;">({{detailInfoTitle}})</em>
	    		<export-button export-condition="detailInfoCondition"></export-button>
			</div>
	        <is-loading ng-if="detailInfoLoading"></is-loading>
	        <div class="tableList" ng-show="!detailInfoLoading"  style="background-color: #fff;">
	            <table>
	                <tr>
	                	<th>日期</th>
	                    <th ng-repeat="title in detailInfo.name track by $index" ng-if="$index>0">
	                    	{{title}}
	                    </th>
	                </tr>
	                <tr ng-repeat="info in detailInfo.val track by $index" >
	                    <td ng-repeat="col in detailInfo.columnkey track by $index"  ng-style="getBgColor(info['rate_' + col],$index,2)">
	                    	{{info[col]}}
	                    	<p ng-if="$index>1">{{info['rate_' + col]}}%</p>
	                    </td>
	                </tr>
	            </table>
	        </div>
	    </div>
	</div>
</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" 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>