select.wxml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <view>
  2. <van-search class="search" value="{{ params.content.where.condition }}" shape="round" background='#F4F5F7' custom-class='custom-class' placeholder="{{language['关键字']||'请输入搜索关键词'}}" bind:search='startSearch' bind:clear='onClear' />
  3. </view>
  4. <Yl_ListBox id='ListBox' bind:getlist='getList'>
  5. <navigator class="setclient-list-item global-card" url="#" wx:for="{{list}}" wx:key="index" data-id="{{item[idname]}}" bindtap="changeResult">
  6. <van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
  7. <view class="con">
  8. <view class="portrait {{item.enterprisename <=2?'min-portrait':''}}">
  9. {{handle.getName(item[showName])}}
  10. </view>
  11. <view class="mian">
  12. <view class="label line-1"><text wx:if="{{language[item.brandName]||item.brandName}}">【{{language[item.brandName]||item.brandName}}】</text>{{item[showName] ||' -- '}}</view>
  13. <view class="tag-box">
  14. <van-tag custom-class='tag' wx:if="{{item.type}}" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[item.type]||item.type}}</van-tag>
  15. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
  16. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:key="index" wx:for-item='tag' color='#FAAB16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
  17. </view>
  18. </view>
  19. </view>
  20. </navigator>
  21. <My_empty wx:if="{{!list.length}}" />
  22. </Yl_ListBox>
  23. <block wx:if="{{!radio}}">
  24. <view style="height: 130rpx;" />
  25. <view class="footer">
  26. <view class="count">
  27. {{language['已选']||'已选'}}:{{result.length}}
  28. </view>
  29. <van-button custom-class='but' bind:click="submit">{{language['确定']||'确定'}}</van-button>
  30. </view>
  31. </block>
  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>