Commit a7baffc1ded7bcd8cafa8d1fca203564ba053945

Authored by 邱嘉伟
1 parent d9b53821

feat: 与接口数据结构保持一致

@@ -244,12 +244,12 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -244,12 +244,12 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
244 }, 244 },
245 { 245 {
246 title: '默认值', 246 title: '默认值',
247 - dataIndex: 'mappingValues', 247 + dataIndex: 'valueMapping',
248 width: '15%', 248 width: '15%',
249 editable: true, 249 editable: true,
250 - key: 'mappingValues', 250 + key: 'valueMapping',
251 render: (text) => 251 render: (text) =>
252 - text || [].map((item) => { 252 + text?.mappingValues || [].map((item) => {
253 return <span key={item}>{item.indexOf('-') > -1 ? item : ''}</span>; 253 return <span key={item}>{item.indexOf('-') > -1 ? item : ''}</span>;
254 }), 254 }),
255 }, 255 },
@@ -788,7 +788,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -788,7 +788,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
788 ) : ( 788 ) : (
789 qxPropsRemark() 789 qxPropsRemark()
790 ) 790 )
791 - ) : dataIndex == 'mappingValues' ? 791 + ) : dataIndex == 'valueMapping' ?
792 qxPropsDefault() : 792 qxPropsDefault() :
793 ( 793 (
794 // @ts-ignore 794 // @ts-ignore
@@ -45,8 +45,8 @@ const valueOptions = [ @@ -45,8 +45,8 @@ const valueOptions = [
45 { key: 'BOOL', label: '布尔' }, 45 { key: 'BOOL', label: '布尔' },
46 { key: 'OBJECT', label: '对象' }, 46 { key: 'OBJECT', label: '对象' },
47 { key: 'ARRAY', label: '数组' }, 47 { key: 'ARRAY', label: '数组' },
48 -/* { key: 'ANNEX', label: '附件' },  
49 - { key: 'PIC', label: '图片' },*/ 48 + /* { key: 'ANNEX', label: '附件' },
  49 + { key: 'PIC', label: '图片' },*/
50 { key: 'FORM', label: '表单' }, 50 { key: 'FORM', label: '表单' },
51 { key: 'USER', label: '人员' }, 51 { key: 'USER', label: '人员' },
52 { key: 'ORG', label: '部门' }, 52 { key: 'ORG', label: '部门' },
@@ -267,7 +267,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -267,7 +267,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
267 if (code == 'qxProps') { 267 if (code == 'qxProps') {
268 _qxProps = value; 268 _qxProps = value;
269 } else { 269 } else {
270 - _qxProps = {...data.qxProps}; 270 + _qxProps = { ...data.qxProps };
271 _qxProps[_newCode] = value; 271 _qxProps[_newCode] = value;
272 } 272 }
273 treeList[i].qxProps = { 273 treeList[i].qxProps = {
@@ -565,12 +565,16 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -565,12 +565,16 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
565 // const _qxProps = {}; 565 // const _qxProps = {};
566 566
567 const loopChangeTree = (treeList: ParamDesignModel[]) => { 567 const loopChangeTree = (treeList: ParamDesignModel[]) => {
  568 + let newMappingValues = [];
568 for (let i = 0; i < treeList.length; i++) { 569 for (let i = 0; i < treeList.length; i++) {
569 if (treeList[i].id == data.id) { 570 if (treeList[i].id == data.id) {
570 -  
571 - treeList[i].mappingValues = val.map((item: any) => 571 + newMappingValues = val.map((item: any) =>
572 item?.extVal ? item?.extVal : item?.value, 572 item?.extVal ? item?.extVal : item?.value,
573 ); 573 );
  574 + treeList[i].valueMapping = {
  575 + ...data.valueMapping,
  576 + mappingValues: newMappingValues
  577 + }
574 treeList[i].valuesObj = val; 578 treeList[i].valuesObj = val;
575 // if (!treeList[i].qxProps) { 579 // if (!treeList[i].qxProps) {
576 // treeList[i].qxProps = _qxProps; 580 // treeList[i].qxProps = _qxProps;