过滤器小程序

This commit is contained in:
2026-05-12 01:32:55 +08:00
commit bd749bb6c9
88 changed files with 28033 additions and 0 deletions
+95
View File
@@ -0,0 +1,95 @@
<template>
<view class="container">
<view class="tui-title">请选择安装点位</view>
<tui-cascade-selection height="200px" :itemList="itemList" @complete="complete"></tui-cascade-selection>
</view>
</template>
<script>
import myapp from '@/common/js/myapp.js'
export default {
data() {
return {
apiHost: myapp.apiHost,
itemList: [],
sn: '',
h_id: ''
};
},
onLoad() {
let that = this;
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let curRoute = routes[routes.length - 1].route //获取当前页面路由
let curParam = routes[routes.length - 1].options; //获取路由参数
this.sn = curParam.sn
this.h_id = curParam.h_id
myapp.request('/?c=position&a=getPositionList',function(res) {
that.itemList = res.data.data
},{h_id:curParam.h_id})
},
methods: {
complete(e) {
console.log(e.text);
uni.navigateTo({
url:'/packagePage/pages/ctrldevice/ctrldevice?position='+e.text+'*&sn='+this.sn
})
}
}
};
</script>
<style>
.container {
padding: 20rpx 0 120rpx 0;
box-sizing: border-box;
}
.header {
padding: 80rpx 90rpx 60rpx 90rpx;
box-sizing: border-box;
}
.title {
font-size: 34rpx;
color: #333;
font-weight: 500;
}
.sub-title {
font-size: 24rpx;
color: #7a7a7a;
padding-top: 18rpx;
}
.tui-title {
width: 100%;
padding: 50rpx 30rpx 30rpx;
box-sizing: border-box;
font-size: 32rpx;
font-weight: bold;
}
.tui-btn-box {
width: 100%;
padding: 80rpx 30rpx;
box-sizing: border-box;
}
.tui-header {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx;
box-sizing: border-box;
background-color: #fff;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
position: relative;
}
.tui-icon-close {
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
}
</style>