Commit a50e1497 authored by zhengke's avatar zhengke

修改

parent e4953f26
......@@ -512,6 +512,26 @@ export function GetStudentStaticRateMonth(data) {
});
}
//获取月度数据
export function GetStudentStaticYear(data) {
return request({
url: '/StudentStat/GetStudentStaticYear',
method: 'post',
data
});
}
//获取月度数据
export function GetStudentStaticYearRate(data) {
return request({
url: '/StudentStat/GetStudentStaticYearRate',
method: 'post',
data
});
}
......
......@@ -5,7 +5,7 @@
}
</style>
<template>
<div class="page-body">
<div>
<div class="col row wrap q-mb-lg">
<div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense>
......
......@@ -5,7 +5,7 @@
}
</style>
<template>
<div class="page-body">
<div>
<div class="col row wrap q-mb-lg">
<div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense>
......
<style>
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
}
</style>
<template>
<div>
<div class="page-content">
<q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}"
no-data-label="暂无相关数据" flat class="sticky-column-table sticky-header-column-table no-bottom-table"
separator="none" :data="dataList" :columns="columns" row-key="">
<template v-slot:header-cell-FirstYear="props">
<q-th :props="props">
<span v-if="dataList&&dataList.length>0">{{dataList[0].FirstYearStr}}</span>
</q-th>
</template>
<template v-slot:header-cell-SecondYear="props">
<q-th :props="props">
<span v-if="dataList&&dataList.length>0">{{dataList[0].SecondYearStr}}</span>
</q-th>
</template>
<template v-slot:bottom>
</template>
</q-table>
</div>
</div>
</template>
<script>
export default {
props: {
dataList: {
type: Array,
default: null
}
},
meta: {
title: ""
},
components: {},
data() {
return {
columns: [{
name: 'ItemName',
label: '名称',
field: 'ItemName',
align: 'left'
},
{
name: 'FirstYear',
label: '第一条',
field: 'FirstYear',
align: 'left'
},
{
name: 'SecondYear',
label: '第二条',
field: 'SecondYear',
align: 'left',
},
{
name: 'YearRate',
label: '成长率',
field: 'YearRate',
align: 'left',
}
],
loading: false,
msg:{
rowsPerPage: 0
},
tableHeight: 500,
}
},
created() {
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90;
}, 100)
},
mounted() {
},
methods: {
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<template>
<div class="page-body">
<q-tabs v-model="tabCheck" @input="getList" narrow-indicator dense align="left" class="text-primary q-mb-sm">
<q-tab :ripple="false" :name="1" label="年份统计" />
<q-tab :ripple="false" :name="2" label="成长率" />
</q-tabs>
<div class="col row wrap q-mb-lg">
<div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense>
<template v-slot:control>
<el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small"
type="year" placeholder="选择年">
</el-date-picker>
</template>
</q-field>
</div>
</div>
<yearFirst :dataList="dataList"></yearFirst>
</div>
</template>
<script>
import yearFirst from '../sale/yearFirst';
import {
GetStudentStaticYear
} from '../../api/sale/sale';
import {
GetStudentStaticYearRate
} from '../../api/sale/sale';
export default {
props: {},
meta: {
title: ""
},
components: {
yearFirst
},
data() {
return {
tabCheck: 1,
dataList:[],
msg: {
YearStr: '',
rowsPerPage: 0
}
}
},
created() {
},
mounted() {
let d = new Date();
this.msg.YearStr = d.getFullYear().toString();
this.getList();
},
methods: {
//获取数据
getList() {
if (this.tabCheck == 1) {
this.loading = true;
GetStudentStaticYear(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
}
})
} else {
this.loading = true;
GetStudentStaticYearRate(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
}
})
}
}
}
}
</script>
......@@ -1070,6 +1070,11 @@ const routes = [{
component: ()=>
import("pages/sale/monthTotal.vue")
},
{
path: "/sale/yearTotal", //年度统计
component: ()=>
import("pages/sale/yearTotal.vue")
},
{
path: "/sale/everyMonthTotal", //每月统计
component: ()=>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment