统计分析导出

This commit is contained in:
shijing 2024-03-19 17:13:03 +08:00
parent b74e71b659
commit 5ea16bde8a
10 changed files with 227 additions and 108 deletions

View File

@ -2379,26 +2379,26 @@ const routes = [
}, },
"component": "statistics/good_check.vue" "component": "statistics/good_check.vue"
}, },
{ // {
"name": "behavior_check", // "name": "behavior_check",
"path": "/statistic/behavior_check", // "path": "/statistic/behavior_check",
"meta": { // "meta": {
"title": "性能检验", // "title": "性能检验",
"icon": "el-icon-cellphone", // "icon": "el-icon-cellphone",
"perms": ["statistic_qm"] // "perms": ["statistic_qm"]
}, // },
"component": "statistics/behavior_check.vue" // "component": "statistics/behavior_check.vue"
}, // },
{ // {
"name": "enter_check", // "name": "enter_check",
"path": "/statistic/enter_check", // "path": "/statistic/enter_check",
"meta": { // "meta": {
"title": "入厂检验", // "title": "入厂检验",
"icon": "el-icon-cellphone", // "icon": "el-icon-cellphone",
"perms": ["statistic_qm"] // "perms": ["statistic_qm"]
}, // },
"component": "statistics/enter_check.vue" // "component": "statistics/enter_check.vue"
}, // },
] ]
}, },
//物料统计 //物料统计

View File

@ -40,8 +40,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData"> <el-button @click="handleExport('ZJ')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData" id="exportDivZJ">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
</el-table-column> </el-table-column>
@ -66,8 +67,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData"> <el-button @click="handleExport('ZB')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData" id="exportDivZB">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
</el-table-column> </el-table-column>
@ -92,8 +94,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData"> <el-button @click="handleExport('AVG')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData" id="exportDivAVG">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
</el-table-column> </el-table-column>
@ -285,9 +288,22 @@
this.getData7(); this.getData7();
this.getData10(); this.getData10();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val+'成品检验统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style> <style scoped>
.tables{
position: absolute;
top:4px;
right: 6px;
z-index: 10;
}
</style> </style>

View File

@ -40,8 +40,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData"> <el-button @click="handleExport('ZJ')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData" id="exportDivZJ">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="批次号" prop="date"> <el-table-column label="批次号" prop="date">
</el-table-column> </el-table-column>
@ -74,12 +75,13 @@
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :lg="8"> <el-col :lg="8">
<el-card shadow="never"> <el-card shadow="never">
<scEcharts height="300px" :option="option1"></scEcharts> <scEcharts height="300px" :option="option2"></scEcharts>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData"> <el-button @click="handleExport('ZB')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData" id="exportDivZB">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
</el-table-column> </el-table-column>
@ -194,7 +196,6 @@
this.start_date =year+'-'+month+'-01'; this.start_date =year+'-'+month+'-01';
this.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate(); this.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate();
this.queryDate = year+'-'+month; this.queryDate = year+'-'+month;
this.getData6();
this.getData7(); this.getData7();
this.getData10(); this.getData10();
}, },
@ -209,20 +210,8 @@
} }
this.option.xAxis.data = this.xAxisData; this.option.xAxis.data = this.xAxisData;
this.option2.xAxis.data = this.xAxisData; this.option2.xAxis.data = this.xAxisData;
this.option3.xAxis.data = this.xAxisData;
this.option4.xAxis.data = this.xAxisData;
},
getData6(){
let that = this;
let exec = that.queryType=='月'?'lineWeek':'lineMonth';
let obj = {
query: { start_date: this.start_date, end_date: this.end_date, dept_name: "6车间" },
};
that.$API.bi.dataset.exec.req(exec, obj).then((doInRes) => {
console.log('6生产车间统计:',doInRes);
debugger;
});
}, },
//
getData7(){ getData7(){
let that = this; let that = this;
let obj = { let obj = {
@ -234,6 +223,7 @@
debugger; debugger;
}); });
}, },
//
getData10(){ getData10(){
let that = this; let that = this;
let obj = { let obj = {
@ -265,15 +255,25 @@
this.end_date = this.currentYear+'-12-31'; this.end_date = this.currentYear+'-12-31';
} }
} }
debugger;
console.log(this.query)
this.getData6();
this.getData7(); this.getData7();
this.getData10(); this.getData10();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val == 'ZJ' ? '预制棒检验统计' : '预制管检验统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style> <style scoped>
.tables{
position: absolute;
top:10px;
right: 10px;
z-index: 10;
}
</style> </style>

