Commit f5a82e06 by zhaochengxiang

bug fix

parent de9391bf
...@@ -137,7 +137,8 @@ const FC = (props) => { ...@@ -137,7 +137,8 @@ const FC = (props) => {
type: 'assetmanage.getTemplates', type: 'assetmanage.getTemplates',
callback: data => { callback: data => {
setLoadingTemplates(false) setLoadingTemplates(false)
setTemplates(data) //未挂载资产屏蔽岗位
setTemplates((data??[]).filter(item=>item.type!=='post'))
if ((data??[]).length > 0) { if ((data??[]).length > 0) {
LocalStorage.set(`templateType-${appId}`, data[0].type) LocalStorage.set(`templateType-${appId}`, data[0].type)
setTemplateValue(data[0].type) setTemplateValue(data[0].type)
......
...@@ -1420,38 +1420,40 @@ const AssetAction = (props) => { ...@@ -1420,38 +1420,40 @@ const AssetAction = (props) => {
> >
{ {
(currentAction==='add'||currentAction==='edit') ? (currentAction==='add'||currentAction==='edit') ?
<Row gutter={8} align='middle'> <div className='flex' style={{ alignItems: 'center' }}>
<Col span={22}> <div style={{ flex: 1 }}>
<Form.Item <Form.Item
label='' label=''
name={element.name} name={element.name}
rules={[{ required: element.required === '是' }]} rules={[{ required: element.required === '是' }]}
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
> >
{elementEditComponent(element)} { elementEditComponent(element) }
</Form.Item> </Form.Item>
</Col> </div>
<div style={{ flex: '0 0 auto', marginLeft: 10, width: 16 }}>
{ {
element.interpretation && <Col span={2}> element.interpretation ?
<Tooltip placement="left" title={element.interpretation}> <Tooltip placement="left" title={element.interpretation}>
<QuestionCircleOutlined style={{ fontSize: 16 }} /> <QuestionCircleOutlined style={{ fontSize: 16 }} />
</Tooltip> </Tooltip> : <></>
</Col>
} }
</Row> </div>
</div>
: <React.Fragment> : <React.Fragment>
<Row gutter={8} align='middle'> <div className='flex' style={{ alignItems: 'center' }}>
<Col span={22}> <div style={{ flex: 1 }}>
{ elementDetailComponent(element, publishedElement) } { elementDetailComponent(element, publishedElement) }
</Col> </div>
<div style={{ flex: '0 0 auto', marginLeft: 10, width: 16 }}>
{ {
element.interpretation && <Col span={2}> element.interpretation &&
<Tooltip placement="left" title={element.interpretation}> <Tooltip placement="left" title={element.interpretation}>
<QuestionCircleOutlined style={{ fontSize: 16 }} /> <QuestionCircleOutlined style={{ fontSize: 16 }} />
</Tooltip> </Tooltip>
</Col>
} }
</Row> </div>
</div>
</React.Fragment> </React.Fragment>
} }
</Descriptions.Item> </Descriptions.Item>
......
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