index.wxml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <van-search class="search" value="{{ content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
  2. <My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
  3. <view class="total">共{{content.total}}个</view>
  4. <navigator class="setclient-list-item" url="#" wx:for="{{list}}" wx:key="item.sys_enterpriseid" data-id="{{item.sys_enterpriseid}}" bindtap="changeResult">
  5. <view class="con">
  6. <view class="portrait {{item.enterprisename <=2?'min-portrait':''}}">
  7. {{handle.getName(item.enterprisename)}}
  8. </view>
  9. <view class="mian">
  10. <view class="label line-1">{{item.enterprisename}}</view>
  11. <view class="tag-box">
  12. <van-tag custom-class='tag' color='#E7EEFF' wx:if="{{item.type}}" text-color='#3874F6' round>{{item.type}}</van-tag>
  13. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:for-item='tag' wx:key="index" color='#E7EEFF' text-color='#3874F6' round>{{tag}}</van-tag>
  14. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:for-item='tag' wx:key="index" color='#FFEFD9' text-color='#FA8C16' round>{{tag}}</van-tag>
  15. </view>
  16. </view>
  17. <view class="checkbox">
  18. <van-checkbox value='{{handle.isCheck(item.sys_enterpriseid,result)}}' />
  19. </view>
  20. </view>
  21. </navigator>
  22. <view style="height: 230rpx;" />
  23. <My_empty wx:if="{{!list.length}}" />
  24. </My_listBox>
  25. <view style="height: 130rpx;" />
  26. <view class="footer">
  27. <view class="count">
  28. 已选:{{result.length}}
  29. </view>
  30. <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">确定</van-button>
  31. </view>
  32. <wxs module="handle">
  33. module.exports = {
  34. getName: function (name) {
  35. return name.substring(0, 4)
  36. },
  37. isCheck: function (id, list) {
  38. return list.some(function (v) {
  39. return v == id
  40. });
  41. },
  42. }
  43. </wxs>