Raod 3 years ago
parent 841ade114d
commit c45948ffb5

@ -11,21 +11,21 @@
<div class="bg"> <div class="bg">
<div class="rgba" /> <div class="rgba" />
<div class="content"> <div class="content">
<header>{{ item.name }}</header> <header>{{ item.reportName }}</header>
<footer> <footer>
{{ item.time }} {{ item.updateTime }}
<div class="operation"> <div class="operation">
<el-button <el-button
icon="el-icon-view" icon="el-icon-view"
class="view" class="view"
type="text" type="text"
@click="viewDesign(item.id)" @click="viewDesign(item)"
/> />
<el-button <el-button
icon="el-icon-edit" icon="el-icon-edit"
class="edit" class="edit"
type="text" type="text"
@click="openDesign(item.id)" @click="openDesign(item)"
/> />
</div> </div>
</footer> </footer>
@ -33,59 +33,71 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="block">
<el-pagination :total="totalCount"
:page-sizes="[10, 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>
</div> </div>
</template> </template>
<script> <script>
import { reportPageList } from '@/api/report'
export default { export default {
name: "Login", name: "Login",
components: {}, components: {},
data() { data() {
return { return {
list: [ list: [],
{ totalCount: 0,
id: 1, totalPage: 0,
name: "货物在途大屏", params: {
time: "2021-3-19 17:54:00" reportCode: '',
}, reportName: '',
{ // reportType: '',
id: 2, pageNumber: 1,
name: "仓库库容大屏", pageSize: 8,
time: "2021-3-19 17:54:00" order: 'DESC',
}, sort: 'update_time',
{ },
id: 3,
name: "运输时效大屏",
time: "2021-3-19 17:54:00"
},
{
id: 4,
name: "运输时效大屏1",
time: "2021-3-19 17:54:00"
},
{
id: 5,
name: "运输时效大屏2",
time: "2021-3-19 17:54:00"
}
]
}; };
}, },
mounted() {}, mounted() {},
created() {
this.queryByPage()
},
methods: { methods: {
openDesign(reportId) { async queryByPage () {
var routeUrl = this.$router.resolve({ const res = await reportPageList(this.params)
path: "/bigscreen/designer", if (res.code != '200') return
query: { reportId: reportId } this.listLoading = true
}); this.list = res.data.records
window.open(routeUrl.href, "_blank"); 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()
},
openDesign(val) {
var routeUrl = this.$router.resolve({ path: '/bigscreen/designer', query: { reportCode: val.reportCode, reportId: val.id, accessKey: val.accessKey } })
window.open(routeUrl.href, '_blank')
}, },
viewDesign(reportId) { viewDesign(val) {
var routeUrl = this.$router.resolve({ var routeUrl = this.$router.resolve({ path: '/bigscreen/viewer', query: { reportCode: val.reportCode } })
path: "/bigscreen/viewer", window.open(routeUrl.href, '_blank')
query: { reportId: reportId }
});
window.open(routeUrl.href, "_blank");
} }
} }
}; };

Loading…
Cancel
Save