kts-components-document-access-point 1.4.9 → 1.4.10-v2

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
@@ -3048,10 +3048,15 @@ function modalcomfirm(props) {
3048
3048
  return s.targetId;
3049
3049
  }, []);
3050
3050
 
3051
- var _useState = useState([]),
3051
+ var _useState = useState(false),
3052
3052
  _useState2 = _slicedToArray(_useState, 2),
3053
- targetList = _useState2[0],
3054
- setTargetList = _useState2[1];
3053
+ loading = _useState2[0],
3054
+ setloading = _useState2[1];
3055
+
3056
+ var _useState3 = useState([]),
3057
+ _useState4 = _slicedToArray(_useState3, 2),
3058
+ targetList = _useState4[0],
3059
+ setTargetList = _useState4[1];
3055
3060
 
3056
3061
  useEffect(function () {
3057
3062
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
@@ -3089,9 +3094,8 @@ function modalcomfirm(props) {
3089
3094
  }, []);
3090
3095
  var handleOk = useCallback(function () {
3091
3096
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
3092
- var _DocumentsService$ins2;
3097
+ var note, data, _DocumentsService$ins2, res;
3093
3098
 
3094
- var note, data, res;
3095
3099
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
3096
3100
  while (1) {
3097
3101
  switch (_context2.prev = _context2.next) {
@@ -3107,14 +3111,21 @@ function modalcomfirm(props) {
3107
3111
  senderParticipantNote: note && note.remarkName
3108
3112
  });
3109
3113
  });
3110
- _context2.next = 4;
3114
+
3115
+ if (loading) {
3116
+ _context2.next = 9;
3117
+ break;
3118
+ }
3119
+
3120
+ setloading(true);
3121
+ _context2.next = 6;
3111
3122
  return (_DocumentsService$ins2 = DocumentsService.instance.service) === null || _DocumentsService$ins2 === void 0 ? void 0 : _DocumentsService$ins2.call({
3112
3123
  url: '/schema/config/batchSend',
3113
3124
  data: data,
3114
3125
  type: 'post'
3115
3126
  });
3116
3127
 
3117
- case 4:
3128
+ case 6:
3118
3129
  res = _context2.sent;
3119
3130
 
3120
3131
  if (res.res) {
@@ -3123,14 +3134,16 @@ function modalcomfirm(props) {
3123
3134
  props.handleCancel();
3124
3135
  }
3125
3136
 
3126
- case 6:
3137
+ setloading(false);
3138
+
3139
+ case 9:
3127
3140
  case "end":
3128
3141
  return _context2.stop();
3129
3142
  }
3130
3143
  }
3131
3144
  }, _callee2);
3132
3145
  }))();
