kts-components-document-access-point 1.2.10 → 1.2.14

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.
Files changed (31) hide show
  1. package/dist/DocumentWhiteList/control/state/index.d.ts +8 -3
  2. package/dist/DocumentsDemo/Controller/index.d.ts +7 -0
  3. package/dist/DocumentsDemo/Controller/whitelist.d.ts +2 -0
  4. package/dist/DocumentsDemo/Text.d.ts +2 -0
  5. package/dist/DocumentsDemo/___demo___/base/index.d.ts +2 -0
  6. package/dist/DocumentsDemo/index.d.ts +6 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.esm.js +387 -106
  9. package/dist/index.js +387 -105
  10. package/package.json +2 -2
  11. package/src/DocumentWhiteList/control/actions/whitelist/index.ts +1 -1
  12. package/src/DocumentWhiteList/control/state/index.ts +8 -3
  13. package/src/DocumentWhiteList/index.tsx +1 -1
  14. package/src/DocumentWhiteList/ui/clientmodal/index.tsx +8 -3
  15. package/src/DocumentWhiteList/ui/main/black.tsx +19 -9
  16. package/src/DocumentWhiteList/ui/main/white.tsx +23 -12
  17. package/src/DocumentWhiteList/ui/pageheader/BlackHeader.tsx +1 -1
  18. package/src/DocumentWhiteList/ui/pageheader/WhiteHeader.tsx +2 -4
  19. package/src/DocumentWhiteList/ui/whitemodal/index.tsx +1 -1
  20. package/src/DocumentsDemo/Controller/index.tsx +15 -0
  21. package/src/DocumentsDemo/Controller/whitelist.ts +23 -0
  22. package/src/DocumentsDemo/Text.tsx +23 -0
  23. package/src/DocumentsDemo/___demo___/base/index.tsx +8 -0
  24. package/src/DocumentsDemo/index.less +0 -0
  25. package/src/DocumentsDemo/index.md +6 -0
  26. package/src/DocumentsDemo/index.tsx +36 -0
  27. package/src/DocumentsList/index.tsx +0 -1
  28. package/src/DocumentsList/ui/ModalComfirm/index.tsx +21 -9
  29. package/src/DocumentsList/ui/PageHeader/index.tsx +24 -11
  30. package/src/DocumentsRule/ui/main/index.tsx +10 -7
  31. package/src/index.ts +1 -0
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ var reactRouterDom = require('react-router-dom');
15
15
  var zhCN = require('kts-components-antd-x4/lib/locale/zh_CN');
16
16
  var qs = require('query-string');
17
17
  var _ = require('lodash');
18
+ var ktsComponentService = require('kts-component-service');
18
19
 
19
20
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
21
 
@@ -2720,6 +2721,7 @@ var Main = function Main(props) {
2720
2721
 
2721
2722
  function modalcomfirm(props) {
2722
2723
  var selectItems = props.list;
2724
+ var history = reactRouterDom.useHistory();
2723
2725
  var controller = DocumentsList.useController();
2724
2726
  var targetId = controller.useMemo(function (s) {
2725
2727
  return s.targetId;
@@ -2791,6 +2793,7 @@ function modalcomfirm(props) {
2791
2793
  res = _context2.sent;
2792
2794
 
2793
2795
  if (res.res) {
2796
+ gotoSendlist();
2794
2797
  ktsComponentsAntdX4.message.success('操作成功');
2795
2798
  props.handleCancel();
2796
2799
  }
@@ -2803,16 +2806,29 @@ function modalcomfirm(props) {
2803
2806
  }, _callee2);
2804
2807
  }))();
2805
2808
  }, [targetId]);
