DFS_Shuo_Chen пре 4 месеци
родитељ
комит
7b2becc691
23 измењених фајлова са 2271 додато и 0 уклоњено
  1. 93 0
      admin.ui.plus-master/src/api/admin/PCBA/boardAllFunctionApi.ts
  2. 33 0
      admin.ui.plus-master/src/api/admin/PCBA/boardAllFunctionDto.ts
  3. 77 0
      admin.ui.plus-master/src/api/admin/PCBA/boardFunctionListApi.ts
  4. 33 0
      admin.ui.plus-master/src/api/admin/PCBA/boardFunctionListDto.ts
  5. 23 0
      admin.ui.plus-master/src/api/admin/PCBA/boardFunctionResultApi.ts
  6. 53 0
      admin.ui.plus-master/src/api/admin/PCBA/boardFunctionResultDto.ts
  7. 23 0
      admin.ui.plus-master/src/api/admin/PCBA/boardFunctionSummaryApi.ts
  8. 55 0
      admin.ui.plus-master/src/api/admin/PCBA/boardFunctionSummaryDto.ts
  9. 23 0
      admin.ui.plus-master/src/api/admin/PCBA/boardListApi.ts
  10. 57 0
      admin.ui.plus-master/src/api/admin/PCBA/boardListDto.ts
  11. 25 0
      admin.ui.plus-master/src/api/admin/PCBA/boardSummaryApi.ts
  12. 38 0
      admin.ui.plus-master/src/api/admin/PCBA/boardSummaryDto.ts
  13. 23 0
      admin.ui.plus-master/src/api/admin/PCBA/boardTestRecordApi.ts
  14. 45 0
      admin.ui.plus-master/src/api/admin/PCBA/boardTestRecordDto.ts
  15. 188 0
      admin.ui.plus-master/src/views/admin/PCBA/boardAllFunction/index.vue
  16. 187 0
      admin.ui.plus-master/src/views/admin/PCBA/boardFunctionList/index.vue
  17. 189 0
      admin.ui.plus-master/src/views/admin/PCBA/boardFunctionResult/index.vue
  18. 165 0
      admin.ui.plus-master/src/views/admin/PCBA/boardFunctionSummary/index.vue
  19. 185 0
      admin.ui.plus-master/src/views/admin/PCBA/boardList/index.vue
  20. 134 0
      admin.ui.plus-master/src/views/admin/PCBA/boardSummary/index.vue
  21. 177 0
      admin.ui.plus-master/src/views/admin/PCBA/boardTestRecord/index.vue
  22. 285 0
      admin.ui.plus-master/src/views/admin/PCBA/components/form-edit-functionList.vue
  23. 160 0
      admin.ui.plus-master/src/views/admin/PCBA/components/form-edit.vue

+ 93 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardAllFunctionApi.ts

@@ -0,0 +1,93 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  export class BoardAllFunctionAPI<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-all-function/get-fuel-board-all-function'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-all-function/get-fuel-board-all-function',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+
+
+
+    /**
+   * No description
+   *
+   * @tags
+   * @name Insert
+   * @summary 插入
+   * @request POST:'/api/app/board-all-function/insert-board-all-function'
+   * @secure
+   */
+    Insert = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-all-function/insert-board-all-function',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+
+
+    /**
+   * No description
+   *
+   * @tags
+   * @name Update
+   * @summary 更新
+   * @request POST:'/api/app/board-all-function/update-board-all-function'
+   * @secure
+   */
+    Update = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-all-function/update-board-all-function',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+
+
+
+    /**
+   * No description
+   *
+   * @tags
+   * @name Delete
+   * @summary 删除
+   * @request POST:'/api/app/board-all-function/delete-board-all-function'
+   * @secure
+   */
+    Delete = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-all-function/delete-board-all-function',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+
+
+
+
+      
+    }

+ 33 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardAllFunctionDto.ts

@@ -0,0 +1,33 @@
+/** 查询信息输出 */
+  export interface ResultOutputPageOutputBoardAllFunctionDto{
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 数据 */
+ data?:PageOutputBoardAllFunctionDto[] | null
+}
+    export interface PageOutputBoardAllFunctionDto{
+      /**
+      * 数据总数
+      * @format int64
+      */
+      total?: number
+      /** 数据 */
+      list?: BoardAllFunctionDto[] | null
+    }
+    export interface BoardAllFunctionDto{
+   /** 功能码 */
+      code?: number
+   /** 功能名称 */
+      name?: string
+
+}
+export interface pageInput {
+      /**当前页数 */
+      CurrentPage: number | any
+      /**展示页数 */
+      PageSize: number | any
+    }

+ 77 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardFunctionListApi.ts

@@ -0,0 +1,77 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  export class BoardFunctionListApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-function-list/get-board-function-list-page'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-function-list/get-board-function-list-page',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+    
+
+
+        /**
+   * No description
+   *
+   * @tags
+   * @name insert
+   * @summary 插入
+   * @request POST:'/api/app/board-function-list/insert-board-function-list'
+   * @secure
+   */
+  insert = (data:any ,params: RequestParams = {}) : any  =>
+  this.request<AxiosResponse,any>({
+    path:'/api/app/board-function-list/insert-board-function-list',
+    method: 'POST',
+    body:data,
+    type: ContentType.Json,
+    secure: true,
+    format: 'json',
+    ...params
+  })
+
+
+        /**
+   * No description
+   *
+   * @tags
+   * @name delete
+   * @summary 删除
+   * @request POST:'/api/app/board-function-list/delete-board-function-list'
+   * @secure
+   */
+        delete = (data:any ,params: RequestParams = {}) : any  =>
+          this.request<AxiosResponse,any>({
+            path:'/api/app/board-function-list/delete-board-function-list',
+            method: 'POST',
+            body:data,
+            type: ContentType.Json,
+            secure: true,
+            format: 'json',
+            ...params
+          })
+        
+
+
+
+
+
+
+
+
+
+
+}

+ 33 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardFunctionListDto.ts

@@ -0,0 +1,33 @@
+/** 查询信息输出 */
+  export interface ResultOutputPageOutputBoardFunctionListDto{
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 数据 */
+ data?:PageOutputBoardFunctionListDto[] | null
+}
+    export interface PageOutputBoardFunctionListDto{
+      /**
+      * 数据总数
+      * @format int64
+      */
+      total?: number
+      /** 数据 */
+      list?: BoardFunctionListDto[] | null
+    }
+    export interface BoardFunctionListDto{
+   /** 主板类型 */
+      boardType?: number
+   /** 功能码 */
+      code?: number
+
+}
+export interface pageInput {
+      /**当前页数 */
+      CurrentPage: number | any
+      /**展示页数 */
+      PageSize: number | any
+    }

+ 23 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardFunctionResultApi.ts

@@ -0,0 +1,23 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  export class BoardFunctionResultApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-function-result/get-board-function-result-page'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-function-result/get-board-function-result-page',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+    }

+ 53 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardFunctionResultDto.ts

@@ -0,0 +1,53 @@
+/** 查询信息输出 */
+  export interface ResultOutputPageOutputBoardFunctionResultDto{
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 数据 */
+ data?:PageOutputBoardFunctionResultDto[] | null
+}
+    export interface PageOutputBoardFunctionResultDto{
+      /**
+      * 数据总数
+      * @format int64
+      */
+      total?: number
+      /** 数据 */
+      list?: BoardFunctionResultDto[] | null
+    }
+    export interface BoardFunctionResultDto{
+   /** 序列号 */
+      serno?: string
+   /** 主板类型 */
+      boardType?: number
+   /** 功能码 */
+      code?: number
+   /** 测试结果 */
+      result?: number
+   /** 测试次数 */
+      testTimes?: number
+   /** 成功次数 */
+      successTimes?: number
+   /** 复测次数 */
+      retestTimes?: number
+   /** 有效复测次数 */
+      effectiveRetestTimes?: number
+   /** 创建时间 */
+      createTime?: string
+   /** 最新测试时间 */
+      lastTestTime?: string
+   /** 最新测试员 */
+      lastTestUser?: string
+   /** 测试总耗时 */
+      duration?: number
+
+}
+export interface pageInput {
+      /**当前页数 */
+      CurrentPage: number | any
+      /**展示页数 */
+      PageSize: number | any
+    }

+ 23 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardFunctionSummaryApi.ts

@@ -0,0 +1,23 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  export class BoardFunctionSummaryApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-test-record/get-board-function-summary'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-test-record/get-board-function-summary',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+    }

+ 55 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardFunctionSummaryDto.ts

@@ -0,0 +1,55 @@
+/** 查询信息输出 */
+  export interface ResultOutputPageOutputBoardFunctionSummaryOutput{
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 数据 */
+ data?:PageOutputBoardFunctionSummaryOutput[] | null
+}
+    export interface PageOutputBoardFunctionSummaryOutput{
+      /**
+      * 数据总数
+      * @format int64
+      */
+      total?: number
+      /** 数据 */
+      list?: BoardFunctionSummaryOutput[] | null
+    }
+    export interface BoardFunctionSummaryOutput{
+   /** 功能码 */
+        code?: number
+   /** 测试功能数量 */
+        num?: number
+   /** 通过数量 */
+        successNum?: number
+   /** 测试一次性通过数量 */
+        oneTestSuccessNum?: number
+   /** 测试次数 */
+        testTimes?: number
+   /** 测试成功次数 */
+        testSuccessTimes?: number
+   /** 复测次数 */
+        retestTimes?: number
+   /** 有效复测次数 */
+        effectiveRetestTimes?: number
+   /** 测试通过率,单位:% */
+        successRate?: number
+   /** 测试一次性通过数量,单位:% */
+        oneTestSuccessRate?: number
+   /** 测试成功率,单位:% */
+        testSuccessRate?: number
+   /** 复测率,单位:% */
+        retestRate?: number
+   /** 有效复测率,单位:% */
+        effectiveRetestRate?: number
+
+}
+export interface pageInput {
+      /**当前页数 */
+      CurrentPage: number | any
+      /**展示页数 */
+      PageSize: number | any
+    }

+ 23 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardListApi.ts

@@ -0,0 +1,23 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  export class BoardListApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-list/get-board-list-page'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-list/get-board-list-page',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+    }

