|
|
@ -6,101 +6,251 @@
|
|
|
|
!-->
|
|
|
|
!-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="main-layout">
|
|
|
|
<div class="main-layout">
|
|
|
|
|
|
|
|
<el-form ref="form" :model="params" :rules="rules" label-width="120px">
|
|
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
|
|
|
<el-col :xs="24" :sm="20" :md="12" :lg="6" :xl="4">
|
|
|
|
|
|
|
|
<el-form-item label="名称">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="params.reportName"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
placeholder="名称"
|
|
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :xs="24" :sm="20" :md="12" :lg="6" :xl="4">
|
|
|
|
|
|
|
|
<el-form-item label="报表编码">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="params.reportCode"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
placeholder="报表编码"
|
|
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :xs="24" :sm="20" :md="4" :lg="4" :xl="4">
|
|
|
|
|
|
|
|
<el-button type="primary" size="mini" @click="search('form')"
|
|
|
|
|
|
|
|
>查询</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button type="danger" size="mini" @click="reset('form')"
|
|
|
|
|
|
|
|
>重置</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-col v-for="groupItem in reportGroups" :key="groupItem.groupId" :span="6">
|
|
|
|
<el-col v-for="item in list" :key="item.id" :span="6">
|
|
|
|
<div class="list">
|
|
|
|
<div class="bg">
|
|
|
|
<header>{{ groupItem.groupName }}</header>
|
|
|
|
<img
|
|
|
|
<div v-for="report in groupItem.reportList" :key="report.reportId">
|
|
|
|
class="bg-img"
|
|
|
|
<p @click="openDesign(report.reportId)">{{ report.reportName }}</p>
|
|
|
|
:src="
|
|
|
|
<!-- <el-button type="success" size="mini" icon="el-icon-setting" circle plain @click="openDesign(report.reportId)" />
|
|
|
|
item.reportImage == null || item.reportImage == ''
|
|
|
|
<el-button type="primary" size="mini" icon="el-icon-view" circle plain /> -->
|
|
|
|
? require('../../../assets/images/charts.jpg')
|
|
|
|
|
|
|
|
: item.reportImage
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
alt=""
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
<header>{{ item.reportName }}</header>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
|
|
|
|
{{ item.updateTime }}
|
|
|
|
|
|
|
|
<div class="operation">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
icon="el-icon-share"
|
|
|
|
|
|
|
|
class="view"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="share(item)"
|
|
|
|
|
|
|
|
v-permission="'bigScreenManage:share'"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
|
|
|
class="view"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="viewDesign(item)"
|
|
|
|
|
|
|
|
v-permission="'bigScreenManage:view'"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
|
|
class="edit"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="openDesign(item)"
|
|
|
|
|
|
|
|
v-permission="'bigScreenManage:design'"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<div class="block">
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
|
|
|
:total="totalCount"
|
|
|
|
|
|
|
|
:page-sizes="[8, 20, 50, 100]"
|
|
|
|
|
|
|
|
:page-size="params.pageSize"
|
|
|
|
|
|
|
|
:current-page="params.pageNumber"
|
|
|
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<Share
|
|
|
|
|
|
|
|
:visib="visibleForShareDialog"
|
|
|
|
|
|
|
|
:reportCode="reportCodeForShareDialog"
|
|
|
|
|
|
|
|
:reportName="reportNameForShareDialog"
|
|
|
|
|
|
|
|
@handleClose="visibleForShareDialog = false"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import Share from "@/views/report/report/components/share";
|
|
|
|
|
|
|
|
import { reportPageList } from "@/api/report";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'Login',
|
|
|
|
name: "Login",
|
|
|
|
components: {},
|
|
|
|
components: { Share },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
reportGroups: [
|
|
|
|
list: [],
|
|
|
|
{
|
|
|
|
rules: {},
|
|
|
|
groupId: 1,
|
|
|
|
totalCount: 0,
|
|
|
|
groupName: '时效类',
|
|
|
|
totalPage: 0,
|
|
|
|
reportList: [
|
|
|
|
params: {
|
|
|
|
{
|
|
|
|
reportCode: "",
|
|
|
|
reportId: 1,
|
|
|
|
reportName: "",
|
|
|
|
reportName: 'excel报表1',
|
|
|
|
reportType: 'report_excel',
|
|
|
|
|
|
|
|
pageNumber: 1,
|
|
|
|
|
|
|
|
pageSize: 8,
|
|
|
|
|
|
|
|
order: "DESC",
|
|
|
|
|
|
|
|
sort: "update_time"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// 分享
|
|
|
|
reportId: 2,
|
|
|
|
visibleForShareDialog: false,
|
|
|
|
reportName: 'excel报表2',
|
|
|
|
reportCodeForShareDialog: "",
|
|
|
|
|
|
|
|
reportNameForShareDialog: ""
|
|
|
|
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
mounted() {},
|
|
|
|
reportId: 3,
|
|
|
|
created() {
|
|
|
|
reportName: 'excel报表3',
|
|
|
|
this.queryByPage();
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
methods: {
|
|
|
|
groupId: 2,
|
|
|
|
// 查询
|
|
|
|
groupName: '货物量',
|
|
|
|
search() {
|
|
|
|
reportList: [
|
|
|
|
this.params.pageNumber = 1;
|
|
|
|
{
|
|
|
|
this.queryByPage();
|
|
|
|
reportId: 1,
|
|
|
|
|
|
|
|
reportName: 'excel报表1',
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// 重置
|
|
|
|
reportId: 2,
|
|
|
|
reset(formName) {
|
|
|
|
reportName: 'excel报表2',
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
|
|
|
this.params.reportName = "";
|
|
|
|
|
|
|
|
this.params.reportCode = "";
|
|
|
|
|
|
|
|
this.params.pageNumber = 1;
|
|
|
|
|
|
|
|
this.queryByPage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
async queryByPage() {
|
|
|
|
reportId: 3,
|
|
|
|
const res = await reportPageList(this.params);
|
|
|
|
reportName: 'excel报表3',
|
|
|
|
if (res.code != "200") return;
|
|
|
|
|
|
|
|
this.listLoading = true;
|
|
|
|
|
|
|
|
this.list = res.data.records;
|
|
|
|
|
|
|
|
this.list.forEach(value => {
|
|
|
|
|
|
|
|
value["reportNameCode"] =
|
|
|
|
|
|
|
|
value.reportName + "[" + value.reportCode + "]";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.totalCount = res.data.total;
|
|
|
|
|
|
|
|
this.totalPage = res.data.pages;
|
|
|
|
|
|
|
|
this.listLoading = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
handleSizeChange(val) {
|
|
|
|
|
|
|
|
this.params.pageSize = val;
|
|
|
|
|
|
|
|
this.queryByPage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
}
|
|
|
|
this.params.pageNumber = val;
|
|
|
|
|
|
|
|
this.queryByPage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
// 分享
|
|
|
|
methods: {
|
|
|
|
share(val) {
|
|
|
|
openDesign(reportId) {
|
|
|
|
//excel暂不支持
|
|
|
|
var routeUrl = this.$router.resolve({ path: '/excelreport/designer', query: { reportCode: reportId }})
|
|
|
|
this.$message.warning("暂不支持excel报表分享");
|
|
|
|
window.open(routeUrl.href, '_blank')
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.reportCodeForShareDialog = val.reportCode;
|
|
|
|
|
|
|
|
this.reportNameForShareDialog = val.reportName;
|
|
|
|
|
|
|
|
this.visibleForShareDialog = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
openDesign(val) {
|
|
|
|
|
|
|
|
var routeUrl = this.$router.resolve({
|
|
|
|
|
|
|
|
path: "/excelreport/designer",
|
|
|
|
|
|
|
|
query: {
|
|
|
|
|
|
|
|
reportCode: val.reportCode,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
window.open(routeUrl.href, "_blank");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
viewDesign(val) {
|
|
|
|
|
|
|
|
var routeUrl = this.$router.resolve({
|
|
|
|
|
|
|
|
path: "/excelreport/viewer",
|
|
|
|
|
|
|
|
query: { reportCode: val.reportCode }
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
window.open(routeUrl.href, "_blank");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.main-layout {
|
|
|
|
.main-layout {
|
|
|
|
|
|
|
|
padding: 20px;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
height: auto;
|
|
|
|
height: auto;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
.list {
|
|
|
|
|
|
|
|
background: #fff;
|
|
|
|
background: #fff;
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
|
|
|
header {
|
|
|
|
header {
|
|
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 40px;
|
|
|
|
line-height: 80px;
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
}
|
|
|
|
|
|
|
|
.bg {
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 200px;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
|
|
|
border: 12px solid white;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bg .bg-img {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
filter: blur(6px);
|
|
|
|
|
|
|
|
z-index: 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p {
|
|
|
|
.content {
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
z-index: 3;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
footer {
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
padding: 16px;
|
|
|
|
line-height: 30px;
|
|
|
|
line-height: 30px;
|
|
|
|
text-align: center;
|
|
|
|
position: absolute;
|
|
|
|
color: #666;
|
|
|
|
z-index: 3;
|
|
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
|
|
.operation {
|
|
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
|
|
.view,
|
|
|
|
|
|
|
|
.edit {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
font-size: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
margin: 5px 0;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
|
|
background: rgb(234, 237, 252);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|