123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- <template>
- <view class="">
-
- <!-- 筛选框start -->
- <view style="height:98rpx"></view>
- <view class="ding">
- <!-- <calendar></calendar> -->
- <view class="example-body">
- <uni-datetime-picker v-model="datetimerange" type="daterange" start-placeholder="请选择开始时间"
- end-placeholder="请选择结束时间" start="2000-3-20 12:00:00" end="2025-10-20 20:00:00" rangeSeparator="至" />
- </view>
- </view>
- <!-- 筛选框end -->
- <view class="site-items" style="margin-top:0;height: calc(100vh - 286rpx)">
- <view class="cu-list menu-avatar" >
- <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
- v-for="(item,index) in funcReport" :key="index"
- @touchstart="ListTouchStart"
- @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index"
- >
- <view class="cu-avatar round lg">
- <image class="image-bg" src="/static/device-icon.png"/>
- </view>
- <view class="content">
- <view class="pro-title">
- <view class="cut">{{item.title}}</view>
- </view>
- <view class="pro-des ">
- <view class="text-cut">
- {{item.des}}
- </view>
- </view>
- <view class="pro-date ">{{item.time}}</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 class="move">
- <view class="bg-grey" @click.stop="editItem(item)">编辑</view>
- <view class="bg-red" @click.stop="deleteItem(item)">删除</view>
- </view>
- </view>
- </view>
-
- <view style="padding-bottom:60px"></view>
-
- <!-- <view v-if="!authList.length&&authListRes==1" class="text-center margin-top"> 暂无数据</view>
- <view v-show="isLoadMore&&this.currentPage>1" style="padding-bottom:60px">
- <uni-load-more :status="loadStatus"></uni-load-more>
- </view> -->
- </view>
-
-
-
- <!-- 新增按钮start -->
- <view style="width: 100%;
- position: fixed;
- bottom: 0px;
- right: 0px;
- height: 64px;
- background: #fff;">
- <view class="plus">
- <image src="../../../static/plus.png" style="width:100rpx;height:100rpx" @tap="goAddPage()"></image>
- </view>
- </view>
-
- <!-- 新增按钮end -->
- </view>
- </template>
- <script>
- import json from '../../../data/json.js';
- export default {
- data() {
- return {
- funcReport: json.funcReport,
- modalName: null,
- getData:[],
- dwtype:0,
- datetimerange: ['', ''],
-
- listTouchStart: 0,
- listTouchDirection: null,
- };
- },
- onLoad: function(option) {
- this.dwtype=option.dwtype
- // this.getDeviceList({'company_code':uni.getStorageSync('selectedCode'),"dwtype":option.dwtype})
- },
- onNavigationBarButtonTap(e) {
- console.log(e)
- uni.navigateTo({
- url: './export/export?dwtype='+this.dwtype,
- });
- },
- methods: {
-
-
- // 设备类型数据请求
- // async getDeviceList(params = {}) {
- // const res = await this.$myRequest({
- // url: 'DeviceManagement/getDeviceList',
- // data:params,
- // showLoading: true
- // })
- // this.getData=res.data.data;
- // console.log(this.getData);
- // },
-
- //编辑
- editItem(item) {
- // uni.redirectTo({
- // url: '/pages/siteAdd/siteAdd?id=' + item.id + '',
- // });
- alert('编辑')
- },
-
- //删除
- deleteItem(item) {
- alert('删除')
- // this.deleteStatus=true
- // uni.showModal({
- // title: '确认删除吗?',
- // content: '',
- // success: function(result) {
- // if (result.confirm) {
- // this.setDelSite({
- // "id": item.id
- // })
- // } else if (result.cancel) {
- // // console.log('用户点击取消');
- // }
- // }.bind(this)
- // });
- },
-
- // 新增
- goAddPage(type) {
- uni.redirectTo({
- url: '/pages/setting/funReport/funcAdd/funcAdd',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
-
-
-
- // ListTouch触摸开始
- ListTouchStart(e) {
- this.listTouchStart = e.touches[0].pageX
- },
-
- // ListTouch计算方向
- ListTouchMove(e) {
- this.listTouchDirection = e.touches[0].pageX - this.listTouchStart < -80 ? 'left' : 'right'
- },
-
- // ListTouch计算滚动
- ListTouchEnd(e) {
- if (this.listTouchDirection == 'left') {
- this.modalName = e.currentTarget.dataset.target
- } else {
- this.modalName = null
- }
- this.listTouchDirection = null
- }
-
- }
- }
- </script>
- <style lang="scss">
- .cu-item {
- height: 180rpx !important
- }
- .plus {
- position: fixed;
- bottom: 3px;
- right: 3px;
- }
- </style>
|