<view class="all">
  <view class="close">
    <image mode="scaleToFill" catchTap="onClose" src="../../../image/close.png"/>
  </view>
  <form onReset="onReset">
    <view class="search flex-box flex-v-ce">
      <image mode="scaleToFill" src="../../../image/ss.png"/>
      <input placeholder="请输入姓名搜索" onInput="bindKeyInput" class="flex-1"/>
      <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
    </view>
  </form>
  <view class="content">
    <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
      <view a:for="{{terr}}" class="flex-box flex-v-ce" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
        <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>
        <text style="max-width:2.5rem" class="font-flex-word">{{item.name}}</text>
      </view>
    </view>
    <scroll-view class="staff-ul" scroll-y="{{true}}" style="{{terr.length>1? 'height: calc(100vh - 390rpx);':'height: calc(100vh - 320rpx);'}}">
      <view class="ul2">
        <view class="flex-box flex-v-ce li" a:for="{{rule_tree}}">
          <view class="flex-box flex-v-ce flex-1" data-item="{{item}}" catchTap="changeSection">
            <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"/>
            <text class="flex-1">{{item.name}}</text>
          </view>
          <view class="xia" a:if="{{item._child.length>0}}" data-item="{{item}}" catchTap="openDown">| 下级</view>
        </view>
      </view>

      <view a:if="{{item.name.indexOf(keyVal)>= 0}}" class="flex-box flex-v-ce userItem" a:for="{{userList}}" a:key="{{index}}">
        <view class="{{item.checked? 'active':''}} flex-box flex-v-ce flex-1" catchTap="bindtap1" data-index="{{index}}" data-item="{{item}}">
          <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
          <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
          <view class="radio_"></view>
        </view>
      </view>
      
      <view a:if="{{userList.length==0}}">
        <view class="fontColorF" style="margin-top:200rpx;text-align: center;">
          <view>您暂无相关审批人</view>
        </view>
      </view>
    </scroll-view>
  </view>
  <view class="StaffFooter flex-box flex-v-ce">
    <view class="flex-1 f-left flex-box flex-v-ce">
      <view a:for="{{selectUserId}}" style="margin-right:10rpx;" a:key="{{index}}" a:if="{{item.id}}">
        <image mode="scaleToFill" class="img_box" src="{{item.img_url}}" a:if="{{item.img_url}}"/>
        <view a:else class="img_name_box">{{item.name.substr(item.name.length-2)}}</view>
      </view>
    </view>
    <view class="staffBtn" onTap="onConfirm">确定</view>
  </view>
</view>