看板新页面

This commit is contained in:
ljx 2024-08-22 11:19:35 +08:00
parent f2e3ee0486
commit 70636b91d0
2 changed files with 32 additions and 13 deletions

View File

@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<scroll-board-bottom :ScrollList= "showData.scrollList" /> <scroll-board-bottom :ScrollList= "showData.scrollList2" :listName = "showData.listName2" />
</div> </div>
<dv-loading v-else>Loading...</dv-loading> <dv-loading v-else>Loading...</dv-loading>
<!-- <div style="height: 5%;width: 100%;"></div> --> <!-- <div style="height: 5%;width: 100%;"></div> -->
@ -75,6 +75,8 @@ export default {
leftData: [], leftData: [],
reportedList: [], reportedList: [],
scrollList: [], scrollList: [],
scrollList2: [],
listName2:'',
todayData: [], todayData: [],
bottomData: [], bottomData: [],
allNum: 0, allNum: 0,
@ -83,14 +85,17 @@ export default {
loadingDone: false loadingDone: false
} }
}, },
created () { created (e) {
this.createdData() console.log(window.location.href.split('?')[1])
let params = window.location.href.split('?')[1];
let Aid = params.split('=')[1];
this.createdData(Aid)
}, },
methods: { methods: {
createdData () { createdData (Aid) {
let that = this let that = this
this.$api.post2('/api/web/GetScreenReport?category=A1').then(res => { this.$api.post2('/api/web/GetScreenReport?category='+Aid).then(res => {
if (res.code === '200') { if (res.code === '200') {
let data = res.data; let data = res.data;
this.chartData1 = data.reportSettings[0]; this.chartData1 = data.reportSettings[0];
@ -101,12 +106,21 @@ export default {
if(item.setting.reportType != 'rank'){ if(item.setting.reportType != 'rank'){
this.totalData.push(item) this.totalData.push(item)
} }
}) if(item.code == 'BI_ProcessFlowSheet_Person_Report'){
}
if(data.reportSettings[3].data.length>0){
this.showData.scrollList = data.reportSettings[3].data.map(item => { this.showData.scrollList = data.reportSettings[3].data.map(item => {
return [item.employee_name,item.proc_name,item.value] return [item.employee_name,item.proc_name,item.value]
}); });
}
if(item.code == 'BI_ProduceQuality_KH_Report'){
this.showData.listName2 = item.title;
this.showData.scrollList2 = item.data.map(item => {
return [item.TSaleOrderCode,item.Inventoryname,item.Productionquantity,item.proc01_SJ,item.proc01_SJv,item.proc02_SJ,item.proc02_SJv,item.proc03_SJ,item.proc03_SJv,item.SaleOrder_LastDate]
});
}
})
}
if(data.reportSettings[3].data.length>0){
} }
this.showData.name = '永盛大屏数据看板' this.showData.name = '永盛大屏数据看板'
this.loadingDone = true this.loadingDone = true
@ -194,13 +208,14 @@ export default {
.main-content { .main-content {
flex: 1; flex: 1;
height: calc(100% - 1rem);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.block-left-right-content { .block-left-right-content {
// flex: 1; // flex: 1;
height: 70%; height: 65%;
display: flex; display: flex;
margin-top: 0.2rem; margin-top: 0.2rem;
} }

View File

@ -1,5 +1,6 @@
<template> <template>
<div id="scroll-board-bottom"> <div id="scroll-board-bottom">
<p style="width: 100%;text-align: center;font-size: 0.25rem;font-weight: bold;height: 0.4rem;line-height: 0.4rem;margin: 0;"> {{listName}}</p>
<dv-scroll-board :config="config" /> <dv-scroll-board :config="config" />
</div> </div>
</template> </template>
@ -7,7 +8,7 @@
<script> <script>
export default { export default {
name: 'ScrollBoard', name: 'ScrollBoard',
props: ['ScrollList'], props: ['ScrollList','listName'],
data () { data () {
return { return {
config: { config: {
@ -17,7 +18,7 @@ export default {
// index: true, // index: true,
columnWidth: [1000], columnWidth: [1000],
align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'], align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'],
rowNum: 5, rowNum: 6,
headerBGC: '#1981f6', headerBGC: '#1981f6',
headerHeight: 50, headerHeight: 50,
oddRowBGC: 'rgba(0, 44, 81, 0.8)', oddRowBGC: 'rgba(0, 44, 81, 0.8)',
@ -27,7 +28,7 @@ export default {
}, },
created () { created () {
this.config.headerHeight = this.$fontSize(0.50); this.config.headerHeight = this.$fontSize(0.50);
this.config.columnWidth = [this.$fontSize(1.5),this.$fontSize(6),this.$fontSize(1.5),this.$fontSize(1),this.$fontSize(1),this.$fontSize(1),this.$fontSize(1),this.$fontSize(1),this.$fontSize(1),this.$fontSize(3)]; this.config.columnWidth = [this.$fontSize(3),this.$fontSize(5),this.$fontSize(2),this.$fontSize(1.5),this.$fontSize(1),this.$fontSize(1.5),this.$fontSize(1),this.$fontSize(1.5),this.$fontSize(1),this.$fontSize(3)];
this.config.data = JSON.parse(JSON.stringify(this.ScrollList)) this.config.data = JSON.parse(JSON.stringify(this.ScrollList))
} }
} }
@ -38,12 +39,15 @@ export default {
width:100%; width:100%;
box-sizing: border-box; box-sizing: border-box;
padding:0.2rem; padding:0.2rem;
height: 40%; height: calc(35% - 0.3rem);
overflow: hidden; overflow: hidden;
} }
</style> </style>
<style> <style>
#scroll-board-bottom .dv-scroll-board{
/* height: calc(100% - 0.4rem); */
}
.dv-scroll-board .header{ .dv-scroll-board .header{
font-size: 0.2rem !important; font-size: 0.2rem !important;
font-weight: bold !important; font-weight: bold !important;