Commit a4536280 authored by 彭俊龙's avatar 彭俊龙

feat:工单自动化方案工单模板优化

parent 3c5e8c62
Pipeline #96646 failed with stages
...@@ -408,15 +408,16 @@ const CaseModify = props => { ...@@ -408,15 +408,16 @@ const CaseModify = props => {
const { formJson, values } = data[0]; const { formJson, values } = data[0];
const jsonObj = JSON.parse(formJson) const jsonObj = JSON.parse(formJson)
const formValues =vals.length > 0 ? values.map(v=> { const formValues =vals.length > 0 ? values.map(v=> {
const d = vals.find(x=> v.fieldName === x.fieldName) const d = vals.find(x=> v.fieldName === x.FieldName)
if(d){ if(d){
return { return {
...v, ...v,
fieldValue: d.fieldValue fieldValue: d.FieldValue
} }
} }
return v return v
}) : values }) : values
console.log(formValues, 'formValuesformValuesformValues');
formJsonRef.current = jsonObj formJsonRef.current = jsonObj
setSchemaValues({ values: formValues, formJson: jsonObj }); setSchemaValues({ values: formValues, formJson: jsonObj });
...@@ -1969,19 +1970,12 @@ const CaseModify = props => { ...@@ -1969,19 +1970,12 @@ const CaseModify = props => {
{configInfo.triggerType == '定时触发' && {configInfo.triggerType == '定时触发' &&
<div style={{ marginTop: '10px' }}> <div style={{ marginTop: '10px' }}>
<Space> <Space>
<span>启用工单模板</span> <span>是否填写表单</span>
<Switch checkedChildren="开启" unCheckedChildren="关闭" checked={showForm} onChange={(e)=> setShowForm(e)}/> <Switch checkedChildren="开启" unCheckedChildren="关闭" checked={showForm} onChange={(e)=> setShowForm(e)}/>
{showForm && <Button onClick={()=> setFormVisible(true)}>点击查看</Button>}
</Space> </Space>
</div> </div>
} }
{showForm && (
<div style={{ marginTop: '10px' }}>
<Space>
<span>工单移交模板:</span>
<Button onClick={()=> setFormVisible(true)}>点击查看</Button>
</Space>
</div>
)}
</div> </div>
</> </>
)} )}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment