1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <import src="index.skeleton.wxml" />
- <template is="skeleton" wx:if="{{loading}}" />
- <van-search class="search" value="{{ params.content.where.condition }}" shape="round" placeholder="{{language['关键字']||'请输入搜索关键词'}}" bind:search='startSearch' bind:clear='onClear' />
- <view class="total">{{language['共']||'共'}}{{params.content.total}}{{language['个']||'个'}}</view>
- <Yl_ListBox id='ListBox' bind:getlist='getList'>
- <view hover-class="navigator-hover" class="user-box" wx:for="{{list}}" wx:key="index" data-id="{{item[idname]}}" bindtap="changeResult">
- <view class="user">
- <view class="profile">
- <van-image wx:if="{{item.headpic}}" width="42" height="42" round src="{{item.headpic}}" lazy-load />
- <view wx:else class="text">
- {{item[showName][0]}}
- </view>
- </view>
- <view class="content">
- <view class="name line-1">
- {{item[showName]}}
- </view>
- <view class="tags">
- <van-tag wx:if="{{language[item.position]||item.position}}" style="margin-right: 8rpx;" type="primary">{{language[item.position]||item.position}}</van-tag>
- <van-tag type="primary">{{language[item.depname]||item.depname}}</van-tag>
- </view>
- </view>
- <view class="set" wx:if="{{!radio}}">
- <van-checkbox custom-class='checkbox' icon-size='18' value='{{handle.isCheck(item[idname],result)}}' name="{{item[idname]}}" />
- </view>
- </view>
- </view>
- <view wx:if="{{!radio}}" style="height: 130rpx;" />
- <Yl_Empty wx:if="{{list.length==0}}" />
- </Yl_ListBox>
- <block wx:if="{{!radio}}">
- <view class="footer">
- <view class="count">
- {{language['已选']||'已选'}}:{{result.length}}
- </view>
- <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['确定']||'确定'}}</van-button>
- </view>
- <wxs module="handle">
- module.exports = {
- isCheck: function (id, list) {
- return list.some(function (v) {
- return v == id
- });
- },
- }
- </wxs>
- </block>
|