Jelajahi Sumber

实现生产管理分页功能

wyoujia 1 tahun lalu
induk
melakukan
04217b5b0a

+ 23 - 6
admin.ui.plus-master/src/api/admin/productionManagement/ComponentDetails.ts

@@ -1,4 +1,5 @@
 import {HttpClient} from "/@/api/admin/http-client";
+import {pageInput} from "/@/api/admin/productionManagement/ComponentDetailsDto";
 
 export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
   /**
@@ -12,7 +13,7 @@ export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<Sec
   */
 
   timer = 500
-  getBasicInfo = (params : string) : any  => {
+  getBasicInfo = (params : any) : any  => {
     // eslint-disable-next-line no-console
     console.log(params)
     return new Promise((resolve) => {
@@ -101,9 +102,10 @@ export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<Sec
   * @secure
   */
 
-  getProductionLog = ( params: string ) : any => {
+  getProductionLog = (data: pageInput, params: any ) : any => {
     // eslint-disable-next-line no-console
     console.log(params)
+    console.log(data)
     return new Promise((resolve) => {
       setTimeout(()=> {
         resolve({
@@ -139,9 +141,18 @@ export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<Sec
             { prop: 'workingProcedure', label: '工序' },
             { prop: 'state', label: '状态' },
             { prop: 'productionPictures', label: '生产图片' },
-            { prop: 'remarks', label: '备注' }
+            { prop: 'remarks', label: '备注' },
+            { prop: 'remarks', label: '备注' },
+            { prop: 'remarks', label: '备注' },
+            { prop: 'remarks', label: '备注' },
+            { prop: 'remarks', label: '备注' },
             // You can generate and push more columns based on your data
-          ]
+          ],
+          pageInput: {
+            currentPage: 1,
+            pageSize: 20
+          },
+          total: 100
         })
       },this.timer)
 
@@ -157,9 +168,10 @@ export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<Sec
   * @request GET:
   * @secure
   */
-  getAlarmLog = ( params:string ) : any => {
+  getAlarmLog = (data: pageInput, params:any ) : any => {
     // eslint-disable-next-line no-console
     console.log(params)
+    console.log(data)
     return new Promise((resolve) => {
       setTimeout(()=> {
         resolve({
@@ -190,7 +202,12 @@ export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<Sec
             { prop: 'state', label: '状态' },
             { prop: 'state', label: '状态' },
             { prop: 'state', label: '状态' },
-          ]
+          ],
+          pageInput: {
+            currentPage: 1,
+            pageSize: 20
+          },
+          total: 100
         })
       },this.timer)
     })

+ 12 - 1
admin.ui.plus-master/src/api/admin/productionManagement/ComponentDetailsDto.ts

@@ -41,6 +41,13 @@ export interface goodsInformationBasic {
   goodsImg: imageInter
 }
 
+export interface pageInput {
+  /**当前页数 */
+  currentPage: 1,
+  /**展示页数 */
+  pageSize: 20
+}
+
 /**
  * @name:
  * @description: 生产管理 - 部件详情 - 动态表头
@@ -64,7 +71,11 @@ export interface dynamicTable {
   /**表格数据 */
   tableData: productionLog []| alarmLog [] | null,
   /**动态表头 */
-  dynamicColumns: columnsProps [] | null
+  dynamicColumns: columnsProps [] | null,
+  /**页面分页 */
+  pageInput: pageInput
+  /**总数 */
+  total: number
 }
 
 /**

+ 13 - 0
admin.ui.plus-master/src/views/admin/authorize/fuelingsdk.vue

@@ -0,0 +1,13 @@
+<template>
+  <div>
+    12321
+  </div>
+</template>
+
+<script setup lang="ts">
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 9 - 9
admin.ui.plus-master/src/views/admin/logs/login-log.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="my-layout">
-    <el-card class="mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
+    <el-card class="mt8" shadow="never" >
       <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item prop="name">
           <el-input v-model="state.filterModel.createdUserName" placeholder="登录账户" @keyup.enter="onQuery" />
@@ -12,20 +12,20 @@
     </el-card>
 
     <el-card class="my-fill mt8" shadow="never">
-      <el-table v-loading="state.loading" :data="state.loginLogListData" row-key="id" style="width: 100%">
-        <el-table-column prop="createdUserName" label="登录账号" width="100">
+      <el-table v-loading="state.loading" :data="state.loginLogListData" row-key="id" style="width: 100%" stripe>
+        <el-table-column prop="createdUserName" label="登录账号" >
           <template #default="{ row }"> {{ row.createdUserName }}<br />{{ row.nickName }} </template>
         </el-table-column>
-        <el-table-column prop="ip" label="IP地址" width="130" />
-        <el-table-column prop="browser" label="浏览器" width="100" />
-        <el-table-column prop="os" label="操作系统" width="100" />
-        <el-table-column prop="elapsedMilliseconds" label="耗时(毫秒)" width="100" />
-        <el-table-column prop="status" label="登录状态" width="80">
+        <el-table-column prop="ip" label="IP地址"  />
+        <el-table-column prop="browser" label="浏览器"  />
+        <el-table-column prop="os" label="操作系统"  />
+        <el-table-column prop="elapsedMilliseconds" label="耗时(毫秒)"  />
+        <el-table-column prop="status" label="登录状态" >
           <template #default="{ row }">
             <el-tag :type="row.status ? 'success' : 'danger'" disable-transitions>{{ row.status ? '成功' : '失败' }}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column prop="createdTime" label="登录时间" :formatter="formatterTime" width="160" />
+        <el-table-column prop="createdTime" label="登录时间" :formatter="formatterTime"  />
         <el-table-column prop="msg" label="登录消息" width="" />
       </el-table>
       <div class="my-flex my-flex-end" style="margin-top: 20px">

+ 9 - 9
admin.ui.plus-master/src/views/admin/logs/opration-log.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="my-layout">
-    <el-card class="mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
+    <el-card class="mt8" shadow="never" >
       <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item prop="name">
           <el-input v-model="state.filterModel.createdUserName" placeholder="操作账号" @keyup.enter="onQuery" />
@@ -12,21 +12,21 @@
     </el-card>
 
     <el-card class="my-fill mt8" shadow="never">
-      <el-table ref="tableRef" v-loading="state.loading" :data="state.oprationLogListData" row-key="id" style="width: 100%">
-        <el-table-column prop="createdUserName" label="操作账号" width="100">
+      <el-table ref="tableRef" v-loading="state.loading" :data="state.oprationLogListData" row-key="id" style="width: 100%" stripe>
+        <el-table-column prop="createdUserName" label="操作账号" >
           <template #default="{ row }"> {{ row.createdUserName }}<br />{{ row.nickName }} </template>
         </el-table-column>
-        <el-table-column prop="ip" label="IP地址" width="130" />
-        <el-table-column prop="apiLabel" label="操作名称" min-width="220" />
-        <el-table-column prop="apiPath" label="操作接口" min-width="260" />
-        <el-table-column prop="elapsedMilliseconds" label="耗时(毫秒)" width="100" />
-        <el-table-column prop="status" label="操作状态" width="80">
+        <el-table-column prop="ip" label="IP地址"  />
+        <el-table-column prop="apiLabel" label="操作名称"  />
+        <el-table-column prop="apiPath" label="操作接口"  />
+        <el-table-column prop="elapsedMilliseconds" label="耗时(毫秒)"  />
+        <el-table-column prop="status" label="操作状态" >
           <template #default="{ row }">
             <el-tag :type="row.status ? 'success' : 'danger'" disable-transitions>{{ row.status ? '成功' : '失败' }}</el-tag>
           </template>
         </el-table-column>
         <el-table-column prop="createdTime" label="操作时间" :formatter="formatterTime" width="160" />
-        <el-table-column prop="msg" label="操作消息" width="" />
+        <el-table-column prop="msg" label="操作消息" />
       </el-table>
       <div class="my-flex my-flex-end" style="margin-top: 20px">
         <el-pagination

+ 122 - 27
admin.ui.plus-master/src/views/admin/product/goodInfo.vue

@@ -5,7 +5,7 @@
       <!-- 基础信息 -->
       <el-col :xs="24" >
         <el-card shadow="hover" header="基础信息">
-          <div class="basicInformation" v-loading="goods.loading">
+          <div class="basicInformation" v-loading="goods.loadingBasic">
             <div class="basicInformation-left">
               <div v-for="(item, index) in goods.basicInformation.basicInfo" :key="index" class="item">
                 <el-popover
@@ -38,10 +38,23 @@
       <!-- 生产日志 -->
       <el-col :xs="24" >
         <el-card shadow="hover" header="生产日志">
-          <div class="productionLog">
-            <el-table v-loading="goods.loading" :data="goods.productionLog.tableData" row-key="id" style="width: 100%">
+          <div class="productionLog" >
+            <el-table v-loading="goods.loadingProduct" :data="goods.productionLog.tableData" row-key="id" style="width: 100%">
               <el-table-column v-for="column in goods.productionLog.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label"  />
             </el-table>
+            <div class="my-flex my-flex-end" v-if="goods.productionLog.pageInput" style="margin-top: 20px">
+              <el-pagination
+                v-model:currentPage="goods.productionLog.pageInput.currentPage"
+                v-model:page-size="goods.productionLog.pageInput.pageSize"
+                :total="goods.productionLog.total"
+                :page-sizes="[10, 20, 50, 100]"
+                small
+                background
+                @size-change="onProductionLogSizeChange"
+                @current-change="onProductionLogCurrentChange"
+                layout="total, sizes, prev, pager, next, jumper"
+              />
+            </div>
           </div>
         </el-card>
       </el-col>
@@ -50,9 +63,22 @@
       <el-col :span="24" >
         <el-card shadow="hover" header="报警日志">
           <div class="alarmLog">
-            <el-table v-loading="goods.loading" :data="goods.alarmLog.tableData" row-key="id" style="width: 100%">
+            <el-table v-loading="goods.loadingAlarm" :data="goods.alarmLog.tableData" row-key="id" style="width: 100%">
               <el-table-column v-for="column in goods.alarmLog.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label"  />
             </el-table>
+            <div class="my-flex my-flex-end" v-if="goods.alarmLog.pageInput" style="margin-top: 20px">
+              <el-pagination
+                v-model:currentPage="goods.alarmLog.pageInput.currentPage"
+                v-model:page-size="goods.alarmLog.pageInput.pageSize"
+                :total="goods.alarmLog.total"
+                :page-sizes="[10, 20, 50, 100]"
+                small
+                background
+                @size-change="onAlarmLogSizeChange"
+                @current-change="onAlarmLogCurrentChange"
+                layout="total, sizes, prev, pager, next, jumper"
+              />
+            </div>
           </div>
         </el-card>
       </el-col>
@@ -71,56 +97,125 @@
 
 <script setup lang="ts" name="goodInfo">
 import {onMounted, reactive} from "vue";
-import {adminProductGoodsInfoDto} from "/@/api/admin/productionManagement/ComponentDetailsDto";
 import {ComponentDetails} from "/@/api/admin/productionManagement/ComponentDetails";
 import router from "/@/router";
+import type {
+  alarmLog,
+  columnsProps,
+  goodsInformationBasic,
+  pageInput,
+  productionLog
+} from "/@/api/admin/productionManagement/ComponentDetailsDto";
 
 //组件的页面对象
-const goods:adminProductGoodsInfoDto = reactive({
+const goods = reactive({
+  //部件id
+  id:"",
   /**显示加载效果 */
-  loading: false,
+  loadingBasic: false,
+  loadingProduct: false,
+  loadingAlarm: false,
   /**图片是否方法显示 */
   showBig: false,
   /**放大图片的url */
-  imageUrl:"",
+  imageUrl: "",
   /**基础信息 */
-  basicInformation: {},
+  basicInformation: {} as goodsInformationBasic,
   /**生产日志 */
-  productionLog: {},
+  productionLog: {
+    /**表格数据 */
+    tableData:  [] as Array<productionLog>,
+    /**动态表头 */
+    dynamicColumns: [] as Array<columnsProps>,
+    /**页面分页 */
+    pageInput: {
+      currentPage: 1,
+      pageSize: 20
+    } as pageInput,
+    /**总数 */
+    total: 0
+  },
   /**报警日志 */
-  alarmLog: {},
+  alarmLog: {
+    /**表格数据 */
+    tableData:  [] as Array<alarmLog>,
+    /**动态表头 */
+    dynamicColumns: [] as Array<columnsProps>,
+    /**页面分页 */
+    pageInput: {
+      currentPage: 1,
+      pageSize: 20
+    } as pageInput,
+    /**总数 */
+    total: 0
+  },
 })
 
 
 //查看大图
-const showBigPic = (val : string | null) => {
+const showBigPic = (val) => {
   // eslint-disable-next-line no-console
   console.log(val)
   goods.imageUrl = val
   goods.showBig = true
 }
 
+/**生产日志分页size变化 */
+const onProductionLogSizeChange = (val) => {
+  goods.productionLog.pageInput.pageSize = val
+  initProductionLog()
+}
+
+/**生产日志分页Current变化 */
+const onProductionLogCurrentChange = (val) => {
+  goods.productionLog.pageInput.currentPage = val
+  initProductionLog()
+}
+
+/**报警日志分页size变化 */
+const onAlarmLogSizeChange = (val) => {
+  goods.alarmLog.pageInput.currentPage = val
+  initAlarmLog()
+}
+
+/**报警日志分页Current变化 */
+const onAlarmLogCurrentChange = (val) => {
+  goods.alarmLog.pageInput.currentPage = val
+  initAlarmLog()
+}
+
 /**
  * 初始化数据
  */
-const init = async (id) =>{
-  goods.loading = true
-    const basicInformation = await new ComponentDetails().getBasicInfo(id)
-    const productionLog = await new ComponentDetails().getProductionLog(id)
-    const alarmLog =  await new ComponentDetails().getAlarmLog(id)
-    goods.basicInformation = basicInformation
-    goods.productionLog = productionLog
-    goods.alarmLog = alarmLog
-    goods.loading = false
-    console.log(goods.basicInformation)
-    console.log(goods.productionLog)
-    console.log(goods.alarmLog)
-    goods.loading = false
+const initBasicInformation =  async () => {
+  goods.loadingBasic = true
+  goods.basicInformation = await new ComponentDetails().getBasicInfo(goods.id)
+  goods.loadingBasic = false
+  // console.log(goods.basicInformation)
+}
+
+const initProductionLog = async () => {
+  goods.loadingProduct = true
+  goods.productionLog = await new ComponentDetails().getProductionLog(goods.productionLog.pageInput, goods.id)
+  goods.loadingProduct = false
+  // console.log(goods.productionLog)
 }
 
+const initAlarmLog = async () => {
+  goods.loadingAlarm = true
+  goods.alarmLog = await new ComponentDetails().getAlarmLog(goods.productionLog.pageInput, goods.id)
+  goods.loadingAlarm = false
+  // console.log(goods.alarmLog)
+
+}
+
+
 onMounted(() => {
-  const id = router.currentRoute.value.params.id
-  init(id)
+  goods.id = <string>router.currentRoute.value.params.id
+  /**初始化 */
+  initBasicInformation()
+  initProductionLog()
+  initAlarmLog()
 })
 
 </script>

+ 10 - 6
admin.ui.plus-master/src/views/admin/product/index.vue

@@ -6,7 +6,7 @@
         <el-col :xs="24" >
           <el-card class="mt8" shadow="hover" >
             <el-form :model="bomModel.filterModel" :inline="true" @submit.stop.prevent>
-              <el-form-item prop="name">
+              <el-form-item class="form_item" prop="name" style="width:100%">
                 <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" class="mb20">
                   <el-form-item label="物料号">
                     <el-input v-model="bomModel.filterModel.bomMateNo" placeholder="物料号" clearable></el-input>
@@ -31,11 +31,12 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
-
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
-                <el-button v-auth="'api:admin:file:upload-file'" type="primary" icon="ele-Upload" @click="onUpload"> 上传 </el-button>
+                <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" class="mb20">
+                  <el-form-item>
+                    <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
+                    <el-button v-auth="'api:admin:file:upload-file'" type="primary" icon="ele-Upload" @click="onUpload"> 上传 </el-button>
+                  </el-form-item>
+                </el-col>
               </el-form-item>
             </el-form>
           </el-card>
@@ -237,4 +238,7 @@
   .my-el-link {
     font-size: 12px;
   }
+  .el-form .el-col.mb20 {
+    margin: 0 !important;
+  }
   </style>

+ 109 - 108
admin.ui.plus-master/src/views/admin/product/type.vue

@@ -6,8 +6,7 @@
         <el-col :xs="24" >
           <el-card class="mt8" shadow="hover" >
             <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
-              <el-form-item prop="name">
-
+              <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.filterModel.bomMateNo" placeholder="物料编号" clearable></el-input>
@@ -18,7 +17,6 @@
                     <el-input v-model="state.filterModel.bomName" 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-select v-model="state.filterModel.bomType" placeholder="请选择部件类型" clearable class="w100">
@@ -28,11 +26,12 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
-
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
-                <el-button v-auth="'api:admin:file:upload-file'" type="primary" icon="ele-Upload" @click="onUpload"> 上传 </el-button>
+                <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
+                  <el-form-item>
+                    <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
+                    <el-button v-auth="'api:admin:file:upload-file'" type="primary" icon="ele-Upload" @click="onUpload"> 上传 </el-button>
+                  </el-form-item>
+                </el-col>
               </el-form-item>
             </el-form>
           </el-card>
@@ -99,7 +98,6 @@
                   <el-link
                     class="my-el-link mr12 ml12"
                     @click="$router.push(`/product/${row.guid}`)"
-                    :href="row.guid"
                     type="primary"
                     icon="ele-edit"
                     size="small"
@@ -131,111 +129,114 @@
     </div>
   </template>
 
-  <script lang="ts" setup name="admin/product/bom">
-  import { ref, reactive, onMounted, onBeforeMount, computed } from 'vue'
-  import { PageInputFileGetPageDto, FileGetPageOutput } from '/src/api/admin/data-contracts'
-  import { ComponentTypeApi } from '/@/api/admin/productionManagement/ComponentType'
-  import dayjs from 'dayjs'
-  import eventBus from '/src/utils/mitt'
-  import { isImage } from '/src/utils/test'
-  //import commonFunction from '/@/utils/commonFunction'
-
- // const { proxy } = getCurrentInstance() as any
-
-
-
-  const fileUploadRef = ref()
-
-  //部件的页面对象
-  const state = reactive({
-    loading: false,
-    fileFormTitle: '',
-    filterModel: {
-      fileName: '',
-      bomType: '',
-      bomName: '',
-      bomProNo: '',
-      bomMateNo: '',
-    },
-    total: 0,
-    pageInput: {
-      currentPage: 1,
-      pageSize: 20,
-    } as PageInputFileGetPageDto,
-    bomListData: [] as Array<FileGetPageOutput>,
-    bomLogsTitle: '',
-  })
-
-  //const { copyText } = commonFunction()
-
-  const previewImglist = computed(() => {
-    let imgList = [] as string[]
-    state.bomListData.forEach((a) => {
-      if (isImage(a.extension as string) && a.linkUrl) {
-        imgList.push(a.linkUrl as string)
-      }
-    })
-    return imgList
+<script lang="ts" setup name="admin/product/bom">
+import { ref, reactive, onMounted, onBeforeMount, computed } from 'vue'
+import { PageInputFileGetPageDto, FileGetPageOutput } from '/src/api/admin/data-contracts'
+import { ComponentTypeApi } from '/@/api/admin/productionManagement/ComponentType'
+import dayjs from 'dayjs'
+import eventBus from '/src/utils/mitt'
+import { isImage } from '/src/utils/test'
+//import commonFunction from '/@/utils/commonFunction'
+
+// const { proxy } = getCurrentInstance() as any
+
+
+
+const fileUploadRef = ref()
+
+//部件的页面对象
+const state = reactive({
+  loading: false,
+  fileFormTitle: '',
+  filterModel: {
+    fileName: '',
+    bomType: '',
+    bomName: '',
+    bomProNo: '',
+    bomMateNo: '',
+  },
+  total: 0,
+  pageInput: {
+    currentPage: 1,
+    pageSize: 20,
+  } as PageInputFileGetPageDto,
+  bomListData: [] as Array<FileGetPageOutput>,
+  bomLogsTitle: '',
+})
+
+//const { copyText } = commonFunction()
+
+const previewImglist = computed(() => {
+  let imgList = [] as string[]
+  state.bomListData.forEach((a) => {
+    if (isImage(a.extension as string) && a.linkUrl) {
+      imgList.push(a.linkUrl as string)
+    }
   })
+  return imgList
+})
 
-  onMounted(() => {
+onMounted(() => {
+  onQuery()
+  eventBus.off('refreshFile')
+  eventBus.on('refreshFile', async () => {
     onQuery()
-    eventBus.off('refreshFile')
-    eventBus.on('refreshFile', async () => {
-      onQuery()
-    })
-  })
-
-  onBeforeMount(() => {
-    eventBus.off('refreshFile')
   })
+})
 
-  const formatterTime = (cellValue: any) => {
-    return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss')
-  }
+onBeforeMount(() => {
+  eventBus.off('refreshFile')
+})
 
-  const getInitialIndex = (imgUrl: string) => {
-    return previewImglist.value.indexOf(imgUrl)
-  }
+const formatterTime = (cellValue: any) => {
+  return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss')
+}
 
-  const onQuery = async () => {
-    state.loading = true
-    const res = await new ComponentTypeApi().getPage({ ...state.pageInput, filter: state.filterModel }).catch(() => {
-        state.loading = false
-    })
+const getInitialIndex = (imgUrl: string) => {
+  return previewImglist.value.indexOf(imgUrl)
+}
 
-    state.bomListData = res?.data?.list ?? []
-    state.total = res?.data?.total ?? 0
-    state.loading = false
-  }
-
-  const onSizeChange = (val: number) => {
-    state.pageInput.pageSize = val
-    onQuery()
-  }
+const onQuery = async () => {
+  state.loading = true
+  const res = await new ComponentTypeApi().getPage({ ...state.pageInput, filter: state.filterModel }).catch(() => {
+      state.loading = false
+  })
 
-  const onCurrentChange = (val: number) => {
-    state.pageInput.currentPage = val
-    onQuery()
-  }
-
-  const onUpload = () => {
-    fileUploadRef.value.open()
-  }
-
-  //const onDelete = (row: FileGetPageOutput) => {
-   // proxy.$modal
-      //.confirmDelete(`确定要删除文件【${row.fileName}${row.extension}】?`)
-      //.then(async () => {
-      //  await new BomApi().delete({ id: row.id as number }, { loading: true, showSuccessMessage: true })
-       // onQuery()
-    //  })
-     // .catch(() => {})
- // }
-  </script>
-
-  <style scoped lang="scss">
-  .my-el-link {
-    font-size: 12px;
-  }
-  </style>
+  state.bomListData = res?.data?.list ?? []
+  state.total = res?.data?.total ?? 0
+  state.loading = false
+}
+
+const onSizeChange = (val: number) => {
+  state.pageInput.pageSize = val
+  onQuery()
+}
+
+const onCurrentChange = (val: number) => {
+  state.pageInput.currentPage = val
+  onQuery()
+}
+
+const onUpload = () => {
+  fileUploadRef.value.open()
+}
+
+//const onDelete = (row: FileGetPageOutput) => {
+ // proxy.$modal
+    //.confirmDelete(`确定要删除文件【${row.fileName}${row.extension}】?`)
+    //.then(async () => {
+    //  await new BomApi().delete({ id: row.id as number }, { loading: true, showSuccessMessage: true })
+     // onQuery()
+  //  })
+   // .catch(() => {})
+// }
+</script>
+
+<style scoped lang="scss">
+.my-el-link {
+  font-size: 12px;
+}
+.el-form .el-col.mb20 {
+  margin: 0 !important;
+}
+</style>