|
|
|
@ -67,11 +67,11 @@ export default { |
|
|
|
}, |
|
|
|
getRegentItem(item, fieldCode = "type") { |
|
|
|
const type = item[fieldCode]; |
|
|
|
console.log(item, "type") |
|
|
|
const fillType = fieldCode === "type" ? item.fillType : (item.subFillType || item.fillType); |
|
|
|
return { |
|
|
|
label: "", |
|
|
|
type, |
|
|
|
fillType: item.subFillType || item.fillType, |
|
|
|
fillType, |
|
|
|
parentLabel: item.label, |
|
|
|
filledCodes: item.filledCodes, |
|
|
|
qxbdType: item.qxbdType, |
|
|
|
@ -184,6 +184,20 @@ export default { |
|
|
|
} |
|
|
|
return config; |
|
|
|
}, |
|
|
|
//获取第三个的配置
|
|
|
|
getThirdItem(sItem) { |
|
|
|
const config = { |
|
|
|
label: "", |
|
|
|
options: sItem.thirdOptions || [], |
|
|
|
fillType: sItem.thirdFillType, |
|
|
|
parentLabel: sItem.label, |
|
|
|
maxlength: sItem.thirdMaxlength || 50, |
|
|
|
} |
|
|
|
if (sItem.thirdDisabled) { |
|
|
|
config.disabled = sItem.thirdDisabled; |
|
|
|
} |
|
|
|
return config; |
|
|
|
}, |
|
|
|
// 根据formConfig回填form表单数据
|
|
|
|
handleFormField(update = false) { |
|
|
|
const result = {}; |
|
|
|
@ -235,6 +249,24 @@ export default { |
|
|
|
} |
|
|
|
config[subKey] = { label: currentConfig.label, subKey, type: currentConfig.subType, fillType: currentConfig.subFillType || currentConfig.fillType, selectTo: currentConfig.selectTo } |
|
|
|
} |
|
|
|
if(currentConfig.thirdKey){ |
|
|
|
const { thirdKey } = currentConfig; |
|
|
|
if (update) { |
|
|
|
result[thirdKey] = formFields[thirdKey] || formData[thirdKey] || ''; |
|
|
|
} else { |
|
|
|
result[thirdKey] = formFields[thirdKey] || formData[thirdKey] || ''; |
|
|
|
} |
|
|
|
config[thirdKey] = { label: currentConfig.label, thirdKey, type: currentConfig.thirdType, fillType: currentConfig.thirdFillType, selectTo: currentConfig.selectTo } |
|
|
|
} |
|
|
|
if(currentConfig.fourthKey){ |
|
|
|
const { fourthKey } = currentConfig; |
|
|
|
if (update) { |
|
|
|
result[fourthKey] = formFields[fourthKey] || formData[fourthKey] || ''; |
|
|
|
} else { |
|
|
|
result[fourthKey] = formFields[fourthKey] || formData[fourthKey] || ''; |
|
|
|
} |
|
|
|
config[fourthKey] = { label: currentConfig.label, fourthKey, type: currentConfig.fourthType, fillType: currentConfig.fourthFillType, selectTo: currentConfig.selectTo } |
|
|
|
} |
|
|
|
|
|
|
|
// 检查compareTo字段
|
|
|
|
if (currentConfig.compareTo && formData[currentConfig.compareTo] && result[key]) { |
|
|
|
|