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
| <template>
| <div class="main-home-notice el-alert--warning is-light" v-if="visible" @click.stop="onClose">
| <div class="left-icon"><i class="el-icon-warning"></i></div>
| <div class="notice-view">
| <auto-scroll :step-speed="4000" dir="horizontal">
| <div class="notice-item" v-for="(item, index) in notices" :key="'notice-item-' + index">
| {{ index + 1 }}、零件号:{{item.itemName}},零件名称:{{item.itemDes}},超限。目前库存<span class="blue-f">{{item.itemNum}}</span>件,下限<span class="red-f">{{item.minStorage}}</span>件,上限<span class="red-f">{{item.maxStorage}}</span>件。
| </div>
| </auto-scroll>
| </div>
| </div>
| </template>
|
| <script>
| import AutoScroll from '@/components/autoscroll/index.vue';
| export default {
| name: 'mainHomeNotice',
| components: { AutoScroll },
| props: {
| notices: {
| type: Array,
| default: function () {
| return [];
| }
| },
| visible: {
| type: Boolean,
| default: false
| }
| },
| methods: {
| onClose() {
| this.$emit('update:visible', false);
| }
| }
| };
| </script>
|
| <style lang="scss" scoped>
| .main-home-notice {
| $leftWidth: 36px;
| position: absolute;
| top: 0;
| left: 0;
| width: 100%;
| box-sizing: border-box;
| z-index: 20;
| font-size: 20px;
| height: 40px;
| padding-left: $leftWidth;
| cursor: default;
| .left-icon {
| position: absolute;
| top: 0;
| left: 0;
| height: 100%;
| width: $leftWidth;
| display: flex;
| align-items: center;
| justify-content: center;
| }
| .notice-view {
| height: 100%;
| display: flex;
| align-items: center;
| }
| .notice-item {
| height: 100%;
| display: flex;
| align-items: center;
| margin-right: 20px;
| &:last-child {
| margin-right: 0;
| }
| .blue-f{
| color:#409eff;
| }
| .red-f{
| color:#ff0000;
| }
| }
| }
| </style>
|
|