<!-- 前台导入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,['roleFunName'])}}">
  </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: 40%;text-align: center;">{{ formData.checked ? $t['allEnable']:$t['allDisable'] }}</view>
        <view style="width: 50%;text-align: right;">
          <van-switch bind:change="onChangeSwitch" active-color="#00A7B5" checked="{{ formData.checked }}" size="18px"></van-switch>
        </view>

      </view>

    </view>
  </view>

</van-sticky>


<van-tabs active="{{active}}" bind:change="onChange" >
  <van-tab title="小程序">
    <dk-collapse-item wx:if="{{tableDataWXP.length > 0}}" list="{{tableDataWXP}}" bind:obtainList="obtainList"></dk-collapse-item>
  </van-tab>
  <van-tab title="WEB">
    
    <dk-collapse-item-more wx:if="{{tableDataWEB.length > 0}}" list="{{tableDataWEB}}" bind:obtainList="obtainList"></dk-collapse-item-more>
  </van-tab>
</van-tabs>
<!-- 保存 -->
<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>