<template> <div class="full-box reportCss" style="overflow: hidden"> <div class="" style="width: 100%;height:100%;"> <div class="top-tip-box t-title">当前位置:报表管理-</div> <div class="" style="width: 100%;height: 40px" v-if="false"> <div class="" style="width: auto;"> <div class="sl-row-label" style="width: 100px;line-height:34px;">报表名称:</div> <el-input v-model="filter.name" placeholder="请输入内容" style="width:200px;float: left;"></el-input> </div> <el-button class="search-btn" type="primary" @click="searchresult">查询</el-button> </div> <div class="table-result-boxx" style="height: calc(100% - 90px);display: flex;"> <div class="table-container-style"> <el-table :data="tableData.list" height="200"> <el-table-column type="index" align="center" label="编号" width="80"></el-table-column> <el-table-column align="center" v-for="(item, index) in tableHead" :key="index" :label="item" show-overflow-tooltip > <!--<template slot="header" slot-scope="scope">{{scope.row.list[index].title}}</template>--> <template slot-scope="scope">{{scope.row.titleMap[item]}}</template> </el-table-column> </el-table> <el-pagination @current-change="handlePageChange" background layout="total, prev, pager, next" :total="tableData.total" :current-page="tableData.pageNum" :page-size="tableData.pageSize" :page-count="tableData.pages" style="text-align: right;"></el-pagination> </div> </div> </div> <!----> </div> </template> <script> let month = new Date().getMonth()==0?1:new Date().getMonth()+1; let year = month<10?new Date().getFullYear()+"-0"+month :new Date().getFullYear()+"-"+month; export default { name: 'yjManage', data () { return { activeName:'first', timeFilter:[new Date().format("yyyy-")+"01",new Date(year).format("yyyy-MM")], filter:{ name:'', }, tableData:{ list: [], pageNum: 1, pageSize: 10, pages: 0, total: 0, }, } }, mounted (){ /*this.loadTabCharts();*/ }, created(){ this.getDataList(); }, watch:{ }, methods:{ searchresult(){ this.getDataList(1); }, getDataList: function (pager) { let _this = this; _this.tableData.pageNum = _this.$Util.isEmpty(pager) ? _this.tableData.pageNum : pager; /*if(!_this.$Util.isEmpty(_this.timeFilter)){ if(_this.timeFilter.length === 1){ _this.filter.startDate = _this.timeFilter[0]; }else if(_this.timeFilter.length === 2){ _this.filter.startDate = _this.timeFilter[0]; _this.filter.endDate = _this.timeFilter[1]; } }*/ _this.$http.get('/dx-economy-api/reportForms/page', {params: $.extend({pageNum: _this.tableData.pageNum,pageSize: _this.tableData.pageSize},_this.filter)}).then(function (resp) { var _data = resp.data; if (_data.code === 200 && !_this.$Util.isEmpty(_data.data)) { _this.tableData.list = _data.data.list; _this.tableData.pageNum = _data.data.pageNum; _this.tableData.pageSize = _data.data.pageSize; _this.tableData.pages = _data.data.pages; _this.tableData.total = _data.data.total; } else { _this.$message.error(_data.message); } }); }, handlePageChange(currentPage){ this.getDataList(null,currentPage) }, } } </script> <style></style> <style scoped> .aaa{} .aaa{} .aaa{} .aaa{} .aaa{} </style>