<!-- 前台导入wxmlUtil.wxs -->
<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
<van-sticky scroll-top="0">
  <!-- 查询条件 -->

  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['sensitiveName'])}}">
  </dk-dropdown-menu>
  <view style="display: flex;background-color: white;padding:18rpx;padding-right: 40rpx;padding-left:40rpx;">
    <view style="width: 60%;display: flex;">
      <view style="width: 18%;">
        <van-image width="40rpx" height="40rpx" src="{{'/static/image/roles.png'}}" />
      </view>
      <view class="font" style="width: 82%;">{{formData.roleName}}</view>
    </view>
    <view style="width: 50%;text-align: right;">
      <view style="display: flex;">
        <view class="font" style="width: 60%;text-align: center;">{{ formData.checked ?$t['allEnableVisible']:$t['allDisableVisible']  }}</view>
        <view style="width: 40%;text-align: right;">
          <van-switch bind:change="onChangeSwitch" active-color="#3E69F6" checked="{{ formData.checked }}" size="18px"></van-switch>
        </view>

      </view>

    </view>
  </view>

</van-sticky>




<!-- 数据列表区 -->
<view wx:for="{{tableData}}" wx:for-item="item" wx:for-index="index" data-item="{{item}}" wx:key="index" class="main-class-source">
  <view class="main-foot-source" style="position: relative;">
    <view class="corner-view" style="padding:20rpx">
      <view style="display: flex;">
        <view class="corner-view-text font" style="width: 70%;">{{item.itemName}}</view>
        <view style="width: 30%;text-align: right;">
          <van-switch bind:change="onCheckedItem"  data-index="{{index}}" active-color="#3E69F6" checked="{{ item.checked }}" size="18px"></van-switch>
        </view>

      </view>

    </view>

    <view style="background-color: white;">
      <view wx:for="{{item.children}}"  wx:for-item="item_" wx:for-index="index_" wx:key="index_" style="display: flex;padding:20rpx">
        <view class="corner-view-text font" style="width: 70%;">{{item_.itemName}}</view>
        <view style="width: 30%;text-align: right;">
          <van-switch bind:change="onCheckedItem_"  data-index="{{index}}"  data-index_="{{index_}}" active-color="#3E69F6" checked="{{ item_.checked }}" size="18px"></van-switch>
        </view>

      </view>
    </view>
  </view>



</view>



<!-- <dk-save-bottom flagTypeName="select-functional-permissions" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" /> -->

<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>