|
@@ -107,6 +107,7 @@ const datasources: React.FC<widowRush> = (prop: widowRush) => {
|
|
closeAndRefresh();
|
|
closeAndRefresh();
|
|
}
|
|
}
|
|
setDetailVisible(false);
|
|
setDetailVisible(false);
|
|
|
|
+ setTypeStatus(0)
|
|
}
|
|
}
|
|
|
|
|
|
// 页面展示元素
|
|
// 页面展示元素
|
|
@@ -416,11 +417,13 @@ const datasources: React.FC<widowRush> = (prop: widowRush) => {
|
|
{detailVisible && (
|
|
{detailVisible && (
|
|
<SDModalForm
|
|
<SDModalForm
|
|
onValuesChange={(a,b) => {
|
|
onValuesChange={(a,b) => {
|
|
|
|
+ console.log(a.dataSourcesType);
|
|
if (a.dataSourcesType === "JDBC"){
|
|
if (a.dataSourcesType === "JDBC"){
|
|
setTypeStatus(1);
|
|
setTypeStatus(1);
|
|
}else if (a.dataSourcesType === "INTERFACE"){
|
|
}else if (a.dataSourcesType === "INTERFACE"){
|
|
setTypeStatus(2);
|
|
setTypeStatus(2);
|
|
- }else {
|
|
|
|
|
|
+ }else if (a.dataSourcesType === undefined){
|
|
|
|
+ // TODO 待修改
|
|
setTypeStatus(0);
|
|
setTypeStatus(0);
|
|
}
|
|
}
|
|
}}
|
|
}}
|
|
@@ -430,7 +433,6 @@ const datasources: React.FC<widowRush> = (prop: widowRush) => {
|
|
visible={detailVisible}
|
|
visible={detailVisible}
|
|
onVisibleChange={() => {
|
|
onVisibleChange={() => {
|
|
setDetailVisible(false)
|
|
setDetailVisible(false)
|
|
- setTypeStatus(0)
|
|
|
|
}}
|
|
}}
|
|
footer={[
|
|
footer={[
|
|
<SDSubmitButton editType={editType} formRef={formRef} doSubmit={handleSave}>保存</SDSubmitButton>,
|
|
<SDSubmitButton editType={editType} formRef={formRef} doSubmit={handleSave}>保存</SDSubmitButton>,
|
|
@@ -439,6 +441,7 @@ const datasources: React.FC<widowRush> = (prop: widowRush) => {
|
|
successMessage=''
|
|
successMessage=''
|
|
onClick={() => {
|
|
onClick={() => {
|
|
setDetailVisible(false);
|
|
setDetailVisible(false);
|
|
|
|
+ setTypeStatus(0)
|
|
}}>关闭</SDButton>
|
|
}}>关闭</SDButton>
|
|
]}
|
|
]}
|
|
tableRef={actionRef}
|
|
tableRef={actionRef}
|
|
@@ -460,8 +463,8 @@ const datasources: React.FC<widowRush> = (prop: widowRush) => {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- ]} label="数据来源编号"/>
|
|
|
|
- <SDFormText name="dataSourcesName" readonlyCond="update"
|
|
|
|
|
|
+ ]} label="数据来源编号" readonlyCond="update"/>
|
|
|
|
+ <SDFormText name="dataSourcesName"
|
|
rules={[{validator: validateFun.chineseRex, message: '请输入中文'}]} label="数据来源名称"/>
|
|
rules={[{validator: validateFun.chineseRex, message: '请输入中文'}]} label="数据来源名称"/>
|
|
<SDFormDict dictKey="DATASOURCETYPE" name="dataSourcesType" rules={[{required: true}]} label="数据来源类型"/>
|
|
<SDFormDict dictKey="DATASOURCETYPE" name="dataSourcesType" rules={[{required: true}]} label="数据来源类型"/>
|
|
{ typeStatus === 2 && <SDFormDict dictKey="@selectInterFaceData" multiple={true} name="requestInterfaces" rules={[{required: true}]}
|
|
{ typeStatus === 2 && <SDFormDict dictKey="@selectInterFaceData" multiple={true} name="requestInterfaces" rules={[{required: true}]}
|