<loading wx:if="{{loading}}"></loading>
<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<van-sticky scroll-top="0">
  <view style="height: {{(chooseFlag || (tagList && tagList.length > 0))?'210rpx': ((searchContent && searchContent.length > 0)?'200rpx':'120rpx')}}">
    <!-- 查询条件 -->
    <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,placeholder)}}">
    </dk-dropdown-menu>
    <!-- 多选 -->
    <van-tabs wx:if="{{chooseFlag}}" type="card" tab-active-class="{{active==0?'dk-tab-active-left':'dk-tab-active-right'}}" animated="{{true}}" swipeable="{{true}}" active="{{ active }}" dot bind:change="changeTag">
      <van-tab title="待选列表"></van-tab>
      <van-tab title="已选列表" info="{{choosedData.length==0?'':choosedData.length}}"></van-tab>
    </van-tabs>
    <!--tag-->
    <dk-tabs wx:if="{{tagList && tagList.length > 0}}" active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
  </view>
</van-sticky>
<!-- 暂无数据 -->
<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
<!--简单列表-->
<!-- <view wx:if="{{simpleFlag}}" style="margin-top:30rpx;">
  <view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class main-item-class" style="{{item.checked? 'border: 1px solid #1B365D;':''}}" data-index="{{index}}" catchtap="choose">
    {{item[title]}}
  </view>
</view> -->


<!-- 列表区 防止遮住 -->
<dk-list wx:if="{{ active == 0}}" id="list" simpleFlag="{{simpleFlag}}" status="{{status}}" statusFlag="{{statusFlag}}" list="{{tableData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" chooseFlag="{{chooseFlag}}" bind:toDetail="toDetail" bind:choose="chooseData"></dk-list>


<!-- 已选列表区 -->
<dk-list wx:if="{{   chooseFlag && active == 1}}" id="choosed" list="{{choosedData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" simpleFlag="{{simpleFlag}}" content="{{contentList}}" footerInfo="{{footerInfo}}" swipeDisabled="{{false}}" swipeDeleteFlag="{{true}}" bind:swipe="delChoosed"></dk-list>

<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
<view style="height: 200rpx;"></view>
<!-- 确定按钮 -->
<dk-save-button wx:if="{{chooseFlag}}" btnAutoWidthFlag="{{true}}" buttonList="{{buttonList}}" bind:open="confirm"></dk-save-button>

<!-- 底部加号 -->
<view style="position: fixed;bottom: 230rpx;right: 30rpx;" wx:if="{{addUrl || (popContent && popContent.length > 0)}}">
  <view bind:tap="toAdd" class="btn-add-class">
    <van-icon name="plus" color="#FFFFFF" size="60rpx" />
  </view>
</view>

<dk-popup id="popup" type="basic" validFlag="{{true}}" priceTitle="" title="{{popTitle}}" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjNamePop}}" contentObj="{{popContent}}" bind:commit="editItems">
</dk-popup>