//-Created by zhuyan6 on 16/9/9.
- var obj = {
-  number:conf.number || '',
-  midNumber:conf.midNumber || 0,
-  intersectionNumber:conf.intersectionNumber || '',
-  percentage:conf.percentage || 0,
-  audienceNumber:conf.audienceNumber || '',
-  direction:conf.direction||{},
-  other:conf.other||{},
-  def:conf.def||false
- }

mixin changeList()
   - for( var  i  in obj.direction) {
   - var item = obj.direction[i];
      //- console.log('item=====:',item,item.con(),item.isSelect())
      - if(item.isSelect()){
       .ui-cover-bar.right
         .right
         .left #{item.name + item.con().substr(0,8)}
      - }
   - }

- var audienceShow = (obj.other.audience&&obj.other.audience.isSelect())?'block':'none'
- var audienceCon = (obj.other.audience)?obj.other.audience.con():''

- var accountShow = (obj.other.audience&&obj.other.designatedAccount.isSelect())?'block':'none'

- var lifeShow = (obj.other.audience&&obj.other.lifeEvents.isSelect())?'block':'none'

- var talkShow = (obj.other.audience&&obj.other.topicInteraction.isSelect())?'block':'none'

- var nativeShow = (obj.other.audience&&obj.other.nativePropagation.isSelect())?'block':'none'
- var nativeCon = (obj.other.nativePropagation)?obj.other.nativePropagation.con():''

- var feedShow = (obj.other.audience&&obj.other.feedInteraction.isSelect())?'block':'none'

- var defaultStyle='',intersectionStyle='';

- function isDefault(){
- var dir = obj.direction;
- var arr = ['age','genders','geoLocations','interests','userDevice','userNetwork'];
- var newArr = arr.filter(function(i){
- if(!dir[i]){
-  return false;
-}
- var name = dir[i].con().substr(0,2);
- if(name ==='不限' || name==='全部' ){
-  return true;
- }
-})
-return newArr.length===arr.length;
- }
-  console.log('是否默认>>>>',obj.def,accountShow,lifeShow,talkShow)
- if(obj.def&&accountShow==='none'&&lifeShow ==='none'&&talkShow==='none'){
-   defaultStyle='min-height:120px';
-   intersectionStyle='margin-top:40px;float:none;text-align:center';
-   obj.intersectionNumber = '全量用户:'+obj.intersectionNumber;
-}else if(!obj.def&&accountShow==='none'&&lifeShow ==='none'&&talkShow==='none'){
-   defaultStyle='min-height:120px';
-   intersectionStyle='margin-top:40px;float:none;text-align:center';
-}else {
-  var count=1;
-  if(accountShow!=='none'){
-     count++;
-  }
-  if(lifeShow!=='none'){
-     count++;
-  }
-  if(talkShow!=='none'){
-     count++;
-  }
-  intersectionStyle='margin-top:'+(-(count*20)+'px');
- }


block mod-uv-coverage

   .mod-uv-coverage
      .mod-uv-coverage-header
         .total-cover
            .uvc-title 条件覆盖人群
            .uvc-count-down #{obj.number}
      .mod-uv-coverage-body
         .static-cover(style='display:'+audienceShow)
            .audience
               .uvc-sub-title(title=audienceCon.split(':')[0]) #{obj.other.audience?obj.other.audience.name:''}:#{audienceCon.split(':')[0]}
               .uvc-count #{parseInt(audienceCon.split(':')[1])}
         .static-cover
            .feedInteraction(style='display:'+feedShow)
               .uvc-sub-title 博文覆盖:指定博文
               .uvc-count #{obj.midNumber}
         .static-cover
            .nativePropagation(style='display:'+nativeShow)
               .uvc-sub-title 原生关系:#{nativeCon}
               .uvc-count ∞
         .dynamic-cover(style=defaultStyle)
            .designatedAccount(style='display:'+accountShow)
               .uvc-sub-title 帐号粉丝:指定帐号
            .lifeEvents(style='display:'+lifeShow)
               .uvc-sub-title 人生状态:#{obj.other.lifeEvents?obj.other.lifeEvents.con().substr(0,2)+'状态':''}
            .topicInteraction(style='display:'+talkShow)
               .uvc-sub-title 话题互动:指定话题
            .intersection_number(style=intersectionStyle)
               .uvc-sub-title-right #{obj.intersectionNumber}
         .candied-fruit-cover
            +changeList()