2806
- var targetSelect = React.useCallback(function (e) {
2809
+ var gotoSendlist = React.useCallback(function () {
2807
2810
  controller.pipeline( /*#__PURE__*/function () {
2808
2811
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
2809
2812
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
2810
2813
  while (1) {
2811
2814
  switch (_context3.prev = _context3.next) {
2812
2815
  case 0:
2813
- s.targetId = e.target.value;
2816
+ s.type = 2;
2814
2817
 
2815
- case 1:
2818
+ if (selectItems.length === 1) {
2819
+ s.params = {
2820
+ configNumber: selectItems[0].configNumber
2821
+ };
2822
+ }
2823
+
2824
+ history.push({
2825
+ pathname: "/rulelist",
2826
+ state: {
2827
+ type: 2
2828
+ }
2829
+ });
2830
+
2831
+ case 3:
2816
2832
  case "end":
2817
2833
  return _context3.stop();
2818
2834
  }
@@ -2825,6 +2841,28 @@ function modalcomfirm(props) {
2825
2841
  };
2826
2842
  }())();
2827
2843
  }, []);
2844
+ var targetSelect = React.useCallback(function (e) {
2845
+ controller.pipeline( /*#__PURE__*/function () {
2846
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
2847
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
2848
+ while (1) {
2849
+ switch (_context4.prev = _context4.next) {
2850
+ case 0:
2851
+ s.targetId = e.target.value;
2852
+
2853
+ case 1:
2854
+ case "end":
2855
+ return _context4.stop();
2856
+ }
2857
+ }
2858
+ }, _callee4);
2859
+ }));
2860
+
2861
+ return function (_x2) {
2862
+ return _ref4.apply(this, arguments);
2863
+ };
2864
+ }())();
2865
+ }, []);
2828
2866
  var radioStyle = React.useMemo(function () {
2829
2867
  return {
2830
2868
  alignItems: 'center',
@@ -2845,8 +2883,6 @@ function modalcomfirm(props) {
2845
2883
  style: radioStyle,
2846
2884
  key: key,
2847
2885
  value: item.participantId
2848
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Tooltip, {
2849
- title: item.participantId
2850
2886
  }, /*#__PURE__*/React__default['default'].createElement("div", {
2851
2887
  style: {
2852
2888
  display: 'flex',
@@ -2860,7 +2896,7 @@ function modalcomfirm(props) {
2860
2896
  textOverflow: 'ellipsis',
2861
2897
  display: 'block'
2862
2898
  }
2863
- }, item.participantId))));
2899
+ }, item.participantId)));
2864
2900
  }))));
2865
2901
  }
2866
2902
 
@@ -2898,18 +2934,25 @@ var PageHeader = (function () {
2898
2934
  setSchema = _useState6[1];
2899
2935
 
2900
2936
  var ktsRef = React.useRef(null);
2937
+
2938
+ var _useState7 = React.useState([]),
2939
+ _useState8 = _slicedToArray(_useState7, 2),
2940
+ didlist = _useState8[0],
2941
+ setDidList = _useState8[1]; //我司对应DID
2942
+
2943
+
2901
2944
  React.useEffect(function () {
2902
2945
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
2903
2946
  var _DocumentsService$ins;
2904
2947
 
2905
- var res, list;
2948
+ var res;
2906
2949
  return regeneratorRuntime.wrap(function _callee$(_context) {
2907
2950
  while (1) {
2908
2951
  switch (_context.prev = _context.next) {
2909
2952
  case 0:
2910
2953
  _context.next = 2;
2911
2954
  return (_DocumentsService$ins = DocumentsService.instance.service) === null || _DocumentsService$ins === void 0 ? void 0 : _DocumentsService$ins.call({
2912
- url: '/schema/config/getDefaultTypeList',
2955
+ url: '/participant/listBySubjectId',
2913
2956
  data: {},
2914
2957
  type: 'get'
2915
2958
  });
@@ -2917,12 +2960,43 @@ var PageHeader = (function () {
2917
2960
  case 2:
2918
2961
  res = _context.sent;
2919
2962
 
2963
+ if (res.res) {
2964
+ setDidList(res.res);
2965
+ }
2966
+
2967
+ case 4:
2968
+ case "end":
2969
+ return _context.stop();
2970
+ }
2971
+ }
2972
+ }, _callee);
2973
+ }))();
2974
+ }, []);
2975
+ React.useEffect(function () {
2976
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2977
+ var _DocumentsService$ins2;
2978
+
2979
+ var res, list;
2980
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
2981
+ while (1) {
2982
+ switch (_context2.prev = _context2.next) {
2983
+ case 0:
2984
+ _context2.next = 2;
2985
+ return (_DocumentsService$ins2 = DocumentsService.instance.service) === null || _DocumentsService$ins2 === void 0 ? void 0 : _DocumentsService$ins2.call({
2986
+ url: '/schema/config/getDefaultTypeList',
2987
+ data: {},
2988
+ type: 'get'
2989
+ });
2990
+
2991
+ case 2:
2992
+ res = _context2.sent;
2993
+
2920
2994
  if (!res.err) {
2921
- _context.next = 7;
2995
+ _context2.next = 7;
2922
2996
  break;
2923
2997
  }
2924
2998
 
2925
- return _context.abrupt("return", false);
2999
+ return _context2.abrupt("return", false);
2926
3000
 
2927
3001
  case 7:
2928
3002
  list = res.res.map(function (item) {
@@ -2935,10 +3009,10 @@ var PageHeader = (function () {
2935
3009
 
2936
3010
  case 9:
2937
3011
  case "end":
2938
- return _context.stop();
3012
+ return _context2.stop();
2939
3013
  }
2940
3014
  }
2941
- }, _callee);
3015
+ }, _callee2);
2942
3016
  }))();
