From f9dd65b8616332294288de4c9ee33b73fd2b2806 Mon Sep 17 00:00:00 2001
From: zhaoxuebing <1291173720@qq.com>
Date: Mon, 15 Apr 2024 13:02:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=A1=E6=81=AF=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/wms/interfaceInfo/index.ts | 56 ++++
.../wms/agvManage/interfaceInfo/index.vue | 244 ++++++++++++++++++
.../interfaceInfo/interfaceInfo.data.ts | 106 ++++++++
3 files changed, 406 insertions(+)
create mode 100644 src/api/wms/interfaceInfo/index.ts
create mode 100644 src/views/wms/agvManage/interfaceInfo/index.vue
create mode 100644 src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts
diff --git a/src/api/wms/interfaceInfo/index.ts b/src/api/wms/interfaceInfo/index.ts
new file mode 100644
index 000000000..370b7f1c2
--- /dev/null
+++ b/src/api/wms/interfaceInfo/index.ts
@@ -0,0 +1,56 @@
+import request from '@/config/axios'
+
+export interface InterfaceInfoVO {
+ id: number
+ interfaceType: string
+ interfaceName: string
+ interfaceStatus: string
+ url: string
+ reqBody: string
+ respBody: string
+ errorMsg: string
+ remark: string
+ extraProperties: string
+ concurrencyStamp: number
+}
+
+// 查询接口调用信息列表
+export const getInterfaceInfoPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/interface-info/senior', data })
+ } else {
+ return await request.get({ url: `/wms/interface-info/page`, params })
+ }
+}
+
+// 查询接口调用信息详情
+export const getInterfaceInfo = async (id: number) => {
+ return await request.get({ url: `/wms/interface-info/get?id=` + id })
+}
+
+// 新增接口调用信息
+export const createInterfaceInfo = async (data: InterfaceInfoVO) => {
+ return await request.post({ url: `/wms/interface-info/create`, data })
+}
+
+// 修改接口调用信息
+export const updateInterfaceInfo = async (data: InterfaceInfoVO) => {
+ return await request.put({ url: `/wms/interface-info/update`, data })
+}
+
+// 删除接口调用信息
+export const deleteInterfaceInfo = async (id: number) => {
+ return await request.delete({ url: `/wms/interface-info/delete?id=` + id })
+}
+
+// 导出接口调用信息 Excel
+export const exportInterfaceInfo = async (params) => {
+ return await request.download({ url: `/wms/interface-info/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/wms/interface-info/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/views/wms/agvManage/interfaceInfo/index.vue b/src/views/wms/agvManage/interfaceInfo/index.vue
new file mode 100644
index 000000000..ec8913d10
--- /dev/null
+++ b/src/views/wms/agvManage/interfaceInfo/index.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts b/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts
new file mode 100644
index 000000000..6c9898302
--- /dev/null
+++ b/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts
@@ -0,0 +1,106 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const InterfaceInfoRules = reactive({
+ concurrencyStamp: [required],
+})
+
+export const InterfaceInfo = useCrudSchemas(reactive([
+ {
+ label: '序号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '接口类型',
+ field: 'interfaceType',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'SelectV2'
+ },
+ },
+ {
+ label: '接口名称',
+ field: 'interfaceName',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '状态',
+ field: 'interfaceStatus',
+ sort: 'custom',
+ form: {
+ component: 'Radio'
+ },
+ },
+ {
+ label: '请求地址',
+ field: 'url',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '请求参数',
+ field: 'reqBody',
+ sort: 'custom',
+ },
+ {
+ label: '返回结果',
+ field: 'respBody',
+ sort: 'custom',
+ },
+ {
+ label: '错误信息',
+ field: 'errorMsg',
+ sort: 'custom',
+ },
+ {
+ 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: '扩展属性',
+ field: 'extraProperties',
+ sort: 'custom',
+ isTable:false,
+ },
+ {
+ label: '并发乐观锁',
+ field: 'concurrencyStamp',
+ isTable:false,
+ sort: 'custom',
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))