|
@@ -1,234 +1,252 @@
|
|
import { useDictionaryStoreHook } from "@/store";
|
|
import { useDictionaryStoreHook } from "@/store";
|
|
const { dicts } = useDictionaryStoreHook();
|
|
const { dicts } = useDictionaryStoreHook();
|
|
|
|
|
|
-export const getTableConfig = (id: string) => {
|
|
|
|
- return {
|
|
|
|
- // 获取工序记录项信息信息
|
|
|
|
- jiluxiang: {
|
|
|
|
- url: `/api/v1/op/operationRecord`,
|
|
|
|
- column: [
|
|
|
|
- {
|
|
|
|
- label: "工序id",
|
|
|
|
- prop: "operationId",
|
|
|
|
- display: false,
|
|
|
|
- hide: true,
|
|
|
|
- value: id,
|
|
|
|
- },
|
|
|
|
- { label: "记录项", prop: "thName" },
|
|
|
|
- {
|
|
|
|
- label: "单位",
|
|
|
|
- prop: "unit",
|
|
|
|
- search: true,
|
|
|
|
- filterable: true,
|
|
|
|
- type: "select",
|
|
|
|
- dataType: "string",
|
|
|
|
- dicData: dicts.danwei_type,
|
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
- },
|
|
|
|
- { label: "标准值", prop: "standard" },
|
|
|
|
- { label: "上限值", prop: "upper" },
|
|
|
|
- { label: "下限值", prop: "lower" },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- //工序物料
|
|
|
|
- wuliaocaiji: {
|
|
|
|
- url: "/api/v1/op/operationItem",
|
|
|
|
- column: [
|
|
|
|
- {
|
|
|
|
- label: "工序id",
|
|
|
|
- prop: "operationId",
|
|
|
|
- display: false,
|
|
|
|
- hide: true,
|
|
|
|
- value: id,
|
|
|
|
- },
|
|
|
|
- { label: "物料名称", prop: "itemName" },
|
|
|
|
- { label: "物料编码", prop: "itemCode" },
|
|
|
|
- { label: "物料规格", prop: "itemModel" },
|
|
|
|
- { label: "所需数量", prop: "num" },
|
|
|
|
- {
|
|
|
|
- label: "追溯类型",
|
|
|
|
- prop: "traceType",
|
|
|
|
- search: true,
|
|
|
|
- filterable: true,
|
|
|
|
- type: "select",
|
|
|
|
- dataType: "string",
|
|
|
|
- dicData: dicts.trace_type,
|
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "单位",
|
|
|
|
- prop: "unit",
|
|
|
|
- search: true,
|
|
|
|
- filterable: true,
|
|
|
|
- type: "select",
|
|
|
|
- dataType: "string",
|
|
|
|
- dicData: dicts.danwei_type,
|
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "是否需要",
|
|
|
|
- prop: "isTrace",
|
|
|
|
- type: "radio", //类型为单选框
|
|
|
|
- dicData: [
|
|
|
|
- {
|
|
|
|
- label: "需采集物料",
|
|
|
|
- value: 1,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "非必须采集物料",
|
|
|
|
- value: 0,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- value: 1,
|
|
|
|
- rules: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: "是否需要",
|
|
|
|
- trigger: "blur",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- dianjian: {
|
|
|
|
- url: `/api/v1/op/operationCheck`,
|
|
|
|
- column: [
|
|
|
|
- {
|
|
|
|
- label: "工序id",
|
|
|
|
- prop: "operationId",
|
|
|
|
- display: false,
|
|
|
|
- hide: true,
|
|
|
|
- value: id,
|
|
|
|
- },
|
|
|
|
- { label: "点检名称", prop: "checkName" },
|
|
|
|
- { label: "点检编码", prop: "checkCode" },
|
|
|
|
- { label: "内容", prop: "content" },
|
|
|
|
- {
|
|
|
|
- label: "单位",
|
|
|
|
- prop: "unit",
|
|
|
|
- search: true,
|
|
|
|
- filterable: true,
|
|
|
|
- type: "select",
|
|
|
|
- dataType: "string",
|
|
|
|
- dicData: dicts.danwei_type,
|
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
- },
|
|
|
|
- { label: "标准值", prop: "standard" },
|
|
|
|
- { label: "上限值", prop: "upper" },
|
|
|
|
- { label: "下限值", prop: "lower" },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- shebeijilu: {
|
|
|
|
- url: "/api/v1/op/operationEquit",
|
|
|
|
- column: [
|
|
|
|
- {
|
|
|
|
- label: "工序id",
|
|
|
|
- prop: "operationId",
|
|
|
|
- display: false,
|
|
|
|
- hide: true,
|
|
|
|
- value: id,
|
|
|
|
- },
|
|
|
|
- { label: "精度要求", prop: "accuracy" },
|
|
|
|
- { label: "所需数量", prop: "num", display: false, hide: true },
|
|
|
|
- {
|
|
|
|
- label: "设备类型",
|
|
|
|
- prop: "equitType",
|
|
|
|
- search: true,
|
|
|
|
- filterable: true,
|
|
|
|
- type: "select",
|
|
|
|
- dataType: "string",
|
|
|
|
- dicData: dicts.device_type,
|
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "必须采集",
|
|
|
|
- prop: "collection",
|
|
|
|
- type: "radio", //类型为单选框
|
|
|
|
- dicData: [
|
|
|
|
- {
|
|
|
|
- label: "必须",
|
|
|
|
- value: 1,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "非必须",
|
|
|
|
- value: 0,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- value: 1,
|
|
|
|
- rules: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: "是否必须采集",
|
|
|
|
- trigger: "blur",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- ESOP: {
|
|
|
|
- url: "/api/v1/op/esop",
|
|
|
|
- column: [
|
|
|
|
- {
|
|
|
|
- label: "工序id",
|
|
|
|
- prop: "operationId",
|
|
|
|
- display: false,
|
|
|
|
- hide: true,
|
|
|
|
- value: id,
|
|
|
|
- },
|
|
|
|
- { label: "内容", prop: "content" },
|
|
|
|
- { label: "标题", prop: "title" },
|
|
|
|
- {
|
|
|
|
- label: "文件",
|
|
|
|
- prop: "imgUrl",
|
|
|
|
- span: 24,
|
|
|
|
- slot: true,
|
|
|
|
- viewDisplay: false,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- };
|
|
|
|
|
|
+export const getTableConfig = (id : string) => {
|
|
|
|
+ return {
|
|
|
|
+ // 获取工序记录项信息信息
|
|
|
|
+ jiluxiang: {
|
|
|
|
+ url: `/api/v1/op/operationRecord`,
|
|
|
|
+ column: [
|
|
|
|
+ {
|
|
|
|
+ label: "工序id",
|
|
|
|
+ prop: "operationId",
|
|
|
|
+ display: false,
|
|
|
|
+ hide: true,
|
|
|
|
+ value: id,
|
|
|
|
+ },
|
|
|
|
+ { label: "记录项", prop: "thName" },
|
|
|
|
+ {
|
|
|
|
+ label: "单位",
|
|
|
|
+ prop: "unit",
|
|
|
|
+ search: true,
|
|
|
|
+ filterable: true,
|
|
|
|
+ type: "select",
|
|
|
|
+ dataType: "string",
|
|
|
|
+ dicData: dicts.danwei_type,
|
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
+ },
|
|
|
|
+ { label: "标准值", prop: "standard" },
|
|
|
|
+ { label: "上限值", prop: "upper" },
|
|
|
|
+ { label: "下限值", prop: "lower" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ //工序物料
|
|
|
|
+ wuliaocaiji: {
|
|
|
|
+ url: "/api/v1/op/operationItem",
|
|
|
|
+ column: [
|
|
|
|
+ {
|
|
|
|
+ label: "工序id",
|
|
|
|
+ prop: "operationId",
|
|
|
|
+ display: false,
|
|
|
|
+ hide: true,
|
|
|
|
+ value: id,
|
|
|
|
+ },
|
|
|
|
+ { label: "物料名称", prop: "itemName", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "物料版本号", prop: "recordVersion", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "物料编码", prop: "itemCode", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "物料规格", prop: "itemModel", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "所需数量", prop: "num" },
|
|
|
|
+ {
|
|
|
|
+ label: "追溯类型",
|
|
|
|
+ prop: "traceType",
|
|
|
|
+ search: true,
|
|
|
|
+ filterable: true,
|
|
|
|
+ type: "select",
|
|
|
|
+ dataType: "string",
|
|
|
|
+ dicData: dicts.trace_type,
|
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "单位",
|
|
|
|
+ prop: "unit",
|
|
|
|
+ search: true,
|
|
|
|
+ filterable: true,
|
|
|
|
+ type: "select",
|
|
|
|
+ dataType: "string",
|
|
|
|
+ dicData: dicts.danwei_type,
|
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "是否需要",
|
|
|
|
+ prop: "isTrace",
|
|
|
|
+ type: "radio", //类型为单选框
|
|
|
|
+ dicData: [
|
|
|
|
+ {
|
|
|
|
+ label: "需采集物料",
|
|
|
|
+ value: 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "非必须采集物料",
|
|
|
|
+ value: 0,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ value: 1,
|
|
|
|
+ rules: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "是否需要",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ dianjian: {
|
|
|
|
+ url: `/api/v1/op/operationCheck`,
|
|
|
|
+ column: [
|
|
|
|
+ {
|
|
|
|
+ label: "工序id",
|
|
|
|
+ prop: "operationId",
|
|
|
|
+ display: false,
|
|
|
|
+ hide: true,
|
|
|
|
+ value: id,
|
|
|
|
+ },
|
|
|
|
+ { label: "点检名称", prop: "checkName", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "点检编码", prop: "checkCode", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "内容", prop: "content", addDisabled: true, editDisabled: true },
|
|
|
|
+ {
|
|
|
|
+ label: "单位",
|
|
|
|
+ prop: "unit",
|
|
|
|
+ search: true,
|
|
|
|
+ filterable: true,
|
|
|
|
+ type: "select",
|
|
|
|
+ dataType: "string",
|
|
|
|
+ dicData: dicts.danwei_type,
|
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
+ },
|
|
|
|
+ { label: "标准值", prop: "standard" },
|
|
|
|
+ { label: "上限值", prop: "upper" },
|
|
|
|
+ { label: "下限值", prop: "lower" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ shebeijilu: {
|
|
|
|
+ url: "/api/v1/op/operationEquit",
|
|
|
|
+ column: [
|
|
|
|
+ {
|
|
|
|
+ label: "工序id",
|
|
|
|
+ prop: "operationId",
|
|
|
|
+ display: false,
|
|
|
|
+ hide: true,
|
|
|
|
+ value: id,
|
|
|
|
+ },
|
|
|
|
+ { label: "精度要求", prop: "accuracy" },
|
|
|
|
+ { label: "所需数量", prop: "num", display: false, hide: true },
|
|
|
|
+ {
|
|
|
|
+ label: "设备类型",
|
|
|
|
+ prop: "equitType",
|
|
|
|
+ search: true,
|
|
|
|
+ filterable: true,
|
|
|
|
+ type: "select",
|
|
|
|
+ dataType: "string",
|
|
|
|
+ dicData: dicts.device_type,
|
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "必须采集",
|
|
|
|
+ prop: "collection",
|
|
|
|
+ type: "radio", //类型为单选框
|
|
|
|
+ dicData: [
|
|
|
|
+ {
|
|
|
|
+ label: "必须",
|
|
|
|
+ value: 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "非必须",
|
|
|
|
+ value: 0,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ value: 1,
|
|
|
|
+ rules: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "是否必须采集",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ESOP: {
|
|
|
|
+ url: "/api/v1/op/esop",
|
|
|
|
+ column: [
|
|
|
|
+ {
|
|
|
|
+ label: "工序id",
|
|
|
|
+ prop: "operationId",
|
|
|
|
+ display: false,
|
|
|
|
+ hide: true,
|
|
|
|
+ value: id,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ { label: "标题", prop: "title", addDisabled: true, editDisabled: true },
|
|
|
|
+ { label: "展示页数", prop: "showAppointPageNum", type: "number" },
|
|
|
|
+ { label: "总页数", prop: "pageNum", type: "number" },
|
|
|
|
+ {
|
|
|
|
+ label: "版本号", prop: "recordVersion", type: "number", addDisabled: true, editDisabled: true,
|
|
|
|
+ rules: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "版本号",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ { label: "图纸编码", prop: "drawingCode", hide: true, addDisabled: true, editDisabled: true, },
|
|
|
|
+ { label: "内容", prop: "content", hide: true,addDisabled: true, editDisabled: true, },
|
|
|
|
+ { label: "排序", prop: "sortNum", hide: true,addDisabled: true, editDisabled: true, },
|
|
|
|
+ {
|
|
|
|
+ label: "文件",
|
|
|
|
+ prop: "filePath",
|
|
|
|
+ span: 24,
|
|
|
|
+ type: "img",
|
|
|
|
+ slot: true,
|
|
|
|
+ viewDisplay: false,
|
|
|
|
+ addDisabled: true, editDisabled: true
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ };
|
|
};
|
|
};
|
|
|
|
|
|
// 工艺工序组件路径的组件类别
|
|
// 工艺工序组件路径的组件类别
|
|
interface comType {
|
|
interface comType {
|
|
- compentName: string;
|
|
|
|
- compentType: string;
|
|
|
|
|
|
+ compentName : string;
|
|
|
|
+ compentType : string;
|
|
}
|
|
}
|
|
-export const comTypes: comType[] = [
|
|
|
|
- {
|
|
|
|
- compentName: "记录项",
|
|
|
|
- compentType: "jiluxiang",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "物料采集",
|
|
|
|
- compentType: "wuliaocaiji",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "ESOP",
|
|
|
|
- compentType: "ESOP",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "点检",
|
|
|
|
- compentType: "dianjian",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "设备记录",
|
|
|
|
- compentType: "shebeijilu",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "紧固",
|
|
|
|
- compentType: "jingu",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "调试配对",
|
|
|
|
- compentType: "tiaoshipipei",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "铭牌绑定",
|
|
|
|
- compentType: "mingpai",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "多媒体采集",
|
|
|
|
- compentType: "duomeiticaiji",
|
|
|
|
- },
|
|
|
|
-];
|
|
|
|
|
|
+export const comTypes : comType[] = [
|
|
|
|
+ {
|
|
|
|
+ compentName: "记录项",
|
|
|
|
+ compentType: "jiluxiang",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "物料采集",
|
|
|
|
+ compentType: "wuliaocaiji",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "ESOP",
|
|
|
|
+ compentType: "ESOP",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "点检",
|
|
|
|
+ compentType: "dianjian",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "设备记录",
|
|
|
|
+ compentType: "shebeijilu",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "紧固",
|
|
|
|
+ compentType: "jingu",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "调试配对",
|
|
|
|
+ compentType: "tiaoshipipei",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "铭牌绑定",
|
|
|
|
+ compentType: "mingpai",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ compentName: "多媒体采集",
|
|
|
|
+ compentType: "duomeiticaiji",
|
|
|
|
+ },
|
|
|
|
+];
|