|
@@ -6,7 +6,7 @@
|
|
|
<el-card class="mt8" shadow="hover">
|
|
|
<el-form :model="state.filter" :inline="true" @submit.stop.prevent>
|
|
|
<el-form-item prop="name" style="width: 100%">
|
|
|
- <el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="6" class="mb20">
|
|
|
+ <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
<el-form-item label="主板类型">
|
|
|
<el-select v-model="state.filter.boardType" placeholder="">
|
|
|
<el-option v-for="(value, key) in PCBABoardType" :key="key" :label="value[1].name"
|
|
@@ -14,13 +14,13 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="6" class="mb20">
|
|
|
+ <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
<el-form-item label="检测员">
|
|
|
<el-input v-model="state.filter.lastTestUser" placeholder="单行输入" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="6" class="mb20">
|
|
|
- <el-form-item label="创建时间">
|
|
|
+ <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
+ <el-form-item label="创建时间范围">
|
|
|
<el-date-picker
|
|
|
v-model="state.filter.createTimeRange"
|
|
|
type="daterange"
|
|
@@ -33,9 +33,6 @@
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
- <hr class="fengexian">
|
|
|
-
|
|
|
<div class="my-flex my-flex-start" style="margin-top: -38px;">
|
|
|
<el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
|
|
|
<el-button type="primary" icon="ele-Document" @click="exportDataToExcel"> 导出 </el-button>
|
|
@@ -45,7 +42,7 @@
|
|
|
</el-col>
|
|
|
<!--表格-->
|
|
|
<el-col :xs="24">
|
|
|
- <el-card class="my-fill mt8" shadow="hover">
|
|
|
+ <el-card style="height: 55vh" class="my-fill mt8" shadow="hover">
|
|
|
<el-table id="myTable" ref="myTable" v-loading="state.loading" stripe :data="state.tableModel" row-key="id" style="width: 100%">
|
|
|
<!--<el-table-column v-for="column in state.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label" >
|
|
|
</el-table-column>-->
|
|
@@ -79,10 +76,10 @@
|
|
|
</el-table>
|
|
|
<div class="my-flex my-flex-end" style="margin-top: 20px">
|
|
|
<el-pagination
|
|
|
- v-model:currentPage="pageState.pageInput.currentPage"
|
|
|
- v-model:page-size="pageState.pageInput.pageSize"
|
|
|
+ v-model:currentPage="state.pageInput.CurrentPage"
|
|
|
+ v-model:page-size="state.pageInput.PageSize"
|
|
|
:total="state.total"
|
|
|
- :page-sizes="[10, 15, 20, 50, 100]"
|
|
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
|
small
|
|
|
background
|
|
|
@size-change="onSizeChange"
|
|
@@ -106,10 +103,7 @@ import { useGlobalCacheStore } from "/@/stores/globalCacheStore";
|
|
|
import { getCurrentInstance } from 'vue';
|
|
|
import { saveAs } from 'file-saver';
|
|
|
import * as ExcelJS from 'exceljs';
|
|
|
-import { useDynamicPageSize } from "/@/composables/useDynamicPageSize";
|
|
|
-
|
|
|
-// 使用组合式函数获取分页状态
|
|
|
-const pageState = useDynamicPageSize(10, 15);
|
|
|
+import List from "/@/components/iconSelector/list.vue";
|
|
|
|
|
|
const { proxy: ctx } = getCurrentInstance();
|
|
|
|
|
@@ -164,8 +158,6 @@ const state = reactive({
|
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
|
- // 初始化分页大小
|
|
|
-state.pageInput.PageSize = pageState.pageInput.pageSize;
|
|
|
init();
|
|
|
eventBus.off('refreshView');
|
|
|
eventBus.on('refreshView', async () => {
|
|
@@ -222,12 +214,17 @@ async function exportDataToExcel() {
|
|
|
{ header: '测试成功率', key: 'boardTestSuccessRate', width: 15 }
|
|
|
];
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
for (let i = 0; i < tableData.length; i++) {
|
|
|
- let data = tableData[i];
|
|
|
+
|
|
|
+ let data = {...tableData[i]}
|
|
|
data.boardSuccessRate += "%";
|
|
|
data.boardOneTestSuccessRate += "%";
|
|
|
data.boardTestSuccessRate += "%";
|
|
|
- worksheet.addRow(tableData[i]);
|
|
|
+
|
|
|
+ worksheet.addRow(data);
|
|
|
}
|
|
|
|
|
|
// 生成 Excel 文件
|
|
@@ -250,24 +247,4 @@ const onCurrentChange = () => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.fengexian{
|
|
|
- margin-top:-3vh;
|
|
|
- margin-bottom:5vh;
|
|
|
-}
|
|
|
-.el-input,
|
|
|
-.el-select {
|
|
|
- width: 240px;
|
|
|
-}
|
|
|
-
|
|
|
-/* 输入框标签固定四个字符宽度 */
|
|
|
-::v-deep .el-form-item__label {
|
|
|
- // 字体大小14,4个字符,12px右间距
|
|
|
- width: 14*4px+12px;
|
|
|
- justify-content: start;
|
|
|
-}
|
|
|
-
|
|
|
-/* 数据表头 设置灰色样式 */
|
|
|
-::v-deep .el-table th.el-table__cell {
|
|
|
- background-color: #F6F6F6;
|
|
|
-}
|
|
|
</style>
|