Blame view

src/views/dashboard/PanelGroup.vue 5.94 KB
yuanshuhui authored
1
2
<template>
  <el-row :gutter="40" class="panel-group">
yuanshuhui authored
3
    <el-col :xs="8" :sm="8" :lg="4" class="card-panel-col">
yuanshuhui authored
4
      <router-link :to="{path: 'inventory/inventoryTransaction'}">
5
      <div class="card-panel">
yuanshuhui authored
6
7
        <div class="card-panel-icon-wrapper icon-transaction">
          <svg-icon icon-class="transaction-total" class-name="card-panel-icon" />
yuanshuhui authored
8
9
10
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
yuanshuhui authored
11
            交易
yuanshuhui authored
12
          </div>
yuanshuhui authored
13
          <count-to :start-val="0" :end-val="data.bllCount" :duration="2600" class="card-panel-num" />
yuanshuhui authored
14
15
        </div>
      </div>
yuanshuhui authored
16
      </router-link>
yuanshuhui authored
17
    </el-col>
yuanshuhui authored
18
    <el-col :xs="8" :sm="8" :lg="4" class="card-panel-col">
yuanshuhui authored
19
      <router-link :to="{path: 'receipt/receiptHeader/900/0'}">
20
      <div class="card-panel" >
yuanshuhui authored
21
22
        <div class="card-panel-icon-wrapper icon-receipt">
          <svg-icon icon-class="receipt-total" class-name="card-panel-icon" />
yuanshuhui authored
23
24
25
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
yuanshuhui authored
26
            入库
yuanshuhui authored
27
          </div>
yuanshuhui authored
28
          <count-to :start-val="0" :end-val="data.receiptTotal" :duration="3000" class="card-panel-num" />
yuanshuhui authored
29
30
        </div>
      </div>
yuanshuhui authored
31
       </router-link>
yuanshuhui authored
32
    </el-col>
yuanshuhui authored
33
    <el-col :xs="8" :sm="8" :lg="4" class="card-panel-col">
yuanshuhui authored
34
       <router-link :to="{path: 'shipment/shipmentHeader'}">
35
      <div class="card-panel">
yuanshuhui authored
36
37
        <div class="card-panel-icon-wrapper icon-shipment">
          <svg-icon icon-class="shipment-total" class-name="card-panel-icon" />
yuanshuhui authored
38
39
40
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
yuanshuhui authored
41
            出库
yuanshuhui authored
42
          </div>
yuanshuhui authored
43
          <count-to :start-val="0" :end-val="data.shipmentTotal" :duration="3200" class="card-panel-num" />
yuanshuhui authored
44
45
        </div>
      </div>
yuanshuhui authored
46
       </router-link>
yuanshuhui authored
47
    </el-col>
yuanshuhui authored
48
    <el-col :xs="8" :sm="8" :lg="4" class="card-panel-col">
yuanshuhui authored
49
       <router-link :to="{path: 'inventory/inventoryHeader'}">
50
      <div class="card-panel" >
yuanshuhui authored
51
52
        <div class="card-panel-icon-wrapper icon-inventory">
          <svg-icon icon-class="inventory-total" class-name="card-panel-icon" />
yuanshuhui authored
53
54
55
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
yuanshuhui authored
56
57
            库存
          </div>
yuanshuhui authored
58
          <count-to :start-val="0" :end-val="data.inventoryTotal" :duration="3600" class="card-panel-num" />
yuanshuhui authored
59
60
        </div>
      </div>
yuanshuhui authored
61
       </router-link>
yuanshuhui authored
62
63
    </el-col>
     <el-col :xs="8" :sm="8" :lg="4" class="card-panel-col">
yuanshuhui authored
64
       <router-link :to="{path: 'inventory/inventoryMaterialSummary'}">
65
      <div class="card-panel" >
yuanshuhui authored
66
67
68
69
70
71
72
        <div class="card-panel-icon-wrapper icon-material">
          <svg-icon icon-class="material-total" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
            物料
          </div>
yuanshuhui authored
73
          <count-to :start-val="0" :end-val="data.materialCount" :duration="3600" class="card-panel-num" />
