|
@@ -88,7 +88,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listCorps } from "../../src/api/index";
|
|
|
+import { listCorps , listCorps_s,listCorps_ss} from "../../src/api/index";
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
@@ -97,7 +97,7 @@ export default {
|
|
|
version: "3.2.1",
|
|
|
tableData: [{
|
|
|
date: '2020-11-20 12:00',
|
|
|
- name: '某客户出库单审核',
|
|
|
+ name: "<p>维护内容</p>",
|
|
|
address: '查看详情'
|
|
|
}, {
|
|
|
date: '2020-11-20 12:00',
|
|
@@ -117,6 +117,8 @@ export default {
|
|
|
},
|
|
|
created(){
|
|
|
this.getList();
|
|
|
+ this.getLabel_s();
|
|
|
+ this.getLabel_ss();
|
|
|
},
|
|
|
methods: {
|
|
|
//设置单元格边框
|
|
@@ -130,9 +132,22 @@ export default {
|
|
|
console.log(response.rows);
|
|
|
});
|
|
|
},
|
|
|
+ // 仓库图表
|
|
|
+ getLabel_s(){
|
|
|
+ listCorps_s(this.queryParse).then(response =>{
|
|
|
+ console.log(response.rows);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 商品图表
|
|
|
+ getLabel_ss(){
|
|
|
+ listCorps_ss(0).then(response =>{
|
|
|
+ console.log(response);
|
|
|
+ })
|
|
|
+ },
|
|
|
goTarget(href) {
|
|
|
window.open(href, "_blank");
|
|
|
},
|
|
|
+ //仓库图表
|
|
|
drawLine() {
|
|
|
// 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
|
|
|
let myChart = this.$echarts.init(document.getElementById('box'))
|
|
@@ -227,10 +242,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {value: 535, name: '荆州'},
|
|
|
- {value: 510, name: '兖州'},
|
|
|
- {value: 634, name: '益州'},
|
|
|
- {value: 735, name: '西凉'}
|
|
|
+ {value: 500, name: '荆州'},
|
|
|
+ {value: 500, name: '兖州'},
|
|
|
],
|
|
|
emphasis: {
|
|
|
itemStyle: {
|
|
@@ -251,7 +264,7 @@ export default {
|
|
|
backgroundColor: '#fff',
|
|
|
|
|
|
title: {
|
|
|
- text: '某某统计',
|
|
|
+ text: '货主库存占比统计',
|
|
|
left: 'center',
|
|
|
top: 20,
|
|
|
textStyle: {
|
|
@@ -279,11 +292,11 @@ export default {
|
|
|
radius: '80%',
|
|
|
center: ['50%', '60%'],
|
|
|
data: [
|
|
|
- {value: 335, name: '某某库存1'},
|
|
|
- {value: 310, name: '某某库存2'},
|
|
|
- {value: 274, name: '某某库存3'},
|
|
|
- {value: 235, name: '某某库存4'},
|
|
|
- {value: 400, name: '某某库存5'}
|
|
|
+ {value: 335, name: '货主1'},
|
|
|
+ {value: 310, name: '货主2'},
|
|
|
+ {value: 274, name: '货主3'},
|
|
|
+ {value: 235, name: '货主4'},
|
|
|
+ {value: 400, name: '货主5'}
|
|
|
].sort(function (a, b) { return a.value - b.value; }),
|
|
|
roseType: 'radius',
|
|
|
label: {
|
|
@@ -318,7 +331,7 @@ export default {
|
|
|
// 绘制图表
|
|
|
myChart.setOption({
|
|
|
title: {
|
|
|
- text: '某某库存统计',
|
|
|
+ text: '本仓库商品统计',
|
|
|
subtext: '虚构数据',
|
|
|
left: 'center'
|
|
|
},
|
|
@@ -338,7 +351,7 @@ export default {
|
|
|
xAxis: [
|
|
|
{
|
|
|
type: 'category',
|
|
|
- data: ['1号仓库', '2号仓库', '3号仓库', '4号仓库', '5号仓库', '6号仓库', '7号仓库'],
|
|
|
+ data: ['棉花', '淀粉', '木薯', '冰糖', '麻花', '海盐', '胡椒粉'],
|
|
|
axisTick: {
|
|
|
alignWithLabel: true
|
|
|
}
|