dk-tree-form-more.wxml 5.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <view wx:for="{{tree}}" class="{{!item[parentIdKey]?'Outer-frame':''}}">
  2. <!-- 列表上半部分 -->
  3. <!-- <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}" right-hight="10"> -->
  4. <dk-swiper right-width="{{swipeDisabled? 0:65 }}" disabled="{{swipeDisabled}}" data-item="{{item}}" bind:click="onSwipeBind" rightButtontxt="{{(item[flgValidKey] ? '停用' : '启用')}}">
  5. <view wx:if="{{!item[parentIdKey]}}" class="main-title-class" bind:tap="clickName" data-item="{{item}}" data-type="fa">
  6. <view data-item="{{item}}" data-type="fa" style="flex:1">
  7. <view class="font-title">{{item[nameKey]}}</view>
  8. </view>
  9. <view style="margin-right: 20rpx;" wx:if="{{flgValid}}">
  10. <view wx:if="{{flgValidOnFlag}}" class="status-detail-class" style="{{item[flgValidKey] ? 'width: 56rpx' : 'background-color:red;width: 56rpx;'}}">{{item[flgValidKey] ? '启用' :'停用'}}
  11. </view>
  12. <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;">{{'停用'}}
  13. </view>
  14. </view>
  15. <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">
  16. <van-icon wx:if="{{ item.open }}" color="#bdb7b7" name="arrow-down" />
  17. <van-icon wx:else color="#bdb7b7" name="arrow" />
  18. </view>
  19. </view>
  20. </dk-swiper>
  21. <!-- 侧拉 -->
  22. <!-- <view wx:if="{{!swipeDisabled}}" data-item="{{item}}" bind:tap="onSwipeBind" slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
  23. </van-swipe-cell> -->
  24. <!-- 列表下半部分 -->
  25. <view class="{{(item.children && item.children.length > 0 && !item[parentIdKey])?'list-below-item':''}}">
  26. <view style="width:100%">
  27. <!-- <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}"> -->
  28. <dk-swiper right-width="{{swipeDisabled? 0:65 }}" disabled="{{swipeDisabled}}" data-item="{{item}}" bind:click="onSwipeBind" rightButtontxt="{{(item[flgValidKey] ? '停用' : '启用')}}">
  29. <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;" bind:tap="clickName" data-item="{{item}}" data-type="sub" data-open="{{item.open}}">
  30. <view wx:if="{{isNameImgFlag}}">
  31. <view class="tree_left" wx:if="{{item[itemListKey].length !== 0}}" data-id="{{item[idKey]}}" data-open="{{item.open}}">
  32. <van-image src="{{imageUrl + 'tree.png'}}" width="25rpx" height="25rpx" fit="heightFix" />
  33. </view>
  34. </view>
  35. <view wx:if="{{ischekboxFlag}}">
  36. <checkbox checked="{{item.selected}}" bindchange="handleCheckboxChange" data-id="{{item.id}}"> </checkbox>
  37. </view>
  38. <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}}" >
  39. <view class="font">{{item[nameKey]}}</view>
  40. </view>
  41. <view style="margin-right: 68px;width: 54rpx" wx:if="{{flgValid}}">
  42. <view wx:if="{{flgValidOnFlag}}" class="status-detail-class" style="{{item[flgValidKey] ? 'width: 56rpx' : 'background-color:red;width: 56rpx;'}}">{{item[flgValidKey] ? '启用' :'停用'}}
  43. </view>
  44. <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;">{{'停用'}}
  45. </view>
  46. </view>
  47. <view style="position: absolute;right: 40rpx;">
  48. <!-- <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
  49. <van-button type="default" size="mini" custom-style="border:none"> <van-icon wx:if="{{!item.open }}" color="#bdb7b7" name="arrow" />
  50. <van-icon wx:else name="arrow-down" color="#bdb7b7" /></van-button>
  51. </view> -->
  52. <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
  53. <van-icon wx:if="{{ item.open }}" color="#bdb7b7" size="15px" name="arrow-down" />
  54. <van-icon wx:else color="#bdb7b7" size="15px" name="arrow" />
  55. </view>
  56. </view>
  57. </view>
  58. <!-- 侧拉 -->
  59. <!-- <view wx:if="{{!swipeDisabled}}" data-item="{{item}}" bind:tap="onSwipeBind" slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view> -->
  60. <!-- </van-swipe-cell> -->
  61. </dk-swiper>
  62. <view wx:if="{{item[itemListKey]}}">
  63. <view hidden="{{!item.open}}">
  64. <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>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>