From ca96595db551e4bf60d04a4060a1aebff46441f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com>
Date: Tue, 27 Feb 2024 17:29:52 +0800
Subject: [PATCH 1/3] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/item/replaceItemDes/index.ts | 52 ++++
src/views/eam/item/replaceItemDes/index.vue | 239 ++++++++++++++++++
.../replaceItemDes/replaceItemDes.data.ts | 60 +++++
3 files changed, 351 insertions(+)
create mode 100644 src/api/eam/item/replaceItemDes/index.ts
create mode 100644 src/views/eam/item/replaceItemDes/index.vue
create mode 100644 src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
diff --git a/src/api/eam/item/replaceItemDes/index.ts b/src/api/eam/item/replaceItemDes/index.ts
new file mode 100644
index 0000000..502c819
--- /dev/null
+++ b/src/api/eam/item/replaceItemDes/index.ts
@@ -0,0 +1,52 @@
+import request from '@/config/axios'
+
+export interface AttachmentFileVO {
+ itemNumber: string
+ qty: number
+ areaNumber: string
+ isInAccount: string
+ siteId: string
+ available: string
+ concurrencyStamp: number
+}
+
+// 查询备件台账列表
+export const getReplaceItemDesPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/eam/attachment-file/senior', data })
+ } else {
+ return await request.get({ url: `/eam/attachment-file/page`, params })
+ }
+}
+
+// 查询备件台账详情
+export const getReplaceItemDes = async (id: number) => {
+ return await request.get({ url: `/eam/attachment-file/get?id=` + id })
+}
+
+// 新增备件台账
+export const createReplaceItemDes = async (data: AttachmentFileVO) => {
+ return await request.post({ url: `/eam/attachment-file/create`, data })
+}
+
+// 修改备件台账
+export const updateReplaceItemDes = async (data: AttachmentFileVO) => {
+ return await request.put({ url: `/eam/attachment-file/update`, data })
+}
+
+// 删除备件台账
+export const deleteReplaceItemDes = async (id: number) => {
+ return await request.delete({ url: `/eam/attachment-file/delete?id=` + id })
+}
+
+// 导出备件台账 Excel
+export const exportReplaceItemDes = async (params) => {
+ return await request.download({ url: `/eam/attachment-file/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/eam/attachment-file/get-import-template' })
+}
diff --git a/src/views/eam/item/replaceItemDes/index.vue b/src/views/eam/item/replaceItemDes/index.vue
new file mode 100644
index 0000000..9a74584
--- /dev/null
+++ b/src/views/eam/item/replaceItemDes/index.vue
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
new file mode 100644
index 0000000..b4c4c8a
--- /dev/null
+++ b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
@@ -0,0 +1,60 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+import { Item } from '@/views/eam/basic/item/item.data'
+import * as ItemApi from '@/api/eam/basic/item'
+
+// 表单校验
+export const ReplaceItemDesRules = reactive({
+ itemNumber: [required],
+ areaNumber: [required],
+ concurrencyStamp: [required],
+})
+
+export const ReplaceItemDes = useCrudSchemas(reactive([
+ {
+ label: '备件编号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择备件编号', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '备件信息', // 查询弹窗标题
+ searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
+ searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
+ searchCondition: [
+ {
+ key: 'available',
+ value: "TRUE",
+ isMainValue: false
+ }]
+ }
+ }
+ },
+ {
+ label: '文件',
+ field: 'filePathList',
+ sort: 'custom',
+ table: {
+ },
+ form: {
+ component: 'UploadFile',
+ componentProps: {
+
+ }
+ }
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+
+ fixed: 'right'
+ }
+ }
+]))
From e950e419f1899e84011375f8a9597003ab816b06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com>
Date: Wed, 28 Feb 2024 14:07:07 +0800
Subject: [PATCH 2/3] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/item/replaceItemDes/index.ts | 1 +
src/views/eam/item/replaceItemDes/index.vue | 381 +++++++++---------
.../replaceItemDes/replaceItemDes.data.ts | 25 +-
3 files changed, 208 insertions(+), 199 deletions(-)
diff --git a/src/api/eam/item/replaceItemDes/index.ts b/src/api/eam/item/replaceItemDes/index.ts
index 502c819..4c7daf4 100644
--- a/src/api/eam/item/replaceItemDes/index.ts
+++ b/src/api/eam/item/replaceItemDes/index.ts
@@ -12,6 +12,7 @@ export interface AttachmentFileVO {
// 查询备件台账列表
export const getReplaceItemDesPage = async (params) => {
+ params.funcCode="Replace_Item_Des"
if (params.isSearch) {
delete params.isSearch
const data = {...params}
diff --git a/src/views/eam/item/replaceItemDes/index.vue b/src/views/eam/item/replaceItemDes/index.vue
index 9a74584..a20890e 100644
--- a/src/views/eam/item/replaceItemDes/index.vue
+++ b/src/views/eam/item/replaceItemDes/index.vue
@@ -4,29 +4,17 @@
-
-
+
+
-
+ }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
+ v-model:sort="tableObject.sort">
{{ row.code }}
@@ -39,201 +27,198 @@
-
+
-
+
diff --git a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
index b4c4c8a..77def59 100644
--- a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
+++ b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
@@ -37,8 +37,9 @@ export const ReplaceItemDes = useCrudSchemas(reactive([
},
{
label: '文件',
- field: 'filePathList',
+ field: 'filePathListView',
sort: 'custom',
+ isTable: false,
table: {
},
form: {
@@ -48,6 +49,28 @@ export const ReplaceItemDes = useCrudSchemas(reactive([
}
}
},
+ {
+ label: '文件',
+ field: 'filePathList',
+ sort: 'custom',
+ isTable: false,
+ isForm: false,
+ table: {
+ },
+ form: {
+ component: 'UploadFile',
+ componentProps: {
+
+ }
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isForm: false
+ },
{
label: '操作',
field: 'action',
From 5a6bad275dd752f788c07215589f3a76926e043b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com>
Date: Wed, 28 Feb 2024 15:37:32 +0800
Subject: [PATCH 3/3] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/device/problemSolving/index.ts | 55 +++++
src/api/eam/item/replaceItemDes/index.ts | 2 +
src/views/eam/device/problemSolving/index.vue | 224 ++++++++++++++++++
.../problemSolving/problemSolving.data.ts | 83 +++++++
src/views/eam/item/replaceItemDes/index.vue | 4 +-
.../replaceItemDes/replaceItemDes.data.ts | 16 --
6 files changed, 366 insertions(+), 18 deletions(-)
create mode 100644 src/api/eam/device/problemSolving/index.ts
create mode 100644 src/views/eam/device/problemSolving/index.vue
create mode 100644 src/views/eam/device/problemSolving/problemSolving.data.ts
diff --git a/src/api/eam/device/problemSolving/index.ts b/src/api/eam/device/problemSolving/index.ts
new file mode 100644
index 0000000..9c97bc3
--- /dev/null
+++ b/src/api/eam/device/problemSolving/index.ts
@@ -0,0 +1,55 @@
+import request from '@/config/axios'
+
+export interface AttachmentFileVO {
+ itemNumber: string
+ qty: number
+ areaNumber: string
+ isInAccount: string
+ siteId: string
+ available: string
+ funcCode: string
+ concurrencyStamp: number
+}
+
+// 查询备件台账列表
+export const getProblemSolvingPage = async (params) => {
+ params.funcCode="problem_solving"
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/eam/attachment-file/senior', data })
+ } else {
+ return await request.get({ url: `/eam/attachment-file/page`, params })
+ }
+}
+
+// 查询备件台账详情
+export const getProblemSolving = async (id: number) => {
+ return await request.get({ url: `/eam/attachment-file/get?id=` + id })
+}
+
+// 新增备件台账
+export const createProblemSolving = async (data: AttachmentFileVO) => {
+ data.funcCode="problem_solving"
+ return await request.post({ url: `/eam/attachment-file/create`, data })
+}
+
+// 修改备件台账
+export const updateProblemSolving = async (data: AttachmentFileVO) => {
+ return await request.put({ url: `/eam/attachment-file/update`, data })
+}
+
+// 删除备件台账
+export const deleteProblemSolving = async (id: number) => {
+ return await request.delete({ url: `/eam/attachment-file/delete?id=` + id })
+}
+
+// 导出备件台账 Excel
+export const exportProblemSolving = async (params) => {
+ return await request.download({ url: `/eam/attachment-file/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/eam/attachment-file/get-import-template' })
+}
diff --git a/src/api/eam/item/replaceItemDes/index.ts b/src/api/eam/item/replaceItemDes/index.ts
index 4c7daf4..92cd7f2 100644
--- a/src/api/eam/item/replaceItemDes/index.ts
+++ b/src/api/eam/item/replaceItemDes/index.ts
@@ -6,6 +6,7 @@ export interface AttachmentFileVO {
areaNumber: string
isInAccount: string
siteId: string
+ funcCode: string
available: string
concurrencyStamp: number
}
@@ -29,6 +30,7 @@ export const getReplaceItemDes = async (id: number) => {
// 新增备件台账
export const createReplaceItemDes = async (data: AttachmentFileVO) => {
+ data.funcCode="Replace_Item_Des"
return await request.post({ url: `/eam/attachment-file/create`, data })
}
diff --git a/src/views/eam/device/problemSolving/index.vue b/src/views/eam/device/problemSolving/index.vue
new file mode 100644
index 0000000..b603df2
--- /dev/null
+++ b/src/views/eam/device/problemSolving/index.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/eam/device/problemSolving/problemSolving.data.ts b/src/views/eam/device/problemSolving/problemSolving.data.ts
new file mode 100644
index 0000000..1302a63
--- /dev/null
+++ b/src/views/eam/device/problemSolving/problemSolving.data.ts
@@ -0,0 +1,83 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+ import { DeviceAccounts } from '@/views/eam/device/deviceAccounts/deviceAccounts.data'
+ import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
+
+// 表单校验
+export const ProblemSolvingRules = reactive({
+ itemNumber: [required],
+ areaNumber: [required],
+ concurrencyStamp: [required],
+})
+
+export const ProblemSolving = useCrudSchemas(reactive([
+ {
+ label: '设备编号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择设备编号', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '设备信息', // 查询弹窗标题
+ searchAllSchemas: DeviceAccounts.allSchemas, // 查询弹窗所需类
+ searchPage: DeviceAccountsApi.getDeviceAccountsPage, // 查询弹窗所需分页方法
+ searchCondition: [
+ {
+ key: 'available',
+ value: "TRUE",
+ isMainValue: false
+ }]
+ }
+ }
+ },
+ {
+ label: '文件',
+ field: 'filePathListView',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ },
+ form: {
+ component: 'UploadFile',
+ componentProps: {
+
+ }
+ }
+ },
+ {
+ label: '文件',
+ field: 'filePathList',
+ sort: 'custom',
+ isTable: false,
+ isForm: false,
+ table: {
+ },
+ form: {
+ component: 'UploadFile',
+ componentProps: {
+
+ }
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isForm: false
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+
+ fixed: 'right'
+ }
+ }
+]))
diff --git a/src/views/eam/item/replaceItemDes/index.vue b/src/views/eam/item/replaceItemDes/index.vue
index a20890e..a949072 100644
--- a/src/views/eam/item/replaceItemDes/index.vue
+++ b/src/views/eam/item/replaceItemDes/index.vue
@@ -143,8 +143,8 @@
if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null;
data.filePathList=[];
- for (let i = 0; i < data.filePathListView.length; i++) {
- data.filePathList.push(data.filePathListView[i].url);
+ for (let i = 0; i < data.filePathList.length; i++) {
+ data.filePathList.push(data.filePathList[i].url);
}
if (formType === 'create') {
await ReplaceItemDesApi.createReplaceItemDes(data)
diff --git a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
index 77def59..a3417af 100644
--- a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
+++ b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts
@@ -35,32 +35,16 @@ export const ReplaceItemDes = useCrudSchemas(reactive([
}
}
},
- {
- label: '文件',
- field: 'filePathListView',
- sort: 'custom',
- isTable: false,
- table: {
- },
- form: {
- component: 'UploadFile',
- componentProps: {
-
- }
- }
- },
{
label: '文件',
field: 'filePathList',
sort: 'custom',
isTable: false,
- isForm: false,
table: {
},
form: {
component: 'UploadFile',
componentProps: {
-
}
}
},