uepay-mesh 3.0.12 → 4.0.2-beta
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/bpm/list/applicantTable.js +0 -1
- package/index.d.ts +1 -0
- package/index.js +8 -0
- package/mesh/cell/search/select/standardSelectSearch.js +1 -1
- package/mesh/cell/view/picker/timestampDatePickerView.js +2 -2
- package/mesh/cell/view/select/standardSelectView.js +2 -2
- package/mesh/config/authOptions.js +96 -0
- package/mesh/config/serverEnums.js +43 -29
- package/mesh/crud/remove.js +144 -0
- package/mesh/data/reduxSearch.js +2 -4
- package/mesh/data/request.js +54 -2
- package/mesh/excel/optionsAbleExcel.js +0 -7
- package/mesh/excel/processor.js +7 -5
- package/mesh/form/editAbleForm.js +84 -15
- package/mesh/form/options/confirmBtn.js +24 -14
- package/mesh/form/options/deleteBtn.js +57 -0
- package/mesh/form/options.js +42 -30
- package/mesh/form/standardAddForm.js +3 -1
- package/mesh/form/standardEditForm.js +5 -3
- package/mesh/form/standardForm.js +2 -2
- package/mesh/form/standardViewForm.js +25 -0
- package/mesh/form/support/modifyFormProcessor.js +2 -2
- package/mesh/form/tabs/relateTabs.js +2 -2
- package/mesh/pages/collectEntry.d.ts +9 -0
- package/mesh/pages/collectEntry.js +55 -0
- package/mesh/table/formQueryAbleTable.js +5 -2
- package/mesh/table/optionsFormQueryAbleTable.js +2 -2
- package/mesh/table/queryAbleTable.js +40 -2
- package/mesh/table/selectQueryAbleTable.js +2 -2
- package/mesh/table/standardTable/actionColumnForm/deleteRow.js +135 -0
- package/mesh/table/standardTable/actionColumnForm.js +14 -3
- package/mesh/table/standardTable/searchExtend.js +2 -2
- package/mesh/table/standardTable/tableOptions.js +51 -4
- package/mesh/table/standardTable/tableOptons/multiOptions.js +42 -0
- package/mesh/table/standardTable/thColumn/rowEditAbleCell.js +3 -3
- package/mesh/table/standardTable.d.ts +6 -0
- package/mesh/table/standardTable.js +42 -6
- package/mesh/util/net.js +2 -2
- package/package.json +4 -4
|
@@ -29,7 +29,6 @@ const ApplicantTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
29
29
|
|
|
30
30
|
function handleAction(type, pkValue, record, text) {
|
|
31
31
|
if ("View" === type) {
|
|
32
|
-
console.info(ref);
|
|
33
32
|
ref.current.flush();
|
|
34
33
|
router.push("/bpm/form?insId=".concat(record['bpm_ins_id']));
|
|
35
34
|
}
|
package/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export {default as QueryAbleTable} from './mesh/table/queryAbleTable'
|
|
|
6
6
|
export {default as EditCompareForm} from './mesh/form/editCompareForm'
|
|
7
7
|
export {default as BpmList} from './bpm/list'
|
|
8
8
|
export {default as BpmForm} from './bpm/form'
|
|
9
|
+
export {default as CollectEntry} from './mesh/pages/collectEntry'
|
package/index.js
CHANGED
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "BpmList", {
|
|
|
15
15
|
return _list.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "CollectEntry", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _collectEntry.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "EditCompareForm", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
|
@@ -68,4 +74,6 @@ var _form = _interopRequireDefault(require("./bpm/form"));
|
|
|
68
74
|
|
|
69
75
|
var _list = _interopRequireDefault(require("./bpm/list"));
|
|
70
76
|
|
|
77
|
+
var _collectEntry = _interopRequireDefault(require("./mesh/pages/collectEntry"));
|
|
78
|
+
|
|
71
79
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -20,7 +20,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
21
|
|
|
22
22
|
const Config = {
|
|
23
|
-
condOptions: [_serverEnums.ConditionType.ER],
|
|
23
|
+
condOptions: [_serverEnums.ConditionType.ER, _serverEnums.ConditionType.NE],
|
|
24
24
|
defaultCondValue: _serverEnums.ConditionType.ER.value
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
@@ -17,9 +17,9 @@ var _antd = require("antd");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
21
|
|
|
22
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
|
|
24
24
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
25
|
|
|
@@ -15,9 +15,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
19
|
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
21
|
|
|
22
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
23
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OptValidateUtil = exports.OptTypeList = exports.OptTypeDict = exports.OptType = exports.OptCombineUtil = void 0;
|
|
7
|
+
|
|
8
|
+
var _serverEnums = require("./serverEnums");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 表單、表格權限控制相關的數據和相關識別功能。
|
|
12
|
+
* 所有的權限識別配置都使用2進制占位的方式實現=>1、10、100、1000、10000。位真則具備該權限。
|
|
13
|
+
* 全局定義:查詢 Query=1,編輯 Update=10(2),新增=100(4),刪除=1000(8)。
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type {{Delete: number, Query: number, Update: number, Insert: number}}
|
|
19
|
+
*/
|
|
20
|
+
const OptType = {
|
|
21
|
+
Query: 1,
|
|
22
|
+
Update: 2,
|
|
23
|
+
Insert: 4,
|
|
24
|
+
Delete: 8
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 權限控制字典
|
|
28
|
+
* @type {{}}
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
exports.OptType = OptType;
|
|
32
|
+
|
|
33
|
+
const OptTypeDict = (() => {
|
|
34
|
+
const def = {};
|
|
35
|
+
def[OptType.Query] = {
|
|
36
|
+
label: '查詢',
|
|
37
|
+
value: 1,
|
|
38
|
+
tip: '數據可展示'
|
|
39
|
+
};
|
|
40
|
+
def[OptType.Update] = {
|
|
41
|
+
label: '編輯',
|
|
42
|
+
value: 2,
|
|
43
|
+
tip: '數據可編輯'
|
|
44
|
+
};
|
|
45
|
+
def[OptType.Insert] = {
|
|
46
|
+
label: '新增',
|
|
47
|
+
value: 4,
|
|
48
|
+
tip: '數據可新增'
|
|
49
|
+
};
|
|
50
|
+
def[OptType.Delete] = {
|
|
51
|
+
label: '刪除',
|
|
52
|
+
value: 8,
|
|
53
|
+
tip: '數據可刪除'
|
|
54
|
+
};
|
|
55
|
+
return def;
|
|
56
|
+
})();
|
|
57
|
+
/**
|
|
58
|
+
* 權限控制列表
|
|
59
|
+
* @type {*[]}
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
exports.OptTypeDict = OptTypeDict;
|
|
64
|
+
const OptTypeList = [OptTypeDict["1"], OptTypeDict["2"], OptTypeDict["4"], OptTypeDict["8"]];
|
|
65
|
+
/**
|
|
66
|
+
* 相關的檢驗方法
|
|
67
|
+
* @type {{isDelete: (function(*): boolean), isQuery: (function(*): boolean), isUpdate: (function(*): boolean), isInsert: (function(*): boolean)}}
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
exports.OptTypeList = OptTypeList;
|
|
71
|
+
const OptValidateUtil = {
|
|
72
|
+
isQuery: function isQuery(flag) {
|
|
73
|
+
return OptType.Query === (flag & OptType.Query);
|
|
74
|
+
},
|
|
75
|
+
isUpdate: function isUpdate(flag) {
|
|
76
|
+
return OptType.Update === (flag & OptType.Update);
|
|
77
|
+
},
|
|
78
|
+
isInsert: function isInsert(flag) {
|
|
79
|
+
return OptType.Insert === (flag & OptType.Insert);
|
|
80
|
+
},
|
|
81
|
+
isDelete: function isDelete(flag) {
|
|
82
|
+
return OptType.Delete === (flag & OptType.Delete);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* 進行數據合并的工具方法
|
|
87
|
+
* @type {{combine: (function(*, *))}}
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
exports.OptValidateUtil = OptValidateUtil;
|
|
91
|
+
const OptCombineUtil = {
|
|
92
|
+
combine: function combine(origin, flag) {
|
|
93
|
+
return origin | flag;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
exports.OptCombineUtil = OptCombineUtil;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.UpdateState = exports.TableOrderTypeMapping = exports.ShowType = exports.RelationType = exports.QueryType = exports.OrderType = exports.OptionsState = exports.OptionsFlag = exports.OptionsDict = exports.
|
|
6
|
+
exports.UpdateState = exports.TableUpdateFlag = exports.TableOrderTypeMapping = exports.ShowType = exports.RelationType = exports.QueryType = exports.OrderType = exports.OptionsState = exports.OptionsFlag = exports.OptionsDict = exports.DefaultConditionValue = exports.ConditionType = exports.ColumnSecurityOptions = exports.ColumnSecurity = exports.BETWEENCondMapping = exports.AlisaFlag = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* 匹配模式的字典
|
|
@@ -127,41 +127,40 @@ const ShowType = [{
|
|
|
127
127
|
value: 'ALL',
|
|
128
128
|
label: '全显示',
|
|
129
129
|
tip: '會在列、表單中都顯示'
|
|
130
|
-
}];
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
}]; // /**
|
|
131
|
+
// * 表單編輯狀態
|
|
132
|
+
// * @deprecated
|
|
133
|
+
// * @type {*[]}
|
|
134
|
+
// */
|
|
135
|
+
// export const EditType = [
|
|
136
|
+
// {value: 'NONE', label: '仅只读', tip: '不允許進行修改和新增操作!'},
|
|
137
|
+
// {value: 'EDIT', label: '可更新', tip: '數據存在時,可以進行編輯及更新!'}
|
|
138
|
+
// ];
|
|
139
|
+
// /**
|
|
140
|
+
// * @deprecated
|
|
141
|
+
// * @type {{EDIT: string, NONE: string}}
|
|
142
|
+
// */
|
|
143
|
+
// export const EditTypeDict = {
|
|
144
|
+
// NONE: 'NONE',
|
|
145
|
+
// EDIT: 'EDIT'
|
|
146
|
+
// };
|
|
135
147
|
|
|
136
|
-
exports.ShowType = ShowType;
|
|
137
|
-
const EditType = [{
|
|
138
|
-
value: 'NONE',
|
|
139
|
-
label: '禁止',
|
|
140
|
-
tip: '不允許進行修改和新增操作!'
|
|
141
|
-
}, {
|
|
142
|
-
value: 'EDIT',
|
|
143
|
-
label: '编辑',
|
|
144
|
-
tip: '數據存在時,可以進行編輯!'
|
|
145
|
-
}];
|
|
146
|
-
exports.EditType = EditType;
|
|
147
|
-
const EditTypeDict = {
|
|
148
|
-
NONE: 'NONE',
|
|
149
|
-
EDIT: 'EDIT'
|
|
150
|
-
};
|
|
151
148
|
/**
|
|
152
|
-
*
|
|
149
|
+
* 表單操作能力,
|
|
150
|
+
* ADD包含EDIT包含QUERY。
|
|
151
|
+
* DELETE为完全独立的配置。
|
|
153
152
|
* @type {{"1": number, "3": number, "7": number, "15": number}}
|
|
154
153
|
*/
|
|
155
154
|
|
|
156
|
-
exports.
|
|
155
|
+
exports.ShowType = ShowType;
|
|
157
156
|
const OptionsFlag = {
|
|
158
157
|
QUERY: 1,
|
|
159
|
-
//查詢
|
|
158
|
+
//查詢 1
|
|
160
159
|
EDIT: 3,
|
|
161
|
-
//更新
|
|
160
|
+
//更新 11
|
|
162
161
|
ADD: 7,
|
|
163
|
-
//添加
|
|
164
|
-
DEL:
|
|
162
|
+
//添加 111
|
|
163
|
+
DEL: 8 //删除 1000
|
|
165
164
|
|
|
166
165
|
};
|
|
167
166
|
exports.OptionsFlag = OptionsFlag;
|
|
@@ -180,7 +179,8 @@ exports.OptionsDict = OptionsDict;
|
|
|
180
179
|
const OptionsState = {
|
|
181
180
|
VIEW: 'VIEW',
|
|
182
181
|
EDIT: 'EDIT',
|
|
183
|
-
ADD: 'ADD'
|
|
182
|
+
ADD: 'ADD',
|
|
183
|
+
DEL: 'DEL'
|
|
184
184
|
};
|
|
185
185
|
/**
|
|
186
186
|
* 外鍵關聯別名的一些特殊標記處理
|
|
@@ -265,4 +265,18 @@ const ColumnSecurityOptions = [{
|
|
|
265
265
|
value: 'Virginia',
|
|
266
266
|
label: '字母表替換(維吉尼娜密碼)'
|
|
267
267
|
}];
|
|
268
|
-
|
|
268
|
+
/**
|
|
269
|
+
*
|
|
270
|
+
* @type {{AddExistsUpdate: number, ModifyExistsUpdate: number, RemoveExistsDelete: number, AddNotExistsInsert: number, None: number, ModifyNotExistsInsert: number}}
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
exports.ColumnSecurityOptions = ColumnSecurityOptions;
|
|
274
|
+
const TableUpdateFlag = {
|
|
275
|
+
None: 0,
|
|
276
|
+
AddNotExistsInsert: 1,
|
|
277
|
+
AddExistsUpdate: 2,
|
|
278
|
+
ModifyNotExistsInsert: 4,
|
|
279
|
+
ModifyExistsUpdate: 8,
|
|
280
|
+
RemoveExistsDelete: 16
|
|
281
|
+
};
|
|
282
|
+
exports.TableUpdateFlag = TableUpdateFlag;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.removeDataList = void 0;
|
|
7
|
+
exports.removeRecords = removeRecords;
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/web.dom.iterable.js");
|
|
10
|
+
|
|
11
|
+
var _request = require("../data/request");
|
|
12
|
+
|
|
13
|
+
var _antd = require("antd");
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 根据输入的记录列表来删除数据
|
|
17
|
+
* @param host
|
|
18
|
+
* @param collect
|
|
19
|
+
* @param collectId
|
|
20
|
+
* @param records
|
|
21
|
+
* @param bpm
|
|
22
|
+
* @param handle {Function} (state, msg, sucPkList)=>{
|
|
23
|
+
* state = ‘ERROR|SUC|ANY_SUC}’
|
|
24
|
+
*/
|
|
25
|
+
function removeRecords(_ref) {
|
|
26
|
+
let {
|
|
27
|
+
host,
|
|
28
|
+
collect,
|
|
29
|
+
collectId,
|
|
30
|
+
records,
|
|
31
|
+
bpm,
|
|
32
|
+
handle
|
|
33
|
+
} = _ref;
|
|
34
|
+
const {
|
|
35
|
+
fieldList,
|
|
36
|
+
tableList,
|
|
37
|
+
pkName
|
|
38
|
+
} = collect,
|
|
39
|
+
dataList = [],
|
|
40
|
+
tablePkNameDict = {}; //pkName=>table
|
|
41
|
+
|
|
42
|
+
for (let table of tableList) {
|
|
43
|
+
tablePkNameDict[table.pkName] = table.name;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (let record of records) {
|
|
47
|
+
dataList.push(extractOneRowData(fieldList, tablePkNameDict, pkName, record));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
removeDataList({
|
|
51
|
+
host,
|
|
52
|
+
collect,
|
|
53
|
+
collectId,
|
|
54
|
+
dataList,
|
|
55
|
+
bpm,
|
|
56
|
+
handle
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function extractOneRowData(fieldList, tablePkNameDict, pkName, record) {
|
|
61
|
+
const pkValue = [],
|
|
62
|
+
data = [];
|
|
63
|
+
let pkData = null,
|
|
64
|
+
tablePkField = null,
|
|
65
|
+
value = null;
|
|
66
|
+
|
|
67
|
+
for (let field of fieldList) {
|
|
68
|
+
value = record[field.label];
|
|
69
|
+
|
|
70
|
+
if (field.name === pkName) {
|
|
71
|
+
pkData = value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (tablePkField = tablePkNameDict[field.name]) {
|
|
75
|
+
pkValue.push({
|
|
76
|
+
label: field.label,
|
|
77
|
+
table: tablePkField,
|
|
78
|
+
value: value
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
data.push({
|
|
82
|
+
label: field.label,
|
|
83
|
+
origin: value,
|
|
84
|
+
value
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
pkData,
|
|
91
|
+
pkValue,
|
|
92
|
+
data
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 删除数据
|
|
97
|
+
* @param host {String} 服务器地址
|
|
98
|
+
* @param collect {Object} 数据集结构
|
|
99
|
+
* @param collectId {Number} 数据集ID
|
|
100
|
+
* @param dataList {Array} 数据
|
|
101
|
+
* @example dataList:[{
|
|
102
|
+
* data:[{label:String, origin:Any, value:Any}],
|
|
103
|
+
* pkValue:[{label:String, table:String, value:Any}],
|
|
104
|
+
* pkData:Any
|
|
105
|
+
* }]
|
|
106
|
+
* @param bpm {Object}
|
|
107
|
+
* @param handle {Function} (state, msg, sucPkList)=>{
|
|
108
|
+
* state = ‘ERROR|SUC|ANY_SUC}’
|
|
109
|
+
* }
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
const removeDataList = _ref2 => {
|
|
114
|
+
let {
|
|
115
|
+
host,
|
|
116
|
+
collect,
|
|
117
|
+
collectId,
|
|
118
|
+
dataList,
|
|
119
|
+
bpm,
|
|
120
|
+
handle
|
|
121
|
+
} = _ref2;
|
|
122
|
+
const request = collectId ? _request.deleteWithId : _request.deleteWithClassDes;
|
|
123
|
+
request({
|
|
124
|
+
host,
|
|
125
|
+
collect,
|
|
126
|
+
collectId,
|
|
127
|
+
dataList,
|
|
128
|
+
bpm
|
|
129
|
+
}).then(res => {
|
|
130
|
+
if (res && res.code === 1) {
|
|
131
|
+
_antd.message.success('数据删除成功!');
|
|
132
|
+
|
|
133
|
+
handle('SUC', null, res.pkDatas);
|
|
134
|
+
} else {
|
|
135
|
+
_antd.notification.error({
|
|
136
|
+
message: res && res.msg || '網絡故障,請稍後再試!'
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
handle('ERROR', res.msg | '網絡故障,請稍後再試!');
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
exports.removeDataList = removeDataList;
|
package/mesh/data/reduxSearch.js
CHANGED
|
@@ -11,9 +11,9 @@ require("core-js/modules/es6.regexp.search.js");
|
|
|
11
11
|
|
|
12
12
|
require("core-js/modules/web.dom.iterable.js");
|
|
13
13
|
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
17
|
|
|
18
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
|
|
@@ -70,8 +70,6 @@ class ReduxSearch {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
scribe() {
|
|
73
|
-
console.info('Scribe:', this.search, this.condition);
|
|
74
|
-
|
|
75
73
|
for (let consumer of this.listener) {
|
|
76
74
|
consumer(this.search, this.condition);
|
|
77
75
|
}
|
package/mesh/data/request.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.updateWithId = exports.updateWithClassDes = exports.listQueryWithId = exports.listQueryWithClassDes = exports.getCollectById = exports.formWithId = exports.formWithClassDes = exports.downloadWithId = exports.downloadWithClassDes = exports.batchUpdateWithId = exports.batchUpdateWithClassDes = exports.batchAddWithId = exports.batchAddWithClassDes = exports.addWithId = exports.addWithClassDes = void 0;
|
|
6
|
+
exports.updateWithId = exports.updateWithClassDes = exports.listQueryWithId = exports.listQueryWithClassDes = exports.getCollectById = exports.formWithId = exports.formWithClassDes = exports.downloadWithId = exports.downloadWithClassDes = exports.deleteWithId = exports.deleteWithClassDes = exports.batchUpdateWithId = exports.batchUpdateWithClassDes = exports.batchAddWithId = exports.batchAddWithClassDes = exports.addWithId = exports.addWithClassDes = void 0;
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/es6.regexp.search.js");
|
|
9
9
|
|
|
@@ -423,5 +423,57 @@ const batchAddWithClassDes = _ref15 => {
|
|
|
423
423
|
bpm
|
|
424
424
|
});
|
|
425
425
|
};
|
|
426
|
+
/**
|
|
427
|
+
* 根據數據集ID刪除數據
|
|
428
|
+
* @param host
|
|
429
|
+
* @param collectId
|
|
430
|
+
* @param data
|
|
431
|
+
* @param dataList
|
|
432
|
+
* @param bpm
|
|
433
|
+
* @return {Promise<Response>}
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
exports.batchAddWithClassDes = batchAddWithClassDes;
|
|
438
|
+
|
|
439
|
+
const deleteWithId = _ref16 => {
|
|
440
|
+
let {
|
|
441
|
+
host,
|
|
442
|
+
collectId,
|
|
443
|
+
bpm,
|
|
444
|
+
dataList
|
|
445
|
+
} = _ref16;
|
|
446
|
+
return (0, _net.post)("".concat(host, "/data/mesh/execute/delete"), {
|
|
447
|
+
collectId,
|
|
448
|
+
dataList,
|
|
449
|
+
bpm
|
|
450
|
+
});
|
|
451
|
+
};
|
|
452
|
+
/**
|
|
453
|
+
* 根據數據集結構刪除數據
|
|
454
|
+
* @param host
|
|
455
|
+
* @param collect
|
|
456
|
+
* @param data
|
|
457
|
+
* @param dataList
|
|
458
|
+
* @param bpm
|
|
459
|
+
* @return {Promise<Response>}
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
exports.deleteWithId = deleteWithId;
|
|
464
|
+
|
|
465
|
+
const deleteWithClassDes = _ref17 => {
|
|
466
|
+
let {
|
|
467
|
+
host,
|
|
468
|
+
collect,
|
|
469
|
+
bpm,
|
|
470
|
+
dataList
|
|
471
|
+
} = _ref17;
|
|
472
|
+
return (0, _net.post)("".concat(host, "/data/mesh/execute/preview/delete"), {
|
|
473
|
+
collect,
|
|
474
|
+
dataList,
|
|
475
|
+
bpm
|
|
476
|
+
});
|
|
477
|
+
};
|
|
426
478
|
|
|
427
|
-
exports.
|
|
479
|
+
exports.deleteWithClassDes = deleteWithClassDes;
|
|
@@ -17,10 +17,6 @@ var _xlsx = _interopRequireDefault(require("xlsx"));
|
|
|
17
17
|
|
|
18
18
|
var _standardExcel = _interopRequireDefault(require("./standardExcel"));
|
|
19
19
|
|
|
20
|
-
var _serverEnums = require("../config/serverEnums");
|
|
21
|
-
|
|
22
|
-
var _cell = _interopRequireDefault(require("../cell"));
|
|
23
|
-
|
|
24
20
|
var _request = require("../data/request");
|
|
25
21
|
|
|
26
22
|
var _processor = require("./processor");
|
|
@@ -42,9 +38,6 @@ const {
|
|
|
42
38
|
} = _antd.Modal;
|
|
43
39
|
const ConfirmTotal = 2000;
|
|
44
40
|
const PageSize = 300;
|
|
45
|
-
const Dict = Object.assign({}, _serverEnums.EditTypeDict);
|
|
46
|
-
Dict.NONE = '不可编辑';
|
|
47
|
-
Dict.EDIT = '可编辑';
|
|
48
41
|
const ModifyName = 'Modify';
|
|
49
42
|
const AddName = 'Add';
|
|
50
43
|
|
package/mesh/excel/processor.js
CHANGED
|
@@ -19,11 +19,13 @@ var _antd = require("antd");
|
|
|
19
19
|
|
|
20
20
|
var _cell = _interopRequireDefault(require("../cell"));
|
|
21
21
|
|
|
22
|
+
var _authOptions = require("../config/authOptions");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
27
|
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
29
|
|
|
28
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
31
|
|
|
@@ -93,7 +95,7 @@ const modifyAbleHeaderRow = collect => {
|
|
|
93
95
|
});
|
|
94
96
|
indexHeaderRow.push(field.label);
|
|
95
97
|
explainHeaderRow.push(getExplainHeaderColumn(fieldLabelDict, field));
|
|
96
|
-
displayHeaderRow.push("".concat(field.display));
|
|
98
|
+
displayHeaderRow.push("".concat(field.required ? '!' : '').concat(field.display));
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -138,13 +140,13 @@ const addAbleHeaderRow = collect => {
|
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
for (let field of collect.fieldList) {
|
|
141
|
-
if (field.edit
|
|
143
|
+
if (_authOptions.OptValidateUtil.isInsert(field.edit) && !pkNameDict[field.name] && NONE !== collect.show && checkAliasForAdd(fieldNameDict, field)) {
|
|
142
144
|
colsOptions.push({
|
|
143
145
|
wch: 15
|
|
144
146
|
});
|
|
145
147
|
indexHeaderRow.push(field.label);
|
|
146
148
|
explainHeaderRow.push(getExplainHeaderColumn(fieldLabelDict, field));
|
|
147
|
-
displayHeaderRow.push("".concat(field.display));
|
|
149
|
+
displayHeaderRow.push("".concat(field.required ? '!' : '').concat(field.display));
|
|
148
150
|
}
|
|
149
151
|
}
|
|
150
152
|
|