123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456 |
- import { useDictionaryStore } from "@/store";
- const { dicts } = useDictionaryStore();
- 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",
- },
- ],
- },
- ],
- },
- // 辅料采集
- fuliaoCJ: {
- url: "/api/v1/operationAccessoryItem",
- 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: "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" },
- {
- 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",
- min: 1,
- },
- {
- label: "总页数",
- prop: "pageNum",
- type: "number",
- hide: true,
- display: false,
- },
- {
- label: "版本号",
- prop: "recordVersion",
- type: "number",
- addDisabled: true,
- editDisabled: true,
- rules: [
- {
- required: true,
- message: "版本号",
- trigger: "blur",
- },
- ],
- precision: 1,
- },
- {
- 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,
- },
- ],
- },
- operationExcel: {
- url: "/api/v1/opExcelForm",
- column: [
- {
- label: "工序id",
- prop: "operationId",
- display: false,
- hide: true,
- value: id,
- },
- {
- label: "模版名称",
- prop: "formName",
- addDisabled: true,
- editDisabled: true,
- },
- {
- label: "模版类型",
- prop: "formType",
- addDisabled: true,
- editDisabled: true,
- dicData: dicts.excel_type,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "模版数据",
- prop: "pageNum",
- addDisabled: true,
- editDisabled: true,
- },
- {
- label: "修改时间",
- prop: "updated",
- addDisabled: true,
- editDisabled: true,
- },
- {
- label: "操作人",
- prop: "updator",
- addDisabled: true,
- editDisabled: true,
- },
- ],
- },
- };
- };
- // 工艺工序组件路径的组件类别
- interface comType {
- compentName: string;
- compentType: string;
- index: number;
- }
- export const comTypes: comType[] = [
- {
- compentName: "物料采集",
- compentType: "wuliaocaiji",
- index: 0,
- },
- {
- compentName: "设备记录",
- compentType: "shebeijilu",
- index: 3,
- },
- {
- compentName: "设备数据",
- compentType: "ceshishuju",
- index: 6,
- },
- {
- compentName: "点检",
- compentType: "dianjian",
- index: 9,
- },
- {
- compentName: "记录项",
- compentType: "jiluxiang",
- index: 12,
- },
- // {
- // compentName: "辅料采集",
- // compentType: "fuliaoCJ",
- // },
- // {
- // compentName: "紧固",
- // compentType: "jingu",
- // },
- // {
- // compentName: "调试配对",
- // compentType: "tiaoshipipei",
- // },
- /*{
- compentName: "铭牌绑定",
- compentType: "mingpai",
- },*/
- {
- compentName: "工序表单",
- compentType: "operationExcel",
- index: 15,
- },
- // {
- // compentName: "数据采集",
- // compentType: "screwdriver",
- // },
- {
- compentName: "工序文件",
- compentType: "gongxuwenjian",
- index: 18,
- },
- {
- compentName: "多媒体采集",
- compentType: "duomeiticaiji",
- index: 21,
- },
- {
- compentName: "ESOP",
- compentType: "ESOP",
- index: 24,
- },
- ];
|