kts-components-document-access-point 1.2.1 → 1.2.6

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.
@@ -4,7 +4,7 @@ export interface IParams {
4
4
  pageNum: number;
5
5
  pageSize: number;
6
6
  customerDid?: string;
7
- listNature: number | string;
7
+ type: number | string;
8
8
  }
9
9
  declare const _default: (s: ControllerState, params?: IParams | undefined) => Promise<any>;
10
10
  export default _default;
@@ -43,7 +43,7 @@ export interface IBillType {
43
43
  }
44
44
  export default class DocumentsListControllerState {
45
45
  demo: string;
46
- type: 1 | 2;
46
+ type: number;
47
47
  selectedRowKey: ISelectedRowKey[];
48
48
  billEnum: IBillEnum[];
49
49
  params: IParams;
package/dist/index.esm.js CHANGED
@@ -1295,7 +1295,7 @@ var AddChildPropertyButton = (function (props) {
1295
1295
  return visible ? /*#__PURE__*/React.createElement(Button, {
1296
1296
  onClick: onClick,
1297
1297
  type: "link"
1298
- }, readOnly ? '查看字字段' : '添加子字段') : /*#__PURE__*/React.createElement(React.Fragment, null);
1298
+ }, readOnly ? '查看子字段' : '添加子字段') : /*#__PURE__*/React.createElement(React.Fragment, null);
1299
1299
  });
1300
1300
 
1301
1301
  var EditPropertyButton = (function (props) {
@@ -1348,11 +1348,18 @@ var AddRuleButton = (function (props) {
1348
1348
  var readOnly = controller.useMemo(function (s) {
1349
1349
  return s.readOnly;
1350
1350
  }, []);
1351
+ /** 是否可以显示 */
1352
+
1351
1353
  var visible = React.useMemo(function () {
1352
1354
  return algorithm.filter(function (e) {
1353
1355
  return e.type === getPropertiesType(properties);
1354
1356
  }).length > 0;
1355
1357
  }, [properties, algorithm]);
1358
+ /** 是否有规则 */
1359
+
1360
+ var isHivRules = React.useMemo(function () {
1361
+ return !!(properties.ref.rules && properties.ref.rules.length > 0);
1362
+ }, [properties]);
1356
1363
  var onClick = React.useCallback(function () {
1357
1364
  controller.pipeline( /*#__PURE__*/function () {
1358
1365
  var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
@@ -1374,16 +1381,27 @@ var AddRuleButton = (function (props) {
1374
1381
  return _ref.apply(this, arguments);
1375
1382
  };
1376
1383
  }())();
1377
- }, [properties, controller]);
1378
- return visible ? /*#__PURE__*/React.createElement(Button, {
1379
- onClick: onClick,
1380
- type: "link"
1381
- }, function () {
1382
- var _properties$ref$rules, _properties$ref$rules2;
1384
+ }, [properties, controller]); // 查看规则
1383
1385
 
1384
- if (readOnly) return '查看规则';
1385
- return ((_properties$ref$rules = (_properties$ref$rules2 = properties.ref.rules) === null || _properties$ref$rules2 === void 0 ? void 0 : _properties$ref$rules2.length) !== null && _properties$ref$rules !== void 0 ? _properties$ref$rules : 0 > 0) ? "编辑验证规则" : "添加验证规则";
1386
- }()) : /*#__PURE__*/React.createElement(React.Fragment, null);
1386
+ if (readOnly) {
1387
+ if (isHivRules) {
1388
+ return /*#__PURE__*/React.createElement(Button, {
1389
+ onClick: onClick,
1390
+ type: "link"
1391
+ }, "\u67E5\u770B\u89C4\u5219");
1392
+ } else {
1393
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
1394
+ }
1395
+ } else {
1396
+ if (visible) {
1397
+ return /*#__PURE__*/React.createElement(Button, {
1398
+ onClick: onClick,
1399
+ type: "link"
1400
+ }, isHivRules ? "编辑验证规则" : "添加验证规则");
1401
+ } else {
1402
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
1403
+ }
1404
+ }
1387
1405
  });
1388
1406
 
1389
1407
  function getPropertiesType(ruleProperties) {
@@ -2796,9 +2814,9 @@ function modalcomfirm(props) {
2796
2814
  }, []);
2797
2815
  var radioStyle = useMemo(function () {
2798
2816
  return {
2799
- display: 'block',
2800
- height: '30px',
2801
- lineHeight: '30px'
2817
+ alignItems: 'center',
2818
+ marginBottom: 10,
2819
+ lineHeight: 1.2
2802
2820
  };
2803
2821
  }, []);
2804
2822
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Modal, {
@@ -2814,7 +2832,22 @@ function modalcomfirm(props) {
2814
2832
  style: radioStyle,
2815
2833
  key: key,
2816
2834
  value: item.participantId
2817
- }, " ", item.participantId, " ");
2835
+ }, /*#__PURE__*/React.createElement(Tooltip, {
2836
+ title: item.participantId
2837
+ }, /*#__PURE__*/React.createElement("div", {
2838
+ style: {
2839
+ display: 'flex',
2840
+ flexDirection: 'column',
2841
+ alignContent: 'flex-start'
2842
+ }
2843
+ }, /*#__PURE__*/React.createElement("span", null, item.remarkName, "2"), /*#__PURE__*/React.createElement("span", {
2844
+ style: {
2845
+ maxWidth: 460,
2846
+ overflow: 'hidden',
2847
+ textOverflow: 'ellipsis',
2848
+ display: 'block'
2849
+ }
2850
+ }, item.participantId))));
2818
2851
  }))));
