ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
    <div class="screen1-warnings module-block">
        <block-title title="设备报警2" />
        <div class="module-content">
            <div class="auto-scroll-view">
                <div class="scroll-header">
                    <div 
                        :style="{
                            width:item.grow?'10px':(item.width?item.width:'auto'),
                            flexGrow:item.grow?item.grow:'initial',
                            flexShrink:item.grow?'initial':'0'
                        }" 
                        v-for="(item,index) in columns" 
                        :key="'list-header-cell-'+index">
                        <span class="">{{item.label}}</span>
                    </div>
                </div>
                <!-- list body start -->
                <div class="scroll-body">
                    <auto-scroll :step-speed="$config.base.screen.screen1.scrollSpeed" :hideSheB.sync="hideSheB">
                        <div class="no-data" v-if="list.length===0">暂时没有信息!</div>
                        
                        <template v-else>
                            <div class="scroll-body-row" v-for="(scope,indexA) in list" :key="'scroll-body-row-'+indexA">
                                <span 
                                    :style="{
                                        width:columnItem.grow?'10px':(columnItem.width?columnItem.width:'auto'),
                                        flexGrow:columnItem.grow?columnItem.grow:'initial',
                                        flexShrink:columnItem.grow?'initial':'0'
                                    }" 
                                    v-for="(columnItem,indexB) in columns" 
                                    :key="'list-body-cell-'+indexB"
                                >
                                <span class=""> {{columnItem.type==="index"?(indexA+1):(scope[columnItem.name])}} </span>
                                </span>
                            </div>
                        </template>
                        
                    </auto-scroll>    
                </div>
                <!-- <div class="txt10">出库11111111</div> -->
                <!-- list body end -->
            </div>
        </div>
    </div>
</template>
 
<script>
import AutoScroll from '@/components/AutoScroll.vue'
import BlockTitle from './BlockTitle.vue'
export default {
    name:'screen1Warnings',
    components:{BlockTitle,AutoScroll},
    props:{
        list:{
            type:Array,
            default:function(){
                return []
            }
        },
        hideSheB:{
            type:Boolean
        }
    },
    data() {
        return {
            columns:[
                {
                    label:'序号',
                    type:'index',
                    width:'20px'
                },
                {
                    label:'设备',
                    name:'deviceName',
                    width:'30%'
                },
                // {
                //     label:'时间',
                //     name:'warningTime',
                //     width:'28%'
                // },
                {
                    label:'故障代码',
                    name:'warningContent',
                    width:'50%'
                }
            ]
        }
    }
}
</script>
 
<style lang="scss" scoped>
.screen1-warnings{
    // border: 1px solid red;
    height: 100%;
}
.screen-page1-content .auto-scroll-view{
    height: 94%;
}
.txt10{
    text-align: right;
    width: 90%;
    margin: 0 auto;
    margin-top: 10px;
}
</style>