const pipeTableState = reactive({
selectedRowKeys: [],
selectedRows: [],
toolbar: {
buttons: [
{
code: "insertPipe",
status: "primary",
icon: "PlusOutlined",
name: "添加物量"
},
{
code: "deletePipe",
status: "danger",
icon: "DeleteOutlined",
name: "删除"
}
]
},
columns: [
{
title: "项目",
dataIndex: "projectNo",
width: 50,
type: "project",
options: {
options: [],
fieldNames: {label: "projId", value: "projId"}
},
decorator: {rules: [{required: true, message: "请选择项目!"}]}
},
{
title: "小票号",
dataIndex: "pipeNo",
conditionNotice: "%匹配,逗号相连",
width: 150
},
{
title: "版本号",
dataIndex: "pipeVersion",
width: 60
},
{
title: "最新版",
dataIndex: "isTopVersion",
width: 60,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
decorator: {initialValue: 'Y'}
},
{
title: "是否删除",
dataIndex: "isDelete",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
decorator: {initialValue: 'N'}
},
{
title: "是否暂停",
dataIndex: "isPause",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
decorator: {initialValue: 'N'}
},
{
title: "暂停原因",
dataIndex: "pauseReason",
width: 100
},
{
title: "暂停备注",
dataIndex: "pauseRemark",
width: 100
},
{
title: "暂停人",
width: 70,
dataIndex: "pauseUserNo",
type: "employeeDescription",
options: {
fieldNames: {
label: "pauseUserName",
value: "pauseUserNo"
}
}
},
{
title: "暂停时间",
dataIndex: "pauseDate",
width: 80,
type: "date"
},
{
title: "预计解除暂停日期",
dataIndex: "preResumeDate",
width: 120,
type: "date"
},
{
title: "解除暂停时间",
dataIndex: "resumeDate",
width: 100,
type: "date"
},
{
title: "解除暂停人",
width: 80,
dataIndex: "resumeUserNo",
type: "employeeDescription",
options: {
fieldNames: {
label: "resumeUserName",
value: "resumeUserNo"
}
}
},
{
title: "图号",
dataIndex: "drawNo",
width: 170
},
{
title: "最新图号",
dataIndex: "lastDrawNo",
width: 170
},
{
title: "原图图号",
dataIndex: "originDrawNo",
width: 170
},
{
title: "修改图号",
dataIndex: "modifyDrawNo",
width: 170
},
{
title: "修改图页号",
dataIndex: "modifyDrawPageNo",
width: 80
},
{
title: "技术施工阶段",
dataIndex: "instStage",
width: 100
},
{
title: "系统代码",
dataIndex: "systemNo",
width: 100
},
{
title: "系统名称",
dataIndex: "systemName",
width: 100
},
{
title: "页号",
dataIndex: "pageNo",
width: 50
},
{
title: "属性",
dataIndex: "pipeGrade",
width: 100
},
{
title: "管路等级",
type: 'select',
dataIndex: "pipeClass",
options: {options: [{value: 'I', label: "I"}, {value: 'II', label: "II"}, {value: 'III', label: "III"}]},
width: 80
},
{
title: "测试压力",
dataIndex: "testPressure",
width: 100
},
{
title: "管径壁厚",
dataIndex: "pipeDiaThickness",
width: 100
},
{
title: "长度",
dataIndex: "length",
width: 50
},
{
title: "重量",
dataIndex: "weight",
width: 70
},
{
title: "技术处理方式",
dataIndex: "treatment",
width: 90
},
{
title: "是否通舱件",
dataIndex: "isThroughCabin",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
},
{
title: "内表面积",
dataIndex: "inSurface",
width: 80
},
{
title: "外表面积",
dataIndex: "outSurface",
width: 80
},
{
title: "舱室代码",
dataIndex: "cabinNo",
width: 80
},
{
title: "分段",
dataIndex: "block",
width: 50
},
{
title: "材质",
dataIndex: "matDefinition",
width: 100,
},
{
title: "修改方式",
dataIndex: "modifyType",
width: 100
},
{
title: "内场涂装",
dataIndex: "inPaintNo",
width: 100
},
{
title: "外场涂装",
dataIndex: "outPaintNo",
width: 100
},
{
title: "是否裸管",
dataIndex: "isBarePipe",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
},
{
title: "模型管线号",
dataIndex: "pipelineNo",
width: 170
},
{
title: "管线号",
dataIndex: "pipeRun",
width: 170
},
{
title: "管线短号",
dataIndex: "pipeRunShort",
width: 100
},
{
title: "寸口数",
dataIndex: "inch",
width: 80
},
{
title: "内场寸口数",
dataIndex: "inInch",
width: 100
},
{
title: "外场寸口数",
dataIndex: "outInch",
width: 100
},
{
title: "设计大区域",
dataIndex: "largeArea",
width: 100
},
{
title: "设计中区域",
dataIndex: "area",
width: 100
},
{
title: "设计房间号",
dataIndex: "roomNo",
width: 100
},
{
title: "房间描述",
dataIndex: "roomDesp",
width: 120
},
{
title: "舾装片体",
dataIndex: "sheet",
width: 80
},
{
title: "邻壁房间",
dataIndex: "linkRoomNo",
width: 80
},
{
title: "邻壁分段",
dataIndex: "linkBlock",
width: 80
},
{
title: "安装类型",
dataIndex: "instType",
width: 80
},
{
title: "绝缘属性",
dataIndex: "insulation",
width: 80
},
{
title: "流体类型",
dataIndex: "fluidType",
width: 80
},
{
title: "清洁方式",
dataIndex: "cleaningMethod",
width: 80
},
{
title: "高度值",
dataIndex: "elevation",
width: 80
},
{
title: "是否化学清洗",
dataIndex: "isChemicalCleaning",
width: 90,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
},
{
title: "Nr13",
dataIndex: "nr13",
width: 80
},
{
title: "操作温度",
dataIndex: "operationTemperature",
width: 80
},
{
title: "材质描述",
dataIndex: "materialDesp",
width: 100
},
{
title: "绝缘类型",
dataIndex: "insulationType",
width: 80
},
{
title: "绝缘厚度",
dataIndex: "insulationThick",
width: 80
},
{
title: "PID图号",
dataIndex: "pidDrawNo",
width: 170
},
{
title: "船东规格书",
dataIndex: "pipingClass",
width: 120
},
{
title: "安装三维坐标X",
dataIndex: "instLocationX",
width: 120
},
{
title: "安装三维坐标Y",
dataIndex: "instLocationY",
width: 120
},
{
title: "安装三维坐标Z",
dataIndex: "instLocationZ",
width: 120
},
{
title: "空间代码",
dataIndex: "spaceNo",
width: 80
},
{
title: "设计备注",
dataIndex: "designRemark",
width: 120
},
{
title: "油漆面积影响",
dataIndex: "paintingAreaImpact",
width: 100
},
{
title: "舾装件腿坐标",
dataIndex: "fittingLegCoordinate",
width: 100
},
{
title: "舾装件焊接点型材",
dataIndex: "fittingWeldedStiff",
width: 120
},
{
title: "舾装件腿数量",
dataIndex: "fittingLegQty",
width: 100
},
{
title: "操作",
key: "action",
scopedSlots: {customRender: "action"},
width: 200,
fixed: "right",
formInvisible: true,
}
],
dataSource: []
})
const addPipeTableState = reactive({
selectedRowKeys: [],
selectedRows: [],
toolbar: {
buttons: [
{
code: "addPipe",
status: 'primary',
icon: 'PlusOutlined',
name: "添加"
}
],
},
proxyConfig: {
autoLoad: false,
ajax: {
query: async (pagination) => {
addPipeConditionData = await validateSearchFields(searchAddPipePanelRef, addPipeConditionData)
return server.pipeDesignPlanPage({...pagination, ...addPipeConditionData})
}
},
},
columns: [
{
title: "项目",
dataIndex: "projectNo",
width: 50,
type: "project",
options: {
options: [],
fieldNames: {label: "projId", value: "projId"}
},
decorator: {rules: [{required: true, message: "请选择项目!"}]}
},
{
title: "小票号",
dataIndex: "pipeNo",
conditionNotice: "%匹配,逗号相连",
width: 150
},
{
title: "版本号",
dataIndex: "pipeVersion",
width: 60
},
{
title: "最新版",
dataIndex: "isTopVersion",
width: 60,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
decorator: {initialValue: 'Y'}
},
{
title: "是否删除",
dataIndex: "isDelete",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
decorator: {initialValue: 'N'}
},
{
title: "是否暂停",
dataIndex: "isPause",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
decorator: {initialValue: 'N'}
},
{
title: "暂停原因",
dataIndex: "pauseReason",
width: 100
},
{
title: "暂停备注",
dataIndex: "pauseRemark",
width: 100
},
{
title: "暂停人",
width: 70,
dataIndex: "pauseUserNo",
type: "employeeDescription",
options: {
fieldNames: {
label: "pauseUserName",
value: "pauseUserNo"
}
}
},
{
title: "暂停时间",
dataIndex: "pauseDate",
width: 80,
type: "date"
},
{
title: "预计解除暂停日期",
dataIndex: "preResumeDate",
width: 120,
type: "date"
},
{
title: "解除暂停时间",
dataIndex: "resumeDate",
width: 100,
type: "date"
},
{
title: "解除暂停人",
width: 80,
dataIndex: "resumeUserNo",
type: "employeeDescription",
options: {
fieldNames: {
label: "resumeUserName",
value: "resumeUserNo"
}
}
},
{
title: "图号",
dataIndex: "drawNo",
width: 170
},
{
title: "最新图号",
dataIndex: "lastDrawNo",
width: 170
},
{
title: "原图图号",
dataIndex: "originDrawNo",
width: 170
},
{
title: "修改图号",
dataIndex: "modifyDrawNo",
width: 170
},
{
title: "修改图页号",
dataIndex: "modifyDrawPageNo",
width: 80
},
{
title: "技术施工阶段",
dataIndex: "instStage",
width: 100
},
{
title: "系统代码",
dataIndex: "systemNo",
width: 100
},
{
title: "系统名称",
dataIndex: "systemName",
width: 100
},
{
title: "页号",
dataIndex: "pageNo",
width: 50
},
{
title: "属性",
dataIndex: "pipeGrade",
width: 100
},
{
title: "管路等级",
type: 'select',
dataIndex: "pipeClass",
options: {options: [{value: 'I', label: "I"}, {value: 'II', label: "II"}, {value: 'III', label: "III"}]},
width: 80
},
{
title: "测试压力",
dataIndex: "testPressure",
width: 100
},
{
title: "管径壁厚",
dataIndex: "pipeDiaThickness",
width: 100
},
{
title: "长度",
dataIndex: "length",
width: 50
},
{
title: "重量",
dataIndex: "weight",
width: 70
},
{
title: "技术处理方式",
dataIndex: "treatment",
width: 90
},
{
title: "是否通舱件",
dataIndex: "isThroughCabin",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
},
{
title: "内表面积",
dataIndex: "inSurface",
width: 80
},
{
title: "外表面积",
dataIndex: "outSurface",
width: 80
},
{
title: "舱室代码",
dataIndex: "cabinNo",
width: 80
},
{
title: "分段",
dataIndex: "block",
width: 50
},
{
title: "材质",
dataIndex: "matDefinition",
width: 100,
},
{
title: "修改方式",
dataIndex: "modifyType",
width: 100
},
{
title: "内场涂装",
dataIndex: "inPaintNo",
width: 100
},
{
title: "外场涂装",
dataIndex: "outPaintNo",
width: 100
},
{
title: "是否裸管",
dataIndex: "isBarePipe",
width: 80,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
},
{
title: "模型管线号",
dataIndex: "pipelineNo",
width: 170
},
{
title: "管线号",
dataIndex: "pipeRun",
width: 170
},
{
title: "管线短号",
dataIndex: "pipeRunShort",
width: 100
},
{
title: "寸口数",
dataIndex: "inch",
width: 80
},
{
title: "内场寸口数",
dataIndex: "inInch",
width: 100
},
{
title: "外场寸口数",
dataIndex: "outInch",
width: 100
},
{
title: "设计大区域",
dataIndex: "largeArea",
width: 100
},
{
title: "设计中区域",
dataIndex: "area",
width: 100
},
{
title: "设计房间号",
dataIndex: "roomNo",
width: 100
},
{
title: "房间描述",
dataIndex: "roomDesp",
width: 120
},
{
title: "舾装片体",
dataIndex: "sheet",
width: 80
},
{
title: "邻壁房间",
dataIndex: "linkRoomNo",
width: 80
},
{
title: "邻壁分段",
dataIndex: "linkBlock",
width: 80
},
{
title: "安装类型",
dataIndex: "instType",
width: 80
},
{
title: "绝缘属性",
dataIndex: "insulation",
width: 80
},
{
title: "流体类型",
dataIndex: "fluidType",
width: 80
},
{
title: "清洁方式",
dataIndex: "cleaningMethod",
width: 80
},
{
title: "高度值",
dataIndex: "elevation",
width: 80
},
{
title: "是否化学清洗",
dataIndex: "isChemicalCleaning",
width: 90,
type: 'select',
options: {options: [{value: 'Y', label: "Y"}, {value: 'N', label: "N"}]},
},
{
title: "Nr13",
dataIndex: "nr13",
width: 80
},
{
title: "操作温度",
dataIndex: "operationTemperature",
width: 80
},
{
title: "材质描述",
dataIndex: "materialDesp",
width: 100
},
{
title: "绝缘类型",
dataIndex: "insulationType",
width: 80
},
{
title: "绝缘厚度",
dataIndex: "insulationThick",
width: 80
},
{
title: "PID图号",
dataIndex: "pidDrawNo",
width: 170
},
{
title: "船东规格书",
dataIndex: "pipingClass",
width: 120
},
{
title: "安装三维坐标X",
dataIndex: "instLocationX",
width: 120
},
{
title: "安装三维坐标Y",
dataIndex: "instLocationY",
width: 120
},
{
title: "安装三维坐标Z",
dataIndex: "instLocationZ",
width: 120
},
{
title: "空间代码",
dataIndex: "spaceNo",
width: 80
},
{
title: "设计备注",
dataIndex: "designRemark",
width: 120
},
{
title: "油漆面积影响",
dataIndex: "paintingAreaImpact",
width: 100
},
{
title: "舾装件腿坐标",
dataIndex: "fittingLegCoordinate",
width: 100
},
{
title: "舾装件焊接点型材",
dataIndex: "fittingWeldedStiff",
width: 120
},
{
title: "舾装件腿数量",
dataIndex: "fittingLegQty",
width: 100
},
{
title: "操作",
key: "action",
scopedSlots: {customRender: "action"},
width: 200,
fixed: "right",
formInvisible: true,
}
],
})
两个columns是相同的,提取出来,然后一起引用