修复:项目组分类仅补齐未分类并在完成后刷新列表
This commit is contained in:
@@ -268,7 +268,7 @@ export function MatchRulesDefinitionEditor({ value, onChange, metadata, readOnly
|
||||
{ title: '判断值', render: (_, condition, index) => ['IS_BLANK', 'IS_NOT_BLANK'].includes(condition.operator) ? <span className="structured-config-muted">无需填写</span> : <Input value={condition.value} onChange={event => setEditing({ ...editing, conditions: editing.conditions.map((row, rowIndex) => rowIndex === index ? { ...row, value: event.target.value } : row) })} /> },
|
||||
{ title: '', width: 82, render: (_, __, index) => <Button type="link" danger disabled={editing.conditions.length <= 1} onClick={() => setEditing({ ...editing, conditions: editing.conditions.filter((__, rowIndex) => rowIndex !== index) })}>移除</Button> },
|
||||
]} />
|
||||
<Form.Item label="处理范围"><Switch checked={editing.onlyUnclassified===true} disabled={editing.target!=='group' || rules.some(rule=>rule.id===editing.id && rule.onlyUnclassified===true)} checkedChildren="仅未分类" unCheckedChildren="全部匹配行" onChange={onlyUnclassified=>setEditing({...editing,onlyUnclassified})}/></Form.Item><div className="structured-config-form-grid" style={{ marginTop: 16 }}><Form.Item label="目标类型"><Select value={editing.target} options={targets} disabled={editing.onlyUnclassified===true} onChange={target => setEditing({ ...editing, target })} /></Form.Item><Form.Item label="匹配结果" required><Input value={editing.value} maxLength={190} onChange={event => setEditing({ ...editing, value: event.target.value })} placeholder="例如:工业电机-VCM" /></Form.Item></div>
|
||||
<Form.Item label="处理范围"><Switch checked={editing.onlyUnclassified===true} disabled={!['group','projectGroup'].includes(editing.target) || rules.some(rule=>rule.id===editing.id && rule.onlyUnclassified===true)} checkedChildren="仅未分类" unCheckedChildren="全部匹配行" onChange={onlyUnclassified=>setEditing({...editing,onlyUnclassified})}/></Form.Item><div className="structured-config-form-grid" style={{ marginTop: 16 }}><Form.Item label="目标类型"><Select value={editing.target} options={targets} disabled={editing.onlyUnclassified===true} onChange={target => setEditing({ ...editing, target })} /></Form.Item><Form.Item label="匹配结果" required><Input value={editing.value} maxLength={190} onChange={event => setEditing({ ...editing, value: event.target.value })} placeholder="例如:工业电机-VCM" /></Form.Item></div>
|
||||
{error && <Alert showIcon type="error" message={error} />}
|
||||
</Form>}
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user