yuanshuhui authored
74
75
        </div>
      </div>
yuanshuhui authored
76
       </router-link>
yuanshuhui authored
77
78
    </el-col>
     <el-col :xs="8" :sm="8" :lg="4" class="card-panel-col">
yuanshuhui authored
79
       <router-link :to="{path: 'task/taskHeader/0'}">
80
      <div class="card-panel" >
yuanshuhui authored
81
82
83
84
85
86
        <div class="card-panel-icon-wrapper icon-task">
          <svg-icon icon-class="task-total" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
            任务
yuanshuhui authored
87
          </div>
yuanshuhui authored
88
          <count-to :start-val="0" :end-val="data.taskUncompletedTotal" :duration="3600" class="card-panel-num" />
yuanshuhui authored
89
90
        </div>
      </div>
yuanshuhui authored
91
       </router-link>
yuanshuhui authored
92
93
94
95
96
97
98
99
100
101
102
    </el-col>
  </el-row>
</template>

<script>
import CountTo from 'vue-count-to'

export default {
  components: {
    CountTo
  },
yuanshuhui authored
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
  props: {
   chartData: {
      type: Object,
      required: true
    }
  },
  data() {
   return {
     data: this.chartData
   }
  },
  watch: {
    chartData: {
      deep:true,
      handler(value) {
        this.data = value
      }
    }
yuanshuhui authored
121
  }
122
yuanshuhui authored
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
}
</script>

<style lang="scss" scoped>
.panel-group {
  margin-top: 18px;

  .card-panel-col {
    margin-bottom: 32px;
  }

  .card-panel {
    height: 108px;
    cursor: pointer;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    color: #666;
    background: #fff;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .05);

    &:hover {
      .card-panel-icon-wrapper {
        color: #fff;
      }
yuanshuhui authored
150
151
152
153
154
155
      .icon-transaction {
        background: #1ab394;
      }

      .icon-receipt {
        background:#23c6c8;
yuanshuhui authored
156
157
      }
yuanshuhui authored
158
159
      .icon-shipment {
        background: #1c84c6;
yuanshuhui authored
160
161
      }
yuanshuhui authored
162
163
      .icon-inventory {
        background: #8d95c5;
yuanshuhui authored
164
165
      }
yuanshuhui authored
166
167
168
169
170
171
      .icon-material {
      background: #e59aa6;
    }

      .icon-task {
        background: #f8ac59;
yuanshuhui authored
172
173
174
      }
    }
yuanshuhui authored
175
176
    .icon-transaction {
      color: #1ab394;
yuanshuhui authored
177
178
    }
yuanshuhui authored
179
180
    .icon-receipt {
      color:#23c6c8;
yuanshuhui authored
181
182
    }
yuanshuhui authored
183
184
185
186
187
188
189
190
191
192
    .icon-shipment {
      color: #1c84c6;
    }

    .icon-inventory {
        color: #8d95c5;
      }

    .icon-material {
      color: #e59aa6;
yuanshuhui authored
193
194
    }
yuanshuhui authored
195
196
    .icon-task {
      color: #f8ac59;
yuanshuhui authored
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
    }

    .card-panel-icon-wrapper {
      float: left;
      margin: 14px 0 0 14px;
      padding: 16px;
      transition: all 0.38s ease-out;
      border-radius: 6px;
    }

    .card-panel-icon {
      float: left;
      font-size: 48px;
    }

    .card-panel-description {
      float: right;
      font-weight: bold;
      margin: 26px;
      margin-left: 0px;

      .card-panel-text {
        line-height: 18px;
        color: rgba(0, 0, 0, 0.45);
        font-size: 16px;
        margin-bottom: 12px;
      }

      .card-panel-num {
        font-size: 20px;
      }
    }
  }
}

@media (max-width:550px) {
  .card-panel-description {
    display: none;
  }

  .card-panel-icon-wrapper {
    float: none !important;
    width: 100%;
    height: 100%;
    margin: 0 !important;

    .svg-icon {
      display: block;
      margin: 14px auto !important;
      float: none !important;
    }
  }
}
</style>