<view wx:for="{{tree}}" class="{{!item[parentIdKey]?'Outer-frame':''}}">

  <!-- 列表上半部分 -->
  <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}" right-hight="10">
    <view wx:if="{{!item[parentIdKey]}}" class="main-title-class" bindtap="clickName" data-item="{{item}}" data-type="fa">
      <view data-item="{{item}}" data-type="fa" style="flex:1">
        <view class="font-title">{{item[nameKey]}}</view>
      </view>

      <view style="margin-right: 20rpx;" wx:if="{{flgValid}}">
        <view wx:if="{{flgValidOnFlag}}" class="status-detail-class" style="{{item[flgValidKey] ? 'width: 56rpx' : 'background-color:red;width: 56rpx;'}}">{{item[flgValidKey] ? '启用' :'停用'}}
        </view> 
          <view wx:if="{{!flgValidOnFlag && !item[flgValidKey]}}" class="status-detail-class" style="color:red;width: 56rpx;border: 1px solid #EA4444 ;border-radius: 11rpx;background-color: #d6d6d600;margin-right: 22px;">{{'停用'}}
          </view>
    
      </view>
      <view wx:if="{{item[itemListKey].length > 0}}" style="text-align: right;border: none;position: absolute;right: 40rpx;" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
        <van-icon wx:if="{{ item.open }}" color="#bdb7b7" name="arrow-down" />
        <van-icon wx:else color="#bdb7b7" name="arrow" />
      </view>
    </view>
    <!-- 侧拉 -->
    <view wx:if="{{!swipeDisabled}}" data-item="{{item}}" bind:tap="onSwipeBind" slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
  </van-swipe-cell>
  <!-- 列表下半部分 -->
  <view class="{{(item.children && item.children.length > 0 && !item[parentIdKey])?'list-below-item':''}}">
    <view style="width:100%">
      <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}">
        <view wx:if="{{item[parentIdKey]}}" style="display:flex;align-items:center;margin-left:{{item[itemListKey].length !== 0 ? depth*20 : depth*30}}px;font-size:15px;" bindtap="clickName" data-item="{{item}}" data-type="sub" data-open="{{item.open}}">
          <view wx:if="{{isNameImgFlag}}">
            <view class="tree_left" wx:if="{{item[itemListKey].length !== 0}}" data-id="{{item[idKey]}}" data-open="{{item.open}}">
              <van-image src="{{imageUrl + 'tree.png'}}" width="25rpx" height="25rpx" fit="heightFix" />
            </view>
          </view>
          <view wx:if="{{ischekboxFlag}}">
            <checkbox checked="{{item.selected}}" bindchange="handleCheckboxChange" data-id="{{item.id}}"> </checkbox>
          </view>
          <view class="{{item[itemListKey].length !== 0 ?'parent':'node'}} " style="padding-top: 16rpx;padding-bottom: 16rpx; width: 100%;margin-left: 5vw;font-size: 14px;" data-item="{{item}}" data-type="sub" data-open="{{item.open}}" >
            <view class="font">{{item[nameKey]}}</view>
          </view>

          <view style="margin-right: 68px;width: 54rpx" wx:if="{{flgValid}}">
            <view wx:if="{{flgValidOnFlag}}" class="status-detail-class" style="{{item[flgValidKey] ? 'width: 56rpx' : 'background-color:red;width: 56rpx;'}}">{{item[flgValidKey] ? '启用' :'停用'}}
            </view>

       
            <view wx:if="{{!flgValidOnFlag && !item[flgValidKey]}}" class="status-detail-class" style="color:red;width: 56rpx;border: 1px solid #EA4444 ;border-radius: 11rpx;background-color: #d6d6d600;margin-right: 22px;">{{'停用'}}
          </view>
          </view>

          <view style="position: absolute;right: 40rpx;">
            <!-- <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
              <van-button type="default" size="mini" custom-style="border:none">  <van-icon wx:if="{{!item.open }}" color="#bdb7b7" name="arrow" />
              <van-icon wx:else name="arrow-down" color="#bdb7b7" /></van-button>
            </view> -->
            <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
              <van-icon wx:if="{{ item.open }}" color="#bdb7b7" size="15px" name="arrow-down" />
              <van-icon wx:else color="#bdb7b7" size="15px" name="arrow" />
            </view>
          </view>
        </view>
        <!-- 侧拉 -->
        <view wx:if="{{!swipeDisabled}}" data-item="{{item}}" bind:tap="onSwipeBind" slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
      </van-swipe-cell>
      <view wx:if="{{item[itemListKey]}}">
        <view hidden="{{!item.open}}">
          <dk-tree-form-more flgValidOnFlag="{{false}}" bind:clickName="subclickName" bind:onSwipe="subonSwipeBind_" treeList="{{item[itemListKey]}}" ischekboxFlag="{{ischekboxFlag}}" flgValid="{{flgValid}}" swipeDisabled="{{swipeDisabled}}" isNameImgFlag="{{isNameImgFlag}}" flgValidKey="{{flgValidKey}}" nameKey="{{nameKey}}" idKey="{{idKey}}" isLastClickFlag="{{isLastClickFlag}}" parentIdKey="{{parentIdKey}}" itemListKey="{{itemListKey}}" id="treeSelect" bind:onclick="click" depth="{{depth+1}}"></dk-tree-form-more>
        </view>
      </view>
    </view>
  </view>


</view>