Blame view

ant-design-vue-jeecg/src/views/dashboard/Analysis.vue 5.48 KB
肖超群 authored
1
2
<template>
  <div>
李泰瑜 authored
3
4
5
6
7
8
    <a-row :gutter="24">

      <div class="col-sm-2" style="padding:5px;">
        <a class="menuItem" href="/wms/inventory/inventoryTransaction">

          <div class="total_box ys01">
肖超群 authored
9
            <h1>{{ s1 }}</h1>
李泰瑜 authored
10
11
12
13
14
15
16
            <p>今日库存交易量</p>
          </div>
        </a>
      </div>
      <div class="col-sm-2" style="padding:5px;">
        <a class="menuItem" href="/wms/receipt/receiptHeader/900/0">
          <div class="total_box ys02">
肖超群 authored
17
            <h1>{{ s2 }}</h1>
李泰瑜 authored
18
19
20
21
22
23
24
            <p>今日入库量</p>
          </div>
        </a>
      </div>
      <div class="col-sm-2" style="padding:5px;">
        <a class="menuItem" href="/wms/shipment/shipmentHeader">
          <div class="total_box ys03">
肖超群 authored
25
            <h1>{{ s3 }}</h1>
李泰瑜 authored
26
27
28
29
30
31
32
            <p>今日出库量</p>
          </div>
        </a>
      </div>
      <div class="col-sm-2" style="padding:5px;">
        <a class="menuItem" href="/wms/inventory/inventoryHeader">
          <div class="total_box ys04">
肖超群 authored
33
            <h1>{{ s4 }}</h1>
李泰瑜 authored
34
35
36
37
38
39
40
            <p>库存总量</p>
          </div>
        </a>
      </div>
      <div class="col-sm-2" style="padding:5px;">
        <a class="menuItem" href="/wms/inventory/inventoryMaterialSummary">
          <div class="total_box ys05">
肖超群 authored
41
            <h1>{{ s5 }}</h1>
李泰瑜 authored
42
43
44
45
46
47
48
            <p>库内物料品数</p>
          </div>
        </a>
      </div>
      <div class="col-sm-2" style="padding:5px;">
        <a class="menuItem" href="/wms/task/taskHeader?InternalTaskType=100">
          <div class="total_box ys06">
肖超群 authored
49
            <h1>{{ s6 }}</h1>
李泰瑜 authored
50
51
52
53
54
55
56
57
58
59
            <p>待执行任务数</p>
          </div>
        </a>
      </div>

    </a-row>


    <a-row :gutter="24">
      <a-col :span="12">
60
        <a-card  :bordered="false" title="历史每日收发货量" :style="{ marginTop: '24px' }">
李泰瑜 authored
61
62
63
64
65
66
67
68
69
70
          <a-row>
            <a-col :span="19">
              <div id="chart1" class="flot-chart1">
                这里放图表
              </div>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
      <a-col :span="12">
71
        <a-card  :bordered="false" title="库位利用率" :style="{ marginTop: '24px' }">
李泰瑜 authored
72
73
74
75
76
77
78
79
80
81
82
83
84
85
          <a-row>
            <a-col :span="19">
              <div id="chart2" class="flot-chart1">
                这里放图表
              </div>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
    </a-row>


    <a-row :gutter="24">
      <a-col :span="12">
86
        <a-card  :bordered="false" title="在线库存状态" :style="{ marginTop: '24px' }">
李泰瑜 authored
87
88
89
90
91
92
93
94
95
96
          <a-row>
            <a-col :span="19">
              <div id="chart3" class="flot-chart1">
                这里放图表
              </div>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
      <a-col :span="12">
97
        <a-card  :bordered="false" title="库存概况" :style="{ marginTop: '24px' }">
李泰瑜 authored
98
99
100
101
102
103
104
105
106
107
108
109
          <a-row>
            <a-col :span="19">
              <div id="chart4" class="flot-chart1">
                这里放图表
              </div>
            </a-col>
          </a-row>
        </a-card>
      </a-col>
    </a-row>
肖超群 authored
110
111
112
  </div>
</template>
肖超群 authored
113
114
115
116
117
118
119
120
121
122
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<script language="javascript"  type="text/javascript">
import {inventoryOverview, deliveringAmount, inventoryUtilization, inventoryStatus, getCommonData} from '@/api/api'

export default {
  name: 'Echartdemo',
  data() {
    return {
      msg: 'EChart demo',
      s1: "0",
      s2: "0",
      s3: "0",
      s4: "0",
      s5: "0",
      s6: "0"
    }
  },
  mounted() {
    this.drawLine();
  },
  methods: {
    drawLine() {
      let chart1 = this.$echarts.init(document.getElementById('chart1'))
      let chart2 = this.$echarts.init(document.getElementById('chart2'))
      let chart3 = this.$echarts.init(document.getElementById('chart3'))
      let chart4 = this.$echarts.init(document.getElementById('chart4'))

      deliveringAmount().then((res) => {
        if (res.success) {
          chart1.setOption(JSON.parse(res.message));
        }
      })
      inventoryUtilization().then((res) => {
        if (res.success) {
          chart2.setOption(JSON.parse(res.message));
        }
      })
      inventoryStatus().then((res) => {
        if (res.success) {
          chart3.setOption(JSON.parse(res.message));
        }
      })
      inventoryOverview().then((res) => {
        if (res.success) {
          chart4.setOption(JSON.parse(res.message));
        }
      })
      getCommonData().then((res) => {
        if (res.success) {
          this.s1 = res.result.bllCount
          this.s2 = res.result.receiptTotal
          this.s3 = res.result.shipmentTotal
          this.s4 = res.result.inventoryTotal
          this.s5 = res.result.materialCount
          this.s6 = res.result.taskUncompletedTotal
        }
      })
李泰瑜 authored
170
171
    }
  }
肖超群 authored
172
}
李泰瑜 authored
173
</script>
肖超群 authored
174
李泰瑜 authored
175
<style scoped>
肖超群 authored
176
177
178
@media (min-width: 768px) {
  .col-sm-2 {
    float: left
李泰瑜 authored
179
180
  }
肖超群 authored
181
182
  .col-sm-2 {
    width: 16.66666667%
李泰瑜 authored
183
184
  }
肖超群 authored
185
}
李泰瑜 authored
186
肖超群 authored
187
188
189
190
191
192
193
194
195
196
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
.panel-heading h1, .panel-heading h2 {
  margin-bottom: 5px
}

.ibox-content h1, .ibox-content h2, .ibox-content h3, .ibox-content h4, .ibox-content h5, .ibox-title h1, .ibox-title h2, .ibox-title h3, .ibox-title h4, .ibox-title h5 {
  margin-top: 5px
}

h1 {
  font-size: 30px;
  color: #fff;
}

.total_box {
  text-align: center;
  color: #fff;
  padding: 8px 0 10px 0;
}

.total_box:hover {
  opacity: 0.8;
}

.ys01 {
  background: #1ab394;
}

.ys02 {
  background: #23c6c8;
}

.ys03 {
  background: #1c84c6;
}

.ys04 {
  background: #8d95c5;
}

.ys05 {
  background: #e59aa6;
}

.ys06 {
  background: #f8ac59;
}

.flot-chart1 {
  height: 290px;
}
李泰瑜 authored
237
</style>