点击跳转功能-搜索功能调整
This commit is contained in:
parent
d7c90f5c12
commit
954a6bc75b
|
@ -13,18 +13,18 @@
|
||||||
<view class="item-totel">{{ form.regionCount }} </view>
|
<view class="item-totel">{{ form.regionCount }} </view>
|
||||||
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card1.png"></image>
|
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-item">
|
<view class="card-item" @click="toPageFn(1)">
|
||||||
<view class="item-title">子区域数量 </view>
|
<view class="item-title" >子区域数量 </view>
|
||||||
<view class="item-totel">{{ form.areaCount }} </view>
|
<view class="item-totel">{{ form.areaCount }} </view>
|
||||||
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card2.png"></image>
|
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card2.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-item">
|
<view class="card-item" @click="toPageFn(2)">
|
||||||
<view class="item-title">已绑定子区域数 </view>
|
<view class="item-title" >已绑定子区域数 </view>
|
||||||
<view class="item-totel">{{ form.bindnfc }} </view>
|
<view class="item-totel">{{ form.bindnfc }} </view>
|
||||||
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card3.png"></image>
|
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card3.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-item">
|
<view class="card-item" @click="toPageFn(3)">
|
||||||
<view class="item-title">未绑定子区域数 </view>
|
<view class="item-title" >未绑定子区域数 </view>
|
||||||
<view class="item-totel">{{ form.noBindnfc }} </view>
|
<view class="item-totel">{{ form.noBindnfc }} </view>
|
||||||
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card4.png"></image>
|
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card4.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -64,6 +64,27 @@ export default {
|
||||||
console.log('%c%s', 'color:red', 'onSHow')
|
console.log('%c%s', 'color:red', 'onSHow')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 跳转
|
||||||
|
toPageFn(type){
|
||||||
|
if(type === 1){
|
||||||
|
uni.setStorageSync('search', 1)
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/adminNfc/index?type=1'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(type === 2){
|
||||||
|
uni.setStorageSync('search', 2)
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/adminNfc/index?type=2'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(type === 3){
|
||||||
|
uni.setStorageSync('search', 3)
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/adminNfc/index?type=3'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
async getDataFn() {
|
async getDataFn() {
|
||||||
const res = await GetHomeDataApi()
|
const res = await GetHomeDataApi()
|
||||||
console.log(res, '首页数据')
|
console.log(res, '首页数据')
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view v-if="step === 1">1.请将标签卡贴靠设备NFC识别处!</view>
|
<view v-if="step === 1">1.请将标签卡贴靠设备NFC识别处!</view>
|
||||||
<view v-if="step === 2">2.如果确定将该卡片写入该区域,请将标签卡贴靠设备xNFC识别处,否则请退出!</view>
|
<view v-if="step === 2">2.如果确定将该卡片写入该区域,请将标签卡贴靠设备NFC识别处,否则请退出!</view>
|
||||||
<view v-if="step === 3">3.请再次将标签卡贴靠设备NFC识别处!</view>
|
<view v-if="step === 3">3.请再次将标签卡贴靠设备NFC识别处!</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<view class="card-title">已绑定子区域数</view>
|
<view class="card-title">已绑定子区域数</view>
|
||||||
<view class="card-totel">{{ form.bindnfc }}</view>
|
<view class="card-totel">{{ form.bindnfc }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-item card-right">
|
<view class="card-item card-right" @click="changeFn(2)">
|
||||||
<view class="card-title">未绑定子区域数</view>
|
<view class="card-title">未绑定子区域数</view>
|
||||||
<view class="card-totel">{{ form.noBindnfc }}</view>
|
<view class="card-totel">{{ form.noBindnfc }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -15,8 +15,9 @@
|
||||||
<u-tabs class="tabs-box" bg-color="#F6F8FC" :list="tabsList" :is-scroll="true" :current="tabCurrent" @change="tabChangeFn"></u-tabs>
|
<u-tabs class="tabs-box" bg-color="#F6F8FC" :list="tabsList" :is-scroll="true" :current="tabCurrent" @change="tabChangeFn"></u-tabs>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<u-input class="search-input" v-model="keyword" :clearable="false" border placeholder="搜索名称" @keyup.enter="searchFn"></u-input>
|
<u-input class="search-input" v-model="keyword" border placeholder="搜索名称" @keyup.enter="searchFn" @clear="searchFn"></u-input>
|
||||||
<u-icon name="search" class="search-icon" size="40" @click="searchFn"></u-icon>
|
<!-- <u-icon name="search" class="search-icon" size="40" @click="searchFn"></u-icon> -->
|
||||||
|
<u-button class="btn btn-search" type="primary" @click="searchFn">搜索</u-button>
|
||||||
<view class="select-box" @click="selectFn">
|
<view class="select-box" @click="selectFn">
|
||||||
<view>
|
<view>
|
||||||
{{ selectVal }}
|
{{ selectVal }}
|
||||||
|
@ -104,10 +105,26 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
uni.hideLoading() // 关闭 Loading
|
uni.hideLoading() // 关闭 Loading
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(e) {
|
||||||
|
console.log(e, 'e---')
|
||||||
this.getAreaFn()
|
this.getAreaFn()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow(e) {
|
||||||
|
console.log(e, 'e---onshow')
|
||||||
|
const searchType = uni.getStorageSync('search')
|
||||||
|
console.log(searchType, 'searchType---')
|
||||||
|
if (searchType === 1) {
|
||||||
|
this.selectVal = '筛选'
|
||||||
|
this.getAreaFn()
|
||||||
|
}
|
||||||
|
if (searchType === 2) {
|
||||||
|
this.selectVal = '已绑定'
|
||||||
|
this.getAreaFn()
|
||||||
|
}
|
||||||
|
if (searchType === 3) {
|
||||||
|
this.selectVal = '未绑定'
|
||||||
|
this.getAreaFn()
|
||||||
|
}
|
||||||
this.getDataFn()
|
this.getDataFn()
|
||||||
console.log('%c%s', 'color:red', 'onSHow')
|
console.log('%c%s', 'color:red', 'onSHow')
|
||||||
},
|
},
|
||||||
|
@ -117,6 +134,7 @@ export default {
|
||||||
uni.$emit('reset')
|
uni.$emit('reset')
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogShowFn(row) {
|
dialogShowFn(row) {
|
||||||
// console.log(this.vuex_userData.nfcwrite)
|
// console.log(this.vuex_userData.nfcwrite)
|
||||||
// return
|
// return
|
||||||
|
@ -294,7 +312,7 @@ export default {
|
||||||
|
|
||||||
.search-icon {
|
.search-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 210rpx;
|
left: 320rpx;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
|
@ -303,7 +321,21 @@ export default {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
}
|
}
|
||||||
|
.btn{
|
||||||
|
margin-left:20rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.btn-search {
|
||||||
|
}
|
||||||
|
.btn-cancel {
|
||||||
|
background-color: white;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
.select-box {
|
.select-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -24,8 +24,8 @@ import { loginApi } from '@/api/apiList'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
phone: '13800457777',
|
phone: '18174010566',
|
||||||
pwd: '1a2b3c'
|
pwd: '000000'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -335,6 +335,7 @@ export default {
|
||||||
},
|
},
|
||||||
onClear(event) {
|
onClear(event) {
|
||||||
this.$emit('input', '');
|
this.$emit('input', '');
|
||||||
|
this.$emit('clear', '');
|
||||||
},
|
},
|
||||||
inputClick() {
|
inputClick() {
|
||||||
this.$emit('click');
|
this.$emit('click');
|
||||||
|
|
Loading…
Reference in New Issue