|
@@ -5,9 +5,9 @@
|
|
|
<div style='position:absolute;z-index:999;right:0;width:100%;'>
|
|
|
<div class='title'>毛利润(万元)</div>
|
|
|
<div class="right" style='position:absolute;right:4%;'>
|
|
|
- <el-button :class='{"active":status==1}' @click='statuschange(1)' type="text">按天</el-button>
|
|
|
- <el-button :class='{"active":status==2}' @click='statuschange(2)' type="text">按月</el-button>
|
|
|
- <el-button :class='{"active":status==3}' @click='statuschange(3)' type="text">按年</el-button>
|
|
|
+ <el-button :class='{"active":search==1}' @click='statuschange(1)' type="text">按天</el-button>
|
|
|
+ <el-button :class='{"active":search==2}' @click='statuschange(2)' type="text">按月</el-button>
|
|
|
+ <el-button :class='{"active":search==3}' @click='statuschange(3)' type="text">按年</el-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- <el-button type="primary">按天</el-button>
|
|
@@ -20,7 +20,7 @@
|
|
|
<div calss='table-top' style='width:95%;margin:10px auto 30px;display:flex;justify-content: space-between;align-items: center;'>
|
|
|
<el-date-picker v-model="value1" type="year" placeholder="选择年"></el-date-picker>
|
|
|
<div>
|
|
|
- 合计
|
|
|
+ 合计{{tabledata.total}}万元
|
|
|
<span class="svg-container">
|
|
|
<svg-icon @click='showchange' :icon-class="show?'eye':'eye-open'" />
|
|
|
</span>
|
|
@@ -33,22 +33,22 @@
|
|
|
利润(万元)
|
|
|
</el-form-item>
|
|
|
<el-form-item label="1月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.jan:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="2月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.feb:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="3月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.mar:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="4月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.apr:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="5月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.may:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="6月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.june:'******'}}
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
@@ -57,22 +57,22 @@
|
|
|
利润(万元)
|
|
|
</el-form-item>
|
|
|
<el-form-item label="7月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.july:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="8月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.aug:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="9月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.sept:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="10月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.oct:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="11月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.nov:'******'}}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="12月">
|
|
|
- 利润(万元)
|
|
|
+ {{show?tabledata.dece:'******'}}
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
@@ -86,86 +86,111 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
- getListwithdrawal
|
|
|
+ getListselectProfit
|
|
|
} from '@/api/settlementManagement'
|
|
|
export default {
|
|
|
name: 'hello',
|
|
|
data () {
|
|
|
return {
|
|
|
formInline:{},
|
|
|
+ tabledata:{},
|
|
|
+ linexaxis:[],
|
|
|
+ linedata:[],
|
|
|
status:1,
|
|
|
- value1:'',
|
|
|
- show:true
|
|
|
+ value1:'2022',
|
|
|
+ show:true,
|
|
|
+ search:'1'
|
|
|
}
|
|
|
},
|
|
|
mounted(){//⭐在mounted中定义
|
|
|
+
|
|
|
this.drawLine();
|
|
|
this.drawBar()
|
|
|
},
|
|
|
methods: {
|
|
|
statuschange(status){
|
|
|
- this.status=status
|
|
|
+ this.search=status
|
|
|
+ this.drawLine();
|
|
|
},
|
|
|
showchange(){
|
|
|
- console.log(11111)
|
|
|
+ this.show=!this.show
|
|
|
},
|
|
|
drawLine(){
|
|
|
- // 基于准备好的dom,初始化echarts实例
|
|
|
- console.log(this.$echarts)
|
|
|
- var echart = this.$echarts.init(document.getElementById("container"))//⭐注意是id选择器
|
|
|
- var option = {
|
|
|
- xAxis: {
|
|
|
- type: 'category',
|
|
|
- boundaryGap: false,
|
|
|
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
|
- axisLine:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- axisTick:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- axisLabel:{
|
|
|
- color:'#9E9E9E'
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'value',
|
|
|
- // name:'毛利润(万元)',
|
|
|
- nameTextStyle:{
|
|
|
- fontWeight:'700',
|
|
|
- fontSize:'16'
|
|
|
- },
|
|
|
- axisLine:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- axisTick:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- axisLabel:{
|
|
|
- color:'#9E9E9E'
|
|
|
- }
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
-
|
|
|
- lineStyle: {
|
|
|
- color:'#2F53EB'
|
|
|
- },
|
|
|
- data: [150, 230, 224, 218, 135, 147, 260],
|
|
|
- type: 'line',
|
|
|
- areaStyle: {
|
|
|
- color:'rgba(207, 219, 254, 1)'
|
|
|
+ var that=this
|
|
|
+ this.linexaxis=[]
|
|
|
+ this.linedata=[]
|
|
|
+ const _obj = {}
|
|
|
+ _obj.year= this.value1
|
|
|
+ _obj.searchType = this.search
|
|
|
+ getListselectProfit(_obj).then(response => {
|
|
|
+ this.tabledata=response.data.formList[0]
|
|
|
+ if(response.data.dataList.length>0){
|
|
|
+ for (let i = 0; i < response.data.dataList.length; i++) {
|
|
|
+ this.linexaxis.unshift(response.data.dataList[i].date)
|
|
|
+ this.linedata.unshift(response.data.dataList[i].profit)
|
|
|
}
|
|
|
}
|
|
|
- ],
|
|
|
- grid: {
|
|
|
- left: '3%',
|
|
|
- right: '4%',
|
|
|
- bottom: '3%',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- };
|
|
|
- echart.setOption(option);
|
|
|
+ var echart = that.$echarts.init(document.getElementById("container"))//⭐注意是id选择器
|
|
|
+ var option = {
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: that.linexaxis,
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ axisTick:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ axisLabel:{
|
|
|
+ color:'#9E9E9E'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value',
|
|
|
+ // name:'毛利润(万元)',
|
|
|
+ nameTextStyle:{
|
|
|
+ fontWeight:'700',
|
|
|
+ fontSize:'16'
|
|
|
+ },
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ axisTick:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ axisLabel:{
|
|
|
+ color:'#9E9E9E'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+
|
|
|
+ lineStyle: {
|
|
|
+ color:'#2F53EB'
|
|
|
+ },
|
|
|
+ data: that.linedata,
|
|
|
+ type: 'line',
|
|
|
+ areaStyle: {
|
|
|
+ color:'rgba(207, 219, 254, 1)'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ grid: {
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ };
|
|
|
+ echart.setOption(option);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ console.log(this.$echarts)
|
|
|
+
|
|
|
},
|
|
|
drawBar(){
|
|
|
var echart1 = this.$echarts.init(document.getElementById("container2"))//⭐注意是id选择器
|