From 9b575677dd32e732f057c513525ff01f23e41e9c Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Fri, 9 Aug 2024 08:39:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=90=8C=E6=AD=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basic/callLog/index.ts | 56 ++++ .../eam/item/itemInLocationInaccount/index.ts | 54 ++++ src/views/eam/basic/callLog/callLog.data.ts | 151 +++++++++++ src/views/eam/basic/callLog/index.vue | 244 ++++++++++++++++++ .../item/itemInLocationInaccount/index.vue | 244 ++++++++++++++++++ .../itemInLocationInaccount.data.ts | 101 ++++++++ 6 files changed, 850 insertions(+) create mode 100644 src/api/eam/basic/callLog/index.ts create mode 100644 src/api/eam/item/itemInLocationInaccount/index.ts create mode 100644 src/views/eam/basic/callLog/callLog.data.ts create mode 100644 src/views/eam/basic/callLog/index.vue create mode 100644 src/views/eam/item/itemInLocationInaccount/index.vue create mode 100644 src/views/eam/item/itemInLocationInaccount/itemInLocationInaccount.data.ts diff --git a/src/api/eam/basic/callLog/index.ts b/src/api/eam/basic/callLog/index.ts new file mode 100644 index 0000000..e3745cc --- /dev/null +++ b/src/api/eam/basic/callLog/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface CallLogVO { + id: number + apiName: string + requestPayload: string + responsePayload: string + requestTime: Date + responseTime: Date + statusCode: number + errorMessage: string + siteId: string + available: string + concurrencyStamp: number +} + +// 查询接口调用日志列表 +export const getCallLogPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/api/call-log/senior', data }) + } else { + return await request.get({ url: `/api/call-log/page`, params }) + } +} + +// 查询接口调用日志详情 +export const getCallLog = async (id: number) => { + return await request.get({ url: `/api/call-log/get?id=` + id }) +} + +// 新增接口调用日志 +export const createCallLog = async (data: CallLogVO) => { + return await request.post({ url: `/api/call-log/create`, data }) +} + +// 修改接口调用日志 +export const updateCallLog = async (data: CallLogVO) => { + return await request.put({ url: `/api/call-log/update`, data }) +} + +// 删除接口调用日志 +export const deleteCallLog = async (id: number) => { + return await request.delete({ url: `/api/call-log/delete?id=` + id }) +} + +// 导出接口调用日志 Excel +export const exportCallLog = async (params) => { + return await request.download({ url: `/api/call-log/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/api/call-log/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/item/itemInLocationInaccount/index.ts b/src/api/eam/item/itemInLocationInaccount/index.ts new file mode 100644 index 0000000..3723644 --- /dev/null +++ b/src/api/eam/item/itemInLocationInaccount/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +export interface ItemInLocationInaccountVO { + id: number + number: string + itemNumber: string + locationNumber: string + type: string + qty: number + siteId: string + available: string + concurrencyStamp: number +} + +// 查询备件入库账内记录列表 +export const getItemInLocationInaccountPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/item-in-location-inaccount/senior', data }) + } else { + return await request.get({ url: `/eam/item-in-location-inaccount/page`, params }) + } +} + +// 查询备件入库账内记录详情 +export const getItemInLocationInaccount = async (id: number) => { + return await request.get({ url: `/eam/item-in-location-inaccount/get?id=` + id }) +} + +// 新增备件入库账内记录 +export const createItemInLocationInaccount = async (data: ItemInLocationInaccountVO) => { + return await request.post({ url: `/eam/item-in-location-inaccount/create`, data }) +} + +// 修改备件入库账内记录 +export const updateItemInLocationInaccount = async (data: ItemInLocationInaccountVO) => { + return await request.put({ url: `/eam/item-in-location-inaccount/update`, data }) +} + +// 删除备件入库账内记录 +export const deleteItemInLocationInaccount = async (id: number) => { + return await request.delete({ url: `/eam/item-in-location-inaccount/delete?id=` + id }) +} + +// 导出备件入库账内记录 Excel +export const exportItemInLocationInaccount = async (params) => { + return await request.download({ url: `/eam/item-in-location-inaccount/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/item-in-location-inaccount/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/eam/basic/callLog/callLog.data.ts b/src/views/eam/basic/callLog/callLog.data.ts new file mode 100644 index 0000000..e0c5d19 --- /dev/null +++ b/src/views/eam/basic/callLog/callLog.data.ts @@ -0,0 +1,151 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const CallLogRules = reactive({ + apiName: [required], + concurrencyStamp: [required] +}) + +export const CallLog = useCrudSchemas(reactive([ + // { + // label: '主键ID', + // field: 'id', + // sort: 'custom', + // isForm: false + // }, + { + label: '接口名称', + field: 'apiName', + sort: 'custom', + isSearch: true + }, + { + label: '请求url', + field: 'requestUrl', + sort: 'custom', + isSearch: true + }, + { + label: '响应负载', + field: 'responsePayload', + sort: 'custom', + isSearch: true + }, + { + label: '请求时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '响应时间', + field: 'responseTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '状态码', + field: 'statusCode', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '错误信息', + field: 'errorMessage', + sort: 'custom', + isSearch: true + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + // { + // label: '地点ID', + // field: 'siteId', + // sort: 'custom', + // isSearch: true + // }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: true, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '并发乐观锁', + // field: 'concurrencyStamp', + // sort: 'custom', + // isSearch: true, + // form: { + // component: 'InputNumber', + // value: 0 + // } + // }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/eam/basic/callLog/index.vue b/src/views/eam/basic/callLog/index.vue new file mode 100644 index 0000000..afb74f2 --- /dev/null +++ b/src/views/eam/basic/callLog/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/item/itemInLocationInaccount/index.vue b/src/views/eam/item/itemInLocationInaccount/index.vue new file mode 100644 index 0000000..c9221e1 --- /dev/null +++ b/src/views/eam/item/itemInLocationInaccount/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/item/itemInLocationInaccount/itemInLocationInaccount.data.ts b/src/views/eam/item/itemInLocationInaccount/itemInLocationInaccount.data.ts new file mode 100644 index 0000000..46906b1 --- /dev/null +++ b/src/views/eam/item/itemInLocationInaccount/itemInLocationInaccount.data.ts @@ -0,0 +1,101 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ItemInLocationInaccountRules = reactive({ + number: [required], + itemNumber: [required], + locationNumber: [required], + concurrencyStamp: [required] +}) + +export const ItemInLocationInaccount = useCrudSchemas(reactive([ + // { + // label: 'id', + // field: 'id', + // sort: 'custom', + // isForm: false + // }, + { + label: '入库编号', + field: 'number', + sort: 'custom', + isSearch: true + }, + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true + }, + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isSearch: true + }, + { + label: '入库类型', + field: 'type', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, + dictClass: 'string', + form: { + component: 'Select' + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: true + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + // { + // label: '地点ID', + // field: 'siteId', + // sort: 'custom', + // isSearch: true + // }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // isSearch: true + // }, + // { + // label: '并发乐观锁', + // field: 'concurrencyStamp', + // sort: 'custom', + // isSearch: true, + // form: { + // component: 'InputNumber', + // value: 0 + // } + // }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +]))