<div class="formDetailInfo">
    <div class="formDetailTitle">
        <a class="pretitle" ui-sref="collect.usergroup">分群管理</a>
        <span ng-if="!id"> >新建分群</span>
        <span ng-if="id"> >修改分群</span>
    </div>
   
    <div class="clear"></div>
    <div class="formDetailItem">
        <div class="iptlabel must">名称:</div>
        <input type="text" class="iptform" ng-model="name" ng-blur="exixtName()" placeholder="请输入用户群名称">
        <em class="error" ng-if="tip.name.status">{{tip.name.txt}}</em>
    </div>
    <div class="formDetailItem">
        <div class="iptlabel">备注:</div>
        <input type="text" class="iptform" ng-model="mark" placeholder="请输入用户群备注">
        <em class="error" ng-if="tip.mark.status">{{tip.mark.txt}}</em>
    </div>
    <div class="formDetailItem">
        <div class="iptlabel must">时间:</div>
        <my-datepicker class="dateRange" options="dateOps" init-day="mydate"><span>{{datestr}}</span></my-datepicker>
        <div class="radioWrap" style="margin-left: 30px;">
            <div class="radiolabel" ng-click="userType=0">
                <span class="radio" ng-class="{'active':userType==0}"></span>
                所有用户
            </div>
            <div class="radiolabel" ng-click="userType=1">
                <span class="radio" ng-class="{'active':userType==1}"></span>
                新增用户
            </div> 
        </div>
    </div>
    <div class="profileWrap datawrap">
        <div>用户属性</div>
        <div class="profileItemWrap p">
            <div class="operInfo" ng-show="getProfileNum()>0">
                <div class="operBtn" ng-click="changeRel(1)">{{profileRel}}</div>
            </div>
            <div class="profileItem" ng-repeat="pro in profileInfo track by $index" id="{{pro.id}}" ng-show="pro.show!=false">
                <profile-item info-list="profileList" item-info="pro" item-type="profile"></profile-item>
                <span class="delItemIcon cldItem" ng-click="removeProfile(pro)"></span>
            </div>
        </div>
        <div class="addItemIcon" ng-click="addProfile()" ng-class="{'dis':getProfileNum()>=5}"></div>
    </div>
    <div class="relationWrap">
        <div class="pcenter label">AND</div>
    </div>
    <div class="profileWrap datawrap">
        <div>触发事件<em class="error ml10" ng-if="tip.params.status">{{tip.params.txt}}</em></div>
        <div class="profileItemWrap p">
            <div class="operInfo" ng-show="getEventNum()>0">
                <div class="operBtn" ng-click="changeRel(2)">{{eventRel}}</div>
            </div>
            <div class="eventItem ugItem clearfix p" ng-repeat="event in eventInfo track by $index" ng-show="event.show!=false"  ng-style="event.style" style="margin-bottom: 10px;">
                <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" style="margin-left: 220px;padding-top: 10px;">
                    <div class="operInfo" style="bottom:15px;" ng-show="event.params && getEventParamsNum(event)>0">
                        <div class="operBtn" ng-click="changeRel(3,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}">
                        <span class="addAttrIcon"></span><span class="ckhand">添加事件属性筛选</span>
                    </span>
                </div>
                <span class="delItemIcon right" ng-click="removeEvent(event)"></span>
            </div>

        </div>
        <div class="addItemIcon" ng-click="addEvent()" ng-class="{'dis':getEventNum()>=5}"></div>
    </div>
    <div class="formsaveBtnWrap clearfix">
        <div class="btn5" ng-click="exixtName(1)">
            <span ng-if="!id">立即创建</span>
            <span ng-if="id">保存</span>
        </div>
        <div class="btn6" ng-click="cancel()">取消</div>
    </div>
</div>