@pisell/private-materials 3.4.8 → 3.4.9
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/components/customSelect/index.js +1 -0
- package/es/components/booking/hooks/useClearCart.js +11 -8
- package/es/components/booking/hooks/useQuotation.js +1 -1
- package/es/components/booking/info/client/index.js +3 -2
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +16 -9
- package/es/components/booking/info/service/Lists.js +36 -26
- package/es/components/booking/info/service2/utils.js +20 -21
- package/es/components/booking/info2/index.js +1 -0
- package/es/components/booking/info2/service/addService/utils.js +6 -3
- package/es/components/booking/info2/service/addTimeModal/index.js +3 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
- package/es/components/booking/info2/service/editService/index.js +266 -170
- package/es/components/booking/info2/service/index.js +19 -15
- package/es/components/booking/materiels/duration/index.js +9 -2
- package/es/components/shoppingCart/components/Cart/Product.js +48 -41
- package/es/components/shoppingCart/components/Cart/index.js +21 -18
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +249 -158
- package/es/components/ticketBooking/components/timeBar/index.js +78 -71
- package/es/components/ticketBooking/utils/index.d.ts +2 -0
- package/es/components/ticketBooking/utils/index.js +18 -1
- package/lib/components/booking/components/customSelect/index.js +1 -0
- package/lib/components/booking/hooks/useClearCart.js +16 -13
- package/lib/components/booking/hooks/useQuotation.js +1 -1
- package/lib/components/booking/info/client/index.js +5 -4
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +10 -9
- package/lib/components/booking/info/service/Lists.js +35 -23
- package/lib/components/booking/info/service2/utils.js +17 -17
- package/lib/components/booking/info2/service/addService/utils.js +4 -2
- package/lib/components/booking/info2/service/addTimeModal/index.js +3 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
- package/lib/components/booking/info2/service/editService/index.js +139 -74
- package/lib/components/booking/info2/service/index.js +13 -9
- package/lib/components/booking/materiels/duration/index.js +7 -2
- package/lib/components/shoppingCart/components/Cart/Product.js +31 -21
- package/lib/components/shoppingCart/components/Cart/index.js +18 -15
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +196 -127
- package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
- package/lib/components/ticketBooking/utils/index.d.ts +2 -0
- package/lib/components/ticketBooking/utils/index.js +22 -0
- package/package.json +4 -4
|
@@ -74,6 +74,7 @@ var CustomSelect = function CustomSelect(props, ref) {
|
|
|
74
74
|
showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown,
|
|
75
75
|
propsHandleOpenModal = props.handleOpenModal,
|
|
76
76
|
handleDayChange = props.handleDayChange;
|
|
77
|
+
console.log('custom select');
|
|
77
78
|
var searchRef = useRef();
|
|
78
79
|
|
|
79
80
|
// 当前选择的值
|
|
@@ -2,12 +2,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { Iconfont } from '@pisell/materials';
|
|
8
8
|
import { locales } from "@pisell/utils";
|
|
9
9
|
var useClearCart = function useClearCart(state, dispatch) {
|
|
10
|
-
var _state$
|
|
10
|
+
var _state$service3;
|
|
11
11
|
var handleClear = function handleClear() {
|
|
12
12
|
// 清除购物车
|
|
13
13
|
dispatch({
|
|
@@ -17,11 +17,14 @@ var useClearCart = function useClearCart(state, dispatch) {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return useMemo(function () {
|
|
21
|
+
var _state$service, _state$service2;
|
|
22
|
+
return !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit && /*#__PURE__*/React.createElement("span", {
|
|
23
|
+
className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
|
|
24
|
+
onClick: handleClear
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
26
|
+
type: "pisell2-trash-01"
|
|
27
|
+
}), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
|
|
28
|
+
}, [(_state$service3 = state.service) === null || _state$service3 === void 0 || (_state$service3 = _state$service3.value) === null || _state$service3 === void 0 ? void 0 : _state$service3.length, state.channelDisabledEdit]);
|
|
26
29
|
};
|
|
27
30
|
export default useClearCart;
|
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import { getProductTotalPrice } from "../utils";
|
|
18
|
-
import useEngineContext from "
|
|
18
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
19
19
|
import { locales } from "@pisell/utils";
|
|
20
20
|
import { PisellModal } from "@pisell/materials";
|
|
21
21
|
import { getProductPrice } from "../info/service/serve";
|
|
@@ -36,7 +36,7 @@ import { getWaiverTitle } from "../clientVariant/utils";
|
|
|
36
36
|
import useGetHolderList from "../hooks/useGetHolderList";
|
|
37
37
|
var isLoadClient = false;
|
|
38
38
|
var Client = function Client() {
|
|
39
|
-
var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
|
|
39
|
+
var _state$client$value2, _state$client4, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
|
|
40
40
|
var modalRef = useRef();
|
|
41
41
|
var _useState = useState(false),
|
|
42
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -397,6 +397,7 @@ var Client = function Client() {
|
|
|
397
397
|
}, locales.getText('pisell2.text.load-more'))) : null;
|
|
398
398
|
}, [loadLoading, params, state.client.clients.length]);
|
|
399
399
|
var customSelect = useMemo(function () {
|
|
400
|
+
console.log('render customSelect');
|
|
400
401
|
return /*#__PURE__*/React.createElement(CustomSelect, {
|
|
401
402
|
autoFocus: !state.isTerminal,
|
|
402
403
|
modalOpen: state.modalOpen,
|
|
@@ -459,7 +460,7 @@ var Client = function Client() {
|
|
|
459
460
|
return true;
|
|
460
461
|
}
|
|
461
462
|
});
|
|
462
|
-
}, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
|
|
463
|
+
}, [state.isTerminal, state.modalOpen, (_state$client4 = state.client) === null || _state$client4 === void 0 ? void 0 : _state$client4.value, state.drawerMask, renderList, loading, franchiseeLoading, params.search, loadMore]);
|
|
463
464
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
464
465
|
className: "pisell-lowcode__booking-client",
|
|
465
466
|
onClick: function onClick() {
|
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { useMemoizedFn } from "ahooks";
|
|
7
8
|
import { useEffect, useMemo, useRef } from "react";
|
|
8
9
|
import useHolderConfig from "./useHolderConfig";
|
|
9
10
|
import { isOpenAddTime } from "../utils";
|
|
@@ -29,21 +30,27 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
|
|
|
29
30
|
};
|
|
30
31
|
}, [state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.information_tab]);
|
|
31
32
|
var showAddTimeModal = useMemo(function () {
|
|
32
|
-
return isOpenAddTime(state);
|
|
33
|
+
return isOpenAddTime(state) && !state.isBookingTicket2;
|
|
33
34
|
}, [state, appointment_card.quick_time]);
|
|
34
|
-
var handleEdit = function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
var handleEdit = useMemoizedFn(function (cacheItem, type) {
|
|
36
|
+
var _detailRef$current, _detailRef$current$in;
|
|
37
|
+
// console.timeEnd('handleChange');
|
|
38
|
+
console.time('handleEdit');
|
|
39
|
+
console.log(performance.now() - window.pp1, '打开商品4');
|
|
40
|
+
(_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
|
|
41
|
+
// setTimeout(() => {
|
|
42
|
+
// console.log(performance.now() - window.pp1, '打开商品5');
|
|
43
|
+
// console.timeEnd('handleEdit')
|
|
44
|
+
// detailRef.current?.init?.(cacheItem, false, type === 'edit_product');
|
|
45
|
+
// }, );
|
|
46
|
+
});
|
|
40
47
|
var dispatchService = function dispatchService(type, payload) {
|
|
41
48
|
dispatch({
|
|
42
49
|
type: type,
|
|
43
50
|
payload: _objectSpread({}, payload)
|
|
44
51
|
});
|
|
45
52
|
};
|
|
46
|
-
var handleAction = function
|
|
53
|
+
var handleAction = useMemoizedFn(function (dataSource) {
|
|
47
54
|
var cacheItem = getProductExtend({
|
|
48
55
|
cacheItem: _objectSpread(_objectSpread({}, dataSource._origin), {}, {
|
|
49
56
|
new: 0
|
|
@@ -57,7 +64,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
|
|
|
57
64
|
cacheItem: cacheItem
|
|
58
65
|
}
|
|
59
66
|
});
|
|
60
|
-
};
|
|
67
|
+
});
|
|
61
68
|
return {
|
|
62
69
|
detailRef: detailRef,
|
|
63
70
|
handleEdit: handleEdit,
|
|
@@ -14,7 +14,7 @@ import { useMemoizedFn } from 'ahooks';
|
|
|
14
14
|
import { getProductExtend } from "../../info2/service/addService/utils";
|
|
15
15
|
import useAddHolder from "../hooks/useAddHolder";
|
|
16
16
|
var Lists = function Lists(_ref) {
|
|
17
|
-
var _state$
|
|
17
|
+
var _state$service2;
|
|
18
18
|
var onEdit = _ref.onEdit,
|
|
19
19
|
onChange = _ref.onChange,
|
|
20
20
|
onAction = _ref.onAction,
|
|
@@ -36,6 +36,8 @@ var Lists = function Lists(_ref) {
|
|
|
36
36
|
* @Date: 2024-11-29 16:35
|
|
37
37
|
*/
|
|
38
38
|
var handleChange = useMemoizedFn(function (currentItem, type, other) {
|
|
39
|
+
console.time('handleChange');
|
|
40
|
+
console.log(window.pp1 = performance.now(), '打开商品');
|
|
39
41
|
if (state.disabledEdit || state.disableEventBookingEdit) {
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
@@ -59,9 +61,7 @@ var Lists = function Lists(_ref) {
|
|
|
59
61
|
editModal: true,
|
|
60
62
|
cacheItem: cacheItem
|
|
61
63
|
});
|
|
62
|
-
return onEdit === null || onEdit === void 0 ? void 0 : onEdit(
|
|
63
|
-
new: 0
|
|
64
|
-
}), type);
|
|
64
|
+
return onEdit === null || onEdit === void 0 ? void 0 : onEdit(cacheItem, type);
|
|
65
65
|
}
|
|
66
66
|
var params = {
|
|
67
67
|
editModal: false,
|
|
@@ -95,27 +95,37 @@ var Lists = function Lists(_ref) {
|
|
|
95
95
|
isShowEditProduct: !state.isBookingCreatePage
|
|
96
96
|
};
|
|
97
97
|
}, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
98
|
+
var products = useMemo(function () {
|
|
99
|
+
var _state$service;
|
|
100
|
+
console.time('products');
|
|
101
|
+
var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource);
|
|
102
|
+
console.timeEnd('products');
|
|
103
|
+
return p;
|
|
104
|
+
}, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value, state]);
|
|
105
|
+
return useMemo(function () {
|
|
106
|
+
console.log('render List');
|
|
107
|
+
return /*#__PURE__*/React.createElement(CartContext.Provider, {
|
|
108
|
+
value: {
|
|
109
|
+
state: state
|
|
110
|
+
}
|
|
111
|
+
}, /*#__PURE__*/React.createElement(ShoppingCart, {
|
|
112
|
+
isParallelResource: isParallelResource,
|
|
113
|
+
onAction: onAction,
|
|
114
|
+
onChange: handleChange,
|
|
115
|
+
isOpenGroup: false,
|
|
116
|
+
isHideClearCart: true,
|
|
117
|
+
onAddProduct: function onAddProduct() {
|
|
118
|
+
return onChange({
|
|
119
|
+
addModal: true
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
// onActiveKey={handleActiveKey}
|
|
123
|
+
// collapseParams={CollapseParams}
|
|
124
|
+
,
|
|
125
|
+
productParams: _objectSpread(_objectSpread({}, productParams), {}, {
|
|
126
|
+
products: products
|
|
127
|
+
})
|
|
128
|
+
}));
|
|
129
|
+
}, [products, state, productParams]);
|
|
120
130
|
};
|
|
121
131
|
export default Lists;
|
|
@@ -691,29 +691,28 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
691
691
|
_origin: item
|
|
692
692
|
});
|
|
693
693
|
};
|
|
694
|
-
|
|
695
|
-
// 将商品分为组商品和非组商品
|
|
696
|
-
lists.forEach(function (item) {
|
|
697
|
-
var _item$_extend28;
|
|
698
|
-
if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
|
|
699
|
-
normalList.push(formItem(item));
|
|
700
|
-
} else {
|
|
701
|
-
groupList.push(item);
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
|
|
705
|
-
// 根据item._extend.groupId 进行分组
|
|
706
|
-
var groups = groupList.reduce(function (prev, item) {
|
|
707
|
-
var _item$_extend29;
|
|
708
|
-
var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
|
|
709
|
-
if (!prev[groupId]) {
|
|
710
|
-
prev[groupId] = [];
|
|
711
|
-
}
|
|
712
|
-
prev[groupId].push(item);
|
|
713
|
-
return prev;
|
|
714
|
-
}, {});
|
|
715
694
|
console.log(normalList, 'normalList');
|
|
716
695
|
if (isRenderGroup) {
|
|
696
|
+
// 将商品分为组商品和非组商品
|
|
697
|
+
lists.forEach(function (item) {
|
|
698
|
+
var _item$_extend28;
|
|
699
|
+
if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
|
|
700
|
+
normalList.push(formItem(item));
|
|
701
|
+
} else {
|
|
702
|
+
groupList.push(item);
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
// 根据item._extend.groupId 进行分组
|
|
707
|
+
var groups = groupList.reduce(function (prev, item) {
|
|
708
|
+
var _item$_extend29;
|
|
709
|
+
var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
|
|
710
|
+
if (!prev[groupId]) {
|
|
711
|
+
prev[groupId] = [];
|
|
712
|
+
}
|
|
713
|
+
prev[groupId].push(item);
|
|
714
|
+
return prev;
|
|
715
|
+
}, {});
|
|
717
716
|
return Object.values(groups).map(function (d) {
|
|
718
717
|
return formItem(concatBookings(d));
|
|
719
718
|
}).concat(normalList);
|
|
@@ -79,6 +79,7 @@ var Info = Provider(function (props) {
|
|
|
79
79
|
}, []);
|
|
80
80
|
useMemo(function () {
|
|
81
81
|
var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$i, _context$appHelper3;
|
|
82
|
+
// TODO: 优化 内部每次设置state会触发两次渲染
|
|
82
83
|
var isFranchisee = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.businessUtils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getAppByModal) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, 'franchisee');
|
|
83
84
|
modal.dispatch({
|
|
84
85
|
type: 'setState',
|
|
@@ -128,7 +128,8 @@ export var getTimeObj = function getTimeObj(_ref4) {
|
|
|
128
128
|
cacheItem: cacheItem,
|
|
129
129
|
useStartTime: useStartTime,
|
|
130
130
|
currentResource: currentResource,
|
|
131
|
-
|
|
131
|
+
// 没有使用该参数
|
|
132
|
+
// state,
|
|
132
133
|
durationProps: durationProps
|
|
133
134
|
});
|
|
134
135
|
var obj = sliceDayIntoFiveMinutes((_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.service_time, locales.locale);
|
|
@@ -286,7 +287,9 @@ export var setDefaultResource = function setDefaultResource(_ref6) {
|
|
|
286
287
|
defaultOriginalResource = renderList;
|
|
287
288
|
}
|
|
288
289
|
var defaultResource = defaultOriginalResource.map(function (d) {
|
|
289
|
-
return
|
|
290
|
+
return {
|
|
291
|
+
// ...d,
|
|
292
|
+
children: d.children,
|
|
290
293
|
relation_type: d.relation_type,
|
|
291
294
|
form_id: item.form_id,
|
|
292
295
|
relation_id: d.id,
|
|
@@ -297,7 +300,7 @@ export var setDefaultResource = function setDefaultResource(_ref6) {
|
|
|
297
300
|
form_name: item.title,
|
|
298
301
|
resource_name: d.main_field
|
|
299
302
|
}
|
|
300
|
-
}
|
|
303
|
+
};
|
|
301
304
|
});
|
|
302
305
|
obj[item.form_id] = defaultResource;
|
|
303
306
|
};
|
|
@@ -70,6 +70,7 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
70
70
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
71
71
|
renderList = _useState10[0],
|
|
72
72
|
setRenderList = _useState10[1];
|
|
73
|
+
console.log(renderList, 'renderListrenderList');
|
|
73
74
|
var context = useEngineContext();
|
|
74
75
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
75
76
|
interaction = _context$appHelper$ut.interaction;
|
|
@@ -148,6 +149,7 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
148
149
|
}
|
|
149
150
|
return arr.filter(Boolean);
|
|
150
151
|
}, [(_state$service = state.service) === null || _state$service === void 0 || (_state$service = _state$service.cacheItem) === null || _state$service === void 0 || (_state$service = _state$service._extend) === null || _state$service === void 0 ? void 0 : _state$service.resource]);
|
|
152
|
+
console.log(currentResource, 'currentResource');
|
|
151
153
|
var getTimeUsableStatus = function getTimeUsableStatus(time) {
|
|
152
154
|
var _state$service$cacheI3;
|
|
153
155
|
if (!((_state$service$cacheI3 = state.service.cacheItem) !== null && _state$service$cacheI3 !== void 0 && _state$service$cacheI3._extend) || !currentResource.length) {
|
|
@@ -270,6 +272,7 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
270
272
|
case 3:
|
|
271
273
|
newList = _context2.sent;
|
|
272
274
|
list = newList.map(function (d) {
|
|
275
|
+
debugger;
|
|
273
276
|
// 是否可用
|
|
274
277
|
var isUsable = isUsableProduct(d.add_time, state.service.cacheItem);
|
|
275
278
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -189,9 +189,14 @@ var Resources = function Resources(_ref, ref) {
|
|
|
189
189
|
var getIsAutoAllocation = function getIsAutoAllocation(id) {
|
|
190
190
|
return getAutoAllocationStorage(id);
|
|
191
191
|
};
|
|
192
|
+
console.log('resourcesss');
|
|
193
|
+
|
|
194
|
+
/* todo: 此处value变化渲染三次 */
|
|
195
|
+
|
|
192
196
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.map(function (item) {
|
|
193
197
|
var _cur$2;
|
|
194
198
|
var cur = _value[item.form_id];
|
|
199
|
+
console.log(cur, 'curcur');
|
|
195
200
|
var errors = (cur || []).reduce(function (pre, d) {
|
|
196
201
|
return pre.concat((d === null || d === void 0 ? void 0 : d.errors) || []);
|
|
197
202
|
}, []);
|