update code

prv
haha 2024-04-28 00:45:56 +08:00
parent 4b984e6c12
commit 5c5d8eb58f
2 changed files with 66 additions and 13 deletions

View File

@ -8,9 +8,9 @@ const groupByCheckType=(data)=> {
})
}
const getList=data=>{
const getList=(data,pageSize,pageNum)=>{
return request({
url: `bgscreen/checkDetection/getList`,
url: `bgscreen/checkDetection/getList?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'post',
data:data
})

View File

@ -34,16 +34,37 @@
</svg>
</i>
</div>
<div class="data-list scroll" style="max-height:770px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;" v-if="dataTable.length>0">
<template v-if="dataTable.length>0">
<div class="data-list scroll" style="max-height:730px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;" >
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item"
:class="it.timeout ? 'time-out' : ''">
<div class="item-left">
<el-image ref="preview" style="width: 400px; " :preview-src-list="[it.detectionFile]" v-if="it.detectionFile"
:src="it.detectionFile + '.1000.jpg'">
</el-image>
<div v-else style="text-align: center;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无图片</div>
<div v-else style="text-align: center;height:100%" class="left-imglist">
<template v-if="it.trustDeed||it.specimenPhoto">
<el-carousel>
<el-carousel-item>
<el-image ref="preview" style="width: 400px; " :preview-src-list="['/jhapi/'+it.trustDeed]" v-if="it.trustDeed"
:src="'/jhapi/'+it.trustDeed + '.1000.jpg'">
</el-image>
<div class="div-tip">委托单</div>
</el-carousel-item>
<el-carousel-item>
<el-image ref="preview" style="width: 400px; " :preview-src-list="['/jhapi/'+it.specimenPhoto]" v-if="it.specimenPhoto"
:src="'/jhapi/'+it.specimenPhoto + '.1000.jpg'">
</el-image>
<div class="div-tip">样品照片</div>
</el-carousel-item>
</el-carousel>
</template>
<template v-else>
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无图片</div>
</template>
</div>
</div>
@ -120,6 +141,10 @@
</div>
</div>
</div>
<el-pagination layout="total,prev, pager, next" :hide-on-single-page="true"
@current-change="handleCurrentChange" :total="total" :page-size="size" :current-page.sync="index"
class="bg-pagination"></el-pagination>
</template>
<div v-else style="text-align: center;margin-top: 200px;">
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
@ -139,22 +164,36 @@ export default {
return {
fontSize: 0,
title:'',
size: 10,
index: 1,
total: 0,
show: false,
dataTable: []
dataTable: [],
opt:{}
};
},
mounted() {
},
methods: {
handleCurrentChange(n) {
this.index = n;
this.loadData();
},
toggleNav(n) {
this.nav = n;
},
showDialog(opt) {
this.show = true
this.$api.checkDetection.getList(opt).then(d=>{
this.dataTable=d.data||[];
showDialog(opt) {
this.show = true
this.opt=opt;
this.loadData();
},
loadData(){
this.$api.checkDetection.getList({
...this.opt
},this.size,this.index).then(d=>{
this.total=d.total||0;
this.dataTable=d.rows||[];
this.title="材料进场取样复试-"+['汇总','钢筋原材料','钢筋试拉件','混凝土试件','其他'][opt.checkType||0]+`[${this.dataTable.length}]`;
});
}
@ -257,7 +296,21 @@ export default {
display: inline-flex;
width: 400px;
min-height: 220px;
align-items: center;
align-items: center;
.left-imglist{
width: 100%;
height:100%;
.el-carousel{
height: 100%;
.el-carousel__item{
.div-tip{
position: absolute;
width: 100%;
bottom:40px;
}
}
}
}
}
.text-state {