|
@@ -2,11 +2,12 @@ import React, { useEffect, useRef, useState } from "react";
|
|
|
import { type ProColumns, type ActionType, type ProFormInstance, EditableProTable } from '@ant-design/pro-components';
|
|
|
import type {FormInstance} from 'antd'
|
|
|
import { SDPage,SDFormText,SDModalForm,SDTable,SDButton,SDSubmitButton,EditType, SDAreaTtile, SDOperate, baseFun, validateFun, SDFormDict, } from "@sundata/ui-frame";
|
|
|
-import type { ModelConfigModel, TargetListModel, ModelGradeModel } from '@/services/internalEvaluation/configuration/modelconfig';
|
|
|
+import type { ModelConfigModel, TargetListModel, ModelGradeModel, IndexGradingModel } from '@/services/internalEvaluation/configuration/modelconfig';
|
|
|
import { WomanOutlined } from "@ant-design/icons";
|
|
|
import { ProductProps } from "@/sundataImport";
|
|
|
import { deleteRows, getDataList, selectDetailData, updateExistData, createData } from "@/services/internalEvaluation/configuration/modelconfig";
|
|
|
import { countChineseChars } from "../utils/rwacheckutils";
|
|
|
+import { useModel } from '@umijs/max';
|
|
|
|
|
|
type widowRush = {
|
|
|
onCancel: () => void;
|
|
@@ -26,6 +27,7 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
const templateRef = useRef<FormInstance<any>>();
|
|
|
const [targetList, setTargetList] = useState<TargetListModel[]>();
|
|
|
const [modelGradList, setModelGradList] = useState<ModelGradeModel[]>();
|
|
|
+ const { fetchDict } = useModel('dict');
|
|
|
|
|
|
// 页面数据
|
|
|
var formDataList = new Array<ModelConfigModel>;
|
|
@@ -157,11 +159,19 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
title: '指标',
|
|
|
dataIndex: 'indexNo',
|
|
|
search: false,
|
|
|
+ request:()=>fetchDict('@selectAllIndexToDict'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '指标来源',
|
|
|
dataIndex: 'indexSource',
|
|
|
hideInTable: false,
|
|
|
+ request:()=>fetchDict('INDEXLISTSOURCETYPE'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '指标说明',
|
|
@@ -174,13 +184,21 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
dataIndex: 'indexGrade',
|
|
|
search: false,
|
|
|
hideInTable: false,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // title: '分档区间',
|
|
|
+ // dataIndex: 'sumBalance',
|
|
|
+ // search: false,
|
|
|
+ // },
|
|
|
+ // { title: '指标分值', dataIndex: 'monthaverageBalance',search: false, },
|
|
|
+ // ],
|
|
|
},
|
|
|
- {
|
|
|
- title: '指标分值',
|
|
|
- dataIndex: 'indexScore',
|
|
|
- search: false,
|
|
|
- hideInTable: false,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '指标分值',
|
|
|
+ // dataIndex: 'indexScore',
|
|
|
+ // search: false,
|
|
|
+ // hideInTable: false,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '操作',
|
|
|
valueType: 'option',
|
|
@@ -256,6 +274,28 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
},
|
|
|
];
|
|
|
|
|
|
+ // 输入参数页面展示元素
|
|
|
+const indexGradingColumns: ProColumns<IndexGradingModel>[] = [
|
|
|
+ {
|
|
|
+ title: '指标分档编号',
|
|
|
+ dataIndex: 'indexGradingNo',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '分档区间',
|
|
|
+ dataIndex: 'gradingRange',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '指标分档',
|
|
|
+ dataIndex: 'indexGrading',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+
|
|
|
+]
|
|
|
|
|
|
return (
|
|
|
<SDPage>
|
|
@@ -314,7 +354,7 @@ const modelconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
<SDFormDict dictKey="org" name="modelProduct" rules={[{required:true}]} label="模型所属产品"/>
|
|
|
<SDFormText name="modelType" label="模型类型"/>
|
|
|
<SDFormText name="modelDescribe" label="模型说明"/>
|
|
|
- <SDFormText name="resultFormula" label="结果公式"/>
|
|
|
+ <SDFormText type="textarea" name="resultFormula" label="结果公式"/>
|
|
|
<SDAreaTtile title='指标清单'/>
|
|
|
<EditableProTable<TargetListModel>
|
|
|
rowKey="indexListNo"
|