diff --git a/src/api/basicProcessPlan.ts b/src/api/basicProcessPlan.ts index fce885d..03ae68f 100644 --- a/src/api/basicProcessPlan.ts +++ b/src/api/basicProcessPlan.ts @@ -28,6 +28,8 @@ export interface BasicProcessPlan { createTime?: string + status?:number + } // 基础主数据--工序表 API diff --git a/src/api/callingMaterials.ts b/src/api/callingMaterials.ts new file mode 100644 index 0000000..daece92 --- /dev/null +++ b/src/api/callingMaterials.ts @@ -0,0 +1,69 @@ +import { request } from '@/utils/request' + +// 叫料记录 类型定义 +export interface CallingMaterials { + id?: number + + userId?: number + + deviceId?: number + + status?: number + + createTime?: string + +} + +// 叫料记录 API +export const callingMaterialsApi = { + // 分页查询 + page(params: { page: number; pageSize: number; deviceId?: number; status?: number }) { + return request({ url: '/biz/callingMaterials/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/callingMaterials/${id}`, method: 'get' }) + }, + + // 新增 + create(data: CallingMaterials) { + return request({ url: '/biz/callingMaterials', method: 'post', data }) + }, + + // 修改 + update(data: CallingMaterials) { + return request({ url: '/biz/callingMaterials', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/callingMaterials/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[]; deviceId?: number; status?: number }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.deviceId !== undefined && params?.deviceId !== null) p.deviceId = params.deviceId + if (params?.status !== undefined && params?.status !== null) p.status = params.status + return request({ url: `/biz/callingMaterials/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/callingMaterials/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/callingMaterials/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/api/device.ts b/src/api/device.ts index 98274c9..ad1776b 100644 --- a/src/api/device.ts +++ b/src/api/device.ts @@ -20,6 +20,7 @@ export interface Device{ synEquipId?: number | null, createTime:string, updateTime:string + abnormalRecordList:[] } export interface DeviceRealtimeVO { diff --git a/src/api/deviceAbnormalRecord.ts b/src/api/deviceAbnormalRecord.ts new file mode 100644 index 0000000..f0b1aef --- /dev/null +++ b/src/api/deviceAbnormalRecord.ts @@ -0,0 +1,112 @@ +import { request } from '@/utils/request' + +// 设备异常记录表 类型定义 +export interface DeviceAbnormalRecord { + id?: number + + abnormalCode?: string + + deviceId?: number + + deviceCode?: string + + deviceName?: string + + stationId?: number + + stationName?: string + + abnormalType?: string + + abnormalTypeName?: string + + abnormalLevel?: string + + abnormalLevelName?: string + + abnormalDesc?: string + + abnormalTime?: string + + status?: string + + statusName?: string + + handler?: string + + handleTime?: string + + handleResult?: string + + affectDuration?: number + + abnormalFrequency?: string + + remark?: string + + createTime?: string + + createBy?: string + +} + +// 设备异常记录表 API +export const deviceAbnormalRecordApi = { + // 分页查询 + page(params: { page: number; pageSize: number; id?: number; status?: string }) { + return request({ url: '/biz/deviceAbnormalRecord/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: number) { + return request({ url: `/biz/deviceAbnormalRecord/${id}`, method: 'get' }) + }, + + // 新增 + create(data: DeviceAbnormalRecord) { + return request({ url: '/biz/deviceAbnormalRecord', method: 'post', data }) + }, + + // 修改 + update(data: DeviceAbnormalRecord) { + return request({ url: '/biz/deviceAbnormalRecord', method: 'put', data }) + }, + + // 删除 + delete(ids: number[]) { + return request({ url: `/biz/deviceAbnormalRecord/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: number[]; id?: number; status?: string }) { + 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/deviceAbnormalRecord/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/deviceAbnormalRecord/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/deviceAbnormalRecord/template`, method: 'get', responseType: 'blob' }) + }, + //根据设备Id获取异常记录列表 + getDeviceErrorLogList(deviceId: number) { + return request({ + url: `/biz/deviceAbnormalRecord/getDeviceErrorLogList/${deviceId}`, + method: 'get' + }) + } +} diff --git a/src/api/deviceGather.ts b/src/api/deviceGather.ts new file mode 100644 index 0000000..722c0c0 --- /dev/null +++ b/src/api/deviceGather.ts @@ -0,0 +1,69 @@ +import { request } from '@/utils/request' + +// 设备采集 类型定义 +export interface DeviceGather { + id?: number + + deviceId?: number + + assingWorkId?: number + + userId?: number + + gatherNum?: number + + gatherTime?: string + +} + +// 设备采集 API +export const deviceGatherApi = { + // 分页查询 + page(params: { page: number; pageSize: number }) { + return request({ url: '/biz/deviceGather/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/deviceGather/${id}`, method: 'get' }) + }, + + // 新增 + create(data: DeviceGather) { + return request({ url: '/biz/deviceGather', method: 'post', data }) + }, + + // 修改 + update(data: DeviceGather) { + return request({ url: '/biz/deviceGather', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/deviceGather/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[] }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + return request({ url: `/biz/deviceGather/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/deviceGather/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/deviceGather/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/api/errorNotification.ts b/src/api/errorNotification.ts new file mode 100644 index 0000000..5a81a83 --- /dev/null +++ b/src/api/errorNotification.ts @@ -0,0 +1,83 @@ +import { request } from '@/utils/request' + +// ErrorNotification 类型定义 +export interface ErrorNotification { + id?: number + + subscriptionKey?: string + + title?: string + + subscriptionDeviceIds?: string + + subscriptionDiscoverField?: string + + sendingMethod?: string + + discoverValue?: string + + detectionMethod?: string + + notifier?: string + + createBy?: number + + crateTime?: string + + notifierContent?: string + + abnormalReporting?: number + +} + +// ErrorNotification API +export const errorNotificationApi = { + // 分页查询 + page(params: { page: number; pageSize: number }) { + return request({ url: '/biz/errorNotification/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/errorNotification/${id}`, method: 'get' }) + }, + + // 新增 + create(data: ErrorNotification) { + return request({ url: '/biz/errorNotification', method: 'post', data }) + }, + + // 修改 + update(data: ErrorNotification) { + return request({ url: '/biz/errorNotification', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/errorNotification/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[] }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + return request({ url: `/biz/errorNotification/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/errorNotification/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/errorNotification/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/api/nccode.ts b/src/api/nccode.ts index cb6facc..1de4ba7 100644 --- a/src/api/nccode.ts +++ b/src/api/nccode.ts @@ -1,5 +1,19 @@ import { request } from '@/utils/request' +export interface ncCode { + id?: number, + ncCode?: string, + ncName?: string, + ncContent?: string, + ncDesc?: string, + status?: number, + createTime?: string, + updateTime?: string, + remark?: string, + createBy?: string, +} + + //新增代码库 export function addnccode(data:any) { return request({ diff --git a/src/api/qcItem.ts b/src/api/qcItem.ts index 9b8d4d2..c04d2cc 100644 --- a/src/api/qcItem.ts +++ b/src/api/qcItem.ts @@ -1,5 +1,5 @@ import { request } from '@/utils/request' -import { any } from 'three/tsl' + // 质检项表 类型定义 export interface QcItem { @@ -11,7 +11,9 @@ export interface QcItem { plans?: string - desc?: string + description?: string + + status?: number createby?: number diff --git a/src/api/qcitemProcess.ts b/src/api/qcitemProcess.ts index f8f7a47..c223391 100644 --- a/src/api/qcitemProcess.ts +++ b/src/api/qcitemProcess.ts @@ -8,6 +8,9 @@ export interface QcitemProcess { processId?: number + page?:number + + pageSize?:number } // 质检项和工序关联表 API diff --git a/src/api/section.ts b/src/api/section.ts index 52b7fa6..97c2110 100644 --- a/src/api/section.ts +++ b/src/api/section.ts @@ -1,5 +1,5 @@ import { request } from '@/utils/request' -import { st } from 'vue-router/dist/router-CWoNjPRp.mjs' + export interface Section{ id?: number, @@ -70,10 +70,16 @@ export const sectionApi = { list(params:{sectionName:string}) { return request({ - url:"/biz/section/list", + url:"/biz/section/listBySectionName", method:"get", params }) + }, + listNoParam(){ + return request({ + url:"/biz/section/list", + method:"get" + }) } } \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 799e6a5..731ea1b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -289,6 +289,24 @@ const routes: RouteRecordRaw[] = [ component: () => import('@/views/biz/outsourcing/index.vue'), meta: { title: '工序委外', icon: 'ListOutline' } }, + { + path: 'biz/deviceGather', + name: 'deviceGather', + component: () => import('@/views/biz/deviceGather/index.vue'), + meta: { title: '设备采集', icon: 'ListOutline' } + }, + { + path: 'biz/callingMaterials', + name: 'callingMaterials', + component: () => import('@/views/biz/callingMaterials/index.vue'), + meta: { title: '叫料记录', icon: 'ListOutline' } + }, + { + path: 'biz/errorNotification', + name: 'errorNotification', + component: () => import('@/views/biz/errorNotification/index.vue'), + meta: { title: 'ErrorNotification', icon: 'ListOutline' } + }, { // 开发工具 path: 'tool/gen', diff --git a/src/views/NCcode/index.vue b/src/views/NCcode/index.vue index cede9a2..972f49e 100644 --- a/src/views/NCcode/index.vue +++ b/src/views/NCcode/index.vue @@ -247,7 +247,6 @@ import { reactive, h, onMounted, - watch, } from 'vue' @@ -257,28 +256,26 @@ import { NIcon, NSpace, NPagination, - NGrid, - // NGi, - NTag, + NGrid, useMessage, useDialog, - //type FormInst, + NDropdown, } from 'naive-ui' import { SearchOutline, RefreshOutline, AddOutline, - ArrowDownCircleOutline + ArrowDownCircleOutline, + EllipsisHorizontalOutline } from '@vicons/ionicons5' import { useUserStore } from '@/stores/user' -//import { dictDataApi } from '@/api/org' + import { addnccode, nccodelist, batchIssue, - deleteIssue, editccode, issuecopy, generateNccode, @@ -295,6 +292,7 @@ const userStore = useUserStore() // 权限检查 const hasPermission = (permission: string) => userStore.hasPermission(permission) +//const ncDispatchRecords = ref([]) //派工状态字典 //const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([]) @@ -784,6 +782,13 @@ function handleExport() { getlist() +//查看下发记录 +async function handleDispatchRecord(row:ncCode){ + const ncId = row.id + // ncDispatchRecords.value = await +} + + onMounted(() => { //加载任务树 diff --git a/src/views/biz/basicProcessPlan/index.vue b/src/views/biz/basicProcessPlan/index.vue index a213140..eaac2a1 100644 --- a/src/views/biz/basicProcessPlan/index.vue +++ b/src/views/biz/basicProcessPlan/index.vue @@ -33,10 +33,10 @@ 导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }} - + @@ -287,6 +287,7 @@ const defaultFormData: BasicProcessPlan = { workCenterName: '', departmentName: '', operDescription: '', + status:undefined } const formData = reactive({ ...defaultFormData }) @@ -328,6 +329,30 @@ const columns: DataTableColumns = [ { title: '工作中心', key: 'workCenterName' }, { title: '生产车间', key: 'departmentName' }, { title: '工序说明', key: 'operDescription' }, + { title: '状态', key: 'status', + render(row){ + if(row.status == 0){ + return h(NTag, { + type:'error', + size: 'small' + }, + { + default: () => '禁用' + } + ) + } + if(row.status == 1){ + return h(NTag, { + type:'success', + size: 'small' + }, + { + default: () => '启用' + } + ) + } + } + }, { title: '创建人', key: 'createBy' }, { title: '创建时间', key: 'createTime', width: 180 }, { @@ -340,9 +365,9 @@ const columns: DataTableColumns = [ h(NButton, { size: 'small', quaternary: true, onClick: () => handleEdit(row) }, { default: () => [h(NIcon, null, { default: () => h(CreateOutline) }), ' 编辑'] }), - h(NButton, { size: 'small', quaternary: true, type: 'error', onClick: () => handleDelete(row) }, { - default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除'] - }), + // h(NButton, { size: 'small', quaternary: true, type: 'error', onClick: () => handleDelete(row) }, { + // default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除'] + // }), h(NButton, { size: 'small', quaternary: true, onClick: () => handleOpenRelateModel(row) }, { default: () => ['关联质检项'] }) diff --git a/src/views/biz/callingMaterials/index.vue b/src/views/biz/callingMaterials/index.vue new file mode 100644 index 0000000..0ff8943 --- /dev/null +++ b/src/views/biz/callingMaterials/index.vue @@ -0,0 +1,388 @@ + + + + + diff --git a/src/views/biz/device/DeviceAbnomarlRecord.vue b/src/views/biz/device/DeviceAbnomarlRecord.vue new file mode 100644 index 0000000..895ef06 --- /dev/null +++ b/src/views/biz/device/DeviceAbnomarlRecord.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index a677b4c..dd4cf32 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -5,16 +5,24 @@
- + - + 搜索 - + 重置 @@ -26,7 +34,11 @@
- + 新增设备 @@ -37,11 +49,19 @@ 导入 --> - + 导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }} - + 删除 @@ -49,23 +69,23 @@
+ + + + + + + +
+ + diff --git a/src/views/biz/errorNotification/index.vue b/src/views/biz/errorNotification/index.vue new file mode 100644 index 0000000..bd47e00 --- /dev/null +++ b/src/views/biz/errorNotification/index.vue @@ -0,0 +1,449 @@ + + + + + diff --git a/src/views/biz/flowingAround/index.vue b/src/views/biz/flowingAround/index.vue index d00d0bb..318d919 100644 --- a/src/views/biz/flowingAround/index.vue +++ b/src/views/biz/flowingAround/index.vue @@ -438,23 +438,6 @@ const confirmResultOptions = computed(() => { }) -// const directionOptions = computed(() => { -// const baseOptions: any[] = [ -// { label: t('account.进账'), value: '进账' }, -// { label: t('account.出账'), value: '出账' }, -// ] - -// // 当 accountType === 'currency' 时,才追加“冻结”选项 -// // if (formRegulationData.accountType === 'currency') { -// // baseOptions.push({ label: t('account.冻结'), value: '冻结' }) -// // baseOptions.push({ label: t('account.解冻'), value: '解冻' }) -// // } - -// return baseOptions -// }) - - - // 加载字典选项 async function loadDictOptions() { try { diff --git a/src/views/biz/qualityItem/index.vue b/src/views/biz/qualityItem/index.vue index 9920109..ee0f631 100644 --- a/src/views/biz/qualityItem/index.vue +++ b/src/views/biz/qualityItem/index.vue @@ -37,10 +37,10 @@ 导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }} - +
@@ -110,6 +110,12 @@ + + + + + +