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.esm.js CHANGED
@@ -11,6 +11,7 @@ import { useHistory, MemoryRouter, Switch as Switch$1, Route, Redirect } from 'r
11
11
  import zhCN from 'kts-components-antd-x4/lib/locale/zh_CN';
12
12
  import qs from 'query-string';
13
13
  import _ from 'lodash';
14
+ import { ComponentServicePlatform } from 'kts-component-service';
14
15
 
15
16
  function ownKeys(object, enumerableOnly) {
16
17
  var keys = Object.keys(object);
@@ -2706,6 +2707,7 @@ var Main = function Main(props) {
2706
2707
 
2707
2708
  function modalcomfirm(props) {
2708
2709
  var selectItems = props.list;
2710
+ var history = useHistory();
2709
2711
  var controller = DocumentsList.useController();
2710
2712
  var targetId = controller.useMemo(function (s) {
2711
2713
  return s.targetId;
@@ -2777,6 +2779,7 @@ function modalcomfirm(props) {
2777
2779
  res = _context2.sent;
2778
2780
 
2779
2781
  if (res.res) {
2782
+ gotoSendlist();
2780
2783
  message.success('操作成功');
2781
2784
  props.handleCancel();
2782
2785
  }
@@ -2789,16 +2792,29 @@ function modalcomfirm(props) {
2789
2792
  }, _callee2);
2790
2793
  }))();
2791
2794
  }, [targetId]);
2792
- var targetSelect = useCallback(function (e) {
2795
+ var gotoSendlist = useCallback(function () {
2793
2796
  controller.pipeline( /*#__PURE__*/function () {
2794
2797
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
2795
2798
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
2796
2799
  while (1) {
2797
2800
  switch (_context3.prev = _context3.next) {
2798
2801
  case 0:
2799
- s.targetId = e.target.value;
2802
+ s.type = 2;
2800
2803
 
2801
- case 1:
2804
+ if (selectItems.length === 1) {
2805
+ s.params = {
2806
+ configNumber: selectItems[0].configNumber
2807
+ };
2808
+ }
2809
+
2810
+ history.push({
2811
+ pathname: "/rulelist",
2812
+ state: {
2813
+ type: 2
2814
+ }
2815
+ });
2816
+
2817
+ case 3:
2802
2818
  case "end":
2803
2819
  return _context3.stop();
2804
2820
  }
@@ -2811,6 +2827,28 @@ function modalcomfirm(props) {
2811
2827
  };
2812
2828
  }())();
2813
2829
  }, []);
2830
+ var targetSelect = useCallback(function (e) {
2831
+ controller.pipeline( /*#__PURE__*/function () {
2832
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
2833
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
2834
+ while (1) {
2835
+ switch (_context4.prev = _context4.next) {
2836
+ case 0:
2837
+ s.targetId = e.target.value;
2838
+
2839
+ case 1:
2840
+ case "end":
2841
+ return _context4.stop();
2842
+ }
2843
+ }
2844
+ }, _callee4);
2845
+ }));
2846
+
2847
+ return function (_x2) {
2848
+ return _ref4.apply(this, arguments);
2849
+ };
2850
+ }())();
2851
+ }, []);
2814
2852
  var radioStyle = useMemo(function () {
2815
2853
  return {
2816
2854
  alignItems: 'center',
@@ -2831,8 +2869,6 @@ function modalcomfirm(props) {
2831
2869
  style: radioStyle,
2832
2870
  key: key,
2833
2871
  value: item.participantId
2834
- }, /*#__PURE__*/React.createElement(Tooltip, {
2835
- title: item.participantId
2836
2872
  }, /*#__PURE__*/React.createElement("div", {
2837
2873
  style: {
2838
2874
  display: 'flex',
@@ -2846,7 +2882,7 @@ function modalcomfirm(props) {
2846
2882
  textOverflow: 'ellipsis',
2847
2883
  display: 'block'
2848
2884
  }
2849
- }, item.participantId))));
2885
+ }, item.participantId)));
2850
2886
  }))));
2851
2887
  }
2852
2888
 
@@ -2884,18 +2920,25 @@ var PageHeader = (function () {
2884
2920
  setSchema = _useState6[1];
2885
2921
 
2886
2922
  var ktsRef = useRef(null);
2923
+
2924
+ var _useState7 = useState([]),
2925
+ _useState8 = _slicedToArray(_useState7, 2),
2926
+ didlist = _useState8[0],
2927
+ setDidList = _useState8[1]; //我司对应DID
2928
+
2929
+
2887
2930
  useEffect(function () {
2888
2931
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
2889
2932
  var _DocumentsService$ins;
2890
2933
 
2891
- var res, list;
2934
+ var res;
2892
2935
  return regeneratorRuntime.wrap(function _callee$(_context) {
2893
2936
  while (1) {
2894
2937
  switch (_context.prev = _context.next) {
2895
2938
  case 0:
2896
2939
  _context.next = 2;
2897
2940
  return (_DocumentsService$ins = DocumentsService.instance.service) === null || _DocumentsService$ins === void 0 ? void 0 : _DocumentsService$ins.call({
2898
- url: '/schema/config/getDefaultTypeList',
2941
+ url: '/participant/listBySubjectId',
2899
2942
  data: {},
2900
2943
  type: 'get'
2901
2944
  });
@@ -2903,12 +2946,43 @@ var PageHeader = (function () {
2903
2946
  case 2:
2904
2947
  res = _context.sent;
2905
2948
 
2949
+ if (res.res) {
2950
+ setDidList(res.res);
2951
+ }
2952
+
2953
+ case 4:
2954
+ case "end":
2955
+ return _context.stop();
2956
+ }
2957
+ }
2958
+ }, _callee);
2959
+ }))();
2960
+ }, []);
2961
+ useEffect(function () {
2962
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2963
+ var _DocumentsService$ins2;
2964
+
2965
+ var res, list;
2966
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
2967
+ while (1) {
2968
+ switch (_context2.prev = _context2.next) {
2969
+ case 0:
2970
+ _context2.next = 2;
2971
+ return (_DocumentsService$ins2 = DocumentsService.instance.service) === null || _DocumentsService$ins2 === void 0 ? void 0 : _DocumentsService$ins2.call({
2972
+ url: '/schema/config/getDefaultTypeList',
2973
+ data: {},
2974
+ type: 'get'
2975
+ });
2976
+
2977
+ case 2:
2978
+ res = _context2.sent;
2979
+
2906
2980
  if (!res.err) {
2907
- _context.next = 7;
2981
+ _context2.next = 7;
2908
2982
  break;
2909
2983
  }
2910
2984
 
2911
- return _context.abrupt("return", false);
2985
+ return _context2.abrupt("return", false);
2912
2986
 
2913
2987
  case 7:
2914
2988
  list = res.res.map(function (item) {
@@ -2921,10 +2995,10 @@ var PageHeader = (function () {
2921
2995
 
2922
2996
  case 9:
2923
2997
  case "end":
2924
- return _context.stop();
2998
+ return _context2.stop();
2925
2999
  }
2926
3000
  }
2927
- }, _callee);
3001
+ }, _callee2);
2928
3002
  }))();
2929
3003
  }, []);
2930
3004
  var onSearchFormSubmit = React.useCallback(function (value) {
@@ -2932,32 +3006,32 @@ var PageHeader = (function () {
2932
3006
  typeList: value['typeList'] && [value['typeList']]
2933
3007
  });
2934
3008
  controller.pipeline( /*#__PURE__*/function () {
2935
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
2936
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
3009
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
3010
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
2937
3011
  while (1) {
2938
- switch (_context2.prev = _context2.next) {
3012
+ switch (_context3.prev = _context3.next) {
2939
3013
  case 0:
2940
3014
  s.params = value;
2941
3015
 
2942
3016
  case 1:
2943
3017
  case "end":
2944
- return _context2.stop();
3018
+ return _context3.stop();
2945
3019
  }
2946
3020
  }
2947
- }, _callee2);
3021
+ }, _callee3);
2948
3022
  }));
2949
3023
 
2950
3024
  return function (_x) {
2951
- return _ref2.apply(this, arguments);
3025
+ return _ref3.apply(this, arguments);
2952
3026
  };