View File

@ -53,8 +53,9 @@
<div id="bachart1" style="width:100%;height:300px;"></div> <div id="bachart1" style="width:100%;height:300px;"></div>
<!-- <scEcharts height="300px" :option="option1"></scEcharts> --> <!-- <scEcharts height="300px" :option="option1"></scEcharts> -->
</el-col> </el-col>
<el-col> <el-card shadow="never" style="width: 100%;position: relative;">
<el-table :data="tableData1"> <el-button @click="handleExport('ZJ')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData1" id="exportDivZJ">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
</el-table-column> </el-table-column>
@ -63,7 +64,7 @@
<el-table-column label="数量" prop="count"> <el-table-column label="数量" prop="count">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-card>
</el-row> </el-row>
</el-card> </el-card>
</el-col> </el-col>
@ -71,7 +72,7 @@
<el-card shadow="never" style="margin-bottom: 8px;"> <el-card shadow="never" style="margin-bottom: 8px;">
<el-header> <el-header>
<div class="right-panel"> <div class="right-panel">
<h2>交付数</h2> <h2>交付数</h2>
<!-- <el-select v-model="product" clearable @change="productChange"> <!-- <el-select v-model="product" clearable @change="productChange">
<el-option v-for="item in outData" <el-option v-for="item in outData"
:key="item.id" :key="item.id"
@ -87,8 +88,9 @@
<div id="bachart2" style="width:100%;height:300px;"></div> <div id="bachart2" style="width:100%;height:300px;"></div>
<!-- <scEcharts height="300px" :option="option2"></scEcharts> --> <!-- <scEcharts height="300px" :option="option2"></scEcharts> -->
</el-col> </el-col>
<el-col> <el-card shadow="never" style="width: 100%;position: relative;">
<el-table :data="tableData2"> <el-button @click="handleExport('ZB')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData2" id="exportDivZB">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
</el-table-column> </el-table-column>
@ -97,7 +99,7 @@
<el-table-column label="数量" prop="count"> <el-table-column label="数量" prop="count">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-card>
</el-row> </el-row>
</el-card> </el-card>
</el-col> </el-col>
@ -347,9 +349,22 @@
} }
this.getTableData(); this.getTableData();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val == 'ZJ' ? '棒交付统计' : '管交付统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style> <style scoped>
.tables {
position: absolute;
top: 4px;
right: 6px;
z-index: 10;
}
</style> </style>

View File

