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
| <template>
| <div class="width96 height margin-auto">
| <div
| v-for="(item, index) in boardlist"
| :key="index"
| class="width height45 margin-bottom background-F0F2F5 borderradius boxshadow"
| :style="'background:' + boardbg"
| >
| <div class="board-title flex justify-between align-center" :style="'background:' + boardtitlebg">
| <p class="PrintTitleInfo relative padding-left">{{ item.title }}</p>
|
| </div>
| <template v-for="(element,index) in item.dataList">
| <div class="width94 flex margintopbot height-calc70 overflow" :key="index+'element'">
| <p class="width25 fontweight600 margintopbot">{{ element.materialCode }}</p>
| <p class="width50 fontweight600 margintopbot">{{ element.materialName }}</p>
| <p class="width15 fontweight600 margintopbot">
| <count-to :startVal="startVal" :endVal="element.quantity" :duration="3000"></count-to>
| 件
| </p>
| </div>
| </template>
|
| </div>
| </div>
| </template>
|
| <script>
| import countTo from "vue-count-to";
| export default {
| data() {
| return {
| startVal: 0
| };
| },
| props: {
| boardlist: {
| type: [Array, Object],
| default: () => []
| },
| boardtitlebg: {
| type: [String, Array],
| default: ""
| },
| boardbg: {
| type: String,
| default: ""
| }
| },
| components: { countTo },
| mounted() {
| console.log(this.boardlist);
| },
| methods: {
| load() {}
| },
| watch: {
| boardlist: {
| handler(nvl, ovl) {
| console.log(nvl);
| },
| deep: true
| }
| }
| };
| </script>
|
| <style lang="scss" scoped>
| .board-title {
| width: 100%;
| height: 45px;
| box-shadow: 0 1px 3px 0 #d8dce5;
| background: rgba(240, 242, 245, 1);
| .PrintTitleInfo {
| margin-left: 10px;
| &::after {
| content: "";
| position: absolute;
| top: 0;
| left: 0;
| height: 20px;
| width: 4px;
| background: #2a33ff;
| }
| }
| .board-button {
| padding: 10px 30px;
| border-radius: 8px;
| }
| .passbg {
| color: #fff;
| background: #409eff;
| }
| .notgobg {
| color: #fff;
| background: #e6a23c;
| }
| }
| </style>
|
|