|
|
|
|
@ -4,43 +4,126 @@
|
|
|
|
|
<div ref="lxHeader">
|
|
|
|
|
<lx-header icon="md-apps" text="业务统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
|
|
|
|
</lx-header>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap" :style="{'height':mapHeight+'px'}">
|
|
|
|
|
<echartsLine ref="echartsLine1" :rotate="60" :color="['#147d38','#333']" :lineDataX='monthX' :lineDataY='monthY'></echartsLine>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap" :style="{'height':mapHeight+'px'}">
|
|
|
|
|
<div>
|
|
|
|
|
<el-date-picker @change="changeDate" v-model="dateRange" value-format="yyyy-MM-dd" type="daterange"
|
|
|
|
|
:picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
|
|
align="right">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<echartsLine v-if="showCharts" ref="echartsLine1" :rotate="60" :color="['#147d38','#333']" :lineDataX='monthX'
|
|
|
|
|
:lineDataY='monthY'></echartsLine>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import echartsLine from "@/views/jsc/components/echartsLine.vue";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
echartsLine
|
|
|
|
|
},
|
|
|
|
|
data(){
|
|
|
|
|
return{
|
|
|
|
|
mapHeight:0,
|
|
|
|
|
monthX: ['残疾人证', '自主创业', '经营场地', '教育专项', '励志奖学金', '燃油补贴', '健康体检', '托养', '无障碍改造', '康复设备', '社区康复', '辅具适配','儿童康复','免费用药'],
|
|
|
|
|
monthY: [5, 6, 7, 8, 9, 10, 12, 5, 6, 7, 8, 9,7,2],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.initHeight()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
initHeight() {
|
|
|
|
|
let winHeight = document.body.clientHeight
|
|
|
|
|
this.mapHeight = winHeight - 50 - 20
|
|
|
|
|
console.log(winHeight)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import echartsLine from "./components/echartsLine.vue";
|
|
|
|
|
import {
|
|
|
|
|
getApplyCharts
|
|
|
|
|
} from "@/api/book.js";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
echartsLine
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
mapHeight: 0,
|
|
|
|
|
showCharts: false,
|
|
|
|
|
start_date: '',
|
|
|
|
|
end_date: '',
|
|
|
|
|
dateRange: [],
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
shortcuts: [{
|
|
|
|
|
text: '最近一周',
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: '最近一个月',
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: '最近三个月',
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
monthX: [],
|
|
|
|
|
monthY: [{
|
|
|
|
|
name: '总数',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: []
|
|
|
|
|
}
|
|
|
|
|
// {
|
|
|
|
|
// name:'待审核',
|
|
|
|
|
// type:'bar',
|
|
|
|
|
// data:[5, 6, 7, 8, 9, 10, 12, 5, 6, 7, 8, 9,7,2]
|
|
|
|
|
// },{
|
|
|
|
|
// name:'退回',
|
|
|
|
|
// type:'bar',
|
|
|
|
|
// data:[5, 6, 7, 8, 9, 10, 12, 5, 6, 7, 8, 9,7,2]
|
|
|
|
|
// }
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.initHeight()
|
|
|
|
|
this.getCharts()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
initHeight() {
|
|
|
|
|
let winHeight = document.body.clientHeight
|
|
|
|
|
this.mapHeight = winHeight - 150
|
|
|
|
|
console.log(winHeight)
|
|
|
|
|
},
|
|
|
|
|
changeDate(e) {
|
|
|
|
|
var that = this;
|
|
|
|
|
if (e) {
|
|
|
|
|
this.dateRange = e;
|
|
|
|
|
that.start_date = e[0];
|
|
|
|
|
that.end_date = e[1];
|
|
|
|
|
} else {
|
|
|
|
|
this.dateRange = [];
|
|
|
|
|
that.start_date = '';
|
|
|
|
|
that.end_date = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getCharts();
|
|
|
|
|
},
|
|
|
|
|
getCharts() {
|
|
|
|
|
this.showCharts = false
|
|
|
|
|
this.monthX = []
|
|
|
|
|
this.monthY[0].data = []
|
|
|
|
|
getApplyCharts().then(res => {
|
|
|
|
|
for (var k of res) {
|
|
|
|
|
this.monthX.push(k.name)
|
|
|
|
|
this.monthY[0].data.push(k.total)
|
|
|
|
|
}
|
|
|
|
|
this.showCharts = true
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.wrap{
|
|
|
|
|
width:100%;
|
|
|
|
|
<style>
|
|
|
|
|
.wrap {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|