@ -53,8 +53,9 @@
<div id="bachart1" style="width:100%;height:300px;"></div> <div id="bachart1" style="width:100%;height:300px;"></div>
<!-- <scEcharts height="300px" :option="option2"></scEcharts> --> <!-- <scEcharts height="300px" :option="option2"></scEcharts> -->
</el-col> </el-col>
<el-col> <el-card shadow="never" style="width: 100%;position: relative;">
<el-table :data="tableData1"> <el-button @click="handleExport('1')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData1" id="exportDiv1">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
<template #default="scope"> <template #default="scope">
@ -68,7 +69,7 @@
<el-table-column label="数量" prop="数量"> <el-table-column label="数量" prop="数量">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-card>
</el-row> </el-row>
</el-card> </el-card>
</el-col> </el-col>
@ -92,8 +93,9 @@
<div id="bachart2" style="width:100%;height:300px;"></div> <div id="bachart2" style="width:100%;height:300px;"></div>
<!-- <scEcharts height="300px" :option="option2"></scEcharts> --> <!-- <scEcharts height="300px" :option="option2"></scEcharts> -->
</el-col> </el-col>
<el-col> <el-card shadow="never" style="width: 100%;position: relative;">
<el-table :data="tableData2"> <el-button @click="handleExport('2')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData2" id="exportDiv2">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
<template #default="scope"> <template #default="scope">
@ -107,7 +109,7 @@
<el-table-column label="数量" prop="数量"> <el-table-column label="数量" prop="数量">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-card>
</el-row> </el-row>
</el-card> </el-card>
</el-col> </el-col>
@ -189,11 +191,15 @@
that.currentMonth = month; that.currentMonth = month;
that.start_date =year+'-'+month+'-01'; that.start_date =year+'-'+month+'-01';
that.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate(); that.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate();
let month1=month; console.log('that.start_date',that.start_date)
console.log('that.end_date',that.end_date)
let month1 = month;
if(month1<10){month1='0'+month1} if(month1<10){month1='0'+month1}
that.queryDate = year+'-'+month1; that.queryDate = year+'-'+month1;
that.firstWeekNum = that.getWeekOfYear(new Date(that.firstWeekNum)); that.firstWeekNum = that.getWeekOfYear(new Date(that.start_date));
that.endWeekNum = that.getWeekOfYear(new Date(that.end_date)); that.endWeekNum = that.getWeekOfYear(new Date(that.end_date));
console.log('that.firstWeekNum',that.firstWeekNum)
console.log('that.endWeekNum',that.endWeekNum)
let duration = that.endWeekNum - that.firstWeekNum + 1; let duration = that.endWeekNum - that.firstWeekNum + 1;
for(let i =1;i<=duration;i++ ){ for(let i =1;i<=duration;i++ ){
that.xAxisOrigin.push('第'+i+'周'); that.xAxisOrigin.push('第'+i+'周');
@ -359,9 +365,22 @@
this.getInmData(); this.getInmData();
this.getOutData(); this.getOutData();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val == '1' ? '采购统计' : '消耗统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style> <style scoped>
.tables {
position: absolute;
top: 4px;
right: 6px;
z-index: 10;
}
</style> </style>

View File

@ -20,13 +20,13 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart1" style="width:100%;height:300px;"></div> <div id="bachart1"></div>
<!-- <scEcharts height="300px" :option="option"></scEcharts> -->
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData7"> <el-button @click="handleExport('7')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData7" id="exportDiv7" :height="300">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名"> <el-table-column label="物料名" prop="物料名">
</el-table-column> </el-table-column>
@ -55,13 +55,13 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart2" style="width:100%;height:300px;"></div> <div id="bachart2"></div>
<!-- <scEcharts height="300px" :option="option2"></scEcharts> -->
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData10"> <el-button @click="handleExport('10')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData10" id="exportDiv10" :height="300">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名"> <el-table-column label="物料名" prop="物料名">
</el-table-column> </el-table-column>
@ -90,13 +90,13 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart3" style="width:100%;height:300px;"></div> <div id="bachart3"></div>
<!-- <scEcharts height="300px" :option="option3"></scEcharts> -->
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData6"> <el-button @click="handleExport('6')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData6" id="exportDiv6" :height="300">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名"> <el-table-column label="物料名" prop="物料名">
</el-table-column> </el-table-column>
@ -125,13 +125,13 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart4" style="width:100%;height:300px;"></div> <div id="bachart4"></div>
<!-- <scEcharts height="300px" :option="option4"></scEcharts> -->
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableDataAVG"> <el-button @click="handleExport('AVG')" class="tables" type="primary">导出</el-button>
<el-table :data="tableDataAVG" id="exportDivAVG" :height="300">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名"> <el-table-column label="物料名" prop="物料名">
</el-table-column> </el-table-column>
@ -483,8 +483,27 @@ export default {
this.getData10(); this.getData10();
this.getDataDAVG(); this.getDataDAVG();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val == 'AVG' ? val + '合格数统计' : val+'车间合格数统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style></style> <style scoped>
#bachart1,#bachart2,
#bachart3,#bachart4{
width:100%;
height:300px;
}
.tables{
position: absolute;
top:6px;
left: 4px;
z-index: 10;
}
</style>

View File

@ -23,8 +23,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData" :height="tableHeight"> <el-button @click="handleExport" class="tables" type="primary">导出</el-button>
<el-table :data="tableData" :height="tableHeight" id="exportDiv">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="工段" prop="工段"> <el-table-column label="工段" prop="工段">
</el-table-column> </el-table-column>
@ -172,8 +173,20 @@ export default {
} }
this.getData6(); this.getData6();
}, },
handleExport() {
this.exportLoading = true;
this.$XLSX('#exportDiv', '工序合格数');
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style></style> <style scoped>
.tables{
position: absolute;
top:6px;
left: 4px;
z-index: 10;
}
</style>

View File

@ -21,8 +21,9 @@
<el-col :lg="8"> <el-col :lg="8">
<scEcharts height="300px" :option="option1"></scEcharts> <scEcharts height="300px" :option="option1"></scEcharts>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16" style="position: relative;">
<el-table :data="tableData7"> <el-button @click="handleExport('7')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData7" id="exportDiv7">
<el-table-column label="年" prop="年" v-if="queryType == '年'" width="60"> <el-table-column label="年" prop="年" v-if="queryType == '年'" width="60">
</el-table-column> </el-table-column>
<el-table-column label="月" prop="月" v-else width="60"> <el-table-column label="月" prop="月" v-else width="60">
@ -65,8 +66,9 @@
<el-col :lg="8"> <el-col :lg="8">
<scEcharts height="300px" :option="option2"></scEcharts> <scEcharts height="300px" :option="option2"></scEcharts>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16" style="position: relative;">
<el-table :data="tableData10"> <el-button @click="handleExport('10')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData10" id="exportDiv10">
<el-table-column label="年" prop="年" v-if="queryType == '年'" width="60"> <el-table-column label="年" prop="年" v-if="queryType == '年'" width="60">
</el-table-column> </el-table-column>
<el-table-column label="月" prop="月" v-else width="60"> <el-table-column label="月" prop="月" v-else width="60">
@ -113,8 +115,9 @@
<el-col :lg="8"> <el-col :lg="8">
<scEcharts height="300px" :option="option3"></scEcharts> <scEcharts height="300px" :option="option3"></scEcharts>
</el-col> </el-col>
<el-col :lg="16"> <el-col :lg="16" style="position: relative;">
<el-table :data="tableData8"> <el-button @click="handleExport('8')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData8" id="exportDiv8">
<el-table-column label="年" prop="年" v-if="queryType == '年'" width="60"> <el-table-column label="年" prop="年" v-if="queryType == '年'" width="60">
</el-table-column> </el-table-column>
<el-table-column label="月" prop="月" v-else width="60"> <el-table-column label="月" prop="月" v-else width="60">
@ -159,7 +162,6 @@
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
import scEcharts from '@/components/scEcharts'; import scEcharts from '@/components/scEcharts';
export default { export default {
@ -368,8 +370,21 @@ export default {
this.getData7(); this.getData7();
this.getData10(); this.getData10();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val == '8' ? '退火生产检验统计' : val+'车间生产检验统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style scoped>
<style></style> .tables{
position: absolute;
top:4px;
right: 14px;
z-index: 10;
}
</style>

View File

@ -51,8 +51,9 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="8"> <el-col :lg="8">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData1" :height="tableHeight"> <el-button @click="handleExport('7')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData1" id="exportDiv7" :height="tableHeight">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number"> <el-table-column label="任务编号" prop="number">
</el-table-column> </el-table-column>
@ -66,8 +67,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="8"> <el-col :lg="8">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData2" :height="tableHeight"> <el-button @click="handleExport('10')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData2" id="exportDiv10" :height="tableHeight">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number"> <el-table-column label="任务编号" prop="number">
</el-table-column> </el-table-column>
@ -81,8 +83,9 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="8"> <el-col :lg="8">
<el-card shadow="never"> <el-card shadow="never" style="position: relative;">
<el-table :data="tableData3" :height="tableHeight"> <el-button @click="handleExport('6')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData3" id="exportDiv6" :height="tableHeight">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number"> <el-table-column label="任务编号" prop="number">
</el-table-column> </el-table-column>
@ -326,9 +329,22 @@
this.getData7(); this.getData7();
this.getData10(); this.getData10();
}, },
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val+'车间完成率';
this.$XLSX(id, name);
this.exportLoading = false;
},
}, },
} }
</script> </script>
<style> <style scoped>
.tables{
position: absolute;
top:6px;
left: 4px;
z-index: 10;
}
</style> </style>

View File

@ -12,16 +12,16 @@
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div> </div>
</el-header> </el-header>
<el-main> <el-main id="elMain">
<el-row :gutter="15"> <el-row :gutter="15" style="height: 100%;">
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never" style="height: 100%;">
<scEcharts height="300px" :option="option"></scEcharts> <scEcharts :height="chartHeight" :option="option" id="chartHeight"></scEcharts>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="12">
<el-card shadow="never"> <el-card shadow="never">
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%" :height="chartHeight">
<el-table-column label="日期" prop="date"> <el-table-column label="日期" prop="date">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}
@ -95,6 +95,8 @@ export default {
barWidth: '15px', barWidth: '15px',
} }
}, },
tableHeight: 0,
chartHeight:0,
} }
}, },
mounted() { mounted() {
@ -109,6 +111,10 @@ export default {
this.queryDate = year + '-' + month; this.queryDate = year + '-' + month;
this.getData(); this.getData();
this.getDept(); this.getDept();
let mainHeight = document.getElementById('elMain').clientHeight;
this.tableHeight = (mainHeight-30)+'px';
this.chartHeight = (mainHeight-50)+'px';
}, },
methods: { methods: {
getDept() { getDept() {