diff --git a/mes-ui/src/api/concessionApply.ts b/mes-ui/src/api/concessionApply.ts deleted file mode 100644 index 042db53..0000000 --- a/mes-ui/src/api/concessionApply.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { request } from '@/utils/request' - -// 让步接收申请表 类型定义 -export interface ConcessionApply { - id?: number - - qcId?: number - - concessionQty?: number - - applyRemark?: string - - applyContent?: string - - applyFile?: string - - applyUserId?: number - - deptId?: number - - instanceId?: string - - approveStatus?: number - - createTime?: string - - updateTime?: string - -} - -// 让步接收申请表 API -export const concessionApplyApi = { - // 分页查询 - page(params: { page: number; pageSize: number; id?: number }) { - return request({ url: '/biz/concessionApply/page', method: 'get', params }) - }, - - // 获取详情 - detail(id: string) { - return request({ url: `/biz/concessionApply/${id}`, method: 'get' }) - }, - - // 新增 - create(data: ConcessionApply) { - return request({ url: '/biz/concessionApply', method: 'post', data }) - }, - - // 修改 - update(data: ConcessionApply) { - return request({ url: '/biz/concessionApply', method: 'put', data }) - }, - - // 删除 - delete(ids: string[]) { - return request({ url: `/biz/concessionApply/${ids.join(',')}`, method: 'delete' }) - }, - - // 导出 - export(params?: { ids?: string[]; id?: number }) { - const p: Record = {} - if (params?.ids?.length) p.ids = params.ids.join(',') - if (params?.id !== undefined && params?.id !== null) p.id = params.id - return request({ url: `/biz/concessionApply/export`, method: 'get', params: p, responseType: 'blob' }) - }, - - // 导入 - importData(file: File) { - const formData = new FormData() - formData.append('file', file) - return request<{ success: number; fail: number; errors: string[] }>({ - url: `/biz/concessionApply/import`, - method: 'post', - data: formData, - headers: { 'Content-Type': 'multipart/form-data' } - }) - }, - - // 下载导入模板 - downloadTemplate() { - return request({ url: `/biz/concessionApply/template`, method: 'get', responseType: 'blob' }) - } -} diff --git a/mes-ui/src/api/maintenanceRecord.ts b/mes-ui/src/api/maintenanceRecord.ts deleted file mode 100644 index 3218c32..0000000 --- a/mes-ui/src/api/maintenanceRecord.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { request } from '@/utils/request' - -// MES设备维修保养记录表 类型定义 -export interface MaintenanceRecord { - recordId?: string - - equipmentId?: string - - recordType?: string - - itemContent?: string - - handleContent?: string - - executorId?: number - - startTime?: string - - endTime?: string - - recordStatus?: string - - createTime?: string - - updateTime?: string - -} - -// MES设备维修保养记录表 API -export const maintenanceRecordApi = { - // 分页查询 - page(params: { page: number; pageSize: number; recordId?: string }) { - return request({ url: '/biz/maintenanceRecord/page', method: 'get', params }) - }, - - // 获取详情 - detail(recordId: string) { - return request({ url: `/biz/maintenanceRecord/${recordId}`, method: 'get' }) - }, - - // 新增 - create(data: MaintenanceRecord) { - return request({ url: '/biz/maintenanceRecord', method: 'post', data }) - }, - - // 修改 - update(data: MaintenanceRecord) { - return request({ url: '/biz/maintenanceRecord', method: 'put', data }) - }, - - // 删除 - delete(recordIds: string[]) { - return request({ url: `/biz/maintenanceRecord/${recordIds.join(',')}`, method: 'delete' }) - }, - - // 导出 - export(params?: { ids?: string[]; recordId?: string }) { - const p: Record = {} - if (params?.ids?.length) p.ids = params.ids.join(',') - if (params?.recordId !== undefined && params?.recordId !== null) p.recordId = params.recordId - return request({ url: `/biz/maintenanceRecord/export`, method: 'get', params: p, responseType: 'blob' }) - }, - - // 导入 - importData(file: File) { - const formData = new FormData() - formData.append('file', file) - return request<{ success: number; fail: number; errors: string[] }>({ - url: `/biz/maintenanceRecord/import`, - method: 'post', - data: formData, - headers: { 'Content-Type': 'multipart/form-data' } - }) - }, - - // 下载导入模板 - downloadTemplate() { - return request({ url: `/biz/maintenanceRecord/template`, method: 'get', responseType: 'blob' }) - } -} diff --git a/mes-ui/src/api/outsourcing.ts b/mes-ui/src/api/outsourcing.ts deleted file mode 100644 index cd1e044..0000000 --- a/mes-ui/src/api/outsourcing.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { request } from '@/utils/request' - -// 委外记录表 类型定义 -export interface Outsourcing { - id?: number - - name?: string - - code?: string - - businessType?: number - - businessId?: number - - businessCode?: string - - orderItemId?: number - - quantity?: number - - supplierId?: number - - supplierName?: string - - unitPrice?: string - - totalAmount?: string - - beginPreparationTime?: string - - endPreparationTime?: string - - beginTime?: string - - endTime?: string - - remark?: string - - createTime?: string - - createBy?: string - - overdue?: number - -} - -// 委外记录表 API -export const outsourcingApi = { - // 分页查询 - page(params: { page: number; pageSize: number; id?: number; name?: string; businessType?: number }) { - return request({ url: '/biz/outsourcing/page', method: 'get', params }) - }, - - // 获取详情 - detail(id: string) { - return request({ url: `/biz/outsourcing/${id}`, method: 'get' }) - }, - - // 新增 - create(data: Outsourcing) { - return request({ url: '/biz/outsourcing', method: 'post', data }) - }, - - // 修改 - update(data: Outsourcing) { - return request({ url: '/biz/outsourcing', method: 'put', data }) - }, - - // 删除 - delete(ids: string[]) { - return request({ url: `/biz/outsourcing/${ids.join(',')}`, method: 'delete' }) - }, - - // 导出 - export(params?: { ids?: string[]; id?: number; name?: string; businessType?: number }) { - const p: Record = {} - if (params?.ids?.length) p.ids = params.ids.join(',') - if (params?.id !== undefined && params?.id !== null) p.id = params.id - if (params?.name !== undefined && params?.name !== null) p.name = params.name - if (params?.businessType !== undefined && params?.businessType !== null) p.businessType = params.businessType - return request({ url: `/biz/outsourcing/export`, method: 'get', params: p, responseType: 'blob' }) - }, - - // 导入 - importData(file: File) { - const formData = new FormData() - formData.append('file', file) - return request<{ success: number; fail: number; errors: string[] }>({ - url: `/biz/outsourcing/import`, - method: 'post', - data: formData, - headers: { 'Content-Type': 'multipart/form-data' } - }) - }, - - // 下载导入模板 - downloadTemplate() { - return request({ url: `/biz/outsourcing/template`, method: 'get', responseType: 'blob' }) - } -} diff --git a/src/api/exceptionFilter.ts b/src/api/exceptionFilter.ts new file mode 100644 index 0000000..eea0f55 --- /dev/null +++ b/src/api/exceptionFilter.ts @@ -0,0 +1,71 @@ +import { request } from '@/utils/request' + +// 异常过滤表 类型定义 +export interface ExceptionFilter { + id?: number + + title?: string + + filterCondition?: string + + description?: string + + status?: 0 + + deleted?: number + +} + +// 异常过滤表 API +export const exceptionFilterApi = { + // 分页查询 + page(params: { page: number; pageSize: number; id?: number; status?: number }) { + return request({ url: '/biz/exceptionFilter/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/exceptionFilter/${id}`, method: 'get' }) + }, + + // 新增 + create(data: ExceptionFilter) { + return request({ url: '/biz/exceptionFilter', method: 'post', data }) + }, + + // 修改 + update(data: ExceptionFilter) { + return request({ url: '/biz/exceptionFilter', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/exceptionFilter/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[]; id?: number; status?: number }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.id !== undefined && params?.id !== null) p.id = params.id + if (params?.status !== undefined && params?.status !== null) p.status = params.status + return request({ url: `/biz/exceptionFilter/export`, method: 'get', params: p, responseType: 'blob' }) + }, + + // 导入 + importData(file: File) { + const formData = new FormData() + formData.append('file', file) + return request<{ success: number; fail: number; errors: string[] }>({ + url: `/biz/exceptionFilter/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/exceptionFilter/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/api/message.ts b/src/api/message.ts index 1584360..ee64d78 100644 --- a/src/api/message.ts +++ b/src/api/message.ts @@ -19,6 +19,7 @@ export interface SysNotice { errorNotificationId?:number, filler?:number, filingStatus?:number, + deviceName?:string } export interface NoticeChannelOption { diff --git a/src/components/ErrorReportModal.vue b/src/components/ErrorReportModal.vue index 35d2b19..c41425d 100644 --- a/src/components/ErrorReportModal.vue +++ b/src/components/ErrorReportModal.vue @@ -2,7 +2,6 @@ import {onMounted, ref, watch} from "vue"; import { Notifications } from '@vicons/ionicons5' -import { ErrorNotification } from '@/api/errorNotification.ts' import {} from '@/api/system.ts' import {noticeApi, SysNotice} from '@/api/message' import type {FormInst} from "naive-ui"; @@ -12,7 +11,7 @@ const emit = defineEmits<{ const props = defineProps<{ show: boolean - errorNotifiaction:ErrorNotification, + notice:SysNotice, }>() @@ -72,7 +71,7 @@ watch(showModal, (val) => { async function handleSubmit() { try { await formRef.value?.validate() - formData.value.id = props.errorNotifiaction.noticeId + formData.value.id = props.notice.id formData.value.filingStatus = 1 //修改通知表 noticeApi.update({ @@ -114,7 +113,7 @@ async function handleSubmit() {