2953
3027
  }())();
2954
3028
  }, [controller]);
2955
3029
  var switchType = React.useCallback(function (e) {
2956
3030
  controller.pipeline( /*#__PURE__*/function () {
2957
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
2958
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
3031
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
3032
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
2959
3033
  while (1) {
2960
- switch (_context3.prev = _context3.next) {
3034
+ switch (_context4.prev = _context4.next) {
2961
3035
  case 0:
2962
3036
  s.type = e.target.value;
2963
3037
  s.params = {};
@@ -2970,62 +3044,69 @@ var PageHeader = (function () {
2970
3044
 
2971
3045
  case 3:
2972
3046
  case "end":
2973
- return _context3.stop();
3047
+ return _context4.stop();
2974
3048
  }
2975
3049
  }
2976
- }, _callee3);
3050
+ }, _callee4);
2977
3051
  }));
2978
3052
 
2979
3053
  return function (_x2) {
2980
- return _ref3.apply(this, arguments);
3054
+ return _ref4.apply(this, arguments);
2981
3055
  };
2982
3056
  }())();
2983
3057
  }, []);
2984
3058
  var handleCancel = React.useCallback(function () {
2985
3059
  controller.pipeline( /*#__PURE__*/function () {
2986
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
2987
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
3060
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
3061
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
2988
3062
  while (1) {
2989
- switch (_context4.prev = _context4.next) {
3063
+ switch (_context5.prev = _context5.next) {
2990
3064
  case 0:
2991
3065
  s.visible = false;
2992
3066
 
2993
3067
  case 1:
2994
3068
  case "end":
2995
- return _context4.stop();
3069
+ return _context5.stop();
2996
3070
  }
2997
3071
  }
2998
- }, _callee4);
3072
+ }, _callee5);
2999
3073
  }));
3000
3074
 
3001
3075
  return function (_x3) {
3002
- return _ref4.apply(this, arguments);
3076
+ return _ref5.apply(this, arguments);
3003
3077
  };
3004
3078
  }())();
3005
3079
  }, []);
3006
3080
  var batchSend = React.useCallback(function () {
3007
3081
  controller.pipeline( /*#__PURE__*/function () {
3008
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
3009
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
3082
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(s) {
3083
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
3010
3084
  while (1) {
3011
- switch (_context5.prev = _context5.next) {
3085
+ switch (_context6.prev = _context6.next) {
3012
3086
  case 0:
3013
3087
  s.visible = true;
3014
3088
 
3015
3089
  case 1:
3016
3090
  case "end":
3017
- return _context5.stop();
3091
+ return _context6.stop();
3018
3092
  }
3019
3093
  }
3020
- }, _callee5);
3094
+ }, _callee6);
3021
3095
  }));
3022
3096
 
3023
3097
  return function (_x4) {
3024
- return _ref5.apply(this, arguments);
3098
+ return _ref6.apply(this, arguments);
3025
3099
  };
3026
3100
  }())();
3027
3101
  }, [controller]);
