import request from '@/utils/request' import state from '@/store' import router from '@/router' // 初始化机床项目 export function initProject() { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', name: 'PDM_项目名称_查询数据' } }) } // 组件查询 export function searchgroup(num) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', name: 'PDM_组件名称_查询数据', param: '机床流水号=' + num } }) } export function searchgroupName(num) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', name: 'PDM_组件名称_查询数据_查询名称', param: '组件流水号=' + num } }) } export function getFileData(MachineDrawValue) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', name: 'PDM_机床总图_查询数据', param: `机床流水号=${MachineDrawValue}` } }) } // 机床查询 export function searchTable1(machineNumberValue, check2) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', name: '车间装配管理_机床信息_查询数据', param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue } }) } // 组件查询 export function searchTable2(machineNumberValue, type) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', name: '车间管理_工作计划_查询数据', param: '机床流水号=' + machineNumberValue + '&计划类型=' + type } }) } export function deletedata(num) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '2', name: '车间管理_工作计划_删除数据', param: '计划流水号=' + num } }) } export function editData(num, group, groupName, Name, time) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '2', name: '车间管理_工作计划_编辑数据', param: '计划流水号=' + num + '&组件流水号=' + group + '&组号=' + groupName + '&任务名称=' + Name + '&计划工时=' + time } }) } export function addData(num, type) { return request({ url: '', method: 'post', data: { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '2', name: '车间管理_工作计划_增加数据', param: '机床流水号=' + num + '&计划类型=' + type } }) }