This commit is contained in:
xd 2024-03-20 15:08:43 +08:00
parent a7f57ae682
commit 3572cf97d9
2 changed files with 25 additions and 23 deletions

View File

@ -15,7 +15,7 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card lyScrollable"> <el-card class="box-card lyScrollable" :style="{'overflow': 'auto','max-height': lyScrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :15px'" v-for="(item,index) in materialDetailA" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :15px'" v-for="(item,index) in materialDetailA" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -68,7 +68,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card lyScrollable"> <el-card class="box-card lyScrollable" :style="{'overflow': 'auto','max-height': lyScrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailB" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailB" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -121,7 +121,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card lyScrollable"> <el-card class="box-card lyScrollable" :style="{'overflow': 'auto','max-height': lyScrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailC" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailC" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -234,7 +234,7 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card selScrollable"> <el-card class="box-card selScrollable" :style="{'overflow': 'auto','max-height': selScrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :15px'" v-for="(item,index) in selMaterialDetailA" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :15px'" v-for="(item,index) in selMaterialDetailA" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -282,7 +282,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card selScrollable"> <el-card class="box-card selScrollable" :style="{'overflow': 'auto','max-height': selScrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in selMaterialDetailB" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in selMaterialDetailB" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -330,7 +330,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card selScrollable"> <el-card class="box-card selScrollable" :style="{'overflow': 'auto','max-height': selScrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in selMaterialDetailC" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in selMaterialDetailC" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -410,17 +410,9 @@
.lyScrollable::-webkit-scrollbar { .lyScrollable::-webkit-scrollbar {
display: none; /* 对于Webkit浏览器 */ display: none; /* 对于Webkit浏览器 */
} }
.lyScrollable{
overflow: auto; /* 自动开启滚动条 */
max-height: 630px; /* 设置最大高度 */
}
.selScrollable::-webkit-scrollbar { .selScrollable::-webkit-scrollbar {
display: none; /* 对于Webkit浏览器 */ display: none; /* 对于Webkit浏览器 */
} }
.selScrollable{
overflow: auto; /* 自动开启滚动条 */
max-height: 580px; /* 设置最大高度 */
}
/*最上方三大块样式*/ /*最上方三大块样式*/
.grid-content { .grid-content {
@ -456,7 +448,11 @@
components: {operlog}, components: {operlog},
data() { data() {
return { return {
//
activeName: 'locationShow', activeName: 'locationShow',
//
lyScrollableHeight: null,
selScrollableHeight: null,
// //
contentStyle: { contentStyle: {
@ -523,6 +519,11 @@
/*获取库位信息*/ /*获取库位信息*/
this.getStorageLocation(); this.getStorageLocation();
}, },
mounted(){
/*设置内容高度*/
this.lyScrollableHeight = (window.innerHeight - 200) + 'px';
this.selScrollableHeight = (window.innerHeight - 250) + 'px';
},
computed:{ computed:{
countA(){ countA(){
// 使 find // 使 find

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="margin-top: 5px;"> <div style="margin-top: 5px;" ref="scroll">
<div style="margin-left: 5px; margin-right: 5px;"> <div style="margin-left: 5px; margin-right: 5px;">
<el-row :gutter="10" style="letter-spacing: 5px;"> <el-row :gutter="10" style="letter-spacing: 5px;">
<el-col :span="8"> <el-col :span="8">
@ -14,7 +14,7 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card scrollable"> <el-card class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :15px'" v-for="(item,index) in materialDetailA" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :15px'" v-for="(item,index) in materialDetailA" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -67,7 +67,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card scrollable"> <el-card class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailB" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailB" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -120,7 +120,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card scrollable"> <el-card class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight}">
<el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailC" :key="item.materialBh"> <el-descriptions border :column="2" size="small" :style="index==0?'': 'margin-top :12px'" v-for="(item,index) in materialDetailC" :key="item.materialBh">
<el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'> <el-descriptions-item :contentStyle='contentStyle' :labelStyle='labelStyle'>
<template slot="label"> <template slot="label">
@ -241,10 +241,6 @@
.scrollable::-webkit-scrollbar { .scrollable::-webkit-scrollbar {
display: none; /* 对于Webkit浏览器 */ display: none; /* 对于Webkit浏览器 */
} }
.scrollable{
overflow: auto; /* 自动开启滚动条 */
max-height: 680px; /* 设置最大高度 */
}
/*最上方三大块样式*/ /*最上方三大块样式*/
.grid-content { .grid-content {
@ -284,7 +280,8 @@
}, },
data() { data() {
return { return {
//
scrollableHeight:null,
// //
contentStyle: { contentStyle: {
'text-align': 'center', 'text-align': 'center',
@ -347,6 +344,10 @@
/*获取库位信息*/ /*获取库位信息*/
this.getStorageLocation(); this.getStorageLocation();
}, },
mounted(){
/*设置内容高度*/
this.scrollableHeight = (window.innerHeight - 150) + 'px';
},
computed:{ computed:{
countA(){ countA(){
// 使 find // 使 find