用户中心和采购计划完善
This commit is contained in:
48
pages/workbench/cost/components/Bar.vue
Normal file
48
pages/workbench/cost/components/Bar.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts
|
||||
type="column"
|
||||
:chartData="chartData"
|
||||
:opts="chartOpts"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'InventoryTrend',
|
||||
// 接收父组件传入的日期参数(YYYY-mm格式)
|
||||
props: {
|
||||
chartData: {
|
||||
type: Object,
|
||||
default: {
|
||||
categories: [], // 日期(1日-当前日或当月总天数)
|
||||
series: [] // 库存趋势数据
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 图表配置
|
||||
chartOpts: {
|
||||
title: { text:'月度收支', left:'center' },
|
||||
tooltip:{ trigger:'axis' },
|
||||
legend:{ data:['支出','收入(CNY)','收入(USD)'], bottom:0 },
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
padding: 16rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user