2819
2852
  }
2820
2853
 
@@ -3050,13 +3083,13 @@ var PageHeader = (function () {
3050
3083
  title: "配置名称"
3051
3084
  },
3052
3085
  effectStatus: {
3053
- type: "string",
3054
- title: "标识",
3086
+ type: "radio",
3087
+ title: "使用标识",
3055
3088
  enum: [{
3056
- "label": "未生效",
3089
+ "label": "已失效",
3057
3090
  "value": 0
3058
3091
  }, {
3059
- "label": "已生效",
3092
+ "label": "使用中",
3060
3093
  "value": 1
3061
3094
  }]
3062
3095
  },
@@ -3089,7 +3122,7 @@ var PageHeader = (function () {
3089
3122
  visible: false
3090
3123
  },
3091
3124
  attribution: {
3092
- type: "string",
3125
+ type: "radio",
3093
3126
  title: "我的收发角色",
3094
3127
  enum: [{
3095
3128
  "label": "发送方",
@@ -3228,7 +3261,7 @@ var PageHeader = (function () {
3228
3261
  style: {
3229
3262
  marginRight: 10
3230
3263
  }
3231
- }, "\u6279\u91CF\u53D1\u5E03"), /*#__PURE__*/React.createElement(Dropdown, {
3264
+ }, "\u53D1\u5E03"), /*#__PURE__*/React.createElement(Dropdown, {
3232
3265
  key: "2",
3233
3266
  overlay: menu
3234
3267
  }, /*#__PURE__*/React.createElement(Button$1, {
@@ -3834,7 +3867,11 @@ function validaterule$1(props) {
3834
3867
  }
3835
3868
 
3836
3869
  if (text === 1) {
3837
- return /*#__PURE__*/React.createElement("span", null, "\u4F7F\u7528\u4E2D");
3870
+ return /*#__PURE__*/React.createElement("span", {
3871
+ style: {
3872
+ color: '#0074ff'
3873
+ }
3874
+ }, "\u4F7F\u7528\u4E2D");
3838
3875
  }
3839
3876
  }
3840
3877
  }, {
@@ -3977,6 +4014,32 @@ var Main$1 = function Main(props) {
3977
4014
  var type = controller.useMemo(function (s) {
3978
4015
  return s.type;
3979
4016
  }, []);
4017
+ useEffect(function () {
4018
+ var params = props.location.query && props.location.query.type;
4019
+
4020
+ if (params) {
4021
+ controller.pipeline( /*#__PURE__*/function () {
4022
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
4023
+ return regeneratorRuntime.wrap(function _callee$(_context) {
4024
+ while (1) {
4025
+ switch (_context.prev = _context.next) {
4026
+ case 0:
4027
+ s.type = Number(params);
4028
+
4029
+ case 1:
4030
+ case "end":
4031
+ return _context.stop();
4032
+ }
4033
+ }
4034
+ }, _callee);
4035
+ }));
4036
+
4037
+ return function (_x) {
4038
+ return _ref.apply(this, arguments);
4039
+ };
4040
+ }())();
4041
+ }
4042
+ }, [type]);
3980
4043
  return /*#__PURE__*/React.createElement(DocumentsListContext.Provider, {
3981
4044
  value: controller
3982
4045
  }, /*#__PURE__*/React.createElement("div", {
@@ -4878,9 +4941,9 @@ function Rule(props) {
4878
4941
  }, []);
4879
4942
  var radioStyle = useMemo(function () {
4880
4943
  return {
4881
- display: 'block',
4882
- height: '30px',
4883
- lineHeight: '30px'
4944
+ alignItems: 'center',
4945
+ marginBottom: 10,
4946
+ lineHeight: 1.2
4884
4947
  };
4885
4948
  }, []);
4886
4949
  var updateSchema = useCallback(function (e) {
@@ -4893,13 +4956,23 @@ function Rule(props) {
4893
4956
  confirm({
4894
4957
  title: '您当前有内容未保存,是否退出?',
4895
4958
  onOk: function onOk() {
4896
- history.goBack();
4959
+ goBack();
4897
4960
  }
4898
4961
  });
4899
4962
  } else {
4900
- history.goBack();
4963
+ goBack();
4901
4964
  }
4902
4965
  }, [hasChange]);
4966
+ var goBack = useCallback(function () {
4967
+ if (type === 'record') {
4968
+ history.push({
4969
+ pathname: "/rulelist",
4970
+ search: "?type=2"
4971
+ });
4972
+ } else {
4973
+ history.goBack();
4974
+ }
4975
+ }, []);
4903
4976
  return /*#__PURE__*/React.createElement("div", {
4904
4977
  style: {
4905
4978
  height: '100%',
@@ -5053,7 +5126,22 @@ function Rule(props) {
5053
5126
  style: radioStyle,
5054
5127
  key: key,
5055
5128
  value: item.participantId
5056
- }, item.participantId);
5129
+ }, /*#__PURE__*/React.createElement(Tooltip, {
5130
+ title: item.participantId
5131
+ }, /*#__PURE__*/React.createElement("div", {
5132
+ style: {
5133
+ display: 'flex',
5134
+ flexDirection: 'column',
5135
+ alignContent: 'flex-start'
5136
+ }
5137
+ }, /*#__PURE__*/React.createElement("span", null, item.remarkName), /*#__PURE__*/React.createElement("span", {
5138
+ style: {
5139
+ maxWidth: 460,
5140
+ overflow: 'hidden',
5141
+ textOverflow: 'ellipsis',
5142
+ display: 'block'
5143
+ }
5144
+ }, item.participantId))));
5057
5145
  }))));
5058
5146
  }
5059
5147
 
@@ -5837,7 +5925,7 @@ var Header = (function () {
5837
5925
  },
5838
5926
  dataStatus: {
5839
5927
  type: "string",
5840
- title: "名单性质",
5928
+ title: "数据状态",
5841
5929
  enum: [{
5842
5930
  "label": "使用中",
5843
5931
  "value": 1
@@ -6036,7 +6124,7 @@ function Rule$1(props) {
6036
6124
  title: '所属公司',
6037
6125
  dataIndex: 'customerName'
6038
6126
  }, {
6039
- title: '本条数据状态',
6127
+ title: '数据状态',
6040
6128
  dataIndex: 'dataStatus',
6041
6129
  render: function render(text) {
6042
6130
  return dataStatusEnum[text];
@@ -6272,7 +6360,7 @@ var Header$1 = (function () {
6272
6360
  },
6273
6361
  dataStatus: {
6274
6362
  type: "string",
6275
- title: "名单性质",
6363
+ title: "数据状态",
6276
6364
  enum: [{
6277
6365
  "label": "使用中",
6278
6366
  "value": 1
@@ -6468,7 +6556,7 @@ function Rule$2(props) {
6468
6556
  title: '所属公司',
6469
6557
  dataIndex: 'customerName'
6470
6558
  }, {
6471
- title: '本条数据状态',
6559
+ title: '数据状态',
6472
6560
  dataIndex: 'dataStatus',
6473
6561
  render: function render(text) {
6474
6562
  return dataStatusEnum[text];
@@ -7131,6 +7219,13 @@ function modalcomfirm$2(props) {
7131
7219
  params = _useState2[0],
7132
7220
  setParams = _useState2[1];
7133
7221
 
7222
+ var whiteParams = controller.useMemo(function (s) {
7223
+ return s.whiteParams;
7224
+ }, []);
7225
+ var blackParams = controller.useMemo(function (s) {
7226
+ return s.params;
7227
+ }, []);
7228
+
7134
7229
  var _useState3 = useState({
7135
7230
  pageNum: 1,
7136
7231
  pageSize: 10
@@ -7170,7 +7265,7 @@ function modalcomfirm$2(props) {
7170
7265
  case 0:
7171
7266
  _context.next = 2;
7172
7267
  return controller.synclist(_objectSpread2(_objectSpread2({}, params), {}, {
7173
- listNature: listNature
7268
+ type: listNature
7174
7269
  }, pageMeta));
7175
7270
 
7176
7271
  case 2:
@@ -7288,7 +7383,8 @@ function modalcomfirm$2(props) {
7288
7383
  }, []);
7289
7384
  var onSubmit = useCallback(function () {
7290
7385
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
7291
- var res, data;
7386
+ var res, data, _data;
7387
+
7292
7388
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
7293
7389
  while (1) {
7294
7390
  switch (_context3.prev = _context3.next) {
@@ -7300,14 +7396,16 @@ function modalcomfirm$2(props) {
7300
7396
  res = _context3.sent;
7301
7397
 
7302
7398
  if (res.res) {
7303
- data = _objectSpread2(_objectSpread2({}, params), {}, {
7304
- type: listNature
7305
- });
7306
-
7307
7399
  if (listNature === '1') {
7400
+ data = _objectSpread2(_objectSpread2({}, whiteParams), {}, {
7401
+ type: listNature
7402
+ });
7308
7403
  controller.getWhitelist(data);
7309
7404
  } else {
7310
- controller.getBlacklist(data);
7405
+ _data = _objectSpread2(_objectSpread2({}, blackParams), {}, {
7406
+ type: listNature
7407
+ });
7408
+ controller.getBlacklist(_data);
7311
7409
  }
7312
7410
  }
7313
7411
 
@@ -7332,7 +7430,7 @@ function modalcomfirm$2(props) {
7332
7430
  marginBottom: 24
7333
7431
  }
7334
7432
  }, /*#__PURE__*/React.createElement(AdvancedSearch, {
7335
- width: 400,
7433
+ width: 480,
7336
7434
  height: 44,
7337
7435
  compact: true,
7338
7436
  defaultKey: "customerDid",