2943
3017
  }, []);
2944
3018
  var onSearchFormSubmit = React__default['default'].useCallback(function (value) {
@@ -2946,32 +3020,32 @@ var PageHeader = (function () {
2946
3020
  typeList: value['typeList'] && [value['typeList']]
2947
3021
  });
2948
3022
  controller.pipeline( /*#__PURE__*/function () {
2949
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
2950
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
3023
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
3024
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
2951
3025
  while (1) {
2952
- switch (_context2.prev = _context2.next) {
3026
+ switch (_context3.prev = _context3.next) {
2953
3027
  case 0:
2954
3028
  s.params = value;
2955
3029
 
2956
3030
  case 1:
2957
3031
  case "end":
2958
- return _context2.stop();
3032
+ return _context3.stop();
2959
3033
  }
2960
3034
  }
2961
- }, _callee2);
3035
+ }, _callee3);
2962
3036
  }));
2963
3037
 
2964
3038
  return function (_x) {
2965
- return _ref2.apply(this, arguments);
3039
+ return _ref3.apply(this, arguments);
2966
3040
  };
2967
3041
  }())();
2968
3042
  }, [controller]);
2969
3043
  var switchType = React__default['default'].useCallback(function (e) {
2970
3044
  controller.pipeline( /*#__PURE__*/function () {
2971
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
2972
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
3045
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
3046
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
2973
3047
  while (1) {
2974
- switch (_context3.prev = _context3.next) {
3048
+ switch (_context4.prev = _context4.next) {
2975
3049
  case 0:
2976
3050
  s.type = e.target.value;
2977
3051
  s.params = {};
@@ -2984,62 +3058,69 @@ var PageHeader = (function () {
2984
3058
 
2985
3059
  case 3:
2986
3060
  case "end":
2987
- return _context3.stop();
3061
+ return _context4.stop();
2988
3062
  }
2989
3063
  }
2990
- }, _callee3);
3064
+ }, _callee4);
2991
3065
  }));
2992
3066
 
2993
3067
  return function (_x2) {
2994
- return _ref3.apply(this, arguments);
3068
+ return _ref4.apply(this, arguments);
2995
3069
  };
2996
3070
  }())();
2997
3071
  }, []);
2998
3072
  var handleCancel = React__default['default'].useCallback(function () {
2999
3073
  controller.pipeline( /*#__PURE__*/function () {
3000
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
3001
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
3074
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
3075
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
3002
3076
  while (1) {
3003
- switch (_context4.prev = _context4.next) {
3077
+ switch (_context5.prev = _context5.next) {
3004
3078
  case 0:
3005
3079
  s.visible = false;
3006
3080
 
3007
3081
  case 1:
3008
3082
  case "end":
3009
- return _context4.stop();
3083
+ return _context5.stop();
3010
3084
  }
3011
3085
  }
3012
- }, _callee4);
3086
+ }, _callee5);
3013
3087
  }));
3014
3088
 
3015
3089
  return function (_x3) {
3016
- return _ref4.apply(this, arguments);
3090
+ return _ref5.apply(this, arguments);
3017
3091
  };
3018
3092
  }())();
3019
3093
  }, []);
3020
3094
  var batchSend = React__default['default'].useCallback(function () {
3021
3095
  controller.pipeline( /*#__PURE__*/function () {
3022
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
3023
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
3096
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(s) {
3097
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
3024
3098
  while (1) {
3025
- switch (_context5.prev = _context5.next) {
3099
+ switch (_context6.prev = _context6.next) {
3026
3100
  case 0:
3027
3101
  s.visible = true;
3028
3102
 
3029
3103
  case 1:
3030
3104
  case "end":
3031
- return _context5.stop();
3105
+ return _context6.stop();
3032
3106
  }
3033
3107
  }
3034
- }, _callee5);
3108
+ }, _callee6);
3035
3109
  }));
3036
3110
 
