| | |
| | | <!--pages/inspection/scene/search/index.wxml--> |
| | | <text>pages/inspection/scene/search/index.wxml</text> |
| | | <!--pages/search/index.wxml--> |
| | | <view class="page"> |
| | | <view class="page-header"> |
| | | <t-search |
| | | placeholder="{{placeholder}}" |
| | | model:value="{{searchValue}}" |
| | | bind:submit="handleSubmit" |
| | | bind:clear="handleClear" |
| | | bind:change="handleChange" |
| | | focus |
| | | > |
| | | </t-search> |
| | | </view> |
| | | |
| | | <view class="page-container"> |
| | | <scene-search-result |
| | | wx:for="{{searchResult}}" |
| | | wx:key="index" |
| | | wx:for-index="index" |
| | | result="{{item}}" |
| | | bind:click="handCellClick" |
| | | ></scene-search-result> |
| | | <load-more |
| | | list-is-empty="{{!searchResult.length}}" |
| | | status="{{loadStatus}}" |
| | | bind:retry="_startLoad" |
| | | /> |
| | | <t-empty |
| | | wx:if="{{loadStatus == 2 && isSearch && searchResult.length == 0}}" |
| | | icon="info-circle-filled" |
| | | description="无匹配记录" |
| | | /> |
| | | <block wx:if="{{!isSearch}}"> |
| | | <view wx:if="{{historyWords.length > 0}}" class="history-wrap"> |
| | | <view class="search-header"> |
| | | <text class="search-title">历史搜索</text> |
| | | <text class="search-clear" bind:tap="handleClearHistory">清除</text> |
| | | </view> |
| | | <view class="search-content"> |
| | | <view |
| | | class="search-item" |
| | | hover-class="hover-history-item" |
| | | wx:for="{{historyWords}}" |
| | | bind:tap="handleHistoryTap" |
| | | bindlongpress="deleteCurr" |
| | | data-index="{{index}}" |
| | | wx:key="index" |
| | | > |
| | | {{item}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <t-empty |
| | | wx:else |
| | | t-class-image="t-empty__image" |
| | | image="/res/nodata.png" |
| | | description="请搜索" |
| | | /> |
| | | </block> |
| | | </view> |
| | | <view class="page-footer"></view> |
| | | <t-dialog |
| | | visible="{{dialogShow}}" |
| | | content="{{dialog.message}}" |
| | | bindconfirm="confirm" |
| | | bind:close="close" |
| | | confirm-btn="确定" |
| | | cancel-btn="{{dialog.showCancelButton ? '取消' : null}}" |
| | | t-class-confirm="add-notes__confirm" |
| | | /> |
| | | </view> |