|
@@ -1,389 +0,0 @@
|
|
|
-
|
|
|
-<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="8" :xl="6" class="mb20">
|
|
|
- <el-form-item label="serno">
|
|
|
- <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="8" :xl="6" class="mb20">
|
|
|
- <el-form-item label="外部序列号">
|
|
|
- <el-input v-model="state.filter.exserno" 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="boardType">
|
|
|
- <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="8" :xl="6" class="mb20">
|
|
|
- <el-form-item label="functionCode">
|
|
|
- <el-input v-model="state.filter.functionCode" 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-input v-model="state.filter.functionName" 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-input v-model="state.filter.testType" 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-date-picker
|
|
|
- v-model="state.filter.beginTime"
|
|
|
- type="datetimerange"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- range-separator="To"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-<el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="6" class="mb20">
|
|
|
- <el-form-item label="选择时间">
|
|
|
- <el-date-picker
|
|
|
- v-model="state.filter.endTime"
|
|
|
- type="datetimerange"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- range-separator="To"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-<el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="6" class="mb20">
|
|
|
- <el-form-item label="测试结果">
|
|
|
- <el-input v-model="state.filter.result" 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-input v-model="state.filter.user" placeholder="单行输入" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-</el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <hr>
|
|
|
-
|
|
|
-
|
|
|
-<el-row justify="space-between" class="submit-button" style="margin-bottom: -9px;">
|
|
|
-<el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
|
|
|
-<el-button type="primary" icon="ele-Plus" @click="onAdd"> 添加 </el-button>
|
|
|
-<el-button type="primary" icon="ele-Delete" @click="ondelete"> 批量删除 </el-button>
|
|
|
-<el-button type="primary" icon="ele-RefreshRight" @click="onReset"> 重置 </el-button>
|
|
|
-<el-button type="primary" icon="ele-Upload" @click="onUpload"> 上传 </el-button>
|
|
|
-<el-button type="primary" icon="ele-Document" @click="onExport"> 导出 </el-button>
|
|
|
-<el-button type="primary" icon="ele-UploadFilled" @click="onBatImport"> 批量导入 </el-button>
|
|
|
-<el-button type="primary" icon="ele-Document" @click="onBatExport"> 批量导出 </el-button>
|
|
|
-<el-button type="primary" icon="ele-Tickets" @click="onBatReview"> 批量审核 </el-button>
|
|
|
-</el-row>
|
|
|
-</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 type="selection" width="50"></el-table-column>
|
|
|
-
|
|
|
- <el-table-column v-for="column in state.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label" >
|
|
|
- </el-table-column>
|
|
|
-<el-table-column label="操作" fixed="right" header-align="center" align="center" class="right-operation" width="140">
|
|
|
- <template #default="{ row }" >
|
|
|
-<el-link
|
|
|
- class="my-el-link mr12 ml12"
|
|
|
- type="primary"
|
|
|
- icon="ele-Upload"
|
|
|
- @click="onDateUpdate(row)"
|
|
|
- :underline="false"
|
|
|
- target="_blank"
|
|
|
- >编辑</el-link>
|
|
|
-<el-link
|
|
|
- class="my-el-link mr12 ml12"
|
|
|
- type="primary"
|
|
|
- icon="ele-Upload"
|
|
|
- @click="onDataDetail(row)"
|
|
|
- :underline="false"
|
|
|
- target="_blank"
|
|
|
- >详情</el-link>
|
|
|
-<el-link
|
|
|
- class="my-el-link mr12 ml12"
|
|
|
- type="primary"
|
|
|
- icon="ele-Upload"
|
|
|
- @click="onDataDelete(row)"
|
|
|
- :underline="false"
|
|
|
- target="_blank"
|
|
|
- >删除</el-link>
|
|
|
-</template>
|
|
|
- </el-table-column>
|
|
|
-</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"
|
|
|
- :total="state.total"
|
|
|
- :page-sizes="[10, 15, 20, 50, 100]"
|
|
|
- small
|
|
|
- background
|
|
|
- @size-change="onSizeChange"
|
|
|
- @current-change="onCurrentChange"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- />
|
|
|
- </div>
|
|
|
-</el-card>
|
|
|
- </el-col>
|
|
|
-<!-- 弹窗 -->
|
|
|
- <el-dialog
|
|
|
- v-model="state.dialogVisible"
|
|
|
- :title="state.isEdit ? '修改BoardTestRecordDto' : '添加BoardTestRecordDto'"
|
|
|
- width="500px"
|
|
|
- :before-close="handleDialogClose"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="formRef"
|
|
|
- :model="state.formData"
|
|
|
- :rules="state.rules"
|
|
|
- label-width="100px"
|
|
|
- >
|
|
|
-<el-form-item label="序列号" prop="serno">
|
|
|
- <el-input v-model="state.formData.serno" placeholder="请输入序列号"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="外部序列号" prop="exserno">
|
|
|
- <el-input v-model="state.formData.exserno" placeholder="请输入外部序列号"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="主板类型" prop="boardType">
|
|
|
- <el-input v-model="state.formData.boardType" placeholder="请输入主板类型"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="主板名称" prop="boardName">
|
|
|
- <el-input v-model="state.formData.boardName" placeholder="请输入主板名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="功能码" prop="functionCode">
|
|
|
- <el-input v-model="state.formData.functionCode" placeholder="请输入功能码"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="功能名称" prop="functionName">
|
|
|
- <el-input v-model="state.formData.functionName" placeholder="请输入功能名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="检测类型" prop="testType">
|
|
|
- <el-input v-model="state.formData.testType" placeholder="请输入检测类型"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="检测时间" prop="time">
|
|
|
- <el-input v-model="state.formData.time" placeholder="请输入检测时间"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="测试结果" prop="result">
|
|
|
- <el-input v-model="state.formData.result" placeholder="请输入测试结果"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="测试功能数" prop="testNum">
|
|
|
- <el-input v-model="state.formData.testNum" placeholder="请输入测试功能数"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="测试成功功能数" prop="testSuccessNum">
|
|
|
- <el-input v-model="state.formData.testSuccessNum" placeholder="请输入测试成功功能数"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="测试员" prop="user">
|
|
|
- <el-input v-model="state.formData.user" placeholder="请输入测试员"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="测试耗时" prop="duration">
|
|
|
- <el-input v-model="state.formData.duration" placeholder="请输入测试耗时"></el-input>
|
|
|
- </el-form-item>
|
|
|
-<el-form-item label="备注" prop="info">
|
|
|
- <el-input v-model="state.formData.info" placeholder="请输入备注"></el-input>
|
|
|
- </el-form-item>
|
|
|
-</el-form>
|
|
|
- <template #footer>
|
|
|
- <span class="dialog-footer">
|
|
|
- <el-button @click="handleDialogClose">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleSubmit">确定</el-button>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
-</el-row>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <script setup lang="ts">
|
|
|
- import {onBeforeMount, onMounted, reactive, ref, watch} from "vue";
|
|
|
- import eventBus from "/@/utils/mitt";
|
|
|
- import {Api} from "/@/api/code/api";
|
|
|
- import { useDynamicPageSize } from "/@/composables/useDynamicPageSize";
|
|
|
-
|
|
|
- // 使用组合式函数获取分页状态
|
|
|
-const pageState = useDynamicPageSize(10, 15);
|
|
|
-import { BoardTestRecordDto } from "/@/api/code/dto";
|
|
|
- import type { pageInput } from "/@/api/code/dto"
|
|
|
-
|
|
|
-/**数据对象*/
|
|
|
- const state = reactive({
|
|
|
- /**加载显示 */
|
|
|
- loading: false,
|
|
|
-/** 弹窗显示状态 */
|
|
|
- dialogVisible: false,
|
|
|
- /** 是否是编辑状态 */
|
|
|
- isEdit: false,
|
|
|
- /** 表单数据 */
|
|
|
- formData: {} as BoardTestRecordDto,
|
|
|
- /** 表单验证规则 */
|
|
|
- rules: {},
|
|
|
-/**条件查询模块 */
|
|
|
- filter: {
|
|
|
-/**serno */
|
|
|
- serno: "",
|
|
|
-/**外部序列号 */
|
|
|
- exserno: "",
|
|
|
-/**boardType */
|
|
|
- boardType: "",
|
|
|
-/**functionCode */
|
|
|
- functionCode: "",
|
|
|
-/**功能名称 */
|
|
|
- functionName: "",
|
|
|
-/**检测类型 */
|
|
|
- testType: "",
|
|
|
-/**起始检测时间 */
|
|
|
- beginTime: "",
|
|
|
-/**结束检测时间 */
|
|
|
- endTime: "",
|
|
|
-/**测试结果 */
|
|
|
- result: "",
|
|
|
-/**测试员 */
|
|
|
- user: "",},
|
|
|
- /**表格信息 */
|
|
|
-tableModel: [] as BoardTestRecordDto,
|
|
|
- /**动态表头 */
|
|
|
- dynamicColumns: [
|
|
|
-{ prop: 'serno', label: '序列号' },
|
|
|
-{ prop: 'exserno', label: '外部序列号' },
|
|
|
-{ prop: 'boardType', label: '主板类型' },
|
|
|
-{ prop: 'boardName', label: '主板名称' },
|
|
|
-{ prop: 'functionCode', label: '功能码' },
|
|
|
-{ prop: 'functionName', label: '功能名称' },
|
|
|
-{ prop: 'testType', label: '检测类型' },
|
|
|
-{ prop: 'time', label: '检测时间' },
|
|
|
-{ prop: 'result', label: '测试结果' },
|
|
|
-{ prop: 'testNum', label: '测试功能数' },
|
|
|
-{ prop: 'testSuccessNum', label: '测试成功功能数' },
|
|
|
-{ prop: 'user', label: '测试员' },
|
|
|
-{ prop: 'duration', label: '测试耗时' },
|
|
|
-{ prop: 'info', label: '备注' },],
|
|
|
-/**分页标识 */
|
|
|
- pageInput:{
|
|
|
- CurrentPage: 1,
|
|
|
- PageSize: 10,
|
|
|
- } as pageInput,
|
|
|
- /**分页总数 */
|
|
|
- total: 0,
|
|
|
-})
|
|
|
- onMounted(() => {
|
|
|
- // 初始化分页大小
|
|
|
- Data.pageInput.pageSize = pageState.pageInput.pageSize;
|
|
|
- init()
|
|
|
- eventBus.off('refreshView')
|
|
|
- eventBus.on('refreshView', async () => {
|
|
|
- await init()
|
|
|
- })
|
|
|
- console.log()
|
|
|
- })
|
|
|
- onBeforeMount(() => {
|
|
|
- eventBus.off('refreshView')
|
|
|
- })
|
|
|
- /**
|
|
|
- * 监听变换
|
|
|
- */
|
|
|
- watch(() => {})
|
|
|
-/**条件查询 */
|
|
|
- const onQuery = () => {
|
|
|
- init()
|
|
|
- }
|
|
|
- /**初始化 */
|
|
|
- const init = async () => {
|
|
|
- state.loading = true
|
|
|
-const res:any = await new Api().getList({...pageState.pageInput, Filter:state.filter})
|
|
|
- state.total = res?.data?.total ?? 0
|
|
|
-state.tableModel = res?.data?.list ?? []
|
|
|
- state.loading = false
|
|
|
- }
|
|
|
-/**添加 */
|
|
|
- const onAdd = () => {
|
|
|
- state.isEdit = false;
|
|
|
- state.formData = {} as BoardTestRecordDto;
|
|
|
- state.dialogVisible = true;
|
|
|
- };
|
|
|
- /**批量删除 */
|
|
|
- const ondelete=()=>{}
|
|
|
-/**重置 */
|
|
|
- const onReset=()=>{}
|
|
|
-/**上传 */
|
|
|
- const onUpload=()=>{}
|
|
|
-/**导出 */
|
|
|
- const onExport=()=>{}
|
|
|
-/**批量导入 */
|
|
|
- const onBatImport=()=>{}
|
|
|
-/**批量导出 */
|
|
|
- const onBatExport=()=>{}
|
|
|
-/**批量审核 */
|
|
|
- const onBatReview=()=>{}
|
|
|
-/**编辑 */
|
|
|
- const onDateUpdate = (row: BoardTestRecordDto) => {
|
|
|
- state.isEdit = true;
|
|
|
- state.formData = { ...row };
|
|
|
- state.dialogVisible = true;
|
|
|
- }
|
|
|
-/**详情 */
|
|
|
- const onDataDetail=(row)=>{}
|
|
|
-/**删除 */
|
|
|
- const onDataDelete=(row)=>{}
|
|
|
-/** 关闭弹窗 */
|
|
|
- const handleDialogClose = () => {
|
|
|
- state.dialogVisible = false;
|
|
|
- };
|
|
|
-
|
|
|
- /** 提交表单 */
|
|
|
- const handleSubmit = () => {
|
|
|
- // Add your submit logic here
|
|
|
- state.dialogVisible = false;
|
|
|
- };
|
|
|
-
|
|
|
- /**
|
|
|
-* 页条变化
|
|
|
-* @param val
|
|
|
-*/
|
|
|
-const onSizeChange = (val: number) => {
|
|
|
- Data.pageInput.pageSize = val
|
|
|
- //需按照页面对象修改Data
|
|
|
- init()
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * 页数 变化
|
|
|
- * @param val
|
|
|
- */
|
|
|
-const onCurrentChange = (val: number) => {
|
|
|
- Data.pageInput.currentPage = val
|
|
|
- //需按照页面对象修改Data
|
|
|
- init()
|
|
|
-}
|
|
|
- </script>
|
|
|
-<style scoped lang="scss">
|
|
|
- .el-input,
|
|
|
-.el-select {
|
|
|
- width: 240px;
|
|
|
-}
|
|
|
-
|
|
|
-/* 输入框标签固定四个字符宽度 */
|
|
|
-::v-deep .el-form-item__label {
|
|
|
- // 字体大小14,5个字符,12px右间距
|
|
|
- width: 14*5px+12px;
|
|
|
- justify-content: start;
|
|
|
-}
|
|
|
-
|
|
|
-/* 数据表头 设置灰色样式 */
|
|
|
-::v-deep .el-table th.el-table__cell {
|
|
|
- background-color: #F6F6F6;
|
|
|
-}
|
|
|
- </style>
|