From 5c5d8eb58fc1ec76aaaa5189704dff5ca7fdc792 Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 28 Apr 2024 00:45:56 +0800 Subject: [PATCH] update code --- src/api/checkDetection/index.js | 4 +- src/pages/quality/checkDetectionDlg.vue | 75 +++++++++++++++++++++---- 2 files changed, 66 insertions(+), 13 deletions(-) diff --git a/src/api/checkDetection/index.js b/src/api/checkDetection/index.js index e97e28c..e9b4977 100644 --- a/src/api/checkDetection/index.js +++ b/src/api/checkDetection/index.js @@ -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 }) diff --git a/src/pages/quality/checkDetectionDlg.vue b/src/pages/quality/checkDetectionDlg.vue index d6c442b..f978322 100644 --- a/src/pages/quality/checkDetectionDlg.vue +++ b/src/pages/quality/checkDetectionDlg.vue @@ -34,16 +34,37 @@ -
+
暂无数据
@@ -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 {