@titaui/pc 1.11.52-beta.2 → 1.11.52-beta.20
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/lib/components/button/images/blue.svg +21 -0
- package/lib/components/button/images/red.svg +21 -0
- package/lib/components/button/images/white.svg +19 -0
- package/lib/components/button/rect-btn/index.js +3 -3
- package/lib/components/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/checkbox/index.css +4 -0
- package/lib/components/contact-kefu/index.css +11 -1
- package/lib/components/contact-kefu/index.js +10 -4
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/index.js +197 -132
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/drop-selector/index.js +1 -2
- package/lib/components/dynamic/components/title/index.js +1 -1
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +17 -17
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
- package/lib/components/eReport/eReportLists/reportList.js +29 -30
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +11 -9
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
- package/lib/components/nav-top/components/menu/index.js +18 -16
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/header/edit-name.js +76 -39
- package/lib/components/okr-detail/components/header/index.css +122 -41
- package/lib/components/okr-detail/components/header/index.js +45 -48
- package/lib/components/okr-detail/components/header/o-classify.js +152 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +81 -43
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +174 -64
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
- package/lib/components/okr-detail/detail-header/index.js +11 -5
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/okr-list/index.css +9 -0
- package/lib/components/okr-detail/okr-list/index.js +25 -25
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-flow/export-modal/index.js +26 -16
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +183 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/progress/circle-progress/index.css +2 -0
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/search-key-handle/index.js +12 -10
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +139 -2
- package/lib/components/task-relation-modal/image/loading.gif +0 -0
- package/lib/components/task-relation-modal/index.js +9 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +267 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +131 -0
- package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +191 -0
- package/lib/components/task-relation-modal/request-api.js +28 -2
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +36 -19
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
- package/lib/components/task-relation-modal/search/task-relation.js +83 -0
- package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
- package/lib/components/task-relation-modal/search/work-relation.js +83 -0
- package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
- package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
- package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
- package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
- package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
- package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +256 -0
- package/lib/components/task-tree/task-item-node/index.css +2 -2
- package/lib/components/tooltip/index.js +3 -0
- package/lib/components/tooltip/tooltip-rows/index.css +26 -0
- package/lib/components/tooltip/tooltip-rows/index.js +106 -0
- package/lib/components/upload/components/uploadedPreview.js +18 -18
- package/lib/components/upload/index.js +57 -29
- package/lib/components/user-selector/category-selector-panel/index.js +6 -1
- package/lib/components/user-selector/category-selector-panel/subordinate-tree.js +61 -0
- package/lib/components/user-selector/constant.js +10 -2
- package/lib/components/user-selector/empty/index.css +5 -0
- package/lib/components/user-selector/empty/index.js +9 -3
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +16 -15
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +32 -12
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/pages/new-okr-list/header/index.js +16 -18
- package/lib/utils/auth.js +12 -0
- package/lib/utils/hooks.js +19 -5
- package/lib/utils/open-data.js +214 -66
- package/lib/utils/planDataJson.js +11115 -0
- package/lib/utils/tita-okr-cycle.js +24 -0
- package/package.json +2 -1
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _dialog = _interopRequireDefault(require("../../dialog"));
|
|
13
|
+
|
|
14
|
+
var _toast = _interopRequireDefault(require("../../toast"));
|
|
15
|
+
|
|
16
|
+
var _okrTree = _interopRequireDefault(require("../tree/okr-tree"));
|
|
17
|
+
|
|
18
|
+
var _helper = require("../helper");
|
|
19
|
+
|
|
20
|
+
var _context3 = require("../context");
|
|
21
|
+
|
|
22
|
+
var _requestApi = require("../request-api");
|
|
23
|
+
|
|
24
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
25
|
+
|
|
26
|
+
require("./index.css");
|
|
27
|
+
|
|
28
|
+
var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "taskId", "isRelationOther", "lastSelected"];
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
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); } }
|
|
39
|
+
|
|
40
|
+
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); }); }; }
|
|
41
|
+
|
|
42
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
43
|
+
|
|
44
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
45
|
+
|
|
46
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
47
|
+
|
|
48
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
49
|
+
|
|
50
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
51
|
+
|
|
52
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
53
|
+
|
|
54
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
55
|
+
|
|
56
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
57
|
+
|
|
58
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
59
|
+
|
|
60
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
61
|
+
|
|
62
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
63
|
+
|
|
64
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
65
|
+
|
|
66
|
+
function WorkRelationModal(props) {
|
|
67
|
+
var _props$defaultVisible = props.defaultVisible,
|
|
68
|
+
defaultVisible = _props$defaultVisible === void 0 ? false : _props$defaultVisible,
|
|
69
|
+
_props$multiple = props.multiple,
|
|
70
|
+
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
71
|
+
onOk = props.onOk,
|
|
72
|
+
_props$onCancel = props.onCancel,
|
|
73
|
+
onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
|
|
74
|
+
_props$taskId = props.taskId,
|
|
75
|
+
taskId = _props$taskId === void 0 ? 0 : _props$taskId,
|
|
76
|
+
_props$isRelationOthe = props.isRelationOther,
|
|
77
|
+
isRelationOther = _props$isRelationOthe === void 0 ? false : _props$isRelationOthe,
|
|
78
|
+
_props$lastSelected = props.lastSelected,
|
|
79
|
+
lastSelected = _props$lastSelected === void 0 ? [] : _props$lastSelected,
|
|
80
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
81
|
+
|
|
82
|
+
var _useState = (0, _react.useState)(defaultVisible),
|
|
83
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
84
|
+
visible = _useState2[0],
|
|
85
|
+
setVisible = _useState2[1];
|
|
86
|
+
|
|
87
|
+
var _useState3 = (0, _react.useState)(lastSelected),
|
|
88
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
|
+
selected = _useState4[0],
|
|
90
|
+
setSelected = _useState4[1];
|
|
91
|
+
|
|
92
|
+
var _useState5 = (0, _react.useState)([]),
|
|
93
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
|
+
selectedRoots = _useState6[0],
|
|
95
|
+
setSelectedRoots = _useState6[1];
|
|
96
|
+
|
|
97
|
+
(0, _react.useEffect)(function () {
|
|
98
|
+
var roots = selected.reduce(function (res, cur) {
|
|
99
|
+
return [].concat(_toConsumableArray(res), [cur.workId]);
|
|
100
|
+
}, []);
|
|
101
|
+
setSelectedRoots(roots);
|
|
102
|
+
}, [selected]);
|
|
103
|
+
|
|
104
|
+
var updateRelationOthers = /*#__PURE__*/function () {
|
|
105
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
106
|
+
var _yield$relationWorks, Message;
|
|
107
|
+
|
|
108
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
109
|
+
while (1) {
|
|
110
|
+
switch (_context.prev = _context.next) {
|
|
111
|
+
case 0:
|
|
112
|
+
_context.next = 2;
|
|
113
|
+
return (0, _requestApi.relationWorks)({
|
|
114
|
+
TaskId: taskId,
|
|
115
|
+
taskRelationModels: selected.map(function (item) {
|
|
116
|
+
return {
|
|
117
|
+
WorkId: item.workId,
|
|
118
|
+
KrId: item.krId
|
|
119
|
+
};
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
case 2:
|
|
124
|
+
_yield$relationWorks = _context.sent;
|
|
125
|
+
Message = _yield$relationWorks.Message;
|
|
126
|
+
|
|
127
|
+
if (Message) {
|
|
128
|
+
_toast["default"].Error(Message);
|
|
129
|
+
} else {
|
|
130
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
case 5:
|
|
134
|
+
case "end":
|
|
135
|
+
return _context.stop();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, _callee);
|
|
139
|
+
}));
|
|
140
|
+
|
|
141
|
+
return function updateRelationOthers() {
|
|
142
|
+
return _ref.apply(this, arguments);
|
|
143
|
+
};
|
|
144
|
+
}();
|
|
145
|
+
|
|
146
|
+
var updateRelation = /*#__PURE__*/function () {
|
|
147
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
148
|
+
var _selected, node, _yield$updateLable, Message;
|
|
149
|
+
|
|
150
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
151
|
+
while (1) {
|
|
152
|
+
switch (_context2.prev = _context2.next) {
|
|
153
|
+
case 0:
|
|
154
|
+
if (!(selected.length > 0)) {
|
|
155
|
+
_context2.next = 7;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
_selected = _slicedToArray(selected, 1), node = _selected[0];
|
|
160
|
+
_context2.next = 4;
|
|
161
|
+
return (0, _requestApi.updateLable)({
|
|
162
|
+
task_id: taskId,
|
|
163
|
+
lab_id: node.workId,
|
|
164
|
+
// 目标id 、项目id、分类id
|
|
165
|
+
lab_type: _helper.lableTypeMap[node.type],
|
|
166
|
+
mileStoneId: node.krId // kr | 里程碑id
|
|
167
|
+
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
case 4:
|
|
171
|
+
_yield$updateLable = _context2.sent;
|
|
172
|
+
Message = _yield$updateLable.Message;
|
|
173
|
+
|
|
174
|
+
if (Message) {
|
|
175
|
+
_toast["default"].Error(Message);
|
|
176
|
+
} else {
|
|
177
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
case 7:
|
|
181
|
+
case "end":
|
|
182
|
+
return _context2.stop();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}, _callee2);
|
|
186
|
+
}));
|
|
187
|
+
|
|
188
|
+
return function updateRelation() {
|
|
189
|
+
return _ref2.apply(this, arguments);
|
|
190
|
+
};
|
|
191
|
+
}();
|
|
192
|
+
|
|
193
|
+
var onOkHandler = function onOkHandler() {
|
|
194
|
+
if (taskId) {
|
|
195
|
+
isRelationOther && updateRelationOthers();
|
|
196
|
+
!isRelationOther && updateRelation();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
setVisible(false);
|
|
200
|
+
onOk && onOk(selected);
|
|
201
|
+
setSelected([]);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
var onCancelHandler = function onCancelHandler() {
|
|
205
|
+
setVisible(false);
|
|
206
|
+
onCancel && onCancel();
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var addSelected = function addSelected(node) {
|
|
210
|
+
if (multiple) {
|
|
211
|
+
setSelected([].concat(_toConsumableArray(selected), [node]));
|
|
212
|
+
} else {
|
|
213
|
+
setSelected([node]);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
var removeSelected = function removeSelected(id) {
|
|
218
|
+
var newSelected = selected.filter(function (item) {
|
|
219
|
+
return item.id !== id;
|
|
220
|
+
});
|
|
221
|
+
setSelected(_toConsumableArray(newSelected));
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], _extends({
|
|
225
|
+
title: '关联 OKR',
|
|
226
|
+
visible: visible,
|
|
227
|
+
onOk: onOkHandler,
|
|
228
|
+
onCancel: onCancelHandler,
|
|
229
|
+
onClose: onCancelHandler,
|
|
230
|
+
style: {
|
|
231
|
+
height: "590px"
|
|
232
|
+
},
|
|
233
|
+
width: 840,
|
|
234
|
+
noFooterLine: true // getContainer={getContainer}
|
|
235
|
+
,
|
|
236
|
+
extraClass: ["pull-screen-ignore", "tita-user-pop"],
|
|
237
|
+
destroyOnClose: false
|
|
238
|
+
}, restProps), /*#__PURE__*/_react["default"].createElement(_context3.Context.Provider, {
|
|
239
|
+
value: {
|
|
240
|
+
multiple: multiple,
|
|
241
|
+
selected: selected,
|
|
242
|
+
selectedRoots: selectedRoots,
|
|
243
|
+
addSelected: addSelected,
|
|
244
|
+
removeSelected: removeSelected
|
|
245
|
+
}
|
|
246
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
247
|
+
className: "".concat(_helper.preCls, "__content")
|
|
248
|
+
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], null)), selected.length > 0 && multiple && /*#__PURE__*/_react["default"].createElement("div", {
|
|
249
|
+
className: "".concat(_helper.preCls, "__select")
|
|
250
|
+
}, "\u5DF2\u9009", /*#__PURE__*/_react["default"].createElement("span", {
|
|
251
|
+
className: "".concat(_helper.preCls, "__select-count")
|
|
252
|
+
}, selected.length), "\u9879"))));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
var _default = WorkRelationModal;
|
|
256
|
+
exports["default"] = _default;
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
top: 3px;
|
|
108
108
|
color: #89919f;
|
|
109
109
|
cursor: auto;
|
|
110
|
-
width:
|
|
110
|
+
width: 72px;
|
|
111
111
|
margin-left: 20px;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
top: 3px;
|
|
264
264
|
color: #89919f;
|
|
265
265
|
cursor: auto;
|
|
266
|
-
width:
|
|
266
|
+
width: 72px;
|
|
267
267
|
margin-left: 20px;
|
|
268
268
|
}
|
|
269
269
|
|
|
@@ -11,11 +11,14 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
|
11
11
|
|
|
12
12
|
var _tooltipText = _interopRequireDefault(require("./tooltip-text"));
|
|
13
13
|
|
|
14
|
+
var _tooltipRows = _interopRequireDefault(require("./tooltip-rows"));
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
18
|
// export const TooltipText = _TooltipText;
|
|
17
19
|
// export const ErrorToolTip = _ErrorTip;
|
|
18
20
|
_tooltip["default"].Text = _tooltipText["default"];
|
|
19
21
|
_tooltip["default"].Error = _errorTip["default"];
|
|
22
|
+
_tooltip["default"].Rows = _tooltipRows["default"];
|
|
20
23
|
var _default = _tooltip["default"];
|
|
21
24
|
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.tooltip-rows {
|
|
2
|
+
width: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tooltip-rows-wrapper {
|
|
7
|
+
width: 100%;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tooltip-rows-wrapper--hidden {
|
|
12
|
+
position: absolute;
|
|
13
|
+
visibility: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tooltip-rows-wrapper--normal-chirdren {
|
|
17
|
+
margin-right: 4px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tooltip-rows-wrapper-suffix {
|
|
21
|
+
position: absolute;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
right: 0;
|
|
24
|
+
padding: 0 4px 0 14px;
|
|
25
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 20%);
|
|
26
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
|
|
24
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
29
|
+
|
|
30
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
+
|
|
32
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
+
|
|
34
|
+
var TooltipText = function TooltipText(_ref) {
|
|
35
|
+
var _ref$overlayText = _ref.overlayText,
|
|
36
|
+
overlayText = _ref$overlayText === void 0 ? "" : _ref$overlayText,
|
|
37
|
+
_ref$exClass = _ref.exClass,
|
|
38
|
+
exClass = _ref$exClass === void 0 ? "" : _ref$exClass,
|
|
39
|
+
_ref$isPercent = _ref.isPercent,
|
|
40
|
+
isPercent = _ref$isPercent === void 0 ? false : _ref$isPercent,
|
|
41
|
+
_ref$overlayClassName = _ref.overlayClassName,
|
|
42
|
+
overlayClassName = _ref$overlayClassName === void 0 ? "" : _ref$overlayClassName,
|
|
43
|
+
_ref$mouseEnterDelay = _ref.mouseEnterDelay,
|
|
44
|
+
mouseEnterDelay = _ref$mouseEnterDelay === void 0 ? 0 : _ref$mouseEnterDelay,
|
|
45
|
+
_ref$lineHeight = _ref.lineHeight,
|
|
46
|
+
lineHeight = _ref$lineHeight === void 0 ? 22 : _ref$lineHeight,
|
|
47
|
+
_ref$rowNum = _ref.rowNum,
|
|
48
|
+
rowNum = _ref$rowNum === void 0 ? 2 : _ref$rowNum,
|
|
49
|
+
_ref$suffix = _ref.suffix,
|
|
50
|
+
suffix = _ref$suffix === void 0 ? null : _ref$suffix,
|
|
51
|
+
_ref$suffixClass = _ref.suffixClass,
|
|
52
|
+
suffixClass = _ref$suffixClass === void 0 ? "" : _ref$suffixClass,
|
|
53
|
+
children = _ref.children;
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(false),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
hasTooltip = _useState2[0],
|
|
58
|
+
setHasTooltip = _useState2[1];
|
|
59
|
+
|
|
60
|
+
var domRef = (0, _react.useRef)();
|
|
61
|
+
(0, _react.useEffect)(function () {
|
|
62
|
+
if (isPercent) {
|
|
63
|
+
var _console = console,
|
|
64
|
+
log = _console.log;
|
|
65
|
+
log(domRef.current.getBoundingClientRect());
|
|
66
|
+
var domClient = domRef.current ? domRef.current.getBoundingClientRect() : {
|
|
67
|
+
height: 0,
|
|
68
|
+
width: 0
|
|
69
|
+
};
|
|
70
|
+
var height = domClient.height;
|
|
71
|
+
|
|
72
|
+
if (height > rowNum * lineHeight) {
|
|
73
|
+
setHasTooltip(true);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, []);
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
+
className: "tooltip-rows"
|
|
79
|
+
}, hasTooltip && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
80
|
+
overlayClassName: overlayClassName,
|
|
81
|
+
overlay: overlayText || children,
|
|
82
|
+
placement: "top",
|
|
83
|
+
mouseEnterDelay: mouseEnterDelay
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
|
+
className: "tooltip-rows-wrapper ".concat(exClass),
|
|
86
|
+
style: {
|
|
87
|
+
height: rowNum * lineHeight,
|
|
88
|
+
lineHeight: "".concat(lineHeight, "px")
|
|
89
|
+
}
|
|
90
|
+
}, children, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
className: "tooltip-rows-wrapper-suffix ".concat(suffixClass)
|
|
92
|
+
}, !!suffix && suffix))), !hasTooltip && /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
+
className: "tooltip-rows-wrapper ".concat(exClass)
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
95
|
+
className: "tooltip-rows-wrapper--normal-chirdren"
|
|
96
|
+
}, children), suffix), /*#__PURE__*/_react["default"].createElement("span", {
|
|
97
|
+
className: "tooltip-rows-wrapper tooltip-rows-wrapper--hidden ".concat(exClass),
|
|
98
|
+
ref: domRef,
|
|
99
|
+
style: {
|
|
100
|
+
lineHeight: "".concat(lineHeight, "px")
|
|
101
|
+
}
|
|
102
|
+
}, children));
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var _default = TooltipText;
|
|
106
|
+
exports["default"] = _default;
|
|
@@ -84,7 +84,7 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
84
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
85
|
className: "tu-icon-canceled action-icon action-icon-delete",
|
|
86
86
|
onMouseDown: function onMouseDown() {
|
|
87
|
-
return onSubmit(index,
|
|
87
|
+
return onSubmit(index, 'cancel');
|
|
88
88
|
}
|
|
89
89
|
})));
|
|
90
90
|
}
|
|
@@ -94,24 +94,24 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
94
94
|
if (smallImageUrl && deleteable) {
|
|
95
95
|
// 是图片且能删除
|
|
96
96
|
return [/*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
97
|
-
content: (0, _getLocale.getLocale)(
|
|
97
|
+
content: (0, _getLocale.getLocale)('Mod_Preview'),
|
|
98
98
|
container: document.body
|
|
99
99
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
100
100
|
className: "upload-file-action-wrapper"
|
|
101
101
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
102
102
|
className: "tu-icon-yulan action-icon",
|
|
103
103
|
onMouseDown: function onMouseDown() {
|
|
104
|
-
return onSubmit(index,
|
|
104
|
+
return onSubmit(index, 'preview');
|
|
105
105
|
}
|
|
106
106
|
}))), /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
107
|
-
content: (0, _getLocale.getLocale)(
|
|
107
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
108
108
|
container: document.body
|
|
109
109
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
110
|
className: "upload-file-action-wrapper"
|
|
111
111
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
112
112
|
className: "tu-icon-canceled action-icon delete",
|
|
113
113
|
onMouseDown: function onMouseDown() {
|
|
114
|
-
return onSubmit(index,
|
|
114
|
+
return onSubmit(index, 'delete');
|
|
115
115
|
}
|
|
116
116
|
})))];
|
|
117
117
|
}
|
|
@@ -119,14 +119,14 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
119
|
if (!smallImageUrl && deleteable) {
|
|
120
120
|
// 不是图片但能删除
|
|
121
121
|
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
122
|
-
content: (0, _getLocale.getLocale)(
|
|
122
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
123
123
|
container: document.body
|
|
124
124
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
125
|
className: "upload-file-action-wrapper"
|
|
126
126
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
127
127
|
className: "tu-icon-canceled action-icon delete",
|
|
128
128
|
onMouseDown: function onMouseDown() {
|
|
129
|
-
return onSubmit(index,
|
|
129
|
+
return onSubmit(index, 'delete');
|
|
130
130
|
}
|
|
131
131
|
})));
|
|
132
132
|
}
|
|
@@ -134,14 +134,14 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
134
134
|
if (smallImageUrl && !deleteable) {
|
|
135
135
|
// 是图片不能删除
|
|
136
136
|
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
137
|
-
content: (0, _getLocale.getLocale)(
|
|
137
|
+
content: (0, _getLocale.getLocale)('Mod_Preview'),
|
|
138
138
|
container: document.body
|
|
139
139
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
140
140
|
className: "upload-file-action-wrapper"
|
|
141
141
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
142
142
|
className: "tu-icon-magnifier-circle action-icon",
|
|
143
143
|
onMouseDown: function onMouseDown() {
|
|
144
|
-
return onSubmit(index,
|
|
144
|
+
return onSubmit(index, 'preview');
|
|
145
145
|
}
|
|
146
146
|
})));
|
|
147
147
|
} // 不是图片也不能删除
|
|
@@ -152,14 +152,14 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
152
152
|
|
|
153
153
|
if (uploadStatus === 5) {
|
|
154
154
|
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
155
|
-
content: (0, _getLocale.getLocale)(
|
|
155
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
156
156
|
container: document.body
|
|
157
157
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
158
158
|
className: "upload-file-action-wrapper"
|
|
159
159
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
160
160
|
className: "tu-icon-canceled action-icon delete",
|
|
161
161
|
onMouseDown: function onMouseDown() {
|
|
162
|
-
return onSubmit(index,
|
|
162
|
+
return onSubmit(index, 'delete');
|
|
163
163
|
}
|
|
164
164
|
})));
|
|
165
165
|
} // 4:上传失败
|
|
@@ -173,17 +173,17 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
173
173
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
174
174
|
className: "tu-icon-gengxin1 action-icon",
|
|
175
175
|
onMouseDown: function onMouseDown() {
|
|
176
|
-
return onSubmit(index,
|
|
176
|
+
return onSubmit(index, 'reupload');
|
|
177
177
|
}
|
|
178
178
|
}))), /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
179
|
-
content: (0, _getLocale.getLocale)(
|
|
179
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
180
180
|
container: document.body
|
|
181
181
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
182
182
|
className: "upload-file-action-wrapper"
|
|
183
183
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
184
184
|
className: "tu-icon-canceled action-icon delete",
|
|
185
185
|
onMouseDown: function onMouseDown() {
|
|
186
|
-
return onSubmit(index,
|
|
186
|
+
return onSubmit(index, 'delete');
|
|
187
187
|
}
|
|
188
188
|
}))));
|
|
189
189
|
};
|
|
@@ -205,21 +205,21 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
205
205
|
uploadResultItem = _this$props.uploadResultItem,
|
|
206
206
|
index = _this$props.index;
|
|
207
207
|
return /*#__PURE__*/_react["default"].createElement(_style.PreviewContent, {
|
|
208
|
-
className: [
|
|
208
|
+
className: ['preview__content document-mouse-event-ignore', className].join(' ')
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement(_style.PreviewImageWrapper, null, this.renderPreviewThumbnail()), /*#__PURE__*/_react["default"].createElement(_style.PreviewMessageWrapper, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
210
210
|
content: uploadResultItem.FileName,
|
|
211
211
|
container: document.body
|
|
212
212
|
}, /*#__PURE__*/_react["default"].createElement(_style.PreviewFileTitle, {
|
|
213
213
|
"data-tip": uploadResultItem.FileName,
|
|
214
214
|
key: uploadResultItem.uid
|
|
215
|
-
}, uploadResultItem.FileName,
|
|
215
|
+
}, uploadResultItem.FileName, uploadResultItem.uploadStatus === 2 ? /*#__PURE__*/_react["default"].createElement(_style.UploadProgress, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
216
216
|
style: {
|
|
217
217
|
width: "".concat(uploadResultItem.percentComplete, "%")
|
|
218
218
|
},
|
|
219
219
|
className: "upload-file--progress"
|
|
220
220
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
-
className: uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ?
|
|
222
|
-
}, uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ? (0, _util.getFileSize)(uploadResultItem.FileSize) : uploadResultItem.Msg)))), /*#__PURE__*/_react["default"].createElement(_style.PreviewOptionsWrapper, null, this.dealPreviewOptions(uploadResultItem.uploadStatus, index, uploadResultItem.Deleteable, uploadResultItem.SmallImageUrl),
|
|
221
|
+
className: uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ? 'upload-file-size' : 'upload-file-size upload-file-size--error'
|
|
222
|
+
}, uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ? (0, _util.getFileSize)(uploadResultItem.FileSize) : uploadResultItem.Msg)))), /*#__PURE__*/_react["default"].createElement(_style.PreviewOptionsWrapper, null, this.dealPreviewOptions(uploadResultItem.uploadStatus, index, uploadResultItem.Deleteable, uploadResultItem.SmallImageUrl), ' '));
|
|
223
223
|
}
|
|
224
224
|
}]);
|
|
225
225
|
|