12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <view>
- <view class="box">
- <view class="top">
- <text class="title">业务项</text>
- </view>
- </view>
- <view class="card-box">
- <uni-list>
- <uni-list-item v-for="(item,index) in typeList" link="reLaunch" @click="onClick(item)" >
- <template v-slot:body>{{item.name}}</template>
- </uni-list-item>
- </uni-list>
- </view>
- <noData v-if="typeList.length==0"></noData>
- <u-loadmore style="margin: 30rpx;" :status="status" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- status: 'loadmore',
- customemrId: '1',
- typeList:[],
- p: {
- business: 0,
- pageNo: 1,
- pageSize: 3,
- dataCount: 0
- },
- }
- },
- onShow() {
- this.getItemTypeList();
- },
- onBackPress() {
- this.$common.to('/pages/onely-disinfect/Index')
- return true;
- },
- methods: {
- onClick(item){
- this.$common.to('/pages/onely-disinfect/type-business?typeId='+item.id)
- },
- getItemTypeList(){
- this.$api.getItemTypeList(this.p).then(resp=>{
- this.typeList=resp.data;
- })
- }
- },
- //上拉加载更多,分页模拟数据
- onReachBottom() {
- if (parseInt(this.p.dataCount) > parseInt(this.p.pageSize) * parseInt(this.p.pageNo)) {
- this.status = 'loading';
- this.p.pageSize += 5;
- this.getCarDisinFect();
- } else {
- this.status = 'nomore';
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #fff;
- }
- .add {
- position: absolute;
- right: 40rpx;
- top: -60rpx;
- z-index: 999;
- border: 1rpx solid #359aff;
- border-radius: 8rpx;
- color: #c8e4ff;
- padding: 10rpx 20rpx;
- font-size: 28rpx;
- }
- @import '@/common/common.scss'
- </style>
|