|
@@ -31,11 +31,11 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
|
|
|
// 页面数据
|
|
|
var formDataList = new Array<ModelConfigModel>;
|
|
|
-
|
|
|
+
|
|
|
useEffect(() => {
|
|
|
|
|
|
}, []);
|
|
|
-
|
|
|
+
|
|
|
// 修改查询查询
|
|
|
const selectData = async (formdata : ModelConfigModel) => {
|
|
|
const data = await selectDetailData(formdata);
|
|
@@ -45,13 +45,13 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
}
|
|
|
|
|
|
// 删除
|
|
|
- const delRows =async(record:any)=>{
|
|
|
+ const delRows =async(record:any)=>{
|
|
|
baseFun.confirm('确认删除?',async() =>{
|
|
|
await deleteRows(record);
|
|
|
baseFun.info("删除成功");
|
|
|
closeAndRefresh();
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//关闭窗口刷新父页面
|
|
@@ -74,41 +74,41 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
}
|
|
|
setDetailVisible(false);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 页面展示元素
|
|
|
const columns: ProColumns<ModelConfigModel>[] = [
|
|
|
{
|
|
|
- title: '模型名称',
|
|
|
+ title: '模型名称',
|
|
|
dataIndex: 'modelName',
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '模型编号',
|
|
|
+ title: '模型编号',
|
|
|
dataIndex: 'modelNo',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
valueType:'switch'
|
|
|
},
|
|
|
{
|
|
|
- title: '模型所属产品',
|
|
|
+ title: '模型所属产品',
|
|
|
dataIndex: 'modelProduct',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '模型类型',
|
|
|
+ title: '模型类型',
|
|
|
dataIndex: 'modelType',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '模型说明',
|
|
|
+ title: '模型说明',
|
|
|
dataIndex: 'modelDescribe',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '结果公式',
|
|
|
+ title: '结果公式',
|
|
|
dataIndex: 'resultFormula',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
@@ -124,7 +124,7 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
icon={<WomanOutlined />}
|
|
|
successMessage=""
|
|
|
onClick={
|
|
|
- ()=>{
|
|
|
+ ()=>{
|
|
|
selectData(record);
|
|
|
setDetailVisible(true);
|
|
|
setEditType('update');
|
|
@@ -140,7 +140,7 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
>
|
|
|
删除
|
|
|
</SDOperate>,
|
|
|
-
|
|
|
+
|
|
|
],
|
|
|
},
|
|
|
|
|
@@ -150,13 +150,13 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
// 输入参数页面展示元素
|
|
|
const targetListColumns: ProColumns<TargetListModel>[] = [
|
|
|
{
|
|
|
- title: '指标清单编号',
|
|
|
+ title: '指标清单编号',
|
|
|
dataIndex: 'indexListNo',
|
|
|
search: false,
|
|
|
hideInTable:true
|
|
|
},
|
|
|
{
|
|
|
- title: '指标',
|
|
|
+ title: '指标',
|
|
|
dataIndex: 'indexNo',
|
|
|
search: false,
|
|
|
request:()=>fetchDict('@selectAllIndexToDict'),
|
|
@@ -165,7 +165,7 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- title: '指标来源',
|
|
|
+ title: '指标来源',
|
|
|
dataIndex: 'indexSource',
|
|
|
hideInTable: false,
|
|
|
request:()=>fetchDict('INDEXLISTSOURCETYPE'),
|
|
@@ -174,13 +174,13 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- title: '指标说明',
|
|
|
+ title: '指标说明',
|
|
|
dataIndex: 'indexDescribe',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '指标分档',
|
|
|
+ title: '指标分档',
|
|
|
dataIndex: 'indexGrade',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
@@ -194,7 +194,7 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
// ],
|
|
|
},
|
|
|
// {
|
|
|
- // title: '指标分值',
|
|
|
+ // title: '指标分值',
|
|
|
// dataIndex: 'indexScore',
|
|
|
// search: false,
|
|
|
// hideInTable: false,
|
|
@@ -227,24 +227,24 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
// 模型分档展示元素
|
|
|
const modelGradeColumns: ProColumns<ModelGradeModel>[] = [
|
|
|
{
|
|
|
- title: '模型分档编号',
|
|
|
+ title: '模型分档编号',
|
|
|
dataIndex: 'modelGradeNo',
|
|
|
search: false,
|
|
|
hideInTable: true,
|
|
|
},
|
|
|
{
|
|
|
- title: '等级',
|
|
|
+ title: '等级',
|
|
|
dataIndex: 'grade',
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '等级说明',
|
|
|
+ title: '等级说明',
|
|
|
dataIndex: 'gradeDescription',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '分档',
|
|
|
+ title: '分档',
|
|
|
dataIndex: 'grading',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
@@ -277,26 +277,26 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
// 输入参数页面展示元素
|
|
|
const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
{
|
|
|
- title: '指标分档编号',
|
|
|
+ title: '指标分档编号',
|
|
|
dataIndex: 'indexGradingNo',
|
|
|
search: false,
|
|
|
hideInTable: true,
|
|
|
},
|
|
|
{
|
|
|
- title: '分档区间',
|
|
|
+ title: '分档区间',
|
|
|
dataIndex: 'gradingRange',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
{
|
|
|
- title: '指标分档',
|
|
|
+ title: '指标分档',
|
|
|
dataIndex: 'indexGrading',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
},
|
|
|
|
|
|
]
|
|
|
-
|
|
|
+
|
|
|
return (
|
|
|
<SDPage>
|
|
|
<SDTable
|
|
@@ -313,7 +313,7 @@ const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
toolBarRender={(_: any, { selectedRows }: any) => [
|
|
|
<SDButton
|
|
|
successMessage=""
|
|
|
- onClick={()=>{
|
|
|
+ onClick={()=>{
|
|
|
setEditType('create');
|
|
|
setDetailVisible(true);
|
|
|
setTargetList([]);
|
|
@@ -330,7 +330,7 @@ const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
/>
|
|
|
|
|
|
{detailVisible && (
|
|
|
- <SDModalForm
|
|
|
+ <SDModalForm
|
|
|
title={'详细信息'}
|
|
|
editType={editType}
|
|
|
params={currentRow}
|
|
@@ -349,7 +349,8 @@ const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
formRef={formRef}
|
|
|
>
|
|
|
<SDAreaTtile title='模型配置'/>
|
|
|
- <SDFormText name="modelName" readonlyCond="update" required={true} rules={[{validator:validateFun.chineseRex,message:'请输入中文'}]} label="模型名称"/>
|
|
|
+ {/*rules={[{validator:validateFun.chineseRex,message:'请输入中文'}]}*/}
|
|
|
+ <SDFormText name="modelName" readonlyCond="update" required={true} label="模型名称"/>
|
|
|
<SDFormText name="modelNo" rules={[{required:true},{validator:validateFun.number,message:'请输入数字'}]} label="模型编号"/>
|
|
|
<SDFormDict dictKey="org" name="modelProduct" rules={[{required:true}]} label="模型所属产品"/>
|
|
|
<SDFormText name="modelType" label="模型类型"/>
|
|
@@ -369,10 +370,10 @@ const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
{
|
|
|
position:'bottom',
|
|
|
record: () => {
|
|
|
- return ({
|
|
|
+ return ({
|
|
|
indexListNo: (Math.random() * 1000000).toFixed(0),
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -398,7 +399,7 @@ const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
</SDModalForm>
|
|
|
)}
|
|
|
</SDPage>
|
|
|
-
|
|
|
+
|
|
|
);
|
|
|
}
|
|
|
-export default modelconfig;
|
|
|
+export default modelconfig;
|