| | |
| | | ul { |
| | | list-style-type: none; |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, 370px); |
| | | grid-template-columns: repeat(auto-fit, 375px); |
| | | justify-content: center; |
| | | grid-gap: 22px; |
| | | grid-gap: 16px; |
| | | } |
| | | ul li{ |
| | | width: 370px; |
| | | height: 160px; |
| | | width: 375px; |
| | | height: 165px; |
| | | border-radius: 8px 8px 8px 8px; |
| | | border: 1px solid #EEEEEE; |
| | | margin: 0 !important; |
| | | display: flex; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | padding: 16px; |
| | | font-size: 14px; |
| | | color: #666666; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | ul li img{ |
| | | width: 131px; |
| | | height: 131px; |
| | | ul li .img{ |
| | | width: 114px; |
| | | height: 114px; |
| | | border-radius: 16px; |
| | | margin-right: 24px; |
| | | } |
| | | .list-left .list-left-info{ |
| | | line-height: 30px; |
| | | display: flex; |
| | | } |
| | | .text-truncate { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap |
| | | } |
| | | .circles{ |
| | | position: absolute; |
| | | width: 70px; |
| | | height: 70px; |
| | | right: 0; |
| | | top: 0; |
| | | z-index: 0; |
| | | } |
| | | .circles .circle{ |
| | | border-radius: 50%; |
| | | opacity: 0.2; |
| | | } |
| | | .circle0,.circle1,.circle2{ |
| | | width: 60px; |
| | | height: 60px; |
| | | position: absolute; |
| | | } |
| | | .circle3{ |
| | | width: 16px; |
| | | height: 16px; |
| | | position: absolute; |
| | | } |
| | | .circle0{ |
| | | bottom: 6px; |
| | | left: 0; |
| | | } |
| | | .circle1{ |
| | | bottom: 0; |
| | | right: -30px; |
| | | } |
| | | .circle2{ |
| | | left: 0; |
| | | top: -30px; |
| | | } |
| | | .circle3{ |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | .success .circle{ |
| | | background: #34BD66; |
| | | } |
| | | .danger .circle{ |
| | | background: #FF3838; |
| | | } |
| | | .warning .circle{ |
| | | background: #FBB247; |
| | | } |
| | | </style> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ul> |
| | | <li v-for="m in 10" :key="m"> |
| | | <img src="https://cn.bing.com/images/search?view=detailV2&ccid=2rNAMzsn&id=EE3F6A1D4B80118C0F4376BEBAD7B9690DCA0029&thid=OIP.2rNAMzsnuOFoZdUl_OIltQHaE8&mediaurl=https%3a%2f%2fts1.cn.mm.bing.net%2fth%2fid%2fR-C.dab340333b27b8e16865d525fce225b5%3frik%3dKQDKDWm517q%252bdg%26riu%3dhttp%253a%252f%252fseopic.699pic.com%252fphoto%252f50052%252f2932.jpg_wh1200.jpg%26ehk%3dViGq82qf5d0jyp5G9R6ZLs8p6PmBR4IGfEPP48JYdZg%253d%26risl%3d%26pid%3dImgRaw%26r%3d0&exph=800&expw=1200&q=%e5%9c%a8%e7%ba%bf%e8%ae%be%e5%a4%87%e5%9b%be%e7%89%87%e4%b8%8d%e8%b7%a8%e5%9f%9f&simid=608030609452501280&FORM=IRPRST&ck=E1891E3AC31F578247B495D0C618E8AE&selectedIndex=1&itb=0&ajaxhist=0&ajaxserp=0" alt=""> |
| | | <ul v-loading="loading" @scroll="scrollFn"> |
| | | <li v-for="(m,i) in list" :key="i"> |
| | | <el-image class="img"> |
| | | <div slot="error" class="image-error" style="width: 112px; |
| | | height: 112px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> |
| | | </el-image> |
| | | <div class="list-left"> |
| | | <div class="list-left-info"> |
| | | <span class="label">设备名称:</span> |
| | | <span>小舞灵漩涡混合器</span> |
| | | <span style="color:#3A7BFA;font-size: 16px;display: inline-block; |
| | | width: 129px; word-break: break-all;" class="text-truncate">小舞灵漩涡混合器</span> |
| | | </div> |
| | | <div class="list-left-info"> |
| | | <span class="label">规格型号:</span> |
| | | <span>CASJTS-C004-01</span> |
| | | <span style="color:#333333;font-size: 16px;">CASJTS-C004-01</span> |
| | | </div> |
| | | <div class="list-left-info"> |
| | | <span class="label">状态:</span> |
| | | <el-tag type="danger">标签五</el-tag> |
| | | <el-tag :type="m.type">标签五</el-tag> |
| | | </div> |
| | | </div> |
| | | <div class="circles"> |
| | | <div class="circles" :class="m.type"> |
| | | <div class="circle0 circle"></div> |
| | | <div class="circle1 circle"></div> |
| | | <div class="circle2 circle"></div> |
| | |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-if="list.length<1&&!loading&&!isLoding&&!finishLoding" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div> |
| | | <div v-if="!noMore&&list.length>0"> |
| | | <el-button |
| | | v-show="isLoding" |
| | | type="text" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | ><i class="el-icon-loading"></i |
| | | ></el-button> |
| | | <el-button |
| | | type="text" |
| | | v-show="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | >已经没有更多啦~</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | return { |
| | | options:[], |
| | | // 搜索表单 |
| | | searchForm:{} |
| | | searchForm:{}, |
| | | list:[ |
| | | { |
| | | type:'danger' |
| | | }, |
| | | { |
| | | type:'danger' |
| | | }, |
| | | { |
| | | type:'success' |
| | | }, |
| | | { |
| | | type:'success' |
| | | }, |
| | | { |
| | | type:'danger' |
| | | }, |
| | | { |
| | | type:'danger' |
| | | }, |
| | | { |
| | | type:'danger' |
| | | }, |
| | | { |
| | | type:'danger' |
| | | }, |
| | | { |
| | | type:'warning' |
| | | }, |
| | | { |
| | | type:'warning' |
| | | }, |
| | | ], |
| | | noMore: false, // 搜索结果无的展示 |
| | | currentPage: 1, // 当前页 |
| | | pageSize: 12, // 一页12条 |
| | | total: '', |
| | | loading: false, // 组件loading的展示,默认为true |
| | | isLoding: false, // 加载中,loading图标,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | } |
| | | }, |
| | | created() { |
| | | this.refreshTable(); |
| | | }, |
| | | mounted() { |
| | | // window.addEventListener("scroll", this.throttle(this.scrollFn, 500)); |
| | | }, |
| | | destroyed() { |
| | | // window.removeEventListener("scroll", this.throttle(), false); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | |
| | | this.loading = true |
| | | this.isLoding = true |
| | | this.$axios.get(this.$api.deviceScope.selectEquipmentOverview).then(res => { |
| | | console.log(11111,res) |
| | | }) |
| | | // allCoursesList({ |
| | | // currentPage: this.currentPage, |
| | | // pageSize: this.pageSize, |
| | | // keyword: this.$route.query.keywords |
| | | // }).then((res) => { |
| | | // if (res.data.code === 0) { |
| | | // this.loading = false |
| | | // this.keyWordsCoursesList = [...res.data.data.rows] |
| | | // this.total = res.data.data.total |
| | | // if (this.keyWordsCoursesList.length === 0) { |
| | | // this.noMore = true; |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | refresh() { |
| | | |
| | | }, |
| | | // 滚动触底加载 |
| | | scrollFn() { |
| | | let clientHeight = document.documentElement.clientHeight - 18; //可视区域 |
| | | let scrollHeight = document.body.scrollHeight; // 滚动文档高度 |
| | | let scrollTop = parseInt(document.documentElement.scrollTop); // 已滚动的高度 |
| | | let height = 300; |
| | | if ( |
| | | scrollTop + clientHeight >= scrollHeight - height && |
| | | scrollHeight != 0 |
| | | ) { |
| | | if (this.pageSize > this.total) { |
| | | this.isLoding = false; |
| | | this.finishLoding = true; |
| | | window.removeEventListener("scroll", this.throttle(), false); |
| | | }else{ |
| | | this.currentPage + 1; |
| | | this.pageSize = this.pageSize += 12; |
| | | this.refreshTable(); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | throttle(fn, wait) { |
| | | // 封装函数进行节流 |
| | | var timer = null; |
| | | return function () { |
| | | var context = this; |
| | | var args = arguments; |
| | | if (!timer) { |
| | | timer = setTimeout(function () { |
| | | fn.apply(context, args); |
| | | timer = null; |
| | | }, wait); |
| | | } |
| | | }; |
| | | }, |
| | | } |
| | | } |
| | | </script> |