123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view class="site-wrapper" ref="contentWrapper">
-
- <!-- 筛选框start -->
- <view class="ding">
- <view class="cu-bar search bg-gray filter-section">
- <view class="search-form round bg-white">
- <text class="cuIcon-search"></text>
- <input class="" @focus="InputFocus" @blur="InputBlur" :adjust-position="false" type="text" placeholder="请输入站点名称"
- confirm-type="search"></input>
- </view>
- <view class="action">
- <button class="cu-btn bg-blue round">查询</button>
- </view>
- </view>
- </view>
- <!-- 筛选框end -->
-
- <!-- 站点列表start -->
- <view class="site-items">
- <view class="cu-list menu-avatar">
- <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in nowData"
- :key="index" :data-target="'move-box-' + index">
- <view class="cu-avatar round lg" v-bind:style="{ 'background-image': 'url(' + nowIcon+ ')' }"></view>
- <view class="content" @tap="goNowUrl" v-if="nowType==0">
- <view class="text-grey site-tit">
- {{item.siteName}}
- <text>
- ({{nowNum}})
- </text>
- </view>
- </view>
-
- <view class="content" v-else @tap="goNowUrl" @longpress="showDetail(item)">
- <view class="text-grey site-tit">
- {{item.siteName}}
- <text>(共3个设备)</text>
- </view>
- <view class="showDetail" v-if="item.isShow" @tap.stop="goSiteDetail" >查看详情</view>
- </view>
-
- <view class="nav-right num">
- <view class="text-grey">
- <text class="icon iconfont margin-right-xs margin-left-lg"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 站点列表end -->
-
-
- </view>
- </template>
- <script>
- export default {
- // name: 'listTest',
- props:{
- bindType:{
- type:Number,
- default: ''
- },
- bindData:{
- type:Array,
- default: ''
- },
- bindUrl:{
- type:String,
- default: ''
- },
- bindIcon:{
- type:String,
- default: ''
- },
- bindNum:{
- type:String,
- default: ''
- },
- },
- data() {
- return {
- modalName: null,
- nowData:this.bindData,
- nowUrl:this.bindUrl,
- nowIcon:this.bindIcon,
- nowNum:this.bindNum,
- nowType:this.bindType
-
- };
- },
- onPullDownRefresh() {
- console.log('refresh');
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- methods:{
- // 页面跳转
- goNowUrl() {
- uni.navigateTo({
- url: this.nowUrl,
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- InputFocus(e) {
- this.InputBottom = e.detail.height
- },
- InputBlur(e) {
- this.InputBottom = 0
- },
- }
- }
- </script>
- <style>
- </style>
|