3037
3111
  return function (_x4) {
3038
- return _ref5.apply(this, arguments);
3112
+ return _ref6.apply(this, arguments);
3039
3113
  };
3040
3114
  }())();
3041
3115
  }, [controller]);
3042
3116
  React.useEffect(function () {
3117
+ var didEnum = didlist.map(function (item) {
3118
+ return {
3119
+ label: item.remarkName + ':' + item.participantId,
3120
+ value: item.participantId
3121
+ };
3122
+ });
3123
+
3043
3124
  if (type === 1) {
3044
3125
  var obj = {
3045
3126
  type: "object",
@@ -3065,14 +3146,14 @@ var PageHeader = (function () {
3065
3146
  visible: false
3066
3147
  },
3067
3148
  attribution: {
3068
- type: "string",
3069
- title: "单据类型",
3149
+ type: "radio",
3150
+ title: "收发角色",
3070
3151
  enum: [{
3071
3152
  "label": "发送方",
3072
- "value": '1'
3153
+ "value": 1
3073
3154
  }, {
3074
3155
  "label": "接收方",
3075
- "value": '0'
3156
+ "value": 0
3076
3157
  }],
3077
3158
  'x-props': {
3078
3159
  mode: "multiple"
@@ -3117,10 +3198,10 @@ var PageHeader = (function () {
3117
3198
  title: "我的收发角色",
3118
3199
  enum: [{
3119
3200
  "label": "发送方",
3120
- "value": '1'
3201
+ "value": 1
3121
3202
  }, {
3122
3203
  "label": "接收方",
3123
- "value": '0'
3204
+ "value": 0
3124
3205
  }],
3125
3206
  'x-props': {
3126
3207
  mode: "multiple"
@@ -3131,15 +3212,16 @@ var PageHeader = (function () {
3131
3212
  title: "发送对象",
3132
3213
  visible: true
3133
3214
  },
3134
- did: {
3215
+ senderParticipantId: {
3135
3216
  type: "string",
3136
- title: "我司对应DID"
3217
+ title: "我司对应DID",
3218
+ enum: didEnum
3137
3219
  },
3138
- duixiang: {
3220
+ receiverParticipantId: {
3139
3221
  type: "string",
3140
3222
  title: "接受对象"
3141
3223
  },
3142
- duixianggongsi: {
3224
+ receiverCompany: {
3143
3225
  type: "string",
3144
3226
  title: "接受对象所属公司"
3145
3227
  },
@@ -3170,7 +3252,7 @@ var PageHeader = (function () {
3170
3252
  };
3171
3253
  setSchema(_obj);
3172
3254
  }
3173
- }, [billEnum, type, profileEnum]);
3255
+ }, [billEnum, type, profileEnum, didlist]);
3174
3256
  var onCreateType = React.useCallback(function (category, record) {
3175
3257
  history.push({
3176
3258
  pathname: "/rule",
@@ -4925,6 +5007,13 @@ function Rule(props) {
4925
5007
 
4926
5008
  if (publish) {
4927
5009
  onSendCheck();
5010
+ } else {
5011
+ history.push({
5012
+ pathname: "/rulelist",
5013
+ state: {
5014
+ type: 1
5015
+ }
5016
+ });
4928
5017
  }
4929
5018
  }
4930
5019
 
@@ -4999,10 +5088,15 @@ function Rule(props) {
4999
5088
  case 3:
5000
5089
  res = _context7.sent;
5001
5090
 
5002
- // const res = await DocumentsService.instance.service?.call({ url: '/dap/web/schema/config/batchSend', data: [data], type: 'post' }) as any;
5003
5091
  if (res.res) {
5004
5092
  ktsXui.message.success('操作成功');
5005
5093
  handleCancel();
5094
+ history.push({
5095
+ pathname: "/rulelist",
5096
+ state: {
5097
+ type: 2
5098
+ }
5099
+ });
5006
5100
  }
5007
5101
 
5008
5102
  case 5:
@@ -5214,8 +5308,6 @@ function Rule(props) {
5214
5308
  style: radioStyle,
5215
5309
  key: key,
5216
5310
  value: item.participantId
5217
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Tooltip, {
5218
- title: item.participantId
5219
5311
  }, /*#__PURE__*/React__default['default'].createElement("div", {
5220
5312
  style: {
5221
5313
  display: 'flex',
@@ -5229,7 +5321,7 @@ function Rule(props) {
5229
5321
  textOverflow: 'ellipsis',
5230
5322
  display: 'block'
5231
5323
  }
5232
- }, item.participantId))));
5324
+ }, item.participantId)));
5233
5325
  }))));
5234
5326
  }
5235
5327
 
@@ -5934,11 +6026,6 @@ var Controller$1 = /*#__PURE__*/function (_GreyReactBox) {
5934
6026
  return Controller;
5935
6027
  }(GreyReactBox__default['default']);
5936
6028
 
5937
- var dataStatusEnum = {
5938
- '1': '使用中',
5939
- '2': '停用'
5940
- };
5941
-
5942
6029
  var Header = (function () {
5943
6030
  var controller = WhiteList.useController();
5944
6031
 
@@ -5990,8 +6077,6 @@ var Header = (function () {
5990
6077
  controller.checkclient();
5991
6078
  }, []);
5992
6079
  React.useEffect(function () {
5993
- // console.log(controller);
5994
- // controller.pipeline(controller.didList)({})
5995
6080
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
5996
6081
  var res;
5997
6082
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -6055,7 +6140,7 @@ var Header = (function () {
6055
6140
  },
6056
6141
  companyDid: {
6057
6142
  type: "string",
6058
- title: "对应我的DID",
6143
+ title: "我司对应DID",
6059
6144
  enum: didEnum
6060
6145
  },
6061
6146
  dataStatus: {
@@ -6271,10 +6356,20 @@ function Rule$1(props) {
6271
6356
  dataIndex: 'dataStatus',
6272
6357
  width: 100,
6273
6358
  render: function render(text) {
6274
- return dataStatusEnum[text];
6359
+ if (text === 2) {
6360
+ return /*#__PURE__*/React__default['default'].createElement("span", null, "\u505C\u7528");
6361
+ }
6362
+
6363
+ if (text === 1) {
6364
+ return /*#__PURE__*/React__default['default'].createElement("span", {
6365
+ style: {
6366
+ color: '#0074ff'
6367
+ }
6368
+ }, "\u4F7F\u7528\u4E2D");
6369
+ }
6275
6370
  }
6276
6371
  }, {
6277
- title: '对应我的DID',
6372
+ title: '我司对应DID',
6278
6373
  dataIndex: 'companyDid',
6279
6374
  render: function render(text, record) {
6280
6375
  if (text) {
@@ -6290,14 +6385,13 @@ function Rule$1(props) {
6290
6385
  render: function render(text) {
6291
6386
  return moment__default['default'](text).format('YYYY-MM-DD HH:mm');
6292
6387
  }
6293
- }, {
6294
- title: '最近更新时间',
6295
- dataIndex: 'updateTime',
6296
- width: 200,
6297
- render: function render(text) {
6298
- return moment__default['default'](text).format('YYYY-MM-DD HH:mm');
6299
- }
6300
- }, {
6388
+ }, // {
6389
+ // title: '最近更新时间',
6390
+ // dataIndex: 'updateTime',
6391
+ // width: 200,
6392
+ // render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
6393
+ // },
6394
+ {
6301
6395
  title: '操作',
6302
6396
  dataIndex: 'console',
6303
6397
  width: 80,
@@ -6359,7 +6453,9 @@ function Rule$1(props) {
6359
6453
  res = _context2.sent;
6360
6454
 
6361
6455
  if (res.res) {
6362
- setpageMeta(res.res.pageMeta);
6456
+ setpageMeta(res.res.pageMeta); // await controller.pipeline(async s => {
6457
+ // s.whiteblacklist = res.res.items || [];
6458
+ // })()
6363
6459
  }
6364
6460
 
6365
6461
  case 4:
@@ -6369,7 +6465,7 @@ function Rule$1(props) {
6369
6465
  }
6370
6466
  }, _callee2);
6371
6467
  }))();
6372
- }, [whiteParams, pageParams]);
6468
+ }, [whiteParams]);
6373
6469
  var rowSelection = React.useMemo(function () {
6374
6470
  return {
6375
6471
  onChange: function onChange(selectedRowKeys, selectedRows) {
@@ -6502,7 +6598,7 @@ var Header$1 = (function () {
6502
6598
  },
6503
6599
  companyDid: {
6504
6600
  type: "string",
6505
- title: "对应我的DID",
6601
+ title: "我司对应DID",
6506
6602
  enum: didEnum
6507
6603
  },
6508
6604
  dataStatus: {
@@ -6715,10 +6811,20 @@ function Rule$2(props) {
6715
6811
  dataIndex: 'dataStatus',
6716
6812
  width: 100,
6717
6813
  render: function render(text) {
6718
- return dataStatusEnum[text];
6814
+ if (text === 2) {
6815
+ return /*#__PURE__*/React__default['default'].createElement("span", null, "\u505C\u7528");
6816
+ }
6817
+
6818
+ if (text === 1) {
6819
+ return /*#__PURE__*/React__default['default'].createElement("span", {
6820
+ style: {
6821
+ color: '#0074ff'
6822
+ }
6823
+ }, "\u4F7F\u7528\u4E2D");
6824
+ }
6719
6825
  }
6720
6826
  }, {
6721
- title: '对应我的DID',
6827
+ title: '我司对应DID',
6722
6828
  dataIndex: 'companyDid',
6723
6829
  render: function render(text, record) {
6724
6830
  if (text) {
@@ -6734,14 +6840,13 @@ function Rule$2(props) {
6734
6840
  render: function render(text) {
6735
6841
  return moment__default['default'](text).format('YYYY-MM-DD HH:mm');
6736
6842
  }
6737
- }, {
6738
- title: '最近更新时间',
6739
- width: 200,
6740
- dataIndex: 'updateTime',
6741
- render: function render(text) {
6742
- return moment__default['default'](text).format('YYYY-MM-DD HH:mm');
6743
- }
6744
- }, {
6843
+ }, // {
6844
+ // title: '最近更新时间',
6845
+ // width: 200,
6846
+ // dataIndex: 'updateTime',
6847
+ // render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
6848
+ // },
6849
+ {
6745
6850
  title: '操作',
6746
6851
  width: 80,
6747
6852
  dataIndex: 'console',
@@ -6790,51 +6895,75 @@ function Rule$2(props) {
6790
6895
  }))();
6791
6896
  }, []);
6792
6897
  React.useEffect(function () {
6793
- _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
6898
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
6794
6899
  var res;
6795
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
6900
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
6796
6901
  while (1) {
6797
- switch (_context2.prev = _context2.next) {
6902
+ switch (_context3.prev = _context3.next) {
6798
6903
  case 0:
6799
- _context2.next = 2;
6904
+ _context3.next = 2;
6800
6905
  return controller.getBlacklist(_objectSpread2(_objectSpread2({}, params), pageParams));
6801
6906
 
6802
6907
  case 2:
6803
- res = _context2.sent;
6908
+ res = _context3.sent;
6804
6909
 
6805
- if (res.res) {
6806
- setpageMeta(res.res.pageMeta);
6910
+ if (!res.res) {
6911
+ _context3.next = 7;
6912
+ break;
6807
6913
  }
6808
6914
 
6809
- case 4:
6915
+ setpageMeta(res.res.pageMeta);
6916
+ _context3.next = 7;
6917
+ return controller.pipeline( /*#__PURE__*/function () {
6918
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
6919
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
6920
+ while (1) {
6921
+ switch (_context2.prev = _context2.next) {
6922
+ case 0:
6923
+ s.blacklist = res.res.items || [];
6924
+
6925
+ case 1:
6926
+ case "end":
6927
+ return _context2.stop();
6928
+ }
6929
+ }
6930
+ }, _callee2);
6931
+ }));
6932
+
6933
+ return function (_x) {
6934
+ return _ref3.apply(this, arguments);
6935
+ };
6936
+ }())();
6937
+
6938
+ case 7:
6810
6939
  case "end":
6811
- return _context2.stop();
6940
+ return _context3.stop();
6812
6941
  }
6813
6942
  }
6814
- }, _callee2);
6943
+ }, _callee3);
6815
6944
  }))();
6816
6945
  }, [params, pageParams]);
6817
6946
  var rowSelection = React.useMemo(function () {
6818
6947
  return {
6819
6948
  onChange: function onChange(selectedRowKeys, selectedRows) {
6820
6949
  controller.pipeline( /*#__PURE__*/function () {
6821
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
6822
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
6950
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
6951
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
6823
6952
  while (1) {
6824
- switch (_context3.prev = _context3.next) {
6953
+ switch (_context4.prev = _context4.next) {
6825
6954
  case 0:
6826
6955
  s.selectedBlackRowKey = selectedRows;
6827
6956
 
6828
6957
  case 1:
6829
6958
  case "end":
6830
- return _context3.stop();
6959
+ return _context4.stop();
6831
6960
  }
6832
6961
  }
6833
- }, _callee3);
6962
+ }, _callee4);
6834
6963
  }));
6835
6964
 
6836
- return function (_x) {
6837
- return _ref3.apply(this, arguments);
6965
+ return function (_x2) {
6966
+ return _ref4.apply(this, arguments);
6838
6967
  };
6839
6968
  }())();
6840
6969
  }
