xydata-tools 1.1.20 → 1.1.21
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/components/aaa/setting/permission/index.js +55 -62
- package/dist/components/aaa/setting/requesturl/index.js +29 -30
- package/dist/components/aaa/setting/role/index.js +6 -6
- package/dist/components/aaa/setting/user/index.js +84 -85
- package/dist/components/dictionary/index.js +34 -35
- package/dist/components/payment/components/PaymentDetailModal.js +0 -4
- package/dist/components/payment/order/components/RefundModal.js +0 -2
- package/dist/components/sms/conf/index.js +0 -4
- package/dist/components/sms/gateway/index.js +1 -5
- package/dist/components/sms/log/components/SMSLogDetailModal.js +0 -2
- package/dist/components/sms/template/components/SMSTemplateDetailModal.js +0 -2
- package/dist/components/sms/template/index.js +1 -5
- package/package.json +2 -3
|
@@ -14,12 +14,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
14
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
16
|
import { addApi, queryApi, removeApi, updateApi } from "./service.js";
|
|
17
|
-
import { PlusOutlined } from
|
|
18
|
-
import ProTable from
|
|
19
|
-
;
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import React, { useRef, useState } from "react";
|
|
17
|
+
import { PlusOutlined } from '@ant-design/icons';
|
|
18
|
+
import ProTable from '@ant-design/pro-table';
|
|
19
|
+
import { ROOT_ID, toTree } from '@zhengxs/js.tree';
|
|
20
|
+
import { Button, Divider, Popconfirm, message } from 'antd';
|
|
21
|
+
import React, { useRef, useState } from 'react';
|
|
23
22
|
import UpdateForm from "./components/UpdateForm";
|
|
24
23
|
|
|
25
24
|
/**
|
|
@@ -32,8 +31,8 @@ var handleAdd = /*#__PURE__*/function () {
|
|
|
32
31
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
32
|
while (1) switch (_context.prev = _context.next) {
|
|
34
33
|
case 0:
|
|
35
|
-
hide = message.loading(
|
|
36
|
-
if (!(type ===
|
|
34
|
+
hide = message.loading('正在添加');
|
|
35
|
+
if (!(type === 'C')) {
|
|
37
36
|
_context.next = 7;
|
|
38
37
|
break;
|
|
39
38
|
}
|
|
@@ -55,7 +54,7 @@ var handleAdd = /*#__PURE__*/function () {
|
|
|
55
54
|
_context.next = 15;
|
|
56
55
|
break;
|
|
57
56
|
}
|
|
58
|
-
message.success(
|
|
57
|
+
message.success('操作成功!');
|
|
59
58
|
return _context.abrupt("return", true);
|
|
60
59
|
case 15:
|
|
61
60
|
case "end":
|
|
@@ -80,17 +79,17 @@ var handleRemove = /*#__PURE__*/function () {
|
|
|
80
79
|
while (1) switch (_context2.prev = _context2.next) {
|
|
81
80
|
case 0:
|
|
82
81
|
isSuccess = false;
|
|
83
|
-
hide = message.loading(
|
|
82
|
+
hide = message.loading('正在删除');
|
|
84
83
|
_context2.next = 4;
|
|
85
84
|
return removeApi(record);
|
|
86
85
|
case 4:
|
|
87
86
|
res = _context2.sent;
|
|
88
|
-
if (res.rspCode ===
|
|
87
|
+
if (res.rspCode === '000000') {
|
|
89
88
|
hide();
|
|
90
|
-
message.success(
|
|
89
|
+
message.success('删除成功,正在刷新');
|
|
91
90
|
isSuccess = true;
|
|
92
91
|
} else {
|
|
93
|
-
|
|
92
|
+
console.error(res.rspMsg);
|
|
94
93
|
isSuccess = false;
|
|
95
94
|
}
|
|
96
95
|
return _context2.abrupt("return", isSuccess);
|
|
@@ -159,7 +158,7 @@ var DictionaryList = function DictionaryList() {
|
|
|
159
158
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
160
159
|
treeData = _useState8[0],
|
|
161
160
|
setTreeData = _useState8[1];
|
|
162
|
-
var _useState9 = useState(
|
|
161
|
+
var _useState9 = useState('C'),
|
|
163
162
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
164
163
|
modalType = _useState10[0],
|
|
165
164
|
setModalType = _useState10[1];
|
|
@@ -170,12 +169,12 @@ var DictionaryList = function DictionaryList() {
|
|
|
170
169
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
171
170
|
while (1) switch (_context4.prev = _context4.next) {
|
|
172
171
|
case 0:
|
|
173
|
-
if (!(type ===
|
|
172
|
+
if (!(type === 'U')) {
|
|
174
173
|
_context4.next = 11;
|
|
175
174
|
break;
|
|
176
175
|
}
|
|
177
176
|
//本级及下级所有子节点均不可选择
|
|
178
|
-
hide = message.loading(
|
|
177
|
+
hide = message.loading('正在加载');
|
|
179
178
|
_context4.next = 4;
|
|
180
179
|
return getData({
|
|
181
180
|
dictCode: record.dictCode,
|
|
@@ -218,14 +217,14 @@ var DictionaryList = function DictionaryList() {
|
|
|
218
217
|
var rowTotree = function rowTotree(dataList) {
|
|
219
218
|
return toTree(dataList, {
|
|
220
219
|
root: ROOT_ID,
|
|
221
|
-
idKey:
|
|
222
|
-
parentKey:
|
|
223
|
-
childrenKey:
|
|
220
|
+
idKey: 'id',
|
|
221
|
+
parentKey: 'parentId',
|
|
222
|
+
childrenKey: 'children',
|
|
224
223
|
transform: function transform(data) {
|
|
225
224
|
var isTop = dataList.some(function (x) {
|
|
226
|
-
return x.id ===
|
|
225
|
+
return x.id === '-1';
|
|
227
226
|
});
|
|
228
|
-
!isTop && data.parentId ===
|
|
227
|
+
!isTop && data.parentId === '-1' && (data.parentId = null);
|
|
229
228
|
return _objectSpread(_objectSpread({}, data), {}, {
|
|
230
229
|
title: data.dictName,
|
|
231
230
|
value: data.id
|
|
@@ -234,25 +233,25 @@ var DictionaryList = function DictionaryList() {
|
|
|
234
233
|
});
|
|
235
234
|
};
|
|
236
235
|
var columns = [{
|
|
237
|
-
title:
|
|
238
|
-
dataIndex:
|
|
236
|
+
title: '字典名称',
|
|
237
|
+
dataIndex: 'dictName',
|
|
239
238
|
search: true
|
|
240
239
|
}, {
|
|
241
|
-
title:
|
|
242
|
-
dataIndex:
|
|
240
|
+
title: '字典编码',
|
|
241
|
+
dataIndex: 'dictCode',
|
|
243
242
|
search: false
|
|
244
243
|
}, {
|
|
245
|
-
title:
|
|
246
|
-
dataIndex:
|
|
244
|
+
title: '备注',
|
|
245
|
+
dataIndex: 'remark',
|
|
247
246
|
search: false
|
|
248
247
|
}, {
|
|
249
|
-
title:
|
|
250
|
-
dataIndex:
|
|
251
|
-
valueType:
|
|
248
|
+
title: '操作',
|
|
249
|
+
dataIndex: 'option',
|
|
250
|
+
valueType: 'option',
|
|
252
251
|
render: function render(_, record) {
|
|
253
|
-
return record.dictCode !==
|
|
252
|
+
return record.dictCode !== 'BASE_DICT_ROOT' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a", {
|
|
254
253
|
onClick: function onClick() {
|
|
255
|
-
return createAndUpdate(
|
|
254
|
+
return createAndUpdate('U', record);
|
|
256
255
|
}
|
|
257
256
|
}, "\u7F16\u8F91"), /*#__PURE__*/React.createElement(Divider, {
|
|
258
257
|
type: "vertical"
|
|
@@ -292,19 +291,19 @@ var DictionaryList = function DictionaryList() {
|
|
|
292
291
|
headerTitle: "\u5217\u8868",
|
|
293
292
|
actionRef: actionRef,
|
|
294
293
|
rowKey: "id",
|
|
295
|
-
defaultExpandedRowKeys: [
|
|
294
|
+
defaultExpandedRowKeys: ['-1'],
|
|
296
295
|
toolBarRender: function toolBarRender() {
|
|
297
296
|
return [/*#__PURE__*/React.createElement(Button, {
|
|
298
297
|
type: "primary",
|
|
299
298
|
onClick: function onClick() {
|
|
300
|
-
return createAndUpdate(
|
|
299
|
+
return createAndUpdate('C', {});
|
|
301
300
|
}
|
|
302
301
|
}, /*#__PURE__*/React.createElement(PlusOutlined, null), " \u65B0\u5EFA")];
|
|
303
302
|
},
|
|
304
303
|
beforeSearchSubmit: function beforeSearchSubmit(params) {
|
|
305
304
|
var dictName = params.dictName;
|
|
306
305
|
var obj = {
|
|
307
|
-
dictName: dictName ||
|
|
306
|
+
dictName: dictName || '',
|
|
308
307
|
include: true
|
|
309
308
|
};
|
|
310
309
|
return obj;
|
|
@@ -75,8 +75,6 @@ var PaymentDetailModal = function PaymentDetailModal(_ref) {
|
|
|
75
75
|
res = _context.sent;
|
|
76
76
|
if ((res === null || res === void 0 ? void 0 : res.rspCode) === '000000') {
|
|
77
77
|
setFlowList(res.data || []);
|
|
78
|
-
} else {
|
|
79
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '获取流程列表失败');
|
|
80
78
|
}
|
|
81
79
|
_context.next = 14;
|
|
82
80
|
break;
|
|
@@ -135,8 +133,6 @@ var PaymentDetailModal = function PaymentDetailModal(_ref) {
|
|
|
135
133
|
setCurrentFlow(_objectSpread(_objectSpread({}, res.data), {}, {
|
|
136
134
|
params: params
|
|
137
135
|
}));
|
|
138
|
-
} else {
|
|
139
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '获取流程详情失败');
|
|
140
136
|
}
|
|
141
137
|
_context2.next = 13;
|
|
142
138
|
break;
|
|
@@ -46,8 +46,6 @@ var SMSConfig = function SMSConfig() {
|
|
|
46
46
|
res = _context.sent;
|
|
47
47
|
if (res && res.rspCode === '000000') {
|
|
48
48
|
setDataSource(res.data || []);
|
|
49
|
-
} else {
|
|
50
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '查询配置失败');
|
|
51
49
|
}
|
|
52
50
|
_context.next = 11;
|
|
53
51
|
break;
|
|
@@ -87,8 +85,6 @@ var SMSConfig = function SMSConfig() {
|
|
|
87
85
|
setModalVisible(false);
|
|
88
86
|
setEditingRecord(null);
|
|
89
87
|
fetchData();
|
|
90
|
-
} else {
|
|
91
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '保存失败');
|
|
92
88
|
}
|
|
93
89
|
case 4:
|
|
94
90
|
case "end":
|
|
@@ -67,7 +67,7 @@ var SMSGateway = function SMSGateway() {
|
|
|
67
67
|
// 处理新增/编辑提交
|
|
68
68
|
var handleSubmit = /*#__PURE__*/function () {
|
|
69
69
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
70
|
-
var res, _actionRef$current
|
|
70
|
+
var res, _actionRef$current;
|
|
71
71
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
72
72
|
while (1) switch (_context2.prev = _context2.next) {
|
|
73
73
|
case 0:
|
|
@@ -94,8 +94,6 @@ var SMSGateway = function SMSGateway() {
|
|
|
94
94
|
setModalVisible(false);
|
|
95
95
|
setEditingRecord(null);
|
|
96
96
|
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 || _actionRef$current.reload();
|
|
97
|
-
} else {
|
|
98
|
-
message.error(((_res = res) === null || _res === void 0 ? void 0 : _res.rspMsg) || '操作失败');
|
|
99
97
|
}
|
|
100
98
|
case 10:
|
|
101
99
|
case "end":
|
|
@@ -124,8 +122,6 @@ var SMSGateway = function SMSGateway() {
|
|
|
124
122
|
if (res && res.rspCode === '000000') {
|
|
125
123
|
message.success(successMsg);
|
|
126
124
|
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 || _actionRef$current2.reload();
|
|
127
|
-
} else {
|
|
128
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '操作失败');
|
|
129
125
|
}
|
|
130
126
|
case 4:
|
|
131
127
|
case "end":
|
|
@@ -49,8 +49,6 @@ var SMSLogDetailModal = function SMSLogDetailModal(_ref) {
|
|
|
49
49
|
res = _context.sent;
|
|
50
50
|
if (res && res.rspCode === '000000') {
|
|
51
51
|
setDetail(res.data);
|
|
52
|
-
} else {
|
|
53
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '获取详情失败');
|
|
54
52
|
}
|
|
55
53
|
_context.next = 11;
|
|
56
54
|
break;
|
|
@@ -47,8 +47,6 @@ var SMSTemplateDetailModal = function SMSTemplateDetailModal(_ref) {
|
|
|
47
47
|
res = _context.sent;
|
|
48
48
|
if (res && res.rspCode === '000000') {
|
|
49
49
|
setDetail(res.data);
|
|
50
|
-
} else {
|
|
51
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '获取详情失败');
|
|
52
50
|
}
|
|
53
51
|
_context.next = 11;
|
|
54
52
|
break;
|
|
@@ -77,7 +77,7 @@ var SMSTemplate = function SMSTemplate() {
|
|
|
77
77
|
// 处理提交
|
|
78
78
|
var handleSubmit = /*#__PURE__*/function () {
|
|
79
79
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
80
|
-
var res, _actionRef$current
|
|
80
|
+
var res, _actionRef$current;
|
|
81
81
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
82
82
|
while (1) switch (_context2.prev = _context2.next) {
|
|
83
83
|
case 0:
|
|
@@ -104,8 +104,6 @@ var SMSTemplate = function SMSTemplate() {
|
|
|
104
104
|
setModalVisible(false);
|
|
105
105
|
setEditingRecord(null);
|
|
106
106
|
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 || _actionRef$current.reload();
|
|
107
|
-
} else {
|
|
108
|
-
message.error(((_res = res) === null || _res === void 0 ? void 0 : _res.rspMsg) || '操作失败');
|
|
109
107
|
}
|
|
110
108
|
case 10:
|
|
111
109
|
case "end":
|
|
@@ -134,8 +132,6 @@ var SMSTemplate = function SMSTemplate() {
|
|
|
134
132
|
if (res && res.rspCode === '000000') {
|
|
135
133
|
message.success(successMsg);
|
|
136
134
|
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 || _actionRef$current2.reload();
|
|
137
|
-
} else {
|
|
138
|
-
message.error((res === null || res === void 0 ? void 0 : res.rspMsg) || '操作失败');
|
|
139
135
|
}
|
|
140
136
|
case 4:
|
|
141
137
|
case "end":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xydata-tools",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
4
4
|
"description": "xydata tools",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"compressorjs": "1.2.1",
|
|
66
66
|
"querystring": "0.2.1",
|
|
67
67
|
"react-json-view": "^1.21.3",
|
|
68
|
-
"styled-components": "4.4.1"
|
|
69
|
-
"umi-request": "1.4.0"
|
|
68
|
+
"styled-components": "4.4.1"
|
|
70
69
|
}
|
|
71
70
|
}
|