소스 검색

数据源,数据集、指标页面修改

ZhangYanJie 4 달 전
부모
커밋
84f7b9ef0e

+ 18 - 3
src/pages/internalEvaluation/configuration/datasetconfig.tsx

@@ -6,7 +6,7 @@ import type { DataSetConfigModel } from '@/services/internalEvaluation/configura
 import { WomanOutlined } from "@ant-design/icons";
 import { ProductProps } from "@/sundataImport";
 import { deleteRows, getDataList, selectDetailData, updateExistData, createData } from "@/services/internalEvaluation/configuration/datasetconfig";
-import { countChineseChars } from "../utils/rwacheckutils";
+import { countChineseChars, firstCharIsNotNumber } from "../utils/rwacheckutils";
 
 type widowRush = {
   onCancel:  () => void;
@@ -168,9 +168,24 @@ const datasetconfig : React.FC<widowRush> = (prop:widowRush) => {
           formRef={formRef}
         >
             <SDAreaTtile title='数据集配置信息'/>
-            <SDFormText name="dataSetNo"  readonlyCond="update" required={true} rules={[{required:true}, {validator:validateFun.number,message:'请输入数字'}]} label="数据集编号"/>
+            <SDFormText name="dataSetNo"  readonlyCond="update" required={true} rules={[
+          { required: true, message: '请输入编号' },
+          {
+            validator:validateFun.account
+          },
+          {
+            validator: (rule, value, callback)=> {
+              if (firstCharIsNotNumber(value)>0) {
+                callback('编号不能以数字开头');
+              } else {
+                callback();
+              }
+
+            }
+          }
+        ]} label="数据集编号"/>
             <SDFormText name="dataSetName" rules={[{validator:validateFun.chineseRex,message:'请输入中文'}]} label="数据集名称"/>
-            <SDFormDict dictKey="org" name="dataSourcesNo" rules={[{required:true}]} label="数据源编号"/>
+            <SDFormDict dictKey="@selectDataSource" name="dataSourcesNo" rules={[{required:true}]} label="数据源编号"/>
         </SDModalForm>
       )}
         </SDPage>

+ 18 - 3
src/pages/internalEvaluation/configuration/datasources.tsx

@@ -6,7 +6,7 @@ import type { DataSourcesModel, QueryLogicModel, DataItemConfigModel, InputParam
 import { WomanOutlined } from "@ant-design/icons";
 import { ProductProps } from "@/sundataImport";
 import { deleteRows, getDataList, selectDetailData, updateExistData, createData } from "@/services/internalEvaluation/configuration/datasources";
-import { countChineseChars } from "../utils/rwacheckutils";
+import { countChineseChars, firstCharIsNotNumber } from "../utils/rwacheckutils";
 
 type widowRush = {
   onCancel:  () => void;
@@ -383,8 +383,23 @@ const datasources : React.FC<widowRush> = (prop:widowRush) => {
         >
             <SDAreaTtile title='数据来源信息'/>
             <SDFormText name="dataSourcesName"  readonlyCond="update" required={true} rules={[{validator:validateFun.chineseRex,message:'请输入中文'}]} label="数据来源名称"/>
-            <SDFormText name="dataSourcesNo" rules={[{required:true},{validator:validateFun.number,message:'请输入数字'}]} label="数据来源编号"/>
-            <SDFormDict dictKey="org" name="dataSourcesType" rules={[{required:true}]} label="数据来源类型"/>
+            <SDFormText name="dataSourcesNo" rules={[
+          { required: true, message: '请输入编号' },
+          {
+            validator:validateFun.account
+          },
+          {
+            validator: (rule, value, callback)=> {
+              if (firstCharIsNotNumber(value)>0) {
+                callback('编号不能以数字开头');
+              } else {
+                callback();
+              }
+
+            }
+          }
+        ]} label="数据来源编号"/>
+            <SDFormDict dictKey="DATASOURCETYPE" name="dataSourcesType" rules={[{required:true}]} label="数据来源类型"/>
             <SDFormDict dictKey="@selectInterFaceData" name="dataSources" rules={[{required:true}]} label="数据源(请求接口)"/>
             <SDAreaTtile title='输入参数'/>
             <EditableProTable<InputParamModel>

+ 1 - 1
src/pages/internalEvaluation/configuration/indexconfig.tsx

@@ -170,7 +170,7 @@ const indexconfig : React.FC<widowRush> = (prop:widowRush) => {
           dataIndex: 'dataSourceType',
           search: false,
           hideInTable: false,
-          request:()=>fetchDict('org'),
+          request:()=>fetchDict('INDEXSOURCETYPE'),
           valueType:'select',
           fieldProps: {
              treeDefaultExpandAll: true,