dengrui 7 mesi fa
parent
commit
1101d255c6

+ 53 - 0
src/api/prosteps/screwdriver.ts

@@ -0,0 +1,53 @@
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+import { DeviceContainer, ResData } from "./screwdriverTypes";
+//获取数据采集data
+export function getScrewdriverData(): Promise<ResData> {
+  return request({
+    url: `/api/v1/process/data/acquisition/device/list`,
+    method: "get",
+  });
+}
+export function getAcquisitionData(data: any): Promise<ResData> {
+  return request({
+    url: `/api/v1/process/data/acquisition/page`,
+    method: "post",
+    data,
+  });
+}
+export function addAcquisitionData(data: any): Promise<ResData> {
+  return request({
+    url: `/api/v1/process/data/acquisition/add`,
+    method: "post",
+    data,
+  });
+}
+export function updateAcquisitionData(data: any): Promise<ResData> {
+  return request({
+    url: `/api/v1/process/data/acquisition/update`,
+    method: "post",
+    data,
+  });
+}
+export function delAcquisitionData(data: any): Promise<ResData> {
+  return request({
+    url: `/api/v1/process/data/acquisition/del`,
+    method: "post",
+    data,
+  });
+}
+//获取电动螺丝刀列表
+export function getTaskList(data: any): Promise<ResData> {
+  return request({
+    url: `/api/v1/screwdriverTask/list`,
+    method: "post",
+    data,
+  });
+}
+export function startData(data: any): Promise<ResData> {
+  return request({
+    url: `/api/v1/process/data/acquisition/start`,
+    method: "post",
+    data,
+  });
+}

+ 45 - 0
src/api/prosteps/screwdriverTypes.ts

@@ -0,0 +1,45 @@
+export interface DeviceInfo {
+  brand?: string; // 设备品牌
+  collect?: string; // 收集信息
+  collectState?: string; // 收集状态
+  created?: string; // 创建时间(可能是日期字符串)
+  creator?: string; // 创建者
+  deleted?: number; // 删除标志,可能是一个布尔值的数字表示(0 或 1)
+  deptId?: string; // 部门ID
+  deviceName?: string; // 设备名称
+  deviceNo?: string; // 设备编号
+  devicePic?: string; // 设备图片URL
+  devicePosition?: string; // 设备位置
+  deviceType?: string; // 设备类型标识
+  deviceTypeStr?: string; // 设备类型的描述字符串
+  head?: string; // 可能是负责人或其他相关信息
+  id?: string; // 主键ID,可能是UUID或其他唯一标识符
+  manufacturer?: string; // 生产商
+  meteringDate?: string; // 计量日期(可能是日期字符串)
+  onlineState?: string; // 在线状态
+  orgId?: string; // 组织ID
+  specifications?: string; // 规格
+  state?: string; // 设备状态
+  station?: string; // 工位
+  terminal?: string; // 可能是指终端设备或其他相关信息
+  updated?: string; // 更新时间(可能是日期字符串)
+  updator?: string; // 更新者
+  workshop?: string; // 车间
+}
+export interface DeviceContainer {
+  created?: string; // 创建时间(可能是日期字符串)
+  creator?: string; // 创建者
+  deptId?: string; // 部门ID
+  deviceInfoList?: DeviceInfo[]; // 设备信息列表
+  deviceType: string; // 设备类型标识
+  id?: string; // 主键ID,可能是UUID或其他唯一标识符
+  orgId?: string; // 组织ID
+  updated?: string; // 更新时间(可能是日期字符串)
+  updator?: string; // 更新者
+  state?: null | number;
+}
+export interface ResData {
+  code: string;
+  data: Array<DeviceContainer>;
+  msg: string;
+}

+ 6 - 0
src/views/pro-steps/index.vue

@@ -159,6 +159,12 @@ const defaultComponents = [
     path: "ceshishuju",
     name: "Ceshishuju",
   },
+  {
+    compentName: "数据采集",
+    iconName: "mingpai",
+    path: "screwdriver",
+    name: "Screwdriver",
+  },
 ];
 //当前路由在setpComponents中的index
 const selectIndex = ref(0);