@titaui/pc 1.9.135 → 1.9.136
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/.eslintrc.js
CHANGED
|
@@ -176,13 +176,8 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
|
|
|
176
176
|
source: source > 0 ? source : Source
|
|
177
177
|
}).then(function (res) {
|
|
178
178
|
if (res.data.Code) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
// result,
|
|
182
|
-
// source > 0 ? source : Source,
|
|
183
|
-
// DemoTypeTextMap[type],
|
|
184
|
-
// ),
|
|
185
|
-
// );
|
|
179
|
+
(0, _request.sendBookDemoJson)((0, _utils.bookDemoTransformDataToJson)(result, source > 0 ? source : Source, _constant.DemoTypeTextMap[type], content));
|
|
180
|
+
|
|
186
181
|
_toast["default"].Success("提交成功");
|
|
187
182
|
|
|
188
183
|
if (onSubmitSuccess) {
|
|
@@ -810,7 +810,8 @@ var defaultBookDemoJsonValue = {
|
|
|
810
810
|
interestLearningTutoring: 0,
|
|
811
811
|
hasUseOKRManage: "",
|
|
812
812
|
hasCompanyDonePerAppraisals: "",
|
|
813
|
-
isCompanyHasPerSystem: ""
|
|
813
|
+
isCompanyHasPerSystem: "",
|
|
814
|
+
content: ""
|
|
814
815
|
};
|
|
815
816
|
exports.defaultBookDemoJsonValue = defaultBookDemoJsonValue;
|
|
816
817
|
var _default = bookTypeInfo;
|
|
@@ -33,12 +33,20 @@ var getSource = function getSource() {
|
|
|
33
33
|
|
|
34
34
|
exports.getSource = getSource;
|
|
35
35
|
|
|
36
|
-
var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, source, appliedProduct) {
|
|
36
|
+
var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, source, appliedProduct, content) {
|
|
37
37
|
var result = _objectSpread({}, _constant.defaultBookDemoJsonValue);
|
|
38
38
|
|
|
39
39
|
data.forEach(function (item) {
|
|
40
40
|
if (typeof item.value === "string") {
|
|
41
|
-
|
|
41
|
+
if (item.id === "employeeRange") {
|
|
42
|
+
if (/-/.test(item.value)) {
|
|
43
|
+
result.employeeCount = item.value.split("-")[1];
|
|
44
|
+
} else {
|
|
45
|
+
result.employeeCount = item.value;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
result[item.id] = item.value;
|
|
49
|
+
}
|
|
42
50
|
} else if (item.type === "checkbox" && item.multiSelect) {
|
|
43
51
|
Object.keys(item.value).forEach(function (key) {
|
|
44
52
|
result[key] = item.value[key].isSelected ? 1 : 0;
|
|
@@ -57,6 +65,7 @@ var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, sou
|
|
|
57
65
|
});
|
|
58
66
|
result.source = source;
|
|
59
67
|
result.appliedProduct = appliedProduct;
|
|
68
|
+
result.content = content;
|
|
60
69
|
delete result.verificationCode;
|
|
61
70
|
return result;
|
|
62
71
|
};
|