@bit-sun/business-component 2.2.0-alpha.12 → 2.2.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios';
2
2
  import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, Popover, Card, Avatar, Image, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col, Tabs, Affix } from 'antd';
3
3
  import _, { omit, debounce, cloneDeep as cloneDeep$1, isEmpty } from 'lodash';
4
- import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef, Fragment } from 'react';
4
+ import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef } from 'react';
5
5
  import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
6
6
  import { UnorderedListOutlined, ProfileTwoTone, ExclamationCircleOutlined, DownOutlined, CopyOutlined, SearchOutlined, CaretLeftOutlined, CloseCircleOutlined, ArrowLeftOutlined, FolderOutlined, EllipsisOutlined, CaretDownOutlined, HomeOutlined, DoubleLeftOutlined, DoubleRightOutlined, MenuUnfoldOutlined, DashOutlined, SettingOutlined, BulbOutlined, PlayCircleOutlined, SaveOutlined, FullscreenExitOutlined } from '@ant-design/icons';
7
7
  import { useDebounceFn, useMount } from 'ahooks';
@@ -30619,10 +30619,38 @@ function faltCustomerFieldRange(fileds) {
30619
30619
  });
30620
30620
  return columnsValue;
30621
30621
  }
30622
+ //form存在新加container属性分组得情况 组合操作
30623
+ function combineContainer(originFields, currentFields) {
30624
+ var newCurrentFields = _toConsumableArray(originFields);
30625
+ currentFields.map(function (item) {
30626
+ if (!originFields.find(function (i) {
30627
+ var _i$container, _i$container$props, _item$container;
30628
+ return (i === null || i === void 0 ? void 0 : (_i$container = i.container) === null || _i$container === void 0 ? void 0 : (_i$container$props = _i$container.props) === null || _i$container$props === void 0 ? void 0 : _i$container$props.name) == (item === null || item === void 0 ? void 0 : (_item$container = item.container) === null || _item$container === void 0 ? void 0 : _item$container.name);
30629
+ })) {
30630
+ var _item$container2, _item$container3;
30631
+ newCurrentFields = [].concat(_toConsumableArray(newCurrentFields), [{
30632
+ container: {
30633
+ type: 'card',
30634
+ props: {
30635
+ title: item === null || item === void 0 ? void 0 : (_item$container2 = item.container) === null || _item$container2 === void 0 ? void 0 : _item$container2.title,
30636
+ level: 1,
30637
+ id: Math.random(),
30638
+ isWhiteCard: true,
30639
+ bordered: false,
30640
+ name: item === null || item === void 0 ? void 0 : (_item$container3 = item.container) === null || _item$container3 === void 0 ? void 0 : _item$container3.name
30641
+ }
30642
+ },
30643
+ fields: (item === null || item === void 0 ? void 0 : item.fields) || []
30644
+ }]);
30645
+ }
30646
+ });
30647
+ return newCurrentFields;
30648
+ }
30622
30649
  function hanleCallbackValue(codeProps, value, customerFields) {
30623
30650
  var faltFieldRange = faltCustomerFieldRange(customerFields);
30651
+ // const falltValue = flatFileds({fields: codeProps.fields})
30624
30652
  var falltValue = flatFileds({
30625
- fields: codeProps.fields
30653
+ fields: combineContainer(codeProps.fields, value === null || value === void 0 ? void 0 : value.fields)
30626
30654
  });
30627
30655
  var newCodeProps = _objectSpread2({}, codeProps);
30628
30656
  newCodeProps.fields = convertFileds({
@@ -30870,23 +30898,36 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
30870
30898
  });
30871
30899
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Drawer, {
30872
30900
  visible: visible,
30873
- width: 800,
30901
+ width: 1400,
30874
30902
  onClose: function onClose() {
30875
30903
  return setVisible(false);
30876
30904
  },
30877
30905
  className: 'customFieldsDrawer'
30878
- }, detailTablesSetting.length == 0 && /*#__PURE__*/React.createElement(Fragment, null, isEmpty(moduleParams) ? /*#__PURE__*/React.createElement("div", {
30906
+ }, detailTablesSetting.length == 0 && /*#__PURE__*/React.createElement("div", {
30907
+ style: {
30908
+ display: 'flex'
30909
+ }
30910
+ }, /*#__PURE__*/React.createElement("div", {
30911
+ style: {
30912
+ flex: 1,
30913
+ width: 500
30914
+ }
30915
+ }, isEmpty(moduleParams) ? /*#__PURE__*/React.createElement("div", {
30879
30916
  style: {
30880
30917
  padding: "10px 0",
30881
30918
  fontSize: "16px",
30882
30919
  fontWeight: "bolder"
30883
30920
  }
30884
- }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React.createElement(FieldsSettingsTable, _objectSpread2({}, tableParams)), /*#__PURE__*/React.createElement(Editor, {
30921
+ }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React.createElement(FieldsSettingsTable, _objectSpread2({}, tableParams))), /*#__PURE__*/React.createElement("div", {
30922
+ style: {
30923
+ flex: 1
30924
+ }
30925
+ }, /*#__PURE__*/React.createElement(Editor, {
30885
30926
  type: "table",
30886
30927
  onRun: onClickRun,
30887
30928
  value: jsonEditorVal,
30888
30929
  shallowHeight: height
30889
- })), detailTablesSetting.length > 0 && /*#__PURE__*/React.createElement(Tabs, {
30930
+ }))), detailTablesSetting.length > 0 && /*#__PURE__*/React.createElement(Tabs, {
30890
30931
  defaultActiveKey: activeKey,
30891
30932
  onChange: function onChange(v) {
30892
30933
  return setActiveKey(v);
@@ -30894,33 +30935,59 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
30894
30935
  }, /*#__PURE__*/React.createElement(Tabs.TabPane, {
30895
30936
  tab: "\u8BE6\u60C5\u9875\u914D\u7F6E",
30896
30937
  key: "main"
30938
+ }, /*#__PURE__*/React.createElement("div", {
30939
+ style: {
30940
+ display: 'flex'
30941
+ }
30942
+ }, /*#__PURE__*/React.createElement("div", {
30943
+ style: {
30944
+ flex: 1,
30945
+ width: 500
30946
+ }
30897
30947
  }, isEmpty(moduleParams) ? /*#__PURE__*/React.createElement("div", {
30898
30948
  style: {
30899
30949
  padding: "10px 0",
30900
30950
  fontSize: "16px",
30901
30951
  fontWeight: "bolder"
30902
30952
  }
30903
- }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React.createElement(FieldsSettingsTable, _objectSpread2({}, tableParams)), /*#__PURE__*/React.createElement(Editor, {
30953
+ }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React.createElement(FieldsSettingsTable, _objectSpread2({}, tableParams))), /*#__PURE__*/React.createElement("div", {
30954
+ style: {
30955
+ flex: 1
30956
+ }
30957
+ }, /*#__PURE__*/React.createElement(Editor, {
30904
30958
  type: "table",
30905
30959
  onRun: onClickRun,
30906
30960
  value: jsonEditorVal,
30907
30961
  shallowHeight: height
30908
- })), tableJsonEditorValsArr.map(function (k) {
30962
+ })))), tableJsonEditorValsArr.map(function (k) {
30909
30963
  return /*#__PURE__*/React.createElement(Tabs.TabPane, {
30910
30964
  tab: k.title,
30911
30965
  key: k.tableCode
30966
+ }, /*#__PURE__*/React.createElement("div", {
30967
+ style: {
30968
+ display: 'flex'
30969
+ }
30970
+ }, /*#__PURE__*/React.createElement("div", {
30971
+ style: {
30972
+ flex: 1,
30973
+ width: 500
30974
+ }
30912
30975
  }, !tablesConfigParams[k.tableCode] ? /*#__PURE__*/React.createElement("div", {
30913
30976
  style: {
30914
30977
  padding: "10px 0",
30915
30978
  fontSize: "16px",
30916
30979
  fontWeight: "bolder"
30917
30980
  }
30918
- }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React.createElement(FieldsSettingsTable, _objectSpread2({}, tablesConfigParams[k.tableCode])), /*#__PURE__*/React.createElement(Editor, {
30981
+ }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React.createElement(FieldsSettingsTable, _objectSpread2({}, tablesConfigParams[k.tableCode]))), /*#__PURE__*/React.createElement("div", {
30982
+ style: {
30983
+ flex: 1
30984
+ }
30985
+ }, /*#__PURE__*/React.createElement(Editor, {
30919
30986
  type: "table",
30920
30987
  onRun: onClickRunDetailTables,
30921
30988
  value: k.columns,
30922
30989
  shallowHeight: height
30923
- }));
30990
+ }))));
30924
30991
  }))), !visible && isAdmin() && /*#__PURE__*/React.createElement(ConfigButton, {
30925
30992
  type: 'primary',
30926
30993
  onClick: function onClick() {
package/dist/index.js CHANGED
@@ -30637,10 +30637,38 @@ function faltCustomerFieldRange(fileds) {
30637
30637
  });
30638
30638
  return columnsValue;
30639
30639
  }
30640
+ //form存在新加container属性分组得情况 组合操作
30641
+ function combineContainer(originFields, currentFields) {
30642
+ var newCurrentFields = _toConsumableArray(originFields);
30643
+ currentFields.map(function (item) {
30644
+ if (!originFields.find(function (i) {
30645
+ var _i$container, _i$container$props, _item$container;
30646
+ return (i === null || i === void 0 ? void 0 : (_i$container = i.container) === null || _i$container === void 0 ? void 0 : (_i$container$props = _i$container.props) === null || _i$container$props === void 0 ? void 0 : _i$container$props.name) == (item === null || item === void 0 ? void 0 : (_item$container = item.container) === null || _item$container === void 0 ? void 0 : _item$container.name);
30647
+ })) {
30648
+ var _item$container2, _item$container3;
30649
+ newCurrentFields = [].concat(_toConsumableArray(newCurrentFields), [{
30650
+ container: {
30651
+ type: 'card',
30652
+ props: {
30653
+ title: item === null || item === void 0 ? void 0 : (_item$container2 = item.container) === null || _item$container2 === void 0 ? void 0 : _item$container2.title,
30654
+ level: 1,
30655
+ id: Math.random(),
30656
+ isWhiteCard: true,
30657
+ bordered: false,
30658
+ name: item === null || item === void 0 ? void 0 : (_item$container3 = item.container) === null || _item$container3 === void 0 ? void 0 : _item$container3.name
30659
+ }
30660
+ },
30661
+ fields: (item === null || item === void 0 ? void 0 : item.fields) || []
30662
+ }]);
30663
+ }
30664
+ });
30665
+ return newCurrentFields;
30666
+ }
30640
30667
  function hanleCallbackValue(codeProps, value, customerFields) {
30641
30668
  var faltFieldRange = faltCustomerFieldRange(customerFields);
30669
+ // const falltValue = flatFileds({fields: codeProps.fields})
30642
30670
  var falltValue = flatFileds({
30643
- fields: codeProps.fields
30671
+ fields: combineContainer(codeProps.fields, value === null || value === void 0 ? void 0 : value.fields)
30644
30672
  });
30645
30673
  var newCodeProps = _objectSpread2({}, codeProps);
30646
30674
  newCodeProps.fields = convertFileds({
@@ -30888,23 +30916,36 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
30888
30916
  });
30889
30917
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Drawer, {
30890
30918
  visible: visible,
30891
- width: 800,
30919
+ width: 1400,
30892
30920
  onClose: function onClose() {
30893
30921
  return setVisible(false);
30894
30922
  },
30895
30923
  className: 'customFieldsDrawer'
30896
- }, detailTablesSetting.length == 0 && /*#__PURE__*/React__default['default'].createElement(React.Fragment, null, _.isEmpty(moduleParams) ? /*#__PURE__*/React__default['default'].createElement("div", {
30924
+ }, detailTablesSetting.length == 0 && /*#__PURE__*/React__default['default'].createElement("div", {
30925
+ style: {
30926
+ display: 'flex'
30927
+ }
30928
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30929
+ style: {
30930
+ flex: 1,
30931
+ width: 500
30932
+ }
30933
+ }, _.isEmpty(moduleParams) ? /*#__PURE__*/React__default['default'].createElement("div", {
30897
30934
  style: {
30898
30935
  padding: "10px 0",
30899
30936
  fontSize: "16px",
30900
30937
  fontWeight: "bolder"
30901
30938
  }
30902
- }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React__default['default'].createElement(FieldsSettingsTable, _objectSpread2({}, tableParams)), /*#__PURE__*/React__default['default'].createElement(Editor, {
30939
+ }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React__default['default'].createElement(FieldsSettingsTable, _objectSpread2({}, tableParams))), /*#__PURE__*/React__default['default'].createElement("div", {
30940
+ style: {
30941
+ flex: 1
30942
+ }
30943
+ }, /*#__PURE__*/React__default['default'].createElement(Editor, {
30903
30944
  type: "table",
30904
30945
  onRun: onClickRun,
30905
30946
  value: jsonEditorVal,
30906
30947
  shallowHeight: height
30907
- })), detailTablesSetting.length > 0 && /*#__PURE__*/React__default['default'].createElement(antd.Tabs, {
30948
+ }))), detailTablesSetting.length > 0 && /*#__PURE__*/React__default['default'].createElement(antd.Tabs, {
30908
30949
  defaultActiveKey: activeKey,
30909
30950
  onChange: function onChange(v) {
30910
30951
  return setActiveKey(v);
@@ -30912,33 +30953,59 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
30912
30953
  }, /*#__PURE__*/React__default['default'].createElement(antd.Tabs.TabPane, {
30913
30954
  tab: "\u8BE6\u60C5\u9875\u914D\u7F6E",
30914
30955
  key: "main"
30956
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30957
+ style: {
30958
+ display: 'flex'
30959
+ }
30960
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30961
+ style: {
30962
+ flex: 1,
30963
+ width: 500
30964
+ }
30915
30965
  }, _.isEmpty(moduleParams) ? /*#__PURE__*/React__default['default'].createElement("div", {
30916
30966
  style: {
30917
30967
  padding: "10px 0",
30918
30968
  fontSize: "16px",
30919
30969
  fontWeight: "bolder"
30920
30970
  }
30921
- }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React__default['default'].createElement(FieldsSettingsTable, _objectSpread2({}, tableParams)), /*#__PURE__*/React__default['default'].createElement(Editor, {
30971
+ }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React__default['default'].createElement(FieldsSettingsTable, _objectSpread2({}, tableParams))), /*#__PURE__*/React__default['default'].createElement("div", {
30972
+ style: {
30973
+ flex: 1
30974
+ }
30975
+ }, /*#__PURE__*/React__default['default'].createElement(Editor, {
30922
30976
  type: "table",
30923
30977
  onRun: onClickRun,
30924
30978
  value: jsonEditorVal,
30925
30979
  shallowHeight: height
30926
- })), tableJsonEditorValsArr.map(function (k) {
30980
+ })))), tableJsonEditorValsArr.map(function (k) {
30927
30981
  return /*#__PURE__*/React__default['default'].createElement(antd.Tabs.TabPane, {
30928
30982
  tab: k.title,
30929
30983
  key: k.tableCode
30984
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30985
+ style: {
30986
+ display: 'flex'
30987
+ }
30988
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30989
+ style: {
30990
+ flex: 1,
30991
+ width: 500
30992
+ }
30930
30993
  }, !tablesConfigParams[k.tableCode] ? /*#__PURE__*/React__default['default'].createElement("div", {
30931
30994
  style: {
30932
30995
  padding: "10px 0",
30933
30996
  fontSize: "16px",
30934
30997
  fontWeight: "bolder"
30935
30998
  }
30936
- }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React__default['default'].createElement(FieldsSettingsTable, _objectSpread2({}, tablesConfigParams[k.tableCode])), /*#__PURE__*/React__default['default'].createElement(Editor, {
30999
+ }, "\u63D0\u793A\uFF1A\u4E1A\u52A1\u5BF9\u8C61\u672A\u7EF4\u62A4\uFF0C\u8BF7\u5728\u901A\u7528\u5355\u636E\u5BF9\u5E94\u4E1A\u52A1\u7C7B\u578B\u4E0B\u7EF4\u62A4\u4E1A\u52A1\u5BF9\u8C61") : /*#__PURE__*/React__default['default'].createElement(FieldsSettingsTable, _objectSpread2({}, tablesConfigParams[k.tableCode]))), /*#__PURE__*/React__default['default'].createElement("div", {
31000
+ style: {
31001
+ flex: 1
31002
+ }
31003
+ }, /*#__PURE__*/React__default['default'].createElement(Editor, {
30937
31004
  type: "table",
30938
31005
  onRun: onClickRunDetailTables,
30939
31006
  value: k.columns,
30940
31007
  shallowHeight: height
30941
- }));
31008
+ }))));
30942
31009
  }))), !visible && isAdmin() && /*#__PURE__*/React__default['default'].createElement(ConfigButton, {
30943
31010
  type: 'primary',
30944
31011
  onClick: function onClick() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.2.0-alpha.12",
3
+ "version": "2.2.0-alpha.13",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -120,9 +120,34 @@ function faltCustomerFieldRange(fileds) {
120
120
  return columnsValue;
121
121
  }
122
122
 
123
+ //form存在新加container属性分组得情况 组合操作
124
+ function combineContainer(originFields, currentFields){
125
+ let newCurrentFields = [...originFields];
126
+ currentFields.map((item: any) => {
127
+ if(!originFields.find((i: any) => i?.container?.props?.name == item?.container?.name)){
128
+ newCurrentFields = [...newCurrentFields, {
129
+ container: {
130
+ type: 'card',
131
+ props: {
132
+ title: item?.container?.title,
133
+ level: 1,
134
+ id: Math.random(),
135
+ isWhiteCard: true,
136
+ bordered: false,
137
+ name: item?.container?.name,
138
+ },
139
+ },
140
+ fields: item?.fields || []
141
+ }];
142
+ }
143
+ })
144
+ return newCurrentFields;
145
+ }
146
+
123
147
  function hanleCallbackValue(codeProps, value, customerFields) {
124
- const faltFieldRange = faltCustomerFieldRange(customerFields)
125
- const falltValue = flatFileds({fields: codeProps.fields})
148
+ const faltFieldRange = faltCustomerFieldRange(customerFields);
149
+ // const falltValue = flatFileds({fields: codeProps.fields})
150
+ const falltValue = flatFileds({fields: combineContainer(codeProps.fields, value?.fields)})
126
151
  let newCodeProps = {...codeProps};
127
152
  newCodeProps.fields = convertFileds({fields: value.fields}, falltValue, faltFieldRange).fields;
128
153
  if (codeProps.columns) {
@@ -374,32 +399,11 @@ const JsonQueryTable = React.memo(props => {
374
399
 
375
400
  return (
376
401
  <div>
377
- <Drawer visible={visible} width={800} onClose={() => setVisible(false)} className={'customFieldsDrawer'}>
402
+ <Drawer visible={visible} width={1400} onClose={() => setVisible(false)} className={'customFieldsDrawer'}>
378
403
  {
379
404
  detailTablesSetting.length == 0 &&(
380
- <Fragment>
381
- {
382
- isEmpty(moduleParams)?(
383
- <div style={{padding:"10px 0", fontSize:"16px", fontWeight:"bolder"}}>
384
- 提示:业务对象未维护,请在通用单据对应业务类型下维护业务对象
385
- </div>
386
- ):(
387
- <FieldsSettingsTable {...tableParams}/>
388
- )
389
- }
390
- <Editor
391
- type="table"
392
- onRun={onClickRun}
393
- value={jsonEditorVal}
394
- shallowHeight={height}
395
- />
396
- </Fragment>
397
- )
398
- }
399
- {
400
- detailTablesSetting.length > 0 && (
401
- <Tabs defaultActiveKey={activeKey} onChange={(v: any) => setActiveKey(v)}>
402
- <Tabs.TabPane tab="详情页配置" key="main">
405
+ <div style={{display: 'flex'}}>
406
+ <div style={{flex: 1, width: 500}}>
403
407
  {
404
408
  isEmpty(moduleParams)?(
405
409
  <div style={{padding:"10px 0", fontSize:"16px", fontWeight:"bolder"}}>
@@ -409,31 +413,68 @@ const JsonQueryTable = React.memo(props => {
409
413
  <FieldsSettingsTable {...tableParams}/>
410
414
  )
411
415
  }
416
+ </div>
417
+ <div style={{flex: 1}}>
412
418
  <Editor
413
419
  type="table"
414
420
  onRun={onClickRun}
415
421
  value={jsonEditorVal}
416
422
  shallowHeight={height}
417
423
  />
424
+ </div>
425
+ </div>
426
+ )
427
+ }
428
+ {
429
+ detailTablesSetting.length > 0 && (
430
+ <Tabs defaultActiveKey={activeKey} onChange={(v: any) => setActiveKey(v)}>
431
+ <Tabs.TabPane tab="详情页配置" key="main">
432
+ <div style={{display: 'flex'}}>
433
+ <div style={{flex: 1, width: 500}}>
434
+ {
435
+ isEmpty(moduleParams)?(
436
+ <div style={{padding:"10px 0", fontSize:"16px", fontWeight:"bolder"}}>
437
+ 提示:业务对象未维护,请在通用单据对应业务类型下维护业务对象
438
+ </div>
439
+ ):(
440
+ <FieldsSettingsTable {...tableParams}/>
441
+ )
442
+ }
443
+ </div>
444
+ <div style={{flex: 1}}>
445
+ <Editor
446
+ type="table"
447
+ onRun={onClickRun}
448
+ value={jsonEditorVal}
449
+ shallowHeight={height}
450
+ />
451
+ </div>
452
+ </div>
418
453
  </Tabs.TabPane>
419
454
  {
420
455
  tableJsonEditorValsArr.map((k:any)=>(
421
456
  <Tabs.TabPane tab={k.title} key={k.tableCode}>
422
- {
423
- !tablesConfigParams[k.tableCode]?(
424
- <div style={{padding:"10px 0", fontSize:"16px", fontWeight:"bolder"}}>
425
- 提示:业务对象未维护,请在通用单据对应业务类型下维护业务对象
426
- </div>
427
- ):(
428
- <FieldsSettingsTable {...tablesConfigParams[k.tableCode]}/>
429
- )
430
- }
431
- <Editor
432
- type="table"
433
- onRun={onClickRunDetailTables}
434
- value={k.columns}
435
- shallowHeight={height}
436
- />
457
+ <div style={{display: 'flex'}}>
458
+ <div style={{flex: 1, width: 500}}>
459
+ {
460
+ !tablesConfigParams[k.tableCode]?(
461
+ <div style={{padding:"10px 0", fontSize:"16px", fontWeight:"bolder"}}>
462
+ 提示:业务对象未维护,请在通用单据对应业务类型下维护业务对象
463
+ </div>
464
+ ):(
465
+ <FieldsSettingsTable {...tablesConfigParams[k.tableCode]}/>
466
+ )
467
+ }
468
+ </div>
469
+ <div style={{flex: 1}}>
470
+ <Editor
471
+ type="table"
472
+ onRun={onClickRunDetailTables}
473
+ value={k.columns}
474
+ shallowHeight={height}
475
+ />
476
+ </div>
477
+ </div>
437
478
  </Tabs.TabPane>
438
479
  ))
439
480
  }