|
@@ -1,5 +1,22 @@
|
|
|
<template>
|
|
|
<div v-loading="fullscreenLoading">
|
|
|
+ <el-dialog top="35vh" width="400px" title="团组清单下载" :visible.sync="groupVisible">
|
|
|
+ <el-date-picker
|
|
|
+ style="width:100%;"
|
|
|
+ v-model="downloadtime"
|
|
|
+ type="daterange"
|
|
|
+ align="right"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :picker-options="pickerOptions">
|
|
|
+ </el-date-picker>
|
|
|
+ <div class="group-dialog-btn">
|
|
|
+ <el-button @click="groupVisible=false">取消</el-button>
|
|
|
+ <el-button @click="GroupListFile" type="primary">下载</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<div class="group-list">
|
|
|
<div class="group-box">
|
|
|
<div>
|
|
@@ -20,6 +37,7 @@
|
|
|
<el-button @click="Inquireclick()" type="primary">查 询</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
+ <el-button @click="evocationdownload" type="primary">团组清单下载</el-button>
|
|
|
<el-button @click="addgroup()" type="primary">新增团组</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -184,7 +202,37 @@ export default {
|
|
|
token:'',
|
|
|
fullscreenLoading:false,
|
|
|
userid:'',
|
|
|
- pageId:''
|
|
|
+ pageId:'',
|
|
|
+ groupVisible:false,
|
|
|
+ //下载团组清单时间
|
|
|
+ downloadtime:'',
|
|
|
+ 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]);
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -197,6 +245,17 @@ export default {
|
|
|
this.$route.meta.isBack=false
|
|
|
},
|
|
|
methods:{
|
|
|
+ //处理时间
|
|
|
+ disposeTime(val){
|
|
|
+ var date = new Date(val);
|
|
|
+ var y = date.getFullYear();
|
|
|
+ var m = date.getMonth() + 1;
|
|
|
+ m = m < 10 ? ('0' + m) : m;
|
|
|
+ var d = date.getDate();
|
|
|
+ d = d < 10 ? ('0' + d) : d;
|
|
|
+ let time = y + '-' + m + '-' + d;
|
|
|
+ return time
|
|
|
+ },
|
|
|
//分页api
|
|
|
PostGroupPageList(){
|
|
|
var url = "/api/Groups/PostGroupPageList"
|
|
@@ -240,6 +299,38 @@ export default {
|
|
|
this.currentPage=1;
|
|
|
this.PostGroupPageList()
|
|
|
},
|
|
|
+ //唤起团组清单下载
|
|
|
+ evocationdownload(){
|
|
|
+ this.downloadtime="";
|
|
|
+ this.groupVisible=true;
|
|
|
+ },
|
|
|
+ //团组清单下载
|
|
|
+ GroupListFile(){
|
|
|
+ if (this.downloadtime==null||this.downloadtime=="") {
|
|
|
+ this.$message.error("请选择时间!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var url = "/api/Groups/GroupListFile?beginDt="+this.disposeTime(this.downloadtime[0])+"&endDt="+this.disposeTime(this.downloadtime[1])
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'get',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg ,
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ window.open(res.data.data);
|
|
|
+ that.groupVisible=false;
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
addgroup(){
|
|
|
this.$router.push({path: '/home/Groupedit'});
|
|
|
},
|
|
@@ -400,4 +491,8 @@ export default {
|
|
|
.group-box>.el-input{
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
+ .group-dialog-btn{
|
|
|
+ text-align: right;
|
|
|
+ margin-top: 30px;
|
|
|
+ }
|
|
|
</style>
|