3028
3102
  useEffect(function () {
3103
+ var didEnum = didlist.map(function (item) {
3104
+ return {
3105
+ label: item.remarkName + ':' + item.participantId,
3106
+ value: item.participantId
3107
+ };
3108
+ });
3109
+
3029
3110
  if (type === 1) {
3030
3111
  var obj = {
3031
3112
  type: "object",
@@ -3051,14 +3132,14 @@ var PageHeader = (function () {
3051
3132
  visible: false
3052
3133
  },
3053
3134
  attribution: {
3054
- type: "string",
3055
- title: "单据类型",
3135
+ type: "radio",
3136
+ title: "收发角色",
3056
3137
  enum: [{
3057
3138
  "label": "发送方",
3058
- "value": '1'
3139
+ "value": 1
3059
3140
  }, {
3060
3141
  "label": "接收方",
3061
- "value": '0'
3142
+ "value": 0
3062
3143
  }],
3063
3144
  'x-props': {
3064
3145
  mode: "multiple"
@@ -3103,10 +3184,10 @@ var PageHeader = (function () {
3103
3184
  title: "我的收发角色",
3104
3185
  enum: [{
3105
3186
  "label": "发送方",
3106
- "value": '1'
3187
+ "value": 1
3107
3188
  }, {
3108
3189
  "label": "接收方",
3109
- "value": '0'
3190
+ "value": 0
3110
3191
  }],
3111
3192
  'x-props': {
3112
3193
  mode: "multiple"
@@ -3117,15 +3198,16 @@ var PageHeader = (function () {
3117
3198
  title: "发送对象",
3118
3199
  visible: true
3119
3200
  },
3120
- did: {
3201
+ senderParticipantId: {
3121
3202
  type: "string",
3122
- title: "我司对应DID"
3203
+ title: "我司对应DID",
3204
+ enum: didEnum
3123
3205
  },
3124
- duixiang: {
3206
+ receiverParticipantId: {
3125
3207
  type: "string",
3126
3208
  title: "接受对象"
3127
3209
  },
3128
- duixianggongsi: {
3210
+ receiverCompany: {
3129
3211
  type: "string",
3130
3212
  title: "接受对象所属公司"
3131
3213
  },
@@ -3156,7 +3238,7 @@ var PageHeader = (function () {
3156
3238
  };
3157
3239
  setSchema(_obj);
3158
3240
  }
3159
- }, [billEnum, type, profileEnum]);
3241
+ }, [billEnum, type, profileEnum, didlist]);
3160
3242
  var onCreateType = useCallback(function (category, record) {
3161
3243
  history.push({
3162
3244
  pathname: "/rule",
@@ -4911,6 +4993,13 @@ function Rule(props) {
4911
4993
 
4912
4994
  if (publish) {
4913
4995
  onSendCheck();
4996
+ } else {
4997
+ history.push({
4998
+ pathname: "/rulelist",
4999
+ state: {
5000
+ type: 1
5001
+ }
5002
+ });
4914
5003
  }
4915
5004
  }
4916
5005
 
@@ -4985,10 +5074,15 @@ function Rule(props) {
4985
5074
  case 3:
4986
5075
  res = _context7.sent;
4987
5076
 
4988
- // const res = await DocumentsService.instance.service?.call({ url: '/dap/web/schema/config/batchSend', data: [data], type: 'post' }) as any;
4989
5077
  if (res.res) {
4990
5078
  message$1.success('操作成功');
4991
5079
  handleCancel();
5080
+ history.push({
5081
+ pathname: "/rulelist",
5082
+ state: {
5083
+ type: 2
5084
+ }
5085
+ });
4992
5086
  }
4993
5087
 
4994
5088
  case 5:
@@ -5200,8 +5294,6 @@ function Rule(props) {
5200
5294
  style: radioStyle,
5201
5295
  key: key,
5202
5296
  value: item.participantId
5203
- }, /*#__PURE__*/React.createElement(Tooltip, {
5204
- title: item.participantId
5205
5297
  }, /*#__PURE__*/React.createElement("div", {
5206
5298
  style: {
5207
5299
  display: 'flex',
@@ -5215,7 +5307,7 @@ function Rule(props) {
5215
5307
  textOverflow: 'ellipsis',
5216
5308
  display: 'block'
5217
5309
  }
5218
- }, item.participantId))));
5310
+ }, item.participantId)));
5219
5311
  }))));
5220
5312
  }
5221
5313
 
@@ -5920,11 +6012,6 @@ var Controller$1 = /*#__PURE__*/function (_GreyReactBox) {
5920
6012
  return Controller;
5921
6013
  }(GreyReactBox);
5922
6014
 
5923
- var dataStatusEnum = {
5924
- '1': '使用中',
5925
- '2': '停用'
5926
- };
5927
-
5928
6015
  var Header = (function () {
5929
6016
  var controller = WhiteList.useController();
5930
6017
 
@@ -5976,8 +6063,6 @@ var Header = (function () {
5976
6063
  controller.checkclient();
5977
6064
  }, []);
5978
6065
  useEffect(function () {
5979
- // console.log(controller);
5980
- // controller.pipeline(controller.didList)({})
5981
6066
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
5982
6067
  var res;
5983
6068
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -6041,7 +6126,7 @@ var Header = (function () {
6041
6126
  },
6042
6127
  companyDid: {
6043
6128
  type: "string",
6044
- title: "对应我的DID",
6129
+ title: "我司对应DID",
6045
6130
  enum: didEnum
6046
6131
  },
6047
6132
  dataStatus: {
@@ -6257,10 +6342,20 @@ function Rule$1(props) {
6257
6342
  dataIndex: 'dataStatus',
6258
6343
  width: 100,
6259
6344
  render: function render(text) {
6260
- return dataStatusEnum[text];
6345
+ if (text === 2) {
6346
+ return /*#__PURE__*/React.createElement("span", null, "\u505C\u7528");
6347
+ }
6348
+
6349
+ if (text === 1) {
6350
+ return /*#__PURE__*/React.createElement("span", {
6351
+ style: {
6352
+ color: '#0074ff'
6353
+ }
6354
+ }, "\u4F7F\u7528\u4E2D");
6355
+ }
6261
6356
  }
6262
6357
  }, {
6263
- title: '对应我的DID',
6358
+ title: '我司对应DID',
6264
6359
  dataIndex: 'companyDid',
6265
6360
  render: function render(text, record) {
6266
6361
  if (text) {
@@ -6276,14 +6371,13 @@ function Rule$1(props) {
6276
6371
  render: function render(text) {
6277
6372
  return moment(text).format('YYYY-MM-DD HH:mm');
6278
6373
  }
6279
- }, {
6280
- title: '最近更新时间',
6281
- dataIndex: 'updateTime',
6282
- width: 200,
6283
- render: function render(text) {
6284
- return moment(text).format('YYYY-MM-DD HH:mm');
6285
- }
6286
- }, {
6374
+ }, // {
6375
+ // title: '最近更新时间',
6376
+ // dataIndex: 'updateTime',
6377
+ // width: 200,
6378
+ // render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
6379
+ // },
6380
+ {
6287
6381
  title: '操作',
6288
6382
  dataIndex: 'console',
6289
6383
  width: 80,
@@ -6345,7 +6439,9 @@ function Rule$1(props) {
6345
6439
  res = _context2.sent;
6346
6440
 
6347
6441
  if (res.res) {
6348
- setpageMeta(res.res.pageMeta);
6442
+ setpageMeta(res.res.pageMeta); // await controller.pipeline(async s => {
6443
+ // s.whiteblacklist = res.res.items || [];
6444
+ // })()
6349
6445
  }
6350
6446
 
6351
6447
  case 4:
@@ -6355,7 +6451,7 @@ function Rule$1(props) {
6355
6451
  }
6356
6452
  }, _callee2);
6357
6453
  }))();
6358
- }, [whiteParams, pageParams]);
6454
+ }, [whiteParams]);
6359
6455
  var rowSelection = useMemo(function () {
6360
6456
  return {
6361
6457
  onChange: function onChange(selectedRowKeys, selectedRows) {
@@ -6488,7 +6584,7 @@ var Header$1 = (function () {
6488
6584
  },
6489
6585
  companyDid: {
6490
6586
  type: "string",
6491
- title: "对应我的DID",
6587
+ title: "我司对应DID",
6492
6588
  enum: didEnum
6493
6589
  },
6494
6590
  dataStatus: {
@@ -6701,10 +6797,20 @@ function Rule$2(props) {
6701
6797
  dataIndex: 'dataStatus',
6702
6798
  width: 100,
6703
6799
  render: function render(text) {
6704
- return dataStatusEnum[text];
6800
+ if (text === 2) {
6801
+ return /*#__PURE__*/React.createElement("span", null, "\u505C\u7528");
6802
+ }
6803
+
6804
+ if (text === 1) {
6805
+ return /*#__PURE__*/React.createElement("span", {
6806
+ style: {
6807
+ color: '#0074ff'
6808
+ }
6809
+ }, "\u4F7F\u7528\u4E2D");
6810
+ }
6705
6811
  }
6706
6812
  }, {
6707
- title: '对应我的DID',
6813
+ title: '我司对应DID',
6708
6814
  dataIndex: 'companyDid',
6709
6815
  render: function render(text, record) {
6710
6816
  if (text) {
@@ -6720,14 +6826,13 @@ function Rule$2(props) {
6720
6826
  render: function render(text) {
6721
6827
  return moment(text).format('YYYY-MM-DD HH:mm');
6722
6828
  }
6723
- }, {
6724
- title: '最近更新时间',
6725
- width: 200,
6726
- dataIndex: 'updateTime',
6727
- render: function render(text) {
6728
- return moment(text).format('YYYY-MM-DD HH:mm');
6729
- }
6730
- }, {
6829
+ }, // {
6830
+ // title: '最近更新时间',
6831
+ // width: 200,
6832
+ // dataIndex: 'updateTime',
6833
+ // render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
6834
+ // },
6835
+ {
6731
6836
  title: '操作',
6732
6837
  width: 80,
6733
6838
  dataIndex: 'console',
@@ -6776,51 +6881,75 @@ function Rule$2(props) {
6776
6881
  }))();
6777
6882
  }, []);
6778
6883
  useEffect(function () {
6779
- _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
6884
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
6780
6885
  var res;
6781
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
6886
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
6782
6887
  while (1) {
6783
- switch (_context2.prev = _context2.next) {
6888
+ switch (_context3.prev = _context3.next) {
6784
6889
  case 0:
6785
- _context2.next = 2;
6890
+ _context3.next = 2;
6786
6891
  return controller.getBlacklist(_objectSpread2(_objectSpread2({}, params), pageParams));
6787
6892
 
6788
6893
  case 2:
6789
- res = _context2.sent;
6894
+ res = _context3.sent;
6790
6895
 
6791
- if (res.res) {
6792
- setpageMeta(res.res.pageMeta);
6896
+ if (!res.res) {
6897
+ _context3.next = 7;
6898
+ break;
6793
6899
  }
6794
6900
 
6795
- case 4:
6901
+ setpageMeta(res.res.pageMeta);
6902
+ _context3.next = 7;
6903
+ return controller.pipeline( /*#__PURE__*/function () {
6904
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
6905
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
6906
+ while (1) {
6907
+ switch (_context2.prev = _context2.next) {
6908
+ case 0:
6909
+ s.blacklist = res.res.items || [];
6910
+
6911
+ case 1:
6912
+ case "end":
6913
+ return _context2.stop();
6914
+ }
6915
+ }
6916
+ }, _callee2);
6917
+ }));
6918
+
6919
+ return function (_x) {
6920
+ return _ref3.apply(this, arguments);
6921
+ };
6922
+ }())();
6923
+
6924
+ case 7:
6796
6925
  case "end":
6797
- return _context2.stop();
6926
+ return _context3.stop();
6798
6927
  }
6799
6928
  }
6800
- }, _callee2);
6929
+ }, _callee3);
6801
6930
  }))();
6802
6931
  }, [params, pageParams]);
6803
6932
  var rowSelection = useMemo(function () {
6804
6933
  return {
6805
6934
  onChange: function onChange(selectedRowKeys, selectedRows) {
6806
6935
  controller.pipeline( /*#__PURE__*/function () {
6807
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
6808
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
6936
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
6937
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
6809
6938
  while (1) {
6810
- switch (_context3.prev = _context3.next) {
6939
+ switch (_context4.prev = _context4.next) {
6811
6940
  case 0:
6812
6941
  s.selectedBlackRowKey = selectedRows;
6813
6942
 
6814
6943
  case 1:
6815
6944
  case "end":
6816
- return _context3.stop();
6945
+ return _context4.stop();
6817
6946
  }
6818
6947
  }
6819
- }, _callee3);
6948
+ }, _callee4);
6820
6949
  }));
6821
6950
 
6822
- return function (_x) {
6823
- return _ref3.apply(this, arguments);
6951
+ return function (_x2) {
6952
+ return _ref4.apply(this, arguments);
6824
6953
  };
6825
6954
  }())();
6826
6955
  }
@@ -7247,7 +7376,7 @@ function modalcomfirm$1(props) {
7247
7376
  maxLength: 100,
7248
7377
  placeholder: "\u6700\u591A\u8F93\u5165100\u4E2A\u5B57\u7B26"
7249
7378
  })), /*#__PURE__*/React.createElement(Form.Item, {
7250
- label: "\u5BF9\u5E94\u6211\u7684DID",
7379
+ label: "\u6211\u53F8\u5BF9\u5E94DID",
7251
7380
  name: "companyDid",
7252
7381
  rules: [{
7253
7382
  required: true,
@@ -7373,7 +7502,7 @@ function modalcomfirm$2(props) {
7373
7502
  },
7374
7503
  companyDid: {
7375
7504
  type: "string",
7376
- title: "对应我的DID",
7505
+ title: "我司对应DID",
7377
7506
  enum: didEnum
7378
7507
  },
7379
7508
  customerDidNote: {
@@ -7407,7 +7536,7 @@ function modalcomfirm$2(props) {
7407
7536
  dataIndex: 'customerName',
7408
7537
  width: 200
7409
7538
  }, {
7410
- title: '对应我的DID',
7539
+ title: '我司对应DID',
7411
7540
  dataIndex: 'companyDid',
7412
7541
  render: function render(text, record) {
7413
7542
  if (text) {
@@ -7460,12 +7589,27 @@ function modalcomfirm$2(props) {
7460
7589
  while (1) {
7461
7590
  switch (_context3.prev = _context3.next) {
7462
7591
  case 0:
7463
- _context3.next = 2;
7592
+ if (!(listNature === '1')) {
7593
+ _context3.next = 6;
7594
+ break;
7595
+ }
7596
+
7597
+ _context3.next = 3;
7464
7598
  return controller.addWhite(selectedRowKeys);
7465
7599
 
7466
- case 2:
7600
+ case 3:
7601
+ res = _context3.sent;
7602
+ _context3.next = 9;
7603
+ break;
7604
+
7605
+ case 6:
7606
+ _context3.next = 8;
7607
+ return controller.addBlack(selectedRowKeys);
7608
+
7609
+ case 8:
7467
7610
  res = _context3.sent;
7468
7611
 
7612
+ case 9:
7469
7613
  if (res.res) {
7470
7614
  if (listNature === '1') {
7471
7615
  data = _objectSpread2(_objectSpread2({}, whiteParams), {}, {
@@ -7482,7 +7626,7 @@ function modalcomfirm$2(props) {
7482
7626
 
7483
7627
  handleCancel();
7484
7628
 
7485
- case 5:
7629
+ case 11:
7486
7630
  case "end":
7487
7631
  return _context3.stop();
7488
7632
  }
@@ -7605,4 +7749,141 @@ var Main$4 = function Main(props) {
7605
7749
  }, /*#__PURE__*/React.createElement(Rule$4, null), visible && /*#__PURE__*/React.createElement(modalcomfirm$1, null), clientModal && /*#__PURE__*/React.createElement(modalcomfirm$2, null)));
7606
7750
  };
7607
7751
 
7608
- export { WhiteList as DocumentWhiteList, DocumentsCont, DocumentsEdit, DocumentsList, DocumentsRule, DocumentsService };
7752
+ var getWhitelist$1 = /*#__PURE__*/(function () {
7753
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
7754
+ var _DocumentsService$ins;
7755
+
7756
+ var res;
7757
+ return regeneratorRuntime.wrap(function _callee$(_context) {
7758
+ while (1) {
7759
+ switch (_context.prev = _context.next) {
7760
+ case 0:
7761
+ console.log('DocumentsService.instance.service ===>', DocumentsService.instance.service);
7762
+ _context.next = 3;
7763
+ return (_DocumentsService$ins = DocumentsService.instance.service) === null || _DocumentsService$ins === void 0 ? void 0 : _DocumentsService$ins.call({
7764
+ url: '/whiteblacklist/config/queryWhiteListPage',
7765
+ data: {
7766
+ pageSize: 10,
7767
+ pageNum: 1
7768
+ },
7769
+ type: 'post'
7770
+ });
7771
+
7772
+ case 3:
7773
+ res = _context.sent;
7774
+
7775
+ if (!res.err) {
7776
+ _context.next = 6;
7777
+ break;
7778
+ }
7779
+
7780
+ return _context.abrupt("return", false);
7781
+
7782
+ case 6:
7783
+ if (!res.res) {
7784
+ _context.next = 10;
7785
+ break;
7786
+ }
7787
+
7788
+ res.res.items = res.res.items.map(function (item, index) {
7789
+ return _objectSpread2(_objectSpread2({}, item), {}, {
7790
+ index: index
7791
+ });
7792
+ });
7793
+ s.whiteblacklist = res.res.items || [];
7794
+ return _context.abrupt("return", res);
7795
+
7796
+ case 10:
7797
+ case "end":
7798
+ return _context.stop();
7799
+ }
7800
+ }
7801
+ }, _callee);
7802
+ }));
7803
+
7804
+ return function (_x) {
7805
+ return _ref.apply(this, arguments);
7806
+ };
7807
+ })();
7808
+
7809
+ var ControllerState$2 = function ControllerState() {
7810
+ _classCallCheck(this, ControllerState);
7811
+ };
7812
+
7813
+ var Controller$2 = /*#__PURE__*/function (_GreyReactBox) {
7814
+ _inherits(Controller, _GreyReactBox);
7815
+
7816
+ var _super = _createSuper(Controller);
7817
+
7818
+ function Controller() {
7819
+ var _this;
7820
+
7821
+ _classCallCheck(this, Controller);
7822
+
7823
+ _this = _super.call(this, new ControllerState$2());
7824
+ _this.getWhitelist = _this.pipeline(getWhitelist$1);
7825
+ return _this;
7826
+ }
7827
+
7828
+ return Controller;
7829
+ }(GreyReactBox);
7830
+
7831
+ var Text = (function (props) {
7832
+ var controller = DocumentsCont$1.useController();
7833
+ var whiteblacklist = controller.useMemo(function (s) {
7834
+ return s.whiteblacklist;
7835
+ }, []);
7836
+ console.log(whiteblacklist);
7837
+ React.useEffect(function () {
7838
+ controller.getWhitelist();
7839
+ }, []);
7840
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, null, "\u53D1\u9001"));
7841
+ });
7842
+
7843
+ window.document.domain = window.location.host.split('.').slice(-2).join('.').split(':')[0]; // 设置 sdk
7844
+
7845
+ DocumentsService.instance.service = new ComponentServicePlatform(window.top['$$_kxl_sdk']); // 设置上下文
7846
+
7847
+ DocumentsService.instance.service.context = '/dap/web';
7848
+ var DocumentsEditContext$1 = /*#__PURE__*/React.createContext(undefined);
7849
+
7850
+ var DocumentsCont$1 = /*#__PURE__*/function (_React$Component) {
7851
+ _inherits(DocumentsCont, _React$Component);
7852
+
7853
+ var _super = _createSuper(DocumentsCont);
7854
+
7855
+ function DocumentsCont() {
7856
+ var _this;
7857
+
7858
+ _classCallCheck(this, DocumentsCont);
7859
+
7860
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7861
+ args[_key] = arguments[_key];
7862
+ }
7863
+
7864
+ _this = _super.call.apply(_super, [this].concat(args));
7865
+
7866
+ _this.render = function () {
7867
+ return /*#__PURE__*/React.createElement(Main$5, _objectSpread2({}, _this.props));
7868
+ };
7869
+
7870
+ return _this;
7871
+ }
7872
+
7873
+ return DocumentsCont;
7874
+ }(React.Component);
7875
+
7876
+ DocumentsCont$1.useController = function () {
7877
+ return React.useContext(DocumentsEditContext$1);
7878
+ };
7879
+
7880
+ var Main$5 = function Main(props) {
7881
+ var controller = React.useMemo(function () {
7882
+ return new Controller$2();
7883
+ }, []);
7884
+ return /*#__PURE__*/React.createElement(DocumentsEditContext$1.Provider, {
7885
+ value: controller
7886
+ }, /*#__PURE__*/React.createElement(Text, null));
7887
+ };
7888
+
7889
+ export { WhiteList as DocumentWhiteList, DocumentsCont, DocumentsCont$1 as DocumentsDemo, DocumentsEdit, DocumentsList, DocumentsRule, DocumentsService };