+ 57 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardListDto.ts

@@ -0,0 +1,57 @@
+/** 查询信息输出 */
+  export interface ResultOutputPageOutputBoardListDto{
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 数据 */
+ data?:PageOutputBoardListDto[] | null
+}
+    export interface PageOutputBoardListDto{
+      /**
+      * 数据总数
+      * @format int64
+      */
+      total?: number
+      /** 数据 */
+      list?: BoardListDto[] | null
+    }
+    export interface BoardListDto{
+   /** 序列号 */
+      serno?: string
+   /** 物料号 */
+      partno?: string
+   /** 主板类型 */
+      boardType?: number
+   /** 主板名称 */
+      boardName?: string
+   /** 创建时间 */
+      createTime?: string
+   /** 最近检测时间 */
+      lastTestTime?: string
+   /** 最新检测状态 */
+      lastTestState?: number
+   /** 最新检测员 */
+      lastTestUser?: string
+   /** 功能总测试次数 */
+      testTimes?: number
+   /** 功能总测试成功次数 */
+      successTimes?: number
+   /** 功能总复测次数 */
+      retestTimes?: number
+   /** 功能总有效复测次数 */
+      effectiveRetestTimes?: number
+   /** 测试总耗时 */
+      duration?: number
+   /** 备注 */
+      info?: string
+
+}
+export interface pageInput {
+      /**当前页数 */
+      CurrentPage: number | any
+      /**展示页数 */
+      PageSize: number | any
+    }

+ 25 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardSummaryApi.ts

@@ -0,0 +1,25 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  
+
+  export class BoardSummaryApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-test-record/get-board-summary'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-test-record/get-board-summary',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+    }

+ 38 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardSummaryDto.ts

@@ -0,0 +1,38 @@
+/** 查询信息输出 */
+export interface ResultOutputBoardSummaryOutput{
+     /** 是否成功标记 */
+     success?: boolean
+     /** 编码 */
+     code?: string | null
+     /** 消息 */
+     msg?: string | null
+     /** 数据 */
+    data?:BoardSummaryOutput[] | null
+   }
+         export interface BoardSummaryOutput{
+      /** 主板数量 */
+           boardNum?: number
+      /** 主板测试通过数量 */
+           boardSuccessNum?: number
+      /** 主板测试一次性通过数量 */
+           boardOneTestSuccessNum?: number
+      /** 主板功能测试次数 */
+           boardFunctionTestTimes?: number
+      /** 主板功能测试成功次数 */
+           boardFunctionSuccessTimes?: number
+      /** 主板功能复测次数 */
+           retestTimes?: number
+      /** 主板功能有效复测次数 */
+           effectiveRetestTimes?: number
+      /** 主板测试通过率,单位:% */
+           boardSuccessRate?: number
+      /** 主板测试一次性通过数量,单位:% */
+           boardOneTestSuccessRate?: number
+      /** 主板功能测试成功率,单位:% */
+           boardFunctionSuccessRate?: number
+      /** 主板功能复测率,单位:% */
+           retestRate?: number
+      /** 主板功能有效复测率,单位:% */
+           effectiveRetestRate?: number
+   
+   }

+ 23 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardTestRecordApi.ts

@@ -0,0 +1,23 @@
+import { AxiosResponse } from 'axios'
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
+  export class BoardTestRecordApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
+    /**
+   * No description
+   *
+   * @tags
+   * @name GetList
+   * @summary 查询列表
+   * @request POST:'/api/app/board-test-record/get-board-test-record-page'
+   * @secure
+   */
+getList = (data:any ,params: RequestParams = {}) : any  =>
+      this.request<AxiosResponse,any>({
+        path:'/api/app/board-test-record/get-board-test-record-page',
+        method: 'POST',
+        body:data,
+        type: ContentType.Json,
+        secure: true,
+        format: 'json',
+        ...params
+      })
+    }

+ 45 - 0
admin.ui.plus-master/src/api/admin/PCBA/boardTestRecordDto.ts

@@ -0,0 +1,45 @@
+/** 查询信息输出 */
+  export interface ResultOutputPageOutputBoardTestRecordDto{
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 数据 */
+ data?:PageOutputBoardTestRecordDto[] | null
+}
+    export interface PageOutputBoardTestRecordDto{
+      /**
+      * 数据总数
+      * @format int64
+      */
+      total?: number
+      /** 数据 */
+      list?: BoardTestRecordDto[] | null
+    }
+    export interface BoardTestRecordDto{
+   /** 序列号 */
+      serno?: string
+   /** 功能码 */
+      functionCode?: number
+   /** 功能名称 */
+      functionName?: string
+   /** 检测类型 */
+      testType?: number
+   /** 检测时间 */
+      time?: string
+   /** 测试结果 */
+      result?: number
+   /** 测试员 */
+      user?: string
+   /** 测试耗时 */
+      duration?: number
+
+}
+export interface pageInput {
+      /**当前页数 */
+      CurrentPage: number | any
+      /**展示页数 */
+      PageSize: number | any
+    }

+ 188 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardAllFunction/index.vue

