|
@@ -0,0 +1,185 @@
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="layout-pd">
|
|
|
+ <el-row>
|
|
|
+<!--操作-->
|
|
|
+ <el-col :xs="24" >
|
|
|
+ <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="6" :xl="4" class="mb20">
|
|
|
+ <el-form-item label="序列号">
|
|
|
+ <el-input v-model="state.filter.serno" placeholder="单行输入" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
+ <el-form-item label="物料号">
|
|
|
+ <el-input v-model="state.filter.partno" placeholder="单行输入" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
+ <el-form-item label="主板类型">
|
|
|
+ <el-input v-model="state.filter.boardType" placeholder="单行输入" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+<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.beginCreateTime"
|
|
|
+ type="datetime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ range-separator="To"
|
|
|
+ start-placeholder="Start date"
|
|
|
+ end-placeholder="End date"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+<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.endCreateTime"
|
|
|
+ type="datetime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ range-separator="To"
|
|
|
+ start-placeholder="Start date"
|
|
|
+ end-placeholder="End date"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
+ <el-form-item label="测试状态">
|
|
|
+ <el-input v-model="state.filter.lastTestState" placeholder="单行输入" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+<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-form-item>
|
|
|
+ </el-form>
|
|
|
+<div class="my-flex my-flex-start" >
|
|
|
+<el-button type="primary" icon="ele-CirclePlus" @click="onQuery"> 查询 </el-button>
|
|
|
+</div>
|
|
|
+</el-card>
|
|
|
+ </el-col>
|
|
|
+<!--表格-->
|
|
|
+ <el-col :xs="24" >
|
|
|
+ <el-card style="height: 70vh" class="my-fill mt8" shadow="hover">
|
|
|
+<el-table 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>
|
|
|
+</el-table>
|
|
|
+<div class="my-flex my-flex-end" style="margin-top: 20px">
|
|
|
+ <el-pagination
|
|
|
+ v-model:currentPage="state.pageInput.CurrentPage"
|
|
|
+ v-model:page-size="state.pageInput.PageSize"
|
|
|
+ :total="state.total"
|
|
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
|
+ small
|
|
|
+ background
|
|
|
+ @size-change="onSizeChange"
|
|
|
+ @current-change="onCurrentChange"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</el-card>
|
|
|
+ </el-col>
|
|
|
+</el-row>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <script setup lang="ts">
|
|
|
+ import {onBeforeMount, onMounted, reactive, watch} from "vue";
|
|
|
+ import eventBus from "/@/utils/mitt";
|
|
|
+import { BoardListApi } from '/@/api/admin/PCBA/boardListApi'
|
|
|
+import { BoardListDto } from '/@/api/admin/PCBA/boardListDto'
|
|
|
+import type { pageInput } from "/@/api/admin/shareDto/shareDto";
|
|
|
+
|
|
|
+/**数据对象*/
|
|
|
+ const state = reactive({
|
|
|
+ /**加载显示 */
|
|
|
+ loading: false,
|
|
|
+ /**条件查询模块 */
|
|
|
+ filter: {
|
|
|
+/**序列号 */
|
|
|
+ serno: "",
|
|
|
+/**物料号 */
|
|
|
+ partno: "",
|
|
|
+/**boardType */
|
|
|
+ boardType: -1,
|
|
|
+/**起始创建时间 */
|
|
|
+ beginCreateTime: "",
|
|
|
+/**结束创建时间 */
|
|
|
+ endCreateTime: "",
|
|
|
+/**lastTestState */
|
|
|
+ lastTestState: -1,
|
|
|
+/**最新检测员 */
|
|
|
+ lastTestUser: "",},
|
|
|
+ /**表格信息 */
|
|
|
+tableModel: [] as BoardListDto,
|
|
|
+ /**动态表头 */
|
|
|
+ dynamicColumns: [
|
|
|
+{ prop: 'serno', label: '序列号' },
|
|
|
+{ prop: 'partno', label: '物料号' },
|
|
|
+{ prop: 'boardType', label: '主板类型' },
|
|
|
+{ prop: 'boardName', label: '主板名称' },
|
|
|
+{ prop: 'createTime', label: '创建时间' },
|
|
|
+{ prop: 'lastTestTime', label: '最近检测时间' },
|
|
|
+{ prop: 'lastTestState', label: '最新检测状态' },
|
|
|
+{ prop: 'lastTestUser', label: '最新检测员' },
|
|
|
+{ prop: 'testTimes', label: '功能总测试次数' },
|
|
|
+{ prop: 'successTimes', label: '功能总测试成功次数' },
|
|
|
+{ prop: 'retestTimes', label: '功能总复测次数' },
|
|
|
+{ prop: 'effectiveRetestTimes', label: '功能总有效复测次数' },
|
|
|
+{ prop: 'duration', label: '测试总耗时' },
|
|
|
+{ prop: 'info', label: '备注' },],
|
|
|
+/**分页标识 */
|
|
|
+ pageInput:{
|
|
|
+ CurrentPage: 1,
|
|
|
+ PageSize: 10,
|
|
|
+ } as pageInput,
|
|
|
+ /**分页总数 */
|
|
|
+ total: 0,
|
|
|
+})
|
|
|
+ onMounted(() => {
|
|
|
+ init()
|
|
|
+ eventBus.off('refreshView')
|
|
|
+ eventBus.on('refreshView', async () => {
|
|
|
+ await init()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ onBeforeMount(() => {
|
|
|
+ eventBus.off('refreshView')
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ /**页条数变化*/
|
|
|
+const onSizeChange = () => {
|
|
|
+ init()
|
|
|
+}
|
|
|
+
|
|
|
+/**页数变化*/
|
|
|
+const onCurrentChange = () => {
|
|
|
+ init()
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 监听变换
|
|
|
+ */
|
|
|
+ watch(() => {},() => {})
|
|
|
+/**条件查询 */
|
|
|
+ const onQuery = () => {
|
|
|
+ init()
|
|
|
+ }
|
|
|
+ /**初始化 */
|
|
|
+ const init = async () => {
|
|
|
+ state.loading = true
|
|
|
+const res:any = await new BoardListApi().getList({...state.pageInput, Filter:state.filter})
|
|
|
+ state.total = res?.data?.total ?? 0
|
|
|
+state.tableModel = res?.data?.list ?? []
|
|
|
+ state.loading = false
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+ </style>
|