Compare commits
2 Commits
27eee1eff5
...
433eae9153
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
433eae9153 | ||
|
|
147b802daf |
@ -1,6 +1,6 @@
|
||||
allowBuilds:
|
||||
'@parcel/watcher': set this to true or false
|
||||
core-js: set this to true or false
|
||||
electron-winstaller: set this to true or false
|
||||
esbuild: set this to true or false
|
||||
vue-demi: set this to true or false
|
||||
'@parcel/watcher': true
|
||||
core-js: true
|
||||
electron-winstaller: true
|
||||
esbuild: true
|
||||
vue-demi: true
|
||||
|
||||
77
src/api/tool.ts
Normal file
77
src/api/tool.ts
Normal file
@ -0,0 +1,77 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
export interface Tool {
|
||||
id?: number
|
||||
toolCode: string
|
||||
toolName: string
|
||||
toolType: string
|
||||
toolTypeId?: number
|
||||
specModel: string
|
||||
material: string
|
||||
manufacturer: string
|
||||
purchaseDate?: string | number
|
||||
lifeCycle: number
|
||||
usedCount?: number
|
||||
status: number
|
||||
remark: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export const toolApi = {
|
||||
page(params: {
|
||||
page: number
|
||||
pageSize: number
|
||||
toolCode?: string
|
||||
toolName?: string
|
||||
status?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/biz/tool/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
create(data: Tool) {
|
||||
return request({
|
||||
url: '/biz/tool',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
update(data: Tool) {
|
||||
return request({
|
||||
url: '/biz/tool',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
delete(ids: number[]) {
|
||||
return request({
|
||||
url: `/biz/tool/${ids.join(',')}`,
|
||||
method: 'delete'
|
||||
})
|
||||
},
|
||||
|
||||
export(params?: {
|
||||
ids?: number[]
|
||||
toolCode?: string
|
||||
toolName?: string
|
||||
status?: number
|
||||
}) {
|
||||
const p: Record<string, any> = {}
|
||||
if (params?.ids?.length) p.ids = params.ids.join(',')
|
||||
if (params?.toolCode) p.toolCode = params.toolCode
|
||||
if (params?.toolName) p.toolName = params.toolName
|
||||
if (params?.status != null) p.status = params.status
|
||||
return request({
|
||||
url: '/biz/tool/report',
|
||||
method: 'get',
|
||||
params: p,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -290,16 +290,16 @@ const routes: RouteRecordRaw[] = [
|
||||
meta: { title: '工序委外', icon: 'ListOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/deviceGather',
|
||||
name: 'deviceGather',
|
||||
component: () => import('@/views/biz/deviceGather/index.vue'),
|
||||
meta: { title: '设备采集', icon: 'ListOutline' }
|
||||
path: 'biz/tool',
|
||||
name: 'tool',
|
||||
component: () => import('@/views/biz/tool/index.vue'),
|
||||
meta: { title: '刀具管理', icon: 'ToolOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/callingMaterials',
|
||||
name: 'callingMaterials',
|
||||
component: () => import('@/views/biz/callingMaterials/index.vue'),
|
||||
meta: { title: '叫料记录', icon: 'ListOutline' }
|
||||
path: 'biz/tool/usage',
|
||||
name: 'toolUsage',
|
||||
component: () => import('@/views/biz/tool/usage.vue'),
|
||||
meta: { title: '刀具使用记录', icon: 'ToolOutline', activeMenu: '/biz/tool' }
|
||||
},
|
||||
{
|
||||
path: 'biz/errorNotification',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user