@@ -0,0 +1,188 @@
+
+
+<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="code">
+                  <el-input v-model="state.filter.code" 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.name" 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>
+<el-button  type="primary" icon="ele-CirclePlus" @click="onAdd"> 添加 </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-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-Edit"
+                  @click="onDateUpdate(row)"
+                  :underline="false"
+                  target="_blank"
+                >编辑</el-link>
+<el-link
+                  class="my-el-link mr12 ml12"
+                  type="primary"
+                  icon="ele-Delete"
+                  @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="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>
+<EditDialog ref="editDialogRef" />
+    </div>
+  </template>
+  <script setup lang="ts">
+import { defineAsyncComponent,onMounted, reactive, ref, watch, onBeforeMount,getCurrentInstance } from "vue";
+  import eventBus from "/@/utils/mitt";
+import { BoardAllFunctionAPI } from '/@/api/admin/PCBA/boardAllFunctionApi'
+import { BoardAllFunctionDto } from '/@/api/admin/PCBA/boardAllFunctionDto'
+import type { pageInput } from "/@/api/admin/shareDto/shareDto";
+
+
+
+
+/**引入组件*/
+const EditDialog = defineAsyncComponent(() => import('../components/form-edit.vue'))
+
+/**
+ * 绑定EditDialog
+ */
+const editDialogRef = ref()
+
+
+
+
+/**数据对象*/
+  const state = reactive({
+    /**加载显示 */
+    loading: false,
+    /**条件查询模块 */
+    filter: {
+/**code */
+        code: -1,
+/**功能名称 */
+        name: "",},
+  /**表格信息 */
+tableModel: [] as BoardAllFunctionDto,
+    /**动态表头 */
+    dynamicColumns: [
+    { prop: 'code', label: '功能码' },
+    { prop: 'name', 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()
+}
+
+const { proxy } = getCurrentInstance() as any
+
+  /**
+  * 监听变换
+  */
+  watch(() => {},
+  ()=> {})
+/**条件查询 */
+          const onQuery = () => {
+          init()
+        }
+        /**初始化 */
+        const init = async () => {
+          state.loading = true;
+          state.filter.code = -1;
+const res:any = await new BoardAllFunctionAPI().getList({...state.pageInput, Filter:state.filter}).catch(() => {
+    state.loading = false
+  })
+            state.total = res?.data?.total ?? 0
+state.tableModel = res?.data?.list ?? []
+          state.loading = false
+        }
+/**添加 */
+        const onAdd=()=>{
+
+          editDialogRef.value.openDialog()
+        }
+/**编辑 */
+      const onDateUpdate=(row:BoardAllFunctionDto)=>{
+        editDialogRef.value.openDialog(row)
+       }
+/**删除 */
+      const onDataDelete=(row:BoardAllFunctionDto)=>{       
+        proxy.$modal
+    .confirmDelete(`确定要删除功能【${row.code}】?`)
+    .then(async () => {
+          await new BoardAllFunctionAPI().Delete(row);
+
+          onQuery();
+        })
+        .catch(() => {})
+         // await new BoardAllFunctionAPI().Delete({ id: row.id }, { loading: true })
+          
+}
+</script>
+<style scoped lang="scss">
+  </style>

+ 187 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardFunctionList/index.vue

@@ -0,0 +1,187 @@
+
+<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="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="6" :xl="4" class="mb20">
+                <el-form-item label="code">
+                  <el-input v-model="state.filter.code" 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>
+<el-button  type="primary" icon="ele-CirclePlus" @click="onAdd"> 添加 </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-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="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="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>
+<EditDialog ref="editDialogRef" />
+    </div>
+  </template>
+  <script setup lang="ts">
+  import {defineAsyncComponent,ref,onBeforeMount, onMounted, reactive, watch} from "vue";
+  import eventBus from "/@/utils/mitt";
+import { BoardFunctionListApi } from '/@/api/admin/PCBA/boardFunctionListApi'
+import { BoardFunctionListDto } from '/@/api/admin/PCBA/boardFunctionListDto'
+import { BoardAllFunctionAPI } from '/@/api/admin/PCBA/boardAllFunctionApi'
+import type { pageInput } from "/@/api/admin/shareDto/shareDto";
+
+
+/**引入组件*/
+const EditDialog = defineAsyncComponent(() => import('../components/form-edit-functionList.vue'))
+
+/**
+ * 绑定EditDialog
+ */
+const editDialogRef = ref()
+
+
+/**数据对象*/
+  const state = reactive({
+    /**加载显示 */
+    loading: false,
+    /**条件查询模块 */
+      filter: {
+/**boardType */
+        boardType: -1,
+/**code */
+        code: -1,},
+  /**表格信息 */
+tableModel: [] as BoardFunctionListDto,
+    /**动态表头 */
+    dynamicColumns: [
+{ prop: 'boardType', label: '主板类型' },
+{ prop: 'code', label: '功能码' },],
+/**分页标识 */
+    pageInput:{
+      CurrentPage: 1,
+      PageSize: 10,
+    } as pageInput,
+
+    /**分页标识2 */
+    pageInput2:{
+      CurrentPage: 1,
+      PageSize: 100,
+    } 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()
+}
+
+var res_all:any = [];
+
+  /**
+  * 监听变换
+  */
+  watch(() => {},() => {})
+/**条件查询 */
+          const onQuery = () => {
+          init()
+        }
+        /**初始化 */
+        const init = async () => {
+          state.loading = true
+
+          res_all = await new BoardAllFunctionAPI().getList({...state.pageInput, Filter:state.filter}).catch(() => {
+    state.loading = false
+  })
+            state.total = res_all?.data?.total ?? 0
+           // console.log(res_all?.data?.list ?? [])
+
+
+const res:any = await new BoardFunctionListApi().getList({...state.pageInput, Filter:state.filter})
+            state.total = res?.data?.total ?? 0
+          //  console.log( res?.data)
+state.tableModel = res?.data?.list ?? []
+          state.loading = false
+        }
+
+
+/**添加 */
+        const onAdd=()=>{
+          editDialogRef.value.openDialog(0,res_all?.data?.list ?? [])
+        }
+/**编辑 */
+      const onDateUpdate=(row)=>{
+        editDialogRef.value.openDialog(1,res_all?.data?.list ?? [])
+      }
+/**删除 */
+      const onDataDelete=(row)=>{}
+</script>
+<style scoped lang="scss">
+  </style>

+ 189 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardFunctionResult/index.vue

@@ -0,0 +1,189 @@
+
+<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.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-input v-model="state.filter.code" 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.result" 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.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 { BoardFunctionResultApi } from '/@/api/admin/PCBA/BoardFunctionResultApi'
+import { BoardFunctionResultDto } from '/@/api/admin/PCBA/BoardFunctionResultDto'
+import type { pageInput } from "/@/api/admin/shareDto/shareDto";
+
+
+/**数据对象*/
+  const state = reactive({
+    /**加载显示 */
+    loading: false,
+    /**条件查询模块 */
+      filter: {
+/**序列号 */
+        serno: "",
+/**boardType */
+        boardType: -1,
+/**code */
+        code: -1,
+/**测试结果 */
+        result: -1,
+/**起始创建时间 */
+        beginCreateTime: "",
+/**结束创建时间 */
+        endCreateTime: "",
+/**最新测试员 */
+        lastTestUser: "",},
+  /**表格信息 */
+tableModel: [] as BoardFunctionResultDto,
+    /**动态表头 */
+    dynamicColumns: [
+{ prop: 'serno', label: '序列号' },
+{ prop: 'boardType', label: '主板类型' },
+{ prop: 'code', label: '功能码' },
+{ prop: 'result', label: '测试结果' },
+{ prop: 'testTimes', label: '测试次数' },
+{ prop: 'successTimes', label: '成功次数' },
+{ prop: 'retestTimes', label: '复测次数' },
+{ prop: 'effectiveRetestTimes', label: '有效复测次数' },
+{ prop: 'createTime', label: '创建时间' },
+{ prop: 'lastTestTime', label: '最新测试时间' },
+{ prop: 'lastTestUser', label: '最新测试员' },
+{ prop: 'duration', 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 BoardFunctionResultApi().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>

+ 165 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardFunctionSummary/index.vue

@@ -0,0 +1,165 @@
+
+<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="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="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="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-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 { BoardFunctionSummaryApi } from '/@/api/admin/PCBA/boardFunctionSummaryApi'
+import { BoardFunctionSummaryOutput } from '/@/api/admin/PCBA/boardFunctionSummaryDto'
+import type { pageInput } from "/@/api/admin/shareDto/shareDto";
+
+/**数据对象*/
+  const state = reactive({
+    /**加载显示 */
+    loading: false,
+    /**条件查询模块 */
+      filter: {
+/**boardType */
+        boardType: -1,
+/**检测员 */
+        lastTestUser: "",
+/**起始创建时间 */
+        beginCreateTime: "",
+/**结束创建时间 */
+        endCreateTime: "",},
+  /**表格信息 */
+tableModel: [] as BoardFunctionSummaryOutput,
+    /**动态表头 */
+    dynamicColumns: [
+{ prop: 'code', label: '功能码' },
+{ prop: 'num', label: '测试功能数量' },
+{ prop: 'successNum', label: '通过数量' },
+{ prop: 'oneTestSuccessNum', label: '测试一次性通过数量' },
+{ prop: 'testTimes', label: '测试次数' },
+{ prop: 'testSuccessTimes', label: '测试成功次数' },
+{ prop: 'retestTimes', label: '复测次数' },
+{ prop: 'effectiveRetestTimes', label: '有效复测次数' },
+{ prop: 'successRate', label: '测试通过率,单位:%' },
+{ prop: 'oneTestSuccessRate', label: '测试一次性通过数量,单位:%' },
+{ prop: 'testSuccessRate', label: '测试成功率,单位:%' },
+{ prop: 'retestRate', label: '复测率,单位:%' },
+{ prop: 'effectiveRetestRate', 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 BoardFunctionSummaryApi().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>

+ 185 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardList/index.vue

@@ -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>

+ 134 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardSummary/index.vue

@@ -0,0 +1,134 @@
+
+<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="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="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="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-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>
+</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 { BoardSummaryApi } from '/@/api/admin/PCBA/boardSummaryApi'
+import { BoardSummaryOutput } from '/@/api/admin/PCBA/boardSummaryDto'
+
+/**数据对象*/
+const state = reactive({
+    /**加载显示 */
+    loading: false,
+    /**条件查询模块 */
+      filter: {
+/**boardType */
+        boardType: -1,
+/**检测员 */
+        lastTestUser: "",
+/**起始创建时间 */
+        beginCreateTime: "",
+/**结束创建时间 */
+        endCreateTime: "",},
+  /**表格信息 */
+tableModel: [] as BoardSummaryOutput,
+    /**动态表头 */
+    dynamicColumns: [
+{ prop: 'boardNum', label: '主板数量' },
+{ prop: 'boardSuccessNum', label: '主板测试通过数量' },
+{ prop: 'boardOneTestSuccessNum', label: '主板测试一次性通过数量' },
+{ prop: 'boardFunctionTestTimes', label: '主板功能测试次数' },
+{ prop: 'boardFunctionSuccessTimes', label: '主板功能测试成功次数' },
+{ prop: 'retestTimes', label: '主板功能复测次数' },
+{ prop: 'effectiveRetestTimes', label: '主板功能有效复测次数' },
+{ prop: 'boardSuccessRate', label: '主板测试通过率,单位:%' },
+{ prop: 'boardOneTestSuccessRate', label: '主板测试一次性通过数量,单位:%' },
+{ prop: 'boardFunctionSuccessRate', label: '主板功能测试成功率,单位:%' },
+{ prop: 'retestRate', label: '主板功能复测率,单位:%' },
+{ prop: 'effectiveRetestRate', label: '主板功能有效复测率,单位:%' },],
+})
+  onMounted(() => {
+    init()
+    eventBus.off('refreshView')
+    eventBus.on('refreshView', async () => {
+      await init()
+    })
+  })
+  onBeforeMount(() => {
+    eventBus.off('refreshView')
+  })
+
+
+
+  /**
+  * 监听变换
+  */
+  watch(() => {},() => {})
+/**条件查询 */
+          const onQuery = () => {
+          init()
+        }
+        /**初始化 */
+        const init = async () => {
+          state.loading = true
+const res:any = await new BoardSummaryApi().getList({...state.filter})
+
+
+const array = [res.data] as BoardSummaryOutput;
+state.tableModel = array
+
+          state.loading = false
+        }
+</script>
+<style scoped lang="scss">
+  </style>

+ 177 - 0
admin.ui.plus-master/src/views/admin/PCBA/boardTestRecord/index.vue

@@ -0,0 +1,177 @@
+
+<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="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="6" :xl="4" 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="6" :xl="4" 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="6" :xl="4" class="mb20">
+            <el-form-item label="开始时间">
+                  <el-date-picker
+                    v-model="state.filter.beginTime"
+                    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.endTime"
+                    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.result" 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.user" 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 { BoardTestRecordApi } from '/@/api/admin/PCBA/boardTestRecordApi'
+import { BoardTestRecordDto } from '/@/api/admin/PCBA/boardTestRecordDto'
+import type { pageInput } from "/@/api/admin/shareDto/shareDto";
+/**数据对象*/
+  const state = reactive({
+    /**加载显示 */
+    loading: false,
+    /**条件查询模块 */
+      filter: {
+/**serno */
+        serno: "",
+/**functionCode */
+        functionCode: -1,
+/**检测类型 */
+        testType: -1,
+/**起始检测时间 */
+        beginTime: "",
+/**结束检测时间 */
+        endTime: "",
+/**测试结果 */
+        result: -1,
+/**测试员 */
+        user: "",},
+  /**表格信息 */
+tableModel: [] as BoardTestRecordDto,
+    /**动态表头 */
+    dynamicColumns: [
+{ prop: 'serno', label: '序列号' },
+{ prop: 'functionCode', label: '功能码' },
+{ prop: 'functionName', label: '功能名称' },
+{ prop: 'testType', label: '检测类型' },
+{ prop: 'time', label: '检测时间' },
+{ prop: 'result', label: '测试结果' },
+{ prop: 'user', label: '测试员' },
+{ prop: 'duration', 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 BoardTestRecordApi().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>

+ 285 - 0
admin.ui.plus-master/src/views/admin/PCBA/components/form-edit-functionList.vue

@@ -0,0 +1,285 @@
+<template>
+  <div class="admin-pcba-editInfo">
+    <el-dialog :title="formData.titleText" v-model="formData.isShowDialog" draggable width="769px">
+      <el-form :model="formData.editData"
+               :rules="rules"
+               ref="formRef"
+               v-loading="formData.loading"
+               size="default"
+               label-width="80px">
+        <el-row :gutter="35">
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+            <el-form-item label="主板类型" prop="boardtype">
+              <el-input v-model="formData.editData.boardType" placeholder="请输入主板类型" clearable></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+
+
+
+<table id="myTable">
+    <tr>
+      <th>选择</th>
+      <th>功能码</th>
+      <th>功能名称</th>
+    </tr>
+  </table>
+
+
+
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="onCancel" icon="ele-CircleClose" size="default">取 消</el-button>
+          <el-button type="primary" :icon="formData.editIcon" @click="onSubmit" size="default">{{formData.buttonText}}</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+
+
+
+</template>
+
+
+
+
+
+<script setup lang="ts">
+import {FormRules} from "element-plus";
+import { reactive,onMounted,ref, watch} from "vue";
+import { BoardAllFunctionAPI } from '/@/api/admin/PCBA/boardAllFunctionApi'
+import { BoardAllFunctionDto } from '/@/api/admin/PCBA/boardAllFunctionDto'
+import { BoardFunctionListApi } from '/@/api/admin/PCBA/boardFunctionListApi'
+import { BoardFunctionListDto } from '/@/api/admin/PCBA/boardFunctionListDto'
+import eventBus from "/@/utils/mitt";
+
+
+var addlist = [];
+
+const getSelectedValues =  () => {
+var checkboxes = document.querySelectorAll('input[name="options"]:checked');
+var selectedValues = [];
+checkboxes.forEach(function(checkbox) {
+    selectedValues.push(checkbox.value);
+});
+//alert("选中的值: " + selectedValues.join(", "));
+addlist = selectedValues;
+}
+
+
+
+
+const addCheckbox =  () => {
+
+var checkboxes = document.querySelectorAll('input[name="options"]');
+console.log(checkboxes.length)
+if(checkboxes.length!=0)
+{
+  return;
+}
+
+let list = formData.all_list;
+console.log(list)
+
+for(let i = 0;i<list.length;i++)
+{
+    
+let data = list[i];
+
+
+      var table = document.getElementById("myTable");
+      var row = table.insertRow();
+
+      var cell1 = row.insertCell();
+      var cell2 = row.insertCell();
+      var cell3 = row.insertCell();
+
+
+
+
+
+      cell1.innerHTML = '<input type="checkbox" name="options" value="'+data.code + '">';
+      cell2.innerHTML = data.code;
+      cell3.innerHTML = data.name;
+    }
+}
+
+
+
+
+
+enum Form {
+  ADD,
+  UPDATE
+}
+
+/**数据对象 */
+const formData = reactive({
+  loading: false,
+  formType: Form.ADD,
+  titleText:'',
+  editIcon:'',
+  buttonText:'',
+  isShowDialog: false,
+  //表单数据对象
+  editData:{} as BoardFunctionListDto,
+  all_list:[]
+})
+
+// /**有效时间选择校验*/
+// const validateDate = (rule: any, value: any, callback: any) => {
+//   if(new Date(value).getTime() > Date.now()){
+//     callback()
+//   }else{
+//     callback(new Error('选择的时间已失效'))
+//   }
+// }
+
+/**表单校验*/
+const rules = reactive<FormRules>({
+  code: [
+    { required: true, message: '请输入功能码', trigger: 'blur' },
+  ],
+
+})
+
+
+
+onMounted(() => {
+    init()
+    eventBus.off('refreshView')
+    eventBus.on('refreshView', async () => {
+      await init()
+    })
+
+  })
+
+        /**初始化 */
+        const init = async () => {
+          addCheckbox()
+        }
+
+
+
+/**
+ * 表单对象
+ */
+const formRef = ref()
+
+
+/**
+ * 根据参数 打开表单
+ * @param val
+ */
+const openDialog = (type,val) => {
+
+
+console.log(val)
+  formData.all_list = val;
+  
+  
+  var table = document.getElementById("myTable");
+  if(table != null)
+  {
+    init();
+  }
+  
+  if(type==1){
+
+
+   // formData.editData = JSON.parse(JSON.stringify(({...val})))
+    formData.titleText = '更新'
+    formData.buttonText = '更新'
+    //更新操作
+    formData.formType = Form.UPDATE
+    formData.editIcon = 'ele-Refresh'
+  }else {
+
+
+    //formData.editData = {} as BoardAllFunctionDto
+    formData.titleText = '添加'
+    formData.buttonText = '添加'
+    //添加操作
+    formData.formType = Form.ADD
+    formData.editIcon = 'ele-CirclePlus'
+  }
+  formData.isShowDialog = true
+
+
+}
+
+/**
+ * 取消
+ */
+const onCancel = () => {
+  formData.editData = {} as BoardAllFunctionDto
+  formData.isShowDialog = false
+}
+
+/***监听弹窗关闭表单验证*/
+watch(() => formData.isShowDialog,(newVal) => {
+  if(newVal) formRef.value?.resetFields()
+})
+
+/**
+ * 提交前表单验证
+ */
+const onSubmit =  () => {
+  formRef.value.validate(async (valid: boolean) =>{
+    if(!valid) return
+
+    formData.loading = true
+    let res = {} as any
+    if(formData.formType == Form.UPDATE){
+
+     // res = await new BoardAllFunctionAPI().Update(formData.editData as BoardAllFunctionDto).catch(() => {
+    //    formData.loading = false
+    //  })
+      
+    }else if(formData.formType == Form.ADD){
+     
+      getSelectedValues();
+
+    for(var i = 0;i< addlist.length;i++)
+    {
+        var data ={} as BoardFunctionListDto;
+        data.boardType = formData.editData.boardType;
+        data.code = addlist[i];
+        console.log(data)
+        res = await new BoardFunctionListApi().insert(data).catch(() => {
+          formData.loading = false
+        })
+        console.log(res)
+
+    }
+
+
+     // res = await new BoardAllFunctionAPI().Insert(formData.editData as BoardAllFunctionDto).catch(() => {
+     //   formData.loading = false
+    //  })
+    }else {
+      formData.loading = false
+      return
+    }
+
+    if(res?.data){
+      eventBus.emit('refreshView')
+      formData.isShowDialog = false
+      formData.editData = {}
+    }
+
+    formData.loading = false
+  })
+}
+
+
+defineExpose({
+  openDialog,
+})
+
+</script>
+<style scoped lang="scss">
+
+</style>

+ 160 - 0
admin.ui.plus-master/src/views/admin/PCBA/components/form-edit.vue

@@ -0,0 +1,160 @@
+<template>
+  <div class="admin-pcba-editInfo">
+    <el-dialog :title="formData.titleText" v-model="formData.isShowDialog" draggable width="769px">
+      <el-form :model="formData.editData"
+               :rules="rules"
+               ref="formRef"
+               v-loading="formData.loading"
+               size="default"
+               label-width="80px">
+        <el-row :gutter="35">
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+            <el-form-item label="功能码" prop="code">
+              <el-input v-model="formData.editData.code" placeholder="请输功能码" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+            <el-form-item label="功能名称" prop="name">
+              <el-input v-model="formData.editData.name" placeholder="请输入功能名称" clearable></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="onCancel" icon="ele-CircleClose" size="default">取 消</el-button>
+          <el-button type="primary" :icon="formData.editIcon" @click="onSubmit" size="default">{{formData.buttonText}}</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+import {FormRules} from "element-plus";
+import { reactive, ref, watch} from "vue";
+import { BoardAllFunctionAPI } from '/@/api/admin/PCBA/boardAllFunctionApi'
+import { BoardAllFunctionDto } from '/@/api/admin/PCBA/boardAllFunctionDto'
+import eventBus from "/@/utils/mitt";
+
+
+
+enum Form {
+  ADD,
+  UPDATE
+}
+
+/**数据对象 */
+const formData = reactive({
+  loading: false,
+  formType: Form.ADD,
+  titleText:'',
+  editIcon:'',
+  buttonText:'',
+  isShowDialog: false,
+  //表单数据对象
+  editData:{} as BoardAllFunctionDto,
+})
+
+// /**有效时间选择校验*/
+// const validateDate = (rule: any, value: any, callback: any) => {
+//   if(new Date(value).getTime() > Date.now()){
+//     callback()
+//   }else{
+//     callback(new Error('选择的时间已失效'))
+//   }
+// }
+
+/**表单校验*/
+const rules = reactive<FormRules>({
+  code: [
+    { required: true, message: '请输入功能码', trigger: 'blur' },
+  ],
+  name: [
+    { required: true, message: '请输入功能名称', trigger: 'blur' },
+  ],
+})
+
+/**
+ * 表单对象
+ */
+const formRef = ref()
+
+
+/**
+ * 根据参数 打开表单
+ * @param val
+ */
+const openDialog = (val:BoardAllFunctionDto) => {
+  if(val){
+    formData.editData = JSON.parse(JSON.stringify(({...val})))
+    formData.titleText = '更新'
+    formData.buttonText = '更新'
+    //更新操作
+    formData.formType = Form.UPDATE
+    formData.editIcon = 'ele-Refresh'
+  }else {
+    formData.editData = {} as BoardAllFunctionDto
+    formData.titleText = '添加'
+    formData.buttonText = '添加'
+    //添加操作
+    formData.formType = Form.ADD
+    formData.editIcon = 'ele-CirclePlus'
+  }
+  formData.isShowDialog = true
+}
+
+/**
+ * 取消
+ */
+const onCancel = () => {
+  formData.editData = {} as BoardAllFunctionDto
+  formData.isShowDialog = false
+}
+
+/***监听弹窗关闭表单验证*/
+watch(() => formData.isShowDialog,(newVal) => {
+  if(newVal) formRef.value?.resetFields()
+})
+
+/**
+ * 提交前表单验证
+ */
+const onSubmit =  () => {
+  formRef.value.validate(async (valid: boolean) =>{
+    if(!valid) return
+
+    formData.loading = true
+    let res = {} as any
+    if(formData.formType == Form.UPDATE){
+      res = await new BoardAllFunctionAPI().Update(formData.editData as BoardAllFunctionDto).catch(() => {
+        formData.loading = false
+      })
+    }else if(formData.formType == Form.ADD){
+      res = await new BoardAllFunctionAPI().Insert(formData.editData as BoardAllFunctionDto).catch(() => {
+        formData.loading = false
+      })
+    }else {
+      formData.loading = false
+      return
+    }
+
+    if(res?.data){
+      eventBus.emit('refreshView')
+      formData.isShowDialog = false
+      formData.editData = {}
+    }
+
+    formData.loading = false
+  })
+}
+
+
+defineExpose({
+  openDialog,
+})
+
+</script>
+<style scoped lang="scss">
+
+</style>