update code
parent
4b984e6c12
commit
5c5d8eb58f
|
@ -8,9 +8,9 @@ const groupByCheckType=(data)=> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList=data=>{
|
const getList=(data,pageSize,pageNum)=>{
|
||||||
return request({
|
return request({
|
||||||
url: `bgscreen/checkDetection/getList`,
|
url: `bgscreen/checkDetection/getList?pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
|
|
|
@ -34,16 +34,37 @@
|
||||||
</svg>
|
</svg>
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</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"
|
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item"
|
||||||
:class="it.timeout ? 'time-out' : ''">
|
:class="it.timeout ? 'time-out' : ''">
|
||||||
<div class="item-left">
|
<div class="item-left">
|
||||||
<el-image ref="preview" style="width: 400px; " :preview-src-list="[it.detectionFile]" v-if="it.detectionFile"
|
<el-image ref="preview" style="width: 400px; " :preview-src-list="[it.detectionFile]" v-if="it.detectionFile"
|
||||||
:src="it.detectionFile + '.1000.jpg'">
|
:src="it.detectionFile + '.1000.jpg'">
|
||||||
</el-image>
|
</el-image>
|
||||||
<div v-else style="text-align: center;">
|
<div v-else style="text-align: center;height:100%" class="left-imglist">
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
<template v-if="it.trustDeed||it.specimenPhoto">
|
||||||
<div style="text-align: center;">暂无图片</div>
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -120,6 +141,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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;">
|
<div v-else style="text-align: center;margin-top: 200px;">
|
||||||
<img src="images/nodata.png" style="width: 240px;">
|
<img src="images/nodata.png" style="width: 240px;">
|
||||||
<div style="text-align: center;">暂无数据</div>
|
<div style="text-align: center;">暂无数据</div>
|
||||||
|
@ -139,22 +164,36 @@ export default {
|
||||||
return {
|
return {
|
||||||
fontSize: 0,
|
fontSize: 0,
|
||||||
title:'',
|
title:'',
|
||||||
|
size: 10,
|
||||||
|
index: 1,
|
||||||
|
total: 0,
|
||||||
show: false,
|
show: false,
|
||||||
dataTable: []
|
dataTable: [],
|
||||||
|
opt:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleCurrentChange(n) {
|
||||||
|
this.index = n;
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
toggleNav(n) {
|
toggleNav(n) {
|
||||||
this.nav = n;
|
this.nav = n;
|
||||||
},
|
},
|
||||||
showDialog(opt) {
|
showDialog(opt) {
|
||||||
|
this.show = true
|
||||||
this.show = true
|
this.opt=opt;
|
||||||
this.$api.checkDetection.getList(opt).then(d=>{
|
this.loadData();
|
||||||
this.dataTable=d.data||[];
|
},
|
||||||
|
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}]`;
|
this.title="材料进场取样复试-"+['汇总','钢筋原材料','钢筋试拉件','混凝土试件','其他'][opt.checkType||0]+`[${this.dataTable.length}]`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -257,7 +296,21 @@ export default {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
min-height: 220px;
|
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 {
|
.text-state {
|
||||||
|
|
Loading…
Reference in New Issue