3133
- }, [targetId, targetList]);
3146
+ }, [targetId, targetList, loading]);
3134
3147
  var gotoSendlist = useCallback(function () {
3135
3148
  controller.pipeline( /*#__PURE__*/function () {
3136
3149
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
@@ -3711,7 +3724,7 @@ var PageHeader = (function () {
3711
3724
  }));
3712
3725
  });
3713
3726
 
3714
- var css_248z$3 = ".header {\n padding: 10px 0px;\n display: flex;\n align-items: center;\n}\n.header .buttonGroup {\n margin-right: 20px;\n white-space: nowrap;\n}\n.header .buttons {\n text-align: right;\n flex: 1;\n white-space: nowrap;\n}\n.tabel-action {\n padding: 0 5px;\n font-size: 12px;\n font-family: PingFangSC-Regular, PingFang SC;\n font-weight: 400;\n color: #0074ff;\n white-space: nowrap;\n cursor: pointer;\n}\n.ktsAntX-xui-page-header-foot {\n overflow: inherit !important;\n}\n.ktsAntX-table .ktsAntX-table-thead > tr > th {\n background: #fafafa !important;\n}\n.ktsAntX-table-ping-left:not(.ktsAntX-table-has-fix-left) .ktsAntX-table-container::before {\n box-shadow: none !important;\n}\n.fixheight .ktsAntX-table .ktsAntX-table-thead > tr > th,\n.fixheight .ktsAntX-table .ktsAntX-table-tbody > tr > td,\n.fixheight .ktsAntX-table .ktsAntX-table tfoot > tr > th,\n.fixheight .ktsAntX-table .ktsAntX-table tfoot > tr > td {\n padding: 5px 16px;\n height: 50px;\n}\n.ktsAntX-table-thead > tr > th:not(:last-child):not(.ktsAntX-table-selection-column):not(.ktsAntX-table-row-expand-icon-cell):not([colspan])::before {\n opacity: 0;\n}\n";
3727
+ var css_248z$3 = "";
3715
3728
  styleInject(css_248z$3);
3716
3729
 
3717
3730
  var attributionEnum = {
@@ -5117,14 +5130,19 @@ function Rule(props) {
5117
5130
 
5118
5131
  var _controller$useRuning = controller.useRuning(controller.configupdate, controller.configsave),
5119
5132
  _controller$useRuning2 = _slicedToArray(_controller$useRuning, 1),
5120
- loading = _controller$useRuning2[0]; // const [status, setStatus] = useState(0);
5121
- // const [first, setFirst] = useState(true);
5122
-
5133
+ loading = _controller$useRuning2[0];
5123
5134
 
5124
5135
  var _useState15 = useState(false),
5125
5136
  _useState16 = _slicedToArray(_useState15, 2),
5126
- hasChange = _useState16[0],
5127
- setChange = _useState16[1];
5137
+ sendloading = _useState16[0],
5138
+ setloading = _useState16[1]; // const [status, setStatus] = useState(0);
5139
+ // const [first, setFirst] = useState(true);
5140
+
5141
+
5142
+ var _useState17 = useState(false),
5143
+ _useState18 = _slicedToArray(_useState17, 2),
5144
+ hasChange = _useState18[0],
5145
+ setChange = _useState18[1];
5128
5146
 
5129
5147
  var history = useHistory();
5130
5148
  var search = history.location.search && qs.parse(history.location.search);
@@ -5480,10 +5498,17 @@ function Rule(props) {
5480
5498
  sendPublic: true,
5481
5499
  senderParticipantNote: note && note.remarkName
5482
5500
  });
5483
- _context7.next = 4;
5501
+
5502
+ if (sendloading) {
5503
+ _context7.next = 9;
5504
+ break;
5505
+ }
5506
+
5507
+ setloading(true);
5508
+ _context7.next = 6;
5484
5509
  return controller.batchsend([data]);
5485
5510
 
5486
- case 4:
5511
+ case 6:
5487
5512
  res = _context7.sent;
5488
5513
 
5489
5514
  if (res.res) {
@@ -5497,14 +5522,16 @@ function Rule(props) {
5497
5522
  });
5498
5523
  }
5499
5524
 
5500
- case 6:
5525
+ setloading(false);
5526
+
5527
+ case 9:
5501
5528
  case "end":
5502
5529
  return _context7.stop();
5503
5530
  }
5504
5531
  }
5505
5532
  }, _callee7);
5506
5533
  }))();
5507
- }, [targetId, record]);
5534
+ }, [targetId, record, sendloading]);
5508
5535
  var targetSelect = useCallback(function (e) {
5509
5536
  setTarget(e.target.value);
5510
5537
  }, []);
package/dist/index.js CHANGED
@@ -3062,10 +3062,15 @@ function modalcomfirm(props) {
3062
3062
  return s.targetId;
3063
3063
  }, []);
3064
3064
 
3065
- var _useState = React.useState([]),
3065
+ var _useState = React.useState(false),
3066
3066
  _useState2 = _slicedToArray(_useState, 2),
3067
- targetList = _useState2[0],
3068
- setTargetList = _useState2[1];
3067
+ loading = _useState2[0],
3068
+ setloading = _useState2[1];
3069
+
3070
+ var _useState3 = React.useState([]),
3071
+ _useState4 = _slicedToArray(_useState3, 2),
3072
+ targetList = _useState4[0],
3073
+ setTargetList = _useState4[1];
3069
3074
 
3070
3075
  React.useEffect(function () {
3071
3076
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
@@ -3103,9 +3108,8 @@ function modalcomfirm(props) {
3103
3108
  }, []);
3104
3109
  var handleOk = React.useCallback(function () {
3105
3110
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
3106
- var _DocumentsService$ins2;
3111
+ var note, data, _DocumentsService$ins2, res;
3107
3112
 
3108
- var note, data, res;
3109
3113
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
3110
3114
  while (1) {
3111
3115
  switch (_context2.prev = _context2.next) {
@@ -3121,14 +3125,21 @@ function modalcomfirm(props) {
3121
3125
  senderParticipantNote: note && note.remarkName
3122
3126
  });
3123
3127
  });
3124
- _context2.next = 4;
3128
+
3129
+ if (loading) {
3130
+ _context2.next = 9;
3131
+ break;
3132
+ }
3133
+
3134
+ setloading(true);
3135
+ _context2.next = 6;
3125
3136
  return (_DocumentsService$ins2 = DocumentsService.instance.service) === null || _DocumentsService$ins2 === void 0 ? void 0 : _DocumentsService$ins2.call({
3126
3137
  url: '/schema/config/batchSend',
3127
3138
  data: data,
3128
3139
  type: 'post'
3129
3140
  });
3130
3141
 
3131
- case 4:
3142
+ case 6:
3132
3143
  res = _context2.sent;
3133
3144
 
3134
3145
  if (res.res) {
@@ -3137,14 +3148,16 @@ function modalcomfirm(props) {
3137
3148
  props.handleCancel();
3138
3149
  }
3139
3150
 
3140
- case 6:
3151
+ setloading(false);
3152
+
3153
+ case 9:
3141
3154
  case "end":
3142
3155
  return _context2.stop();
3143
3156
  }
3144
3157
  }
3145
3158
  }, _callee2);
