diff --git a/src/api/device.ts b/src/api/device.ts index ba220eb..3b06bf1 100644 --- a/src/api/device.ts +++ b/src/api/device.ts @@ -79,6 +79,14 @@ export interface DeviceRealtimeVO { } + +export interface DocumentEntity { + id?:number, + name?:string, + code?:string, + fileId?:number, +} + export const deviceApi = { page(params:{ @@ -169,5 +177,13 @@ export const deviceApi = { url:"/biz/device/list", method:"get" }) + }, + + getDeviceByNcId(params:{ncId:number,page:number,pageSize:number}){ + return request({ + url:"biz/device/getDeviceByNcId", + method:"get", + params + }) } } \ No newline at end of file diff --git a/src/api/deviceDocumentConnection.ts b/src/api/deviceDocumentConnection.ts new file mode 100644 index 0000000..42790ec --- /dev/null +++ b/src/api/deviceDocumentConnection.ts @@ -0,0 +1,92 @@ +import { request } from '@/utils/request' + +// 设备和nc/图纸关联表 类型定义 +export interface DeviceDocumentConnection { + id?: number + + deviceId?: number + + sourceId?: number + + devcieIds?:[], + + sourceIds?:[] + +} + +// 设备和nc/图纸关联表 API +export const deviceDocumentConnectionApi = { + // 分页查询 + page(params: { page: number; pageSize: number; id?: number }) { + return request({ url: '/biz/deviceDocumentConnection/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: number) { + return request({ url: `/biz/deviceDocumentConnection/${id}`, method: 'get' }) + }, + + // 新增 + create(data: DeviceDocumentConnection) { + return request({ url: '/biz/deviceDocumentConnection', method: 'post', data }) + }, + + createDevice(data:DeviceDocumentConnection) { + return request({ + url:"biz/deviceDocumentConnection/createDevice", + method:"post", + data + }) + }, + + createDeviceDraw(data:DeviceDocumentConnection) { + return request({ + url:"biz/deviceDocumentConnection/createDeviceDraw", + method:"post", + data + }) + }, + + // 修改 + update(data: DeviceDocumentConnection) { + return request({ url: '/biz/deviceDocumentConnection', method: 'put', data }) + }, + + // 删除 + delete(ids: number[]) { + return request({ url: `/biz/deviceDocumentConnection/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: number[]; 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/deviceDocumentConnection/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/deviceDocumentConnection/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/deviceDocumentConnection/template`, method: 'get', responseType: 'blob' }) + }, + + list(params:{page:number,pageSize:number}) { + return request({ + url:"biz/deviceDocumentConnection/list", + method:"get", + params + }) + } +} diff --git a/src/api/illustrated.ts b/src/api/illustrated.ts index 63f9f82..5eeb592 100644 --- a/src/api/illustrated.ts +++ b/src/api/illustrated.ts @@ -87,3 +87,12 @@ export function multifilelist(fileId:any) { method: 'get' }) } + + +export function getDeviceByDrawingId(params:{drawId?:number,page:number,pageSize:number}) { + return request({ + url:"/biz/device/getDeviceByDrawingId", + method:"get", + params + }) +} \ No newline at end of file diff --git a/src/views/NCcode/index.vue b/src/views/NCcode/index.vue index 179e740..6299b1f 100644 --- a/src/views/NCcode/index.vue +++ b/src/views/NCcode/index.vue @@ -284,31 +284,78 @@ - + + + + + + + 全选当前筛选文档 + + 已勾选 {{ selectedDeviceIds.length }} 道文档 + + + + +
+ + + +
+ + +
+
+ + diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index ef9804e..abaea83 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -243,11 +243,57 @@ + + + + + + + 全选当前筛选文档 + + 已勾选 {{ selectedDocumentIds.length }} 道文档 + + + + +
+ + + +
+ + +
+
+ + diff --git a/src/views/biz/qualityItem/index.vue b/src/views/biz/qualityItem/index.vue index 99f94f6..5206d7c 100644 --- a/src/views/biz/qualityItem/index.vue +++ b/src/views/biz/qualityItem/index.vue @@ -499,16 +499,15 @@ async function handleSubmit() { if (typeof submitData.updateTime === 'number') { submitData.updateTime = new Date(submitData.updateTime).toISOString().slice(0, 19).replace('T', ' ') } - console.log(submitData) - // if (submitData.id) { - // await qcItemApi.update(submitData) - // message.success('修改成功') - // } else { - // await qcItemApi.create(submitData) - // message.success('新增成功') - // } - // modalVisible.value = false - // loadData() + if (submitData.id) { + await qcItemApi.update(submitData) + message.success('修改成功') + } else { + await qcItemApi.create(submitData) + message.success('新增成功') + } + modalVisible.value = false + loadData() } catch (error) { // 错误已在拦截器处理 } diff --git a/src/views/biz/stationHandover/index.vue b/src/views/biz/stationHandover/index.vue index c90fbfb..9a4ac02 100644 --- a/src/views/biz/stationHandover/index.vue +++ b/src/views/biz/stationHandover/index.vue @@ -15,23 +15,31 @@ /> - + /> - + 搜索 - + 重置 @@ -43,7 +51,11 @@
- + 新增 @@ -51,11 +63,11 @@
- + - + - + diff --git a/src/views/production/componets/AssingWorkTreeTable.vue b/src/views/production/componets/AssingWorkTreeTable.vue index 144c4e4..9a84a36 100644 --- a/src/views/production/componets/AssingWorkTreeTable.vue +++ b/src/views/production/componets/AssingWorkTreeTable.vue @@ -319,8 +319,7 @@ const AssingWorkColumns :DataTableColumns = [ const showQcReport = ref(false) const reportTitle = ref() -//懒加载子级 -const loadingRowIds = ref>(new Set()) + const AssingWorkDetailColums:DataTableColumns = [ {