Forráskód Böngészése

虚拟表格追加解决内存溢出异常

ZhangYanJie 2 hónapja
szülő
commit
86c9b233f0

+ 1 - 1
DBScript/张艳杰/001-DDL.sql

@@ -422,7 +422,7 @@ UNIT_CALC_OBJECT_NAME	VARCHAR(60)    comment '计算对象名称',
 UNIT_CALC_INFO	        VARCHAR(3000)  comment '计算对象配置',
 UNIT_DATA_TYPE	        VARCHAR(60)    comment '单元格数据类型',
 UNIT_TYPE	            VARCHAR(60)    comment '单元格类型',
-EXCEL_FORMULA	        VARCHAR(60)    comment 'Excel公式',
+EXCEL_FORMULA	        VARCHAR(3000)    comment 'Excel公式',
 ISHASURL	            VARCHAR(60)    comment '是否包含下钻功能',
  primary key (REPORT_NO,REPORT_UNIT_NO)
 ) COMMENT='报表计算单元清单表';

+ 26 - 31
Procedure/frontend/projectb/src/pages/product/report_form_config_reportcreater/reportfillingconfig.tsx

@@ -293,6 +293,7 @@ const analyseFile = async (data: ReportDefinitionModel) => {
       width:150,
       ellipsis:true,
       render: (text, record, index) => { index  = index + 1;reptId=index; return index},
+
     },
     {
       title: '所在sheet页位置',
@@ -499,7 +500,7 @@ const analyseFile = async (data: ReportDefinitionModel) => {
       dataIndex: 'unitStyleType',
       search: false,
       hideInTable: false,
-      valueType: 'treeSelect',
+      valueType: 'select',
       request: () => fetchDict('UNIT_STYLE_TYPE'),
       fieldProps: {
         treeDefaultExpandAll: true,
@@ -517,24 +518,24 @@ const analyseFile = async (data: ReportDefinitionModel) => {
       }
     },
 
-    editType == 'update' || editType == 'create'? {
-      title: '操作',
-      dataIndex: 'operate',
-      valueType: 'option',
-      render: (_, record) =>  [
-        <SDOperate
-          key="roleCfg"
-          icon={<WomanOutlined />}
-          successMessage=""
-          onClick={
-            ()=>{
-              calculateActionRef.current?.startEditable(record.reportUnitNo);
-           }}
-        >
-          编辑
-        </SDOperate>,
-      ],
-    }:{},
+    // editType == 'update' || editType == 'create'? {
+    //   title: '操作',
+    //   dataIndex: 'operate',
+    //   valueType: 'option',
+    //   render: (_, record) =>  [
+    //     <SDOperate
+    //       key="roleCfg"
+    //       icon={<WomanOutlined />}
+    //       successMessage=""
+    //       onClick={
+    //         ()=>{
+    //           calculateActionRef.current?.startEditable(record.reportUnitNo);
+    //        }}
+    //     >
+    //       编辑
+    //     </SDOperate>,
+    //   ],
+    // }:{},
   ];
 
 
@@ -669,19 +670,10 @@ const analyseFile = async (data: ReportDefinitionModel) => {
               reportNo:reportNo,
             })}
             required={true} rules={[{max:20,message:'最大长度不超过20'},]} label="报表编号"/>
-            <SDFormText name="reportName" rules={[{validator:(rules,value,callback)=>{
-            let chineseCount = countChineseChars(value);
-            if (chineseCount > 100) {
-                callback('最多100个汉字');
-            } else if (chineseCount<=0) {
-                callback('请输入汉字');
-            } else{
-              callback();
-            }
-         }}]} label="报表名称"/>
+            <SDFormText name="reportName"  label="报表名称"/>
             <SDFormDict dictKey='REPORT_TYPE' name="reportType"  label="报表类型" />
             <SDFormDict dictKey='org' name="reportOrgcode" label="所属机构"/>
-            <SDFormAttach name={"reportFile"} required={true}  label="模板文件"
+            <SDFormAttach name={"reportFile"}  label="模板文件"
             funcType={"reportuploadconfig"} filetype="" maxFileNum={1} busiPkId={busiPk}/>
             <SDFormText name="reportVersion" readonlyCond="update" label="报表版本号"/>
             <SDLayout footer={
@@ -698,7 +690,6 @@ const analyseFile = async (data: ReportDefinitionModel) => {
               // rowKey="id"
               columns={reportCalculateColumns}
               recordCreatorProps={false}
-              scroll={{ x: 1500 }}
               actionRef={fillInActionRef}
               value={fillInFormData}
               editable={{
@@ -761,6 +752,8 @@ const analyseFile = async (data: ReportDefinitionModel) => {
                 setFillInFormData([...value]);
                 //setFillInFormData([...fillList]);
               }}
+              virtual
+              scroll={{ x: 1500 , y: 500}}
            />
            </SDLayout>
           <SDAreaTtile title='需计算的单元详情'/>
@@ -770,6 +763,8 @@ const analyseFile = async (data: ReportDefinitionModel) => {
               recordCreatorProps={false}
               actionRef={calculateActionRef}
               value={calculateFormData}
+              virtual
+              scroll={{ x: 1000 , y: 500}}
            />
         </SDModalForm>
       )}