|
@@ -145,6 +145,18 @@ export const IndexDataSet = () => {
|
|
|
/** 数据预览筛选条件回调 */
|
|
|
const onChange = useCallback(() => {}, [])
|
|
|
|
|
|
+
|
|
|
+ /** 选择模型回调*/
|
|
|
+ const onChangeModal = useCallback((id) => {
|
|
|
+ // 获取模型明细
|
|
|
+ dispatch(getModalInfo({
|
|
|
+ id,
|
|
|
+ resolve(data) {
|
|
|
+ updateNodesState(modalToNodes(data, 1))
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ }, [getNodesState])
|
|
|
+
|
|
|
/** 选择模型回调*/
|
|
|
const onSelectModal = useCallback((id) => {
|
|
|
// 获取模型明细
|
|
@@ -153,7 +165,7 @@ export const IndexDataSet = () => {
|
|
|
resolve(data) {
|
|
|
updateNodesState([
|
|
|
...getNodesState,
|
|
|
- ...modalToNodes(data, selected.current.length)
|
|
|
+ ...modalToNodes(data, selected?.current?.length)
|
|
|
])
|
|
|
}
|
|
|
}))
|
|
@@ -485,20 +497,27 @@ export const IndexDataSet = () => {
|
|
|
<Space style={{marginBottom: 10}}>
|
|
|
<Search placeholder={t("placeholder.keyword")} style={{width: 300}}/>
|
|
|
<Select
|
|
|
- mode="multiple"
|
|
|
style={{width: 400}}
|
|
|
- maxTagCount='responsive'
|
|
|
placeholder={t("placeholder.model")}
|
|
|
- onSelect={onSelectModal}
|
|
|
- onDeselect={onDeselectModal}
|
|
|
value={selected.current}
|
|
|
- onChange={(e) => selected.current=e}
|
|
|
+ onChange={onChangeModal}
|
|
|
options={memoModals}
|
|
|
/>
|
|
|
+ {/*<Select*/}
|
|
|
+ {/* mode="multiple"*/}
|
|
|
+ {/* style={{width: 400}}*/}
|
|
|
+ {/* maxTagCount='responsive'*/}
|
|
|
+ {/* placeholder={t("placeholder.model")}*/}
|
|
|
+ {/* onSelect={onSelectModal}*/}
|
|
|
+ {/* onDeselect={onDeselectModal}*/}
|
|
|
+ {/* value={selected.current}*/}
|
|
|
+ {/* onChange={(e) => selected.current=e}*/}
|
|
|
+ {/* options={memoModals}*/}
|
|
|
+ {/*/>*/}
|
|
|
</Space>
|
|
|
<Space style={{float: 'right'}}>
|
|
|
<Button>{t("button.auth")}</Button>
|
|
|
- <Button onClick={onDatasetSave}>{t("button.save")}</Button>
|
|
|
+ <Button onClick={()=>onDatasetSave(recordRef.current)}>{t("button.save")}</Button>
|
|
|
<Button type="primary" style={{backgroundColor: '#fa541c', width: 100}}>{t("button.publish")}</Button>
|
|
|
</Space>
|
|
|
<WorkFlowPanel
|