Commit 302c7881 by 王志慧

commit

1 parent 089669a9
...@@ -7,6 +7,10 @@ Component({ ...@@ -7,6 +7,10 @@ Component({
opts: { opts: {
type: Object, type: Object,
value: {} value: {}
},
chartData:{
type: Object,
value: {}
} }
}, },
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
</view> </view>
<view class="container" style="height: 200px;"> <view class="container" style="height: 200px;">
<bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{opts.chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" /> <bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" />
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -7,6 +7,10 @@ Component({ ...@@ -7,6 +7,10 @@ Component({
opts: { opts: {
type: Object, type: Object,
value: {} value: {}
},
chartData:{
type: Object,
value: {}
} }
}, },
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</view> </view>
</view> </view>
<view class="container" style="height: 180px;"> <view class="container" style="height: 180px;">
<line-echart class="f2-chart" period="{{timePeriod}}" chartData="{{opts.lineData}}" color="{{opts.lineColr}}" tickCount="{{opts.tickCount}}" keys="{{opts.keys}}"/> <line-echart class="f2-chart" period="{{timePeriod}}" chartData="{{chartData}}" color="{{opts.lineColr}}" tickCount="{{opts.tickCount}}" keys="{{opts.keys}}"/>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
</view> </view>
</view> </view>
<view class="line-box"> <view class="line-box">
<output-line id="line" opts="{{opts}}" bind:selectTime="selectTime" bind:selectEvent="selectEvent"></output-line> <output-line id="line" opts="{{opts}}" chartData="{{lineData}}" bind:selectTime="selectTime" bind:selectEvent="selectEvent"></output-line>
</view> </view>
<view class="bar-box"> <view class="bar-box">
<output-bar opts="{{opts}}" id="bar" bind:selectEvent="selectBarEvent"></output-bar> <output-bar opts="{{opts}}" chartData="{{chartData}}" id="bar" bind:selectEvent="selectBarEvent"></output-bar>
</view> </view>
<staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="{{type ==2?'equity':'boutique'}}"/> <staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="{{type ==2?'equity':'boutique'}}"/>
<view class="table-box"> <view class="table-box">
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
</view> </view>
</scroll-view > </scroll-view >
<van-calendar show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose"/>
\ No newline at end of file \ No newline at end of file
<van-calendar max-range="{{ 30 }}" show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose"/>
\ No newline at end of file \ No newline at end of file
...@@ -24,7 +24,7 @@ Component({ ...@@ -24,7 +24,7 @@ Component({
}, },
observers: { observers: {
'chartData': function (data) { 'chartData': function (data) {
console.log(data, '9999999999') console.log(data, '----------------')
this.initData(data) this.initData(data)
...@@ -72,7 +72,7 @@ Component({ ...@@ -72,7 +72,7 @@ Component({
type: 'solid' type: 'solid'
} }
}, },
padding: [2, 10], padding: [0, 12],
borderWidth: 2, borderWidth: 2,
borderColor: this.data.color, borderColor: this.data.color,
borderRadius: 10, borderRadius: 10,
...@@ -86,7 +86,7 @@ Component({ ...@@ -86,7 +86,7 @@ Component({
// }, // },
formatter: function (item) { formatter: function (item) {
console.log(item) console.log(item)
return `${item[0].value}` + '人' return `${item[0].value}`
} }
}, },
xAxis: { xAxis: {
......
...@@ -52,6 +52,7 @@ Component({ ...@@ -52,6 +52,7 @@ Component({
}) })
}, },
setOption(chart,xData,yData) { setOption(chart,xData,yData) {
console.log(xData)
var option = { var option = {
grid: { grid: {
left: 8, left: 8,
...@@ -68,7 +69,7 @@ Component({ ...@@ -68,7 +69,7 @@ Component({
type: 'solid' type: 'solid'
} }
}, },
padding: [2, 10], padding: [0, 12],
borderWidth: 2, borderWidth: 2,
borderColor: '#6ED0BE', borderColor: '#6ED0BE',
borderRadius: 10, borderRadius: 10,
...@@ -82,7 +83,7 @@ Component({ ...@@ -82,7 +83,7 @@ Component({
// }, // },
formatter: function (item) { formatter: function (item) {
console.log(item) console.log(item)
return `${item[0].value}` + '人' return `${item[0].value}`
} }
}, },
xAxis: { xAxis: {
...@@ -124,7 +125,7 @@ Component({ ...@@ -124,7 +125,7 @@ Component({
}, },
dataZoom: { dataZoom: {
type: "inside", type: "inside",
maxSpan: 10 maxSpan: xData.length<5?50:10
}, },
series: [{ series: [{
data: yData, data: yData,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!