3146
3159
  }))();
3147
- }, [targetId, targetList]);
3160
+ }, [targetId, targetList, loading]);
3148
3161
  var gotoSendlist = React.useCallback(function () {
3149
3162
  controller.pipeline( /*#__PURE__*/function () {
3150
3163
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
@@ -3725,7 +3738,7 @@ var PageHeader = (function () {
3725
3738
  }));
3726
3739
  });
3727
3740
 
3728
- var css_248z$3 = ".header {\n padding: 10px 0px;\n display: flex;\n align-items: center;\n}\n.header .buttonGroup {\n margin-right: 20px;\n white-space: nowrap;\n}\n.header .buttons {\n text-align: right;\n flex: 1;\n white-space: nowrap;\n}\n.tabel-action {\n padding: 0 5px;\n font-size: 12px;\n font-family: PingFangSC-Regular, PingFang SC;\n font-weight: 400;\n color: #0074ff;\n white-space: nowrap;\n cursor: pointer;\n}\n.ktsAntX-xui-page-header-foot {\n overflow: inherit !important;\n}\n.ktsAntX-table .ktsAntX-table-thead > tr > th {\n background: #fafafa !important;\n}\n.ktsAntX-table-ping-left:not(.ktsAntX-table-has-fix-left) .ktsAntX-table-container::before {\n box-shadow: none !important;\n}\n.fixheight .ktsAntX-table .ktsAntX-table-thead > tr > th,\n.fixheight .ktsAntX-table .ktsAntX-table-tbody > tr > td,\n.fixheight .ktsAntX-table .ktsAntX-table tfoot > tr > th,\n.fixheight .ktsAntX-table .ktsAntX-table tfoot > tr > td {\n padding: 5px 16px;\n height: 50px;\n}\n.ktsAntX-table-thead > tr > th:not(:last-child):not(.ktsAntX-table-selection-column):not(.ktsAntX-table-row-expand-icon-cell):not([colspan])::before {\n opacity: 0;\n}\n";
3741
+ var css_248z$3 = "";
3729
3742
  styleInject(css_248z$3);
3730
3743
 
3731
3744
  var attributionEnum = {
@@ -5131,14 +5144,19 @@ function Rule(props) {
5131
5144
 
5132
5145
  var _controller$useRuning = controller.useRuning(controller.configupdate, controller.configsave),
5133
5146
  _controller$useRuning2 = _slicedToArray(_controller$useRuning, 1),
5134
- loading = _controller$useRuning2[0]; // const [status, setStatus] = useState(0);
5135
- // const [first, setFirst] = useState(true);
5136
-
5147
+ loading = _controller$useRuning2[0];
5137
5148
 
5138
5149
  var _useState15 = React.useState(false),
5139
5150
  _useState16 = _slicedToArray(_useState15, 2),
5140
- hasChange = _useState16[0],
5141
- setChange = _useState16[1];
5151
+ sendloading = _useState16[0],
5152
+ setloading = _useState16[1]; // const [status, setStatus] = useState(0);
5153
+ // const [first, setFirst] = useState(true);
5154
+
5155
+
5156
+ var _useState17 = React.useState(false),
5157
+ _useState18 = _slicedToArray(_useState17, 2),
5158
+ hasChange = _useState18[0],
5159
+ setChange = _useState18[1];
5142
5160
 
5143
5161
  var history = reactRouterDom.useHistory();
5144
5162
  var search = history.location.search && qs__default['default'].parse(history.location.search);
@@ -5494,10 +5512,17 @@ function Rule(props) {
5494
5512
  sendPublic: true,
5495
5513
  senderParticipantNote: note && note.remarkName
5496
5514
  });
5497
- _context7.next = 4;
5515
+
5516
+ if (sendloading) {
5517
+ _context7.next = 9;
5518
+ break;
5519
+ }
5520
+
5521
+ setloading(true);
5522
+ _context7.next = 6;
5498
5523
  return controller.batchsend([data]);
5499
5524
 
5500
- case 4:
5525
+ case 6:
5501
5526
  res = _context7.sent;
5502
5527
 
5503
5528
  if (res.res) {
@@ -5511,14 +5536,16 @@ function Rule(props) {
5511
5536
  });
5512
5537
  }
5513
5538
 
5514
- case 6:
5539
+ setloading(false);
5540
+
5541
+ case 9:
5515
5542
  case "end":
5516
5543
  return _context7.stop();
5517
5544
  }
