diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts new file mode 100644 index 00000000..ab2eda57 --- /dev/null +++ b/src/api/iot/device/index.ts @@ -0,0 +1,92 @@ +import request from '@/config/axios' + +// 物联设备 VO +export interface DeviceVO { + id: number // ID + deviceConfigId: string // 设备配置id + deviceCode: string // 设备编号 + deviceName: string // 设备名称 + deviceType: string // 设备类型 + siemensSeries: string // Siemens系列(S7-300、S7-1500) + siemensConnectParam: string // 连接参数(波特率,数据位,停止位,校验位 例如:9600,8,1,N) + readCronType: string // 读取任务方式(0无,1有) + readRepeatValue: number // 读取任务时间间隔 + readRepeatUnit: string // 读取任务时间间隔单位 + readCron: string // 读取任务时间表达式 + writeCronType: string // 写入任务时间间隔 + writeRepeatValue: number // 写入任务时间间隔 + writeRepeatUnit: string // 写入任务时间间隔单位 + writeCron: string // 写入任务时间表达式 + localPersistent: string // 是否持久化(0不持久化,1持久化) + uploadRate: string // 上传方式(1实时,2自定义) + rateCount: number // 上传频率 + modbusProtocol: string // modbus协议类型(serial-rtu) + modbusPattern: string // modbus模式(client) + portName: string // modbus串口号 + modbusConnectParam: string // 连接参数(波特率,数据位,停止位,校验位 例如:9600,8,1,N) + modbusReadAddrGap: string // 读地址是否连续(0否,1是) + isUpload: string // 是否已下发(0下,1没下) + gatewayId: number // 网关id + orgId: number // 组织设备id + remark: string // 备注 + isEnable: boolean // 是否启用 +} + +// 物联设备 API +export const DeviceApi = { + // 查询物联设备分页 + getDevicePage: async (params: any) => { + return await request.get({ url: `/iot/device/page`, params }) + }, + + // 查询物联设备详情 + getDevice: async (id: number) => { + return await request.get({ url: `/iot/device/get?id=` + id }) + }, + + // 新增物联设备 + createDevice: async (data: DeviceVO) => { + return await request.post({ url: `/iot/device/create`, data }) + }, + + // 修改物联设备 + updateDevice: async (data: DeviceVO) => { + return await request.put({ url: `/iot/device/update`, data }) + }, + + // 删除物联设备 + deleteDevice: async (id: number) => { + return await request.delete({ url: `/iot/device/delete?id=` + id }) + }, + + // 导出物联设备 Excel + exportDevice: async (params) => { + return await request.download({ url: `/iot/device/export-excel`, params }) + }, + +// ==================== 子表(设备属性) ==================== + + // 获得设备属性分页 + getDeviceAttributePage: async (params) => { + return await request.get({ url: `/iot/device/device-attribute/page`, params }) + }, + // 新增设备属性 + createDeviceAttribute: async (data) => { + return await request.post({ url: `/iot/device/device-attribute/create`, data }) + }, + + // 修改设备属性 + updateDeviceAttribute: async (data) => { + return await request.put({ url: `/iot/device/device-attribute/update`, data }) + }, + + // 删除设备属性 + deleteDeviceAttribute: async (id: number) => { + return await request.delete({ url: `/iot/device/device-attribute/delete?id=` + id }) + }, + + // 获得设备属性 + getDeviceAttribute: async (id: number) => { + return await request.get({ url: `/iot/device/device-attribute/get?id=` + id }) + }, +} \ No newline at end of file diff --git a/src/api/iot/formula/index.ts b/src/api/iot/formula/index.ts new file mode 100644 index 00000000..7b6feb92 --- /dev/null +++ b/src/api/iot/formula/index.ts @@ -0,0 +1,72 @@ +import request from '@/config/axios' + +// 计算公式 VO +export interface FormulaVO { + id: number // ID + name: string // 公式名称 + formulaCode: string // 公式编号 + formula: string // 公式 + resultType: string // 结果类型(产量,电耗,浆耗,水耗,气耗,参数) + machineId: number // 机台ID + remark: string // 备注 + isEnable: boolean // 是否启用 +} + +// 计算公式 API +export const FormulaApi = { + // 查询计算公式分页 + getFormulaPage: async (params: any) => { + return await request.get({ url: `/iot/formula/page`, params }) + }, + + // 查询计算公式详情 + getFormula: async (id: number) => { + return await request.get({ url: `/iot/formula/get?id=` + id }) + }, + + // 新增计算公式 + createFormula: async (data: FormulaVO) => { + return await request.post({ url: `/iot/formula/create`, data }) + }, + + // 修改计算公式 + updateFormula: async (data: FormulaVO) => { + return await request.put({ url: `/iot/formula/update`, data }) + }, + + // 删除计算公式 + deleteFormula: async (id: number) => { + return await request.delete({ url: `/iot/formula/delete?id=` + id }) + }, + + // 导出计算公式 Excel + exportFormula: async (params) => { + return await request.download({ url: `/iot/formula/export-excel`, params }) + }, + +// ==================== 子表(计算公式明细) ==================== + + // 获得计算公式明细分页 + getFormulaDetailPage: async (params) => { + return await request.get({ url: `/iot/formula/formula-detail/page`, params }) + }, + // 新增计算公式明细 + createFormulaDetail: async (data) => { + return await request.post({ url: `/iot/formula/formula-detail/create`, data }) + }, + + // 修改计算公式明细 + updateFormulaDetail: async (data) => { + return await request.put({ url: `/iot/formula/formula-detail/update`, data }) + }, + + // 删除计算公式明细 + deleteFormulaDetail: async (id: number) => { + return await request.delete({ url: `/iot/formula/formula-detail/delete?id=` + id }) + }, + + // 获得计算公式明细 + getFormulaDetail: async (id: number) => { + return await request.get({ url: `/iot/formula/formula-detail/get?id=` + id }) + }, +} \ No newline at end of file diff --git a/src/api/iot/gateway/index.ts b/src/api/iot/gateway/index.ts new file mode 100644 index 00000000..f404d384 --- /dev/null +++ b/src/api/iot/gateway/index.ts @@ -0,0 +1,74 @@ +import request from '@/config/axios' + +// 网关 VO +export interface GatewayVO { + id: number // ID + adminIp: string // 管理地址 + username: string // 管理账号 + password: string // 管理密码 + gatewayName: string // 网关名字 + remark: string // 备注 + isEnable: boolean // 是否启用 + gatewayCode: string // 网关编码 + gatewayStatus: string // 网关状态 + topic: string // 订阅主题 +} + +// 网关 API +export const GatewayApi = { + // 查询网关分页 + getGatewayPage: async (params: any) => { + return await request.get({ url: `/iot/gateway/page`, params }) + }, + + // 查询网关详情 + getGateway: async (id: number) => { + return await request.get({ url: `/iot/gateway/get?id=` + id }) + }, + + // 新增网关 + createGateway: async (data: GatewayVO) => { + return await request.post({ url: `/iot/gateway/create`, data }) + }, + + // 修改网关 + updateGateway: async (data: GatewayVO) => { + return await request.put({ url: `/iot/gateway/update`, data }) + }, + + // 删除网关 + deleteGateway: async (id: number) => { + return await request.delete({ url: `/iot/gateway/delete?id=` + id }) + }, + + // 导出网关 Excel + exportGateway: async (params) => { + return await request.download({ url: `/iot/gateway/export-excel`, params }) + }, + +// ==================== 子表(物联设备) ==================== + + // 获得物联设备分页 + getDevicePage: async (params) => { + return await request.get({ url: `/iot/gateway/device/page`, params }) + }, + // 新增物联设备 + createDevice: async (data) => { + return await request.post({ url: `/iot/gateway/device/create`, data }) + }, + + // 修改物联设备 + updateDevice: async (data) => { + return await request.put({ url: `/iot/gateway/device/update`, data }) + }, + + // 删除物联设备 + deleteDevice: async (id: number) => { + return await request.delete({ url: `/iot/gateway/device/delete?id=` + id }) + }, + + // 获得物联设备 + getDevice: async (id: number) => { + return await request.get({ url: `/iot/gateway/device/get?id=` + id }) + }, +} \ No newline at end of file diff --git a/src/api/iot/iotorganization/index.ts b/src/api/iot/iotorganization/index.ts new file mode 100644 index 00000000..a2fcb626 --- /dev/null +++ b/src/api/iot/iotorganization/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +// IOT组织 VO +export interface OrganizationVO { + id: number // 组织id + sort: number // 显示顺序 + workerUserId: number // 负责人/工人 + orgId: number // 绑定工位id + name: string // 组织名称 + parentId: number // 父组织id + status: number // 组织状态 + deviceType: string // 设备类型 + orgClass: string // 组织等级 + machineType: string // 机台类型 +} + +// IOT组织 API +export const OrganizationApi = { + // 查询IOT组织列表 + getOrganizationList: async (params) => { + return await request.get({ url: `/iot/organization/list`, params }) + }, + + // 查询IOT组织详情 + getOrganization: async (id: number) => { + return await request.get({ url: `/iot/organization/get?id=` + id }) + }, + + // 新增IOT组织 + createOrganization: async (data: OrganizationVO) => { + return await request.post({ url: `/iot/organization/create`, data }) + }, + + // 修改IOT组织 + updateOrganization: async (data: OrganizationVO) => { + return await request.put({ url: `/iot/organization/update`, data }) + }, + + // 删除IOT组织 + deleteOrganization: async (id: number) => { + return await request.delete({ url: `/iot/organization/delete?id=` + id }) + }, + + // 导出IOT组织 Excel + exportOrganization: async (params) => { + return await request.download({ url: `/iot/organization/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/iot/kanban/index.ts b/src/api/iot/kanban/index.ts new file mode 100644 index 00000000..510b9c58 --- /dev/null +++ b/src/api/iot/kanban/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +// 物联看板 VO +export interface KanbanVO { + id: number // ID + img: string // 缩略图 + remark: string // 备注 + isEnable: boolean // 是否启用 + code: string // 编码 + title: string // 标题 + viewUrl: string // 访问地址 + tags: string // 标签 +} + +// 物联看板 API +export const KanbanApi = { + // 查询物联看板分页 + getKanbanPage: async (params: any) => { + return await request.get({ url: `/iot/kanban/page`, params }) + }, + + // 查询物联看板详情 + getKanban: async (id: number) => { + return await request.get({ url: `/iot/kanban/get?id=` + id }) + }, + + // 新增物联看板 + createKanban: async (data: KanbanVO) => { + return await request.post({ url: `/iot/kanban/create`, data }) + }, + + // 修改物联看板 + updateKanban: async (data: KanbanVO) => { + return await request.put({ url: `/iot/kanban/update`, data }) + }, + + // 删除物联看板 + deleteKanban: async (id: number) => { + return await request.delete({ url: `/iot/kanban/delete?id=` + id }) + }, + + // 导出物联看板 Excel + exportKanban: async (params) => { + return await request.download({ url: `/iot/kanban/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/mes/machine/index.ts b/src/api/mes/machine/index.ts new file mode 100644 index 00000000..67983917 --- /dev/null +++ b/src/api/mes/machine/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' + +// 机台 VO +export interface MachineComponentVO { + id: number // 装备id + name: string // 装备名称 + parentId: number // 父id + sort: number // 显示顺序 + orgId: number // 组织机台ID + serialCode: string // 装备SN号 + outgoingTime: Date // 出厂日期 + outgoingReport: string // 出厂报告 + position: string // 位置 + standard: string // 规格 + remark: string // 备注 + status: number // 状态 + componentType: number // 组织类型 + machineType: string // 机台类型 +} + +// 机台 API +export const MachineComponentApi = { + // 查询机台列表 + getMachineComponentList: async (params) => { + return await request.get({ url: `/mes/machine-component/list`, params }) + }, + + // 查询机台详情 + getMachineComponent: async (id: number) => { + return await request.get({ url: `/mes/machine-component/get?id=` + id }) + }, + + // 新增机台 + createMachineComponent: async (data: MachineComponentVO) => { + return await request.post({ url: `/mes/machine-component/create`, data }) + }, + + // 修改机台 + updateMachineComponent: async (data: MachineComponentVO) => { + return await request.put({ url: `/mes/machine-component/update`, data }) + }, + + // 删除机台 + deleteMachineComponent: async (id: number) => { + return await request.delete({ url: `/mes/machine-component/delete?id=` + id }) + }, + + // 导出机台 Excel + exportMachineComponent: async (params) => { + return await request.download({ url: `/mes/machine-component/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index e5f21789..90a29037 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -237,5 +237,23 @@ export enum DICT_TYPE { MES_RECORD_STATUS = "mes_record_status", MES_GROUP_TYPE = "mes_group_type", MES_WORK_TEAM_USER_ROLE = "mes_work_team_user_role", - MES_PRODUCE_ITEM_REQUISITION = "mes_produce_item_requisition" + MES_PRODUCE_ITEM_REQUISITION = "mes_produce_item_requisition", + MES_DATA_TYPE = "mes_data_type", + MES_MACHINE_STATUS = "mes_machine_status", + MES_MACHINE_TYPE = "mes_machine_type", + //====iot + IOT_SIEMENS_TYPE = "iot_siemens_type", + IOT_MODBUS_TYPE = "iot_modbus_type", + IOT_MODBUS_MOLD = "iot_modbus_mold", + IOT_MODBUS_PORT = "iot_modbus_port", + IOT_1_OR_0 = "iot_1_or_0", + IOT_DEVICE_DATA_UNIT = "iot_dev_data_unit", + IOT_DEVICE_TYPE = "iot_device_type", + IOT_ORG_CLASS = "iot_org_class", + IOT_DEVICE_UPLOADING_TYPE = "iot_device_uploading_type", + IOT_FORMULA_VAR_TYPE = "iot_formula_var_type", + IOT_FORMULA_CAL_RANG = "iot_formula_cal_rang", + IOT_GATEWAY_STATUS = "iot_gateway_status", + IOT_DEVICE_DATA_TRANSFER_TYPE = "iot_device_data_transfer_type", + IOT_DEVICE_DATA_TYPE = "iot_device_data_type", } diff --git a/src/views/iot/device/DeviceForm.vue b/src/views/iot/device/DeviceForm.vue new file mode 100644 index 00000000..d83e7b65 --- /dev/null +++ b/src/views/iot/device/DeviceForm.vue @@ -0,0 +1,321 @@ + + diff --git a/src/views/iot/device/components/DeviceAttributeForm.vue b/src/views/iot/device/components/DeviceAttributeForm.vue new file mode 100644 index 00000000..f8010ae3 --- /dev/null +++ b/src/views/iot/device/components/DeviceAttributeForm.vue @@ -0,0 +1,304 @@ + + diff --git a/src/views/iot/device/components/DeviceAttributeList.vue b/src/views/iot/device/components/DeviceAttributeList.vue new file mode 100644 index 00000000..255ab540 --- /dev/null +++ b/src/views/iot/device/components/DeviceAttributeList.vue @@ -0,0 +1,173 @@ + + diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue new file mode 100644 index 00000000..ad77a1d1 --- /dev/null +++ b/src/views/iot/device/index.vue @@ -0,0 +1,347 @@ + + + diff --git a/src/views/iot/formula/FormulaForm.vue b/src/views/iot/formula/FormulaForm.vue new file mode 100644 index 00000000..ad2a81ca --- /dev/null +++ b/src/views/iot/formula/FormulaForm.vue @@ -0,0 +1,140 @@ + + diff --git a/src/views/iot/formula/components/FormulaDetailForm.vue b/src/views/iot/formula/components/FormulaDetailForm.vue new file mode 100644 index 00000000..f19ca936 --- /dev/null +++ b/src/views/iot/formula/components/FormulaDetailForm.vue @@ -0,0 +1,163 @@ + + diff --git a/src/views/iot/formula/components/FormulaDetailList.vue b/src/views/iot/formula/components/FormulaDetailList.vue new file mode 100644 index 00000000..a3d2f1ca --- /dev/null +++ b/src/views/iot/formula/components/FormulaDetailList.vue @@ -0,0 +1,147 @@ + + diff --git a/src/views/iot/formula/index.vue b/src/views/iot/formula/index.vue new file mode 100644 index 00000000..5404703a --- /dev/null +++ b/src/views/iot/formula/index.vue @@ -0,0 +1,277 @@ + + + diff --git a/src/views/iot/gateway/GatewayForm.vue b/src/views/iot/gateway/GatewayForm.vue new file mode 100644 index 00000000..38b94d48 --- /dev/null +++ b/src/views/iot/gateway/GatewayForm.vue @@ -0,0 +1,149 @@ + + diff --git a/src/views/iot/gateway/components/DeviceForm.vue b/src/views/iot/gateway/components/DeviceForm.vue new file mode 100644 index 00000000..f107ee34 --- /dev/null +++ b/src/views/iot/gateway/components/DeviceForm.vue @@ -0,0 +1,316 @@ + + diff --git a/src/views/iot/gateway/components/DeviceList.vue b/src/views/iot/gateway/components/DeviceList.vue new file mode 100644 index 00000000..72e6fcbb --- /dev/null +++ b/src/views/iot/gateway/components/DeviceList.vue @@ -0,0 +1,172 @@ + + diff --git a/src/views/iot/gateway/index.vue b/src/views/iot/gateway/index.vue new file mode 100644 index 00000000..32c9bc06 --- /dev/null +++ b/src/views/iot/gateway/index.vue @@ -0,0 +1,301 @@ + + + diff --git a/src/views/iot/iotorganization/OrganizationForm.vue b/src/views/iot/iotorganization/OrganizationForm.vue new file mode 100644 index 00000000..c67da8e0 --- /dev/null +++ b/src/views/iot/iotorganization/OrganizationForm.vue @@ -0,0 +1,179 @@ + + diff --git a/src/views/iot/iotorganization/index.vue b/src/views/iot/iotorganization/index.vue new file mode 100644 index 00000000..0304a373 --- /dev/null +++ b/src/views/iot/iotorganization/index.vue @@ -0,0 +1,297 @@ + + + diff --git a/src/views/iot/kanban/KanbanForm.vue b/src/views/iot/kanban/KanbanForm.vue new file mode 100644 index 00000000..62d285aa --- /dev/null +++ b/src/views/iot/kanban/KanbanForm.vue @@ -0,0 +1,131 @@ + + \ No newline at end of file diff --git a/src/views/iot/kanban/index.vue b/src/views/iot/kanban/index.vue new file mode 100644 index 00000000..021240c7 --- /dev/null +++ b/src/views/iot/kanban/index.vue @@ -0,0 +1,246 @@ + + + \ No newline at end of file diff --git a/src/views/mes/machine/MachineComponentForm.vue b/src/views/mes/machine/MachineComponentForm.vue new file mode 100644 index 00000000..f377b204 --- /dev/null +++ b/src/views/mes/machine/MachineComponentForm.vue @@ -0,0 +1,206 @@ + + diff --git a/src/views/mes/machine/index.vue b/src/views/mes/machine/index.vue new file mode 100644 index 00000000..8c55a283 --- /dev/null +++ b/src/views/mes/machine/index.vue @@ -0,0 +1,330 @@ + + +