@@ -7261,7 +7390,7 @@ function modalcomfirm$1(props) {
7261
7390
  maxLength: 100,
7262
7391
  placeholder: "\u6700\u591A\u8F93\u5165100\u4E2A\u5B57\u7B26"
7263
7392
  })), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Form.Item, {
7264
- label: "\u5BF9\u5E94\u6211\u7684DID",
7393
+ label: "\u6211\u53F8\u5BF9\u5E94DID",
7265
7394
  name: "companyDid",
7266
7395
  rules: [{
7267
7396
  required: true,
@@ -7387,7 +7516,7 @@ function modalcomfirm$2(props) {
7387
7516
  },
7388
7517
  companyDid: {
7389
7518
  type: "string",
7390
- title: "对应我的DID",
7519
+ title: "我司对应DID",
7391
7520
  enum: didEnum
7392
7521
  },
7393
7522
  customerDidNote: {
@@ -7421,7 +7550,7 @@ function modalcomfirm$2(props) {
7421
7550
  dataIndex: 'customerName',
7422
7551
  width: 200
7423
7552
  }, {
7424
- title: '对应我的DID',
7553
+ title: '我司对应DID',
7425
7554
  dataIndex: 'companyDid',
7426
7555
  render: function render(text, record) {
7427
7556
  if (text) {
@@ -7474,12 +7603,27 @@ function modalcomfirm$2(props) {
7474
7603
  while (1) {
7475
7604
  switch (_context3.prev = _context3.next) {
7476
7605
  case 0:
7477
- _context3.next = 2;
7606
+ if (!(listNature === '1')) {
7607
+ _context3.next = 6;
7608
+ break;
7609
+ }
7610
+
7611
+ _context3.next = 3;
7478
7612
  return controller.addWhite(selectedRowKeys);
7479
7613
 
7480
- case 2:
7614
+ case 3:
7615
+ res = _context3.sent;
7616
+ _context3.next = 9;
7617
+ break;
7618
+
7619
+ case 6:
7620
+ _context3.next = 8;
7621
+ return controller.addBlack(selectedRowKeys);
7622
+
7623
+ case 8:
7481
7624
  res = _context3.sent;
7482
7625
 
7626
+ case 9:
7483
7627
  if (res.res) {
7484
7628
  if (listNature === '1') {
7485
7629
  data = _objectSpread2(_objectSpread2({}, whiteParams), {}, {
@@ -7496,7 +7640,7 @@ function modalcomfirm$2(props) {
7496
7640
 
7497
7641
  handleCancel();
7498
7642
 
7499
- case 5:
7643
+ case 11:
7500
7644
  case "end":
7501
7645
  return _context3.stop();
7502
7646
  }
@@ -7619,8 +7763,146 @@ var Main$4 = function Main(props) {
7619
7763
  }, /*#__PURE__*/React__default['default'].createElement(Rule$4, null), visible && /*#__PURE__*/React__default['default'].createElement(modalcomfirm$1, null), clientModal && /*#__PURE__*/React__default['default'].createElement(modalcomfirm$2, null)));
7620
7764
  };
7621
7765
 
7766
+ var getWhitelist$1 = /*#__PURE__*/(function () {
7767
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
7768
+ var _DocumentsService$ins;
7769
+
7770
+ var res;
7771
+ return regeneratorRuntime.wrap(function _callee$(_context) {
7772
+ while (1) {
7773
+ switch (_context.prev = _context.next) {
7774
+ case 0:
7775
+ console.log('DocumentsService.instance.service ===>', DocumentsService.instance.service);
7776
+ _context.next = 3;
7777
+ return (_DocumentsService$ins = DocumentsService.instance.service) === null || _DocumentsService$ins === void 0 ? void 0 : _DocumentsService$ins.call({
7778
+ url: '/whiteblacklist/config/queryWhiteListPage',
7779
+ data: {
7780
+ pageSize: 10,
7781
+ pageNum: 1
7782
+ },
7783
+ type: 'post'
7784
+ });
7785
+
7786
+ case 3:
7787
+ res = _context.sent;
7788
+
7789
+ if (!res.err) {
7790
+ _context.next = 6;
7791
+ break;
7792
+ }
7793
+
7794
+ return _context.abrupt("return", false);
7795
+
7796
+ case 6:
7797
+ if (!res.res) {
7798
+ _context.next = 10;
7799
+ break;
7800
+ }
7801
+
7802
+ res.res.items = res.res.items.map(function (item, index) {
7803
+ return _objectSpread2(_objectSpread2({}, item), {}, {
7804
+ index: index
7805
+ });
7806
+ });
7807
+ s.whiteblacklist = res.res.items || [];
7808
+ return _context.abrupt("return", res);
7809
+
7810
+ case 10:
7811
+ case "end":
7812
+ return _context.stop();
7813
+ }
7814
+ }
7815
+ }, _callee);
7816
+ }));
7817
+
7818
+ return function (_x) {
7819
+ return _ref.apply(this, arguments);
7820
+ };
7821
+ })();
7822
+
7823
+ var ControllerState$2 = function ControllerState() {
7824
+ _classCallCheck(this, ControllerState);
7825
+ };
7826
+
7827
+ var Controller$2 = /*#__PURE__*/function (_GreyReactBox) {
7828
+ _inherits(Controller, _GreyReactBox);
7829
+
7830
+ var _super = _createSuper(Controller);
7831
+
7832
+ function Controller() {
7833
+ var _this;
7834
+
7835
+ _classCallCheck(this, Controller);
7836
+
7837
+ _this = _super.call(this, new ControllerState$2());
7838
+ _this.getWhitelist = _this.pipeline(getWhitelist$1);
7839
+ return _this;
7840
+ }
7841
+
7842
+ return Controller;
7843
+ }(GreyReactBox__default['default']);
7844
+
7845
+ var Text = (function (props) {
7846
+ var controller = DocumentsCont$1.useController();
7847
+ var whiteblacklist = controller.useMemo(function (s) {
7848
+ return s.whiteblacklist;
7849
+ }, []);
7850
+ console.log(whiteblacklist);
7851
+ React__default['default'].useEffect(function () {
7852
+ controller.getWhitelist();
7853
+ }, []);
7854
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, null, "\u53D1\u9001"));
7855
+ });
7856
+
7857
+ window.document.domain = window.location.host.split('.').slice(-2).join('.').split(':')[0]; // 设置 sdk
7858
+
7859
+ DocumentsService.instance.service = new ktsComponentService.ComponentServicePlatform(window.top['$$_kxl_sdk']); // 设置上下文
7860
+
7861
+ DocumentsService.instance.service.context = '/dap/web';
7862
+ var DocumentsEditContext$1 = /*#__PURE__*/React__default['default'].createContext(undefined);
7863
+
7864
+ var DocumentsCont$1 = /*#__PURE__*/function (_React$Component) {
7865
+ _inherits(DocumentsCont, _React$Component);
7866
+
7867
+ var _super = _createSuper(DocumentsCont);
7868
+
7869
+ function DocumentsCont() {
7870
+ var _this;
7871
+
7872
+ _classCallCheck(this, DocumentsCont);
7873
+
7874
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7875
+ args[_key] = arguments[_key];
7876
+ }
7877
+
7878
+ _this = _super.call.apply(_super, [this].concat(args));
7879
+
7880
+ _this.render = function () {
7881
+ return /*#__PURE__*/React__default['default'].createElement(Main$5, _objectSpread2({}, _this.props));
7882
+ };
7883
+
7884
+ return _this;
7885
+ }
7886
+
7887
+ return DocumentsCont;
7888
+ }(React__default['default'].Component);
7889
+
7890
+ DocumentsCont$1.useController = function () {
7891
+ return React__default['default'].useContext(DocumentsEditContext$1);
7892
+ };
7893
+
7894
+ var Main$5 = function Main(props) {
7895
+ var controller = React__default['default'].useMemo(function () {
7896
+ return new Controller$2();
7897
+ }, []);
7898
+ return /*#__PURE__*/React__default['default'].createElement(DocumentsEditContext$1.Provider, {
7899
+ value: controller
7900
+ }, /*#__PURE__*/React__default['default'].createElement(Text, null));
7901
+ };
7902
+
7622
7903
  exports.DocumentWhiteList = WhiteList;
7623
7904
  exports.DocumentsCont = DocumentsCont;
7905
+ exports.DocumentsDemo = DocumentsCont$1;
7624
7906
  exports.DocumentsEdit = DocumentsEdit;
7625
7907
  exports.DocumentsList = DocumentsList;
7626
7908
  exports.DocumentsRule = DocumentsRule;