Commit b4349af3 authored by 黄奎's avatar 黄奎

页面修改

parent 0ce4d62a
<style> <style>
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
.myTable_Zk tbody tr:first-child td {
background: yellow !important;
}
.myTable_Zk tbody tr:first-child { .myTable_Zk tbody tr:first-child td {
background: yellow !important; background: yellow !important;
z-index: 1 !important; }
}
.TotalredClass{ .myTable_Zk tbody tr:first-child {
color:red; background: yellow !important;
} z-index: 1 !important;
}
.TotalredClass {
color: red;
}
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -21,19 +23,21 @@ ...@@ -21,19 +23,21 @@
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()" size="small" type="month" placeholder="选择年月"> <el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()"
size="small" type="month" placeholder="选择年月">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div style="display:none"> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载"
label="下载" /> @click="downloadStudentMarket" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}" no-data-label="暂无相关数据" flat <q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}"
class="sticky-column-table sticky-header-column-table no-bottom-table myTable_Zk" separator="none" :data="dataList" :columns="columns" row-key=""> no-data-label="暂无相关数据" flat class="sticky-column-table sticky-header-column-table no-bottom-table myTable_Zk"
separator="none" :data="dataList" :columns="columns" row-key="">
<template v-slot:bottom> <template v-slot:bottom>
</template> </template>
</q-table> </q-table>
...@@ -44,7 +48,9 @@ ...@@ -44,7 +48,9 @@
import { import {
GetStudentMarket GetStudentMarket
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -212,8 +218,8 @@ ...@@ -212,8 +218,8 @@
], ],
dataList: [], dataList: [],
loading: false, loading: false,
myDate:'', myDate: '',
tableHeight:500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
MonthStr: '', MonthStr: '',
...@@ -229,23 +235,35 @@ ...@@ -229,23 +235,35 @@
mounted() { mounted() {
let d = new Date(); let d = new Date();
this.msg.YearStr = d.getFullYear().toString(); this.msg.YearStr = d.getFullYear().toString();
this.msg.MonthStr = (d.getMonth()+1).toString(); this.msg.MonthStr = (d.getMonth() + 1).toString();
this.myDate = this.msg.YearStr+'-'+this.msg.MonthStr this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr
this.getList(); this.getList();
}, },
methods: { methods: {
getCheckDate(){ //下载文件
if(this.myDate){ downloadStudentMarket() {
this.msg.YearStr = this.myDate.split('-')[0]; this.loading = true;
this.msg.MonthStr = this.myDate.split('-')[1]; var msg = JSON.parse(JSON.stringify(this.msg));
this.getList(); EduDownLoad(
"/StudentStat/DownLoadStudentMarket",
msg,
"市场部每日数据统计.xls", res => {
this.loading = false;
}
);
},
getCheckDate() {
if (this.myDate) {
this.msg.YearStr = this.myDate.split('-')[0];
this.msg.MonthStr = this.myDate.split('-')[1];
this.getList();
} }
}, },
//获取数据 //获取数据
getList() { getList() {
this.loading=true; this.loading = true;
GetStudentMarket(this.msg).then(res => { GetStudentMarket(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
...@@ -253,8 +271,7 @@ ...@@ -253,8 +271,7 @@
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ No newline at end of file
<style> <style>
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
</style> </style>
<template> <template>
<div> <div>
...@@ -10,19 +10,21 @@ ...@@ -10,19 +10,21 @@
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <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 v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small"
type="year" placeholder="选择年">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;display:none;" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载"
label="下载" /> @click="downloadStudentMarketMonth" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}" no-data-label="暂无相关数据" flat <q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}"
class="sticky-column-table sticky-header-column-table no-bottom-table" separator="none" :data="dataList" :columns="columns" row-key=""> 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:bottom> <template v-slot:bottom>
</template> </template>
</q-table> </q-table>
...@@ -33,7 +35,9 @@ ...@@ -33,7 +35,9 @@
import { import {
GetStudentMarketMonth GetStudentMarketMonth
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -201,8 +205,8 @@ ...@@ -201,8 +205,8 @@
], ],
dataList: [], dataList: [],
loading: false, loading: false,
myDate:'', myDate: '',
tableHeight:500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
rowsPerPage: 0 rowsPerPage: 0
...@@ -220,11 +224,22 @@ ...@@ -220,11 +224,22 @@
this.getList(); this.getList();
}, },
methods: { methods: {
downloadStudentMarketMonth() {
this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/StudentStat/DownLoadStudentMarketMonth",
msg,
"市场部每月数据统计.xls", res => {
this.loading = false;
}
);
},
//获取数据 //获取数据
getList() { getList() {
this.loading=true; this.loading = true;
GetStudentMarketMonth(this.msg).then(res => { GetStudentMarketMonth(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
...@@ -232,8 +247,7 @@ ...@@ -232,8 +247,7 @@
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ No newline at end of file
<style> <style>
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
.TotalredClass{
color:red; .TotalredClass {
} color: red;
}
</style> </style>
<template> <template>
<div> <div>
...@@ -20,8 +21,7 @@ ...@@ -20,8 +21,7 @@
</q-field> </q-field>
</div> </div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;display:none;" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载" @click="downloadStudentMarketMonthRate" />
label="下载" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
...@@ -103,6 +103,9 @@ ...@@ -103,6 +103,9 @@
import { import {
GetStudentMarketMonthRate GetStudentMarketMonthRate
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -113,11 +116,11 @@ ...@@ -113,11 +116,11 @@
return { return {
tabCheck: 1, tabCheck: 1,
dataList: [], dataList: [],
loading:false, loading: false,
tableHeight:500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
rowsPerPage:0 rowsPerPage: 0
}, },
columns: [{ columns: [{
name: 'ItemName', name: 'ItemName',
...@@ -217,10 +220,21 @@ ...@@ -217,10 +220,21 @@
this.getList(); this.getList();
}, },
methods: { methods: {
downloadStudentMarketMonthRate() {
this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/StudentStat/DownLoadStudentMarketMonthRate",
msg,
"市场部每月成长率数据统计.xls", res => {
this.loading = false;
}
);
},
getList() { getList() {
this.loading=true; this.loading = true;
GetStudentMarketMonthRate(this.msg).then(res => { GetStudentMarketMonthRate(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
...@@ -228,5 +242,4 @@ ...@@ -228,5 +242,4 @@
} }
} }
} }
</script>
</script> \ No newline at end of file
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
</template> </template>
</q-field> </q-field>
</div> </div>
<div style="display:none;"> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载"
@click="downloadStudentStaticYear" /> @click="downloadStudentMarketYear" />
</div> </div>
</div> </div>
<customYearFirst :dataList="dataList" :tabCheck="tabCheck"></customYearFirst> <customYearFirst :dataList="dataList" :tabCheck="tabCheck"></customYearFirst>
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
}, },
methods: { methods: {
//下载文件 //下载文件
downloadStudentStaticYear() { downloadStudentMarketYear() {
this.loading = true; this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg)); var msg = JSON.parse(JSON.stringify(this.msg));
var url = "/StudentStat/DownLoadStudentStaticYear"; var url = "/StudentStat/DownLoadStudentMarketYear";
var fileName = "课程顾问部年数据统计.xls"; var fileName = "市场部年数据统计.xls";
if (this.tabCheck == 2) { if (this.tabCheck == 2) {
url = "/StudentStat/DownLoadStudentStaticYearRate"; url = "/StudentStat/DownLoadStudentMarketYearRate";
fileName = "课程顾问部年成长率数据统计.xls"; fileName = "市场部年成长率数据统计.xls";
} }
EduDownLoad( EduDownLoad(
url, url,
......
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