5518
5545
  }
5519
5546
  }, _callee7);
5520
5547
  }))();
5521
- }, [targetId, record]);
5548
+ }, [targetId, record, sendloading]);
5522
5549
  var targetSelect = React.useCallback(function (e) {
5523
5550
  setTarget(e.target.value);
5524
5551
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-components-document-access-point",
3
- "version": "1.4.9",
3
+ "version": "1.4.10-v2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "dumi dev",
@@ -33,9 +33,9 @@
33
33
  "antd": "3.26.20",
34
34
  "grey-react-box": "0.2.15",
35
35
  "kts-component-service": "^1.0.4",
36
- "kts-components": "^1.2.26",
37
- "kts-components-antd-x4": "^4.0.3",
38
- "kts-xui": "1.0.6",
36
+ "kts-components": "1.3.9",
37
+ "kts-components-antd-x4": "5.0.0",
38
+ "kts-xui": "2.0.4",
39
39
  "lodash": "^4.17.21",
40
40
  "moment": "2.29.1",
41
41
  "query-string": "^7.0.1",
@@ -46,7 +46,7 @@ const propertyColumns: ColumnType<any>[] = [
46
46
  },
47
47
  ]
48
48
 
49
- class MySpan extends React.Component {
49
+ class MySpan extends React.Component<any> {
50
50
  render() {
51
51
  return (
52
52
  <span style={{ padding: '0 8px' }}>
@@ -109,7 +109,7 @@ const MyDatePickerTime = (props: { value?: any, disabled?: boolean, onChange?: (
109
109
  props.onChange && props.onChange(e ? e.format('YYYY-MM-DDTHH:mm:ss') : undefined)
110
110
  }, [props.onChange])
111
111
  const value = React.useMemo(() => props.value ? moment(props.value) : undefined, [props.value])
112
- return <DatePicker disabled={props.disabled} value={value} onChange={onChange} showTime />
112
+ return <DatePicker disabled={props.disabled} value={value as any} onChange={onChange} showTime />
113
113
  }
114
114
 
115
115
  const MyDatePicker = (props: { value?: any, disabled?: boolean, onChange?: (e: any) => void }) => {
@@ -117,7 +117,7 @@ const MyDatePicker = (props: { value?: any, disabled?: boolean, onChange?: (e: a
117
117
  props.onChange && props.onChange(e ? e.format('YYYY-MM-DD') : undefined)
118
118
  }, [props.onChange])
119
119
  const value = React.useMemo(() => props.value ? moment(props.value) : undefined, [props.value])
120
- return <DatePicker disabled={props.disabled} value={value} onChange={onChange} />
120
+ return <DatePicker disabled={props.disabled} value={value as any} onChange={onChange} />
121
121
  }
122
122
 
123
123
  const MyArray = (props: { readOnly?: boolean, value?: string[] | string, onChange?: (e: string) => void }) => {
@@ -1,41 +0,0 @@
1
- .header{
2
- padding:10px 0px;
3
- display: flex;
4
- align-items: center;
5
- .buttonGroup{
6
- margin-right: 20px;
7
- white-space: nowrap;
8
- }
9
- .buttons{
10
- text-align: right;
11
- flex: 1;
12
- white-space: nowrap;
13
- }
14
- }
15
- .tabel-action{
16
- padding: 0 5px;
17
- font-size: 12px;
18
- font-family: PingFangSC-Regular,PingFang SC;
19
- font-weight: 400;
20
- color: #0074ff;
21
- white-space: nowrap;
22
- cursor: pointer;
23
- }
24
- .ktsAntX-xui-page-header-foot{
25
- overflow: inherit !important;
26
- }
27
- .ktsAntX-table .ktsAntX-table-thead > tr > th{
28
- background:#fafafa !important
29
- }
30
- .ktsAntX-table-ping-left:not(.ktsAntX-table-has-fix-left) .ktsAntX-table-container::before{
31
- box-shadow:none !important;
32
- }
33
- .fixheight {
34
- .ktsAntX-table .ktsAntX-table-thead > tr > th, .ktsAntX-table .ktsAntX-table-tbody > tr > td, .ktsAntX-table .ktsAntX-table tfoot > tr > th, .ktsAntX-table .ktsAntX-table tfoot > tr > td{
35
- padding: 5px 16px;
36
- height: 50px;
37
- }
38
- }
39
- .ktsAntX-table-thead > tr > th:not(:last-child):not(.ktsAntX-table-selection-column):not(.ktsAntX-table-row-expand-icon-cell):not([colspan])::before{
40
- opacity: 0;
41
- }
@@ -10,6 +10,7 @@ export default function modalcomfirm(props: any) {
10
10
  const history = useHistory();
11
11
  const controller = Main.useController();
12
12
  const targetId = controller.useMemo(s => s.targetId, [])
13
+ const [loading, setloading] = useState(false);
13
14
  const [targetList, setTargetList] = useState<any[]>([]);
14
15
  useEffect(() => {
15
16
  (async () => {
@@ -34,20 +35,25 @@ export default function modalcomfirm(props: any) {
34
35
  senderParticipantNote: note && note.remarkName
35
36
  };
36
37
  });
37
- const res = await DocumentsService.instance.service?.call({ url: '/schema/config/batchSend', data: data, type: 'post' }) as any;
38
- if (res.res) {
39
- gotoSendlist();
40
- message.success('操作成功');
41
- props.handleCancel()
38
+
39
+ if (!loading) {
40
+ setloading(true)
41
+ const res = await DocumentsService.instance.service?.call({ url: '/schema/config/batchSend', data: data, type: 'post' }) as any;
42
+ if (res.res) {
43
+ gotoSendlist();
44
+ message.success('操作成功');
45
+ props.handleCancel()
46
+ }
47
+ setloading(false)
42
48
  }
43
49
  })()
44
- }, [targetId,targetList]);
50
+ }, [targetId, targetList,loading]);
45
51
  const gotoSendlist = useCallback(() => {
46
52
  controller.pipeline(async s => {
47
53
  s.type = 2;
48
54
  if (selectItems.length === 1) {
49
55
  s.params = { configNumber: selectItems[0].configNumber }
50
- s.selectedRowKey=[];
56
+ s.selectedRowKey = [];
51
57
  }
52
58
  history.push({ pathname: `/rulelist`, state: { type: 2 } })
53
59
  })()
@@ -16,7 +16,8 @@ export default function Rule(props: any) {
16
16
  const [visible, setVisible] = useState(false);
17
17
  const [targetId, setTarget] = useState();
18
18
  const [targetList, setList] = useState<any[]>([]);
19
- const [loading] = controller.useRuning(controller.configupdate,controller.configsave)
19
+ const [loading] = controller.useRuning(controller.configupdate, controller.configsave);
20
+ const [sendloading, setloading] = useState(false);
20
21
  // const [status, setStatus] = useState(0);
21
22
  // const [first, setFirst] = useState(true);
22
23
  const [hasChange, setChange] = useState(false);
@@ -136,7 +137,7 @@ export default function Rule(props: any) {
136
137
  * 手动保存
137
138
  */
138
139
 
139
-
140
+
140
141
 
141
142
 
142
143
  const onSave = useCallback((publish: boolean = false) => {
@@ -197,14 +198,18 @@ export default function Rule(props: any) {
197
198
  sendPublic: true,
198
199
  senderParticipantNote: note && note.remarkName
199
200
  }
200
- const res = await controller.batchsend([data]);
201
- if (res.res) {
202
- message.success('操作成功');
203
- handleCancel()
204
- history.push({ pathname: `/rulelist`, state: { type: 2 } })
201
+ if (!sendloading) {
202
+ setloading(true)
203
+ const res = await controller.batchsend([data]);
204
+ if (res.res) {
205
+ message.success('操作成功');
206
+ handleCancel()
207
+ history.push({ pathname: `/rulelist`, state: { type: 2 } })
208
+ }
209
+ setloading(false)
205
210
  }
206
211
  })()
207
- }, [targetId, record]);
212
+ }, [targetId, record,sendloading]);
208
213
  const targetSelect = useCallback((e) => {
209
214
  setTarget(e.target.value);
210
215
  }, []);
package/tsconfig.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "sourceMap": true,
10
10
  "baseUrl": "./",
11
11
  "strict": true,
12
+ "noImplicitAny": false,
12
13
  "paths": {
13
14
  "@/*": ["src/*"],
14
15
  "@@/*": ["src/.umi/*"]