@titaui/pc 1.5.82 → 1.5.83
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/avatar/icon-avatar/index.css +15 -0
- package/lib/components/avatar/icon-avatar/index.js +50 -0
- package/lib/components/avatar/index.js +9 -1
- package/lib/components/avatar/num-avatar/index.css +12 -0
- package/lib/components/avatar/num-avatar/index.js +34 -0
- package/lib/components/button/admin-button/default.js +35 -0
- package/lib/components/button/admin-button/drop-down-arrow.js +93 -0
- package/lib/components/button/admin-button/index.css +86 -0
- package/lib/components/button/admin-button/index.js +40 -0
- package/lib/components/button/admin-button/primary.js +33 -0
- package/lib/components/button/admin-button/secondary.js +35 -0
- package/lib/components/button/default-button/index.css +49 -0
- package/lib/components/button/default-button/index.js +51 -0
- package/lib/components/button/export-button/index.css +51 -0
- package/lib/components/button/export-button/index.js +81 -0
- package/lib/components/button/images/daoru.svg +18 -0
- package/lib/components/button/index.js +23 -0
- package/lib/components/button/interface.js +5 -0
- package/lib/components/change-okr/Filter.js +133 -65
- package/lib/components/change-okr/Item.js +6 -0
- package/lib/components/change-okr/filterTab.js +2 -0
- package/lib/components/change-okr/index.js +2 -2
- package/lib/components/checkbox/index.js +4 -3
- package/lib/components/communication/CommunicationRecord.js +116 -161
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.css +63 -0
- package/lib/components/communication/index.js +53 -28
- package/lib/components/communication/style.js +21 -25
- package/lib/components/create-okr/animation/check-animation.js +2746 -0
- package/lib/components/create-okr/constant.js +27 -0
- package/lib/components/create-okr/createCycle.js +193 -0
- package/lib/components/create-okr/createSuccessCmp.js +233 -0
- package/lib/components/create-okr/createSuccessCmpWrapper.js +20 -0
- package/lib/components/create-okr/fields/date-cycle.js +98 -0
- package/lib/components/create-okr/fields/index.css +346 -0
- package/lib/components/create-okr/fields/index.js +17 -0
- package/lib/components/create-okr/fields/input-with-err-popup.js +57 -0
- package/lib/components/create-okr/fields/o-new-name.js +197 -0
- package/lib/components/create-okr/fields/okr-case.js +98 -0
- package/lib/components/create-okr/fields/okr-classify.js +51 -0
- package/lib/components/create-okr/fields/okr-create-suggest.js +147 -0
- package/lib/components/create-okr/fields/okr-new-user-selector.js +106 -0
- package/lib/components/create-okr/fields/okr-parent.js +157 -0
- package/lib/components/create-okr/fields/okr-type-detail.js +196 -0
- package/lib/components/create-okr/fields/okr-type.js +131 -0
- package/lib/components/create-okr/fields/okr-visibility-detail.js +224 -0
- package/lib/components/create-okr/fields/okr-visibility.js +169 -0
- package/lib/components/create-okr/img/check-normal.svg +29 -0
- package/lib/components/create-okr/img/check-right.svg +16 -0
- package/lib/components/create-okr/img/check-wrong.svg +29 -0
- package/lib/components/create-okr/img/create-success-head.png +0 -0
- package/lib/components/create-okr/img/create-success-left-quotation.svg +14 -0
- package/lib/components/create-okr/img/create-success-message.svg +1 -0
- package/lib/components/create-okr/img/create-success-right-quotation.svg +14 -0
- package/lib/components/create-okr/img/create-success-shadow.svg +23 -0
- package/lib/components/create-okr/img/example.svg +11 -0
- package/lib/components/create-okr/img/hand.svg +12 -0
- package/lib/components/create-okr/img/kr-add.svg +12 -0
- package/lib/components/create-okr/img/left-quotation.svg +12 -0
- package/lib/components/create-okr/img/light.svg +1 -0
- package/lib/components/create-okr/img/pack-up.js +28 -0
- package/lib/components/create-okr/img/qr-code.png +0 -0
- package/lib/components/create-okr/img/right-quotation.svg +12 -0
- package/lib/components/create-okr/img/shower.png +0 -0
- package/lib/components/create-okr/img/target.svg +19 -0
- package/lib/components/create-okr/img/teach-okr.svg +17 -0
- package/lib/components/create-okr/img/wave.png +0 -0
- package/lib/components/create-okr/img/weight.svg +12 -0
- package/lib/components/create-okr/index.css +446 -0
- package/lib/components/create-okr/index.js +911 -0
- package/lib/components/create-okr/interface.js +5 -0
- package/lib/components/create-okr/kr-items/index.css +180 -0
- package/lib/components/create-okr/kr-items/kr-item-weight.js +194 -0
- package/lib/components/create-okr/kr-items/krDatas.js +299 -0
- package/lib/components/create-okr/kr-items/krItem.js +167 -0
- package/lib/components/create-okr/objectType.js +273 -0
- package/lib/components/create-okr/request-api.js +220 -0
- package/lib/components/create-okr/style.js +100 -0
- package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +124 -0
- package/lib/components/create-okr/utils/helper.js +99 -0
- package/lib/components/create-okr/utils/index.js +23 -0
- package/lib/components/dropdown-layer/icon-item.js +5 -3
- package/lib/components/dropdown-layer/index.css +16 -0
- package/lib/components/dropdown-layer/index.js +21 -14
- package/lib/components/dynamic/components/condition-render/index.js +20 -0
- package/lib/components/dynamic/components/dangerous-html/index.js +22 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +78 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +192 -0
- package/lib/components/dynamic/components/obj-status/index.css +22 -0
- package/lib/components/dynamic/components/obj-status/index.js +38 -0
- package/lib/components/dynamic/components/percent/index.css +21 -0
- package/lib/components/dynamic/components/percent/index.js +38 -0
- package/lib/components/dynamic/components/title/index.css +35 -0
- package/lib/components/dynamic/components/title/index.js +59 -0
- package/lib/components/dynamic/constant.js +97 -0
- package/lib/components/dynamic/context/index.js +13 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.css +101 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.js +299 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +59 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +183 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +59 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
- package/lib/components/dynamic/dynamic-item/index.css +128 -0
- package/lib/components/dynamic/dynamic-item/index.js +352 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +126 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +157 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +107 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/components/dynamic/dynamic-liking/index.js +76 -0
- package/lib/components/dynamic/dynamic-liking/item.js +91 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.css +36 -0
- package/lib/components/dynamic/dynamic-list/index.js +61 -0
- package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +148 -0
- package/lib/components/dynamic/dynamic-topping/index.js +80 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +140 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +204 -0
- package/lib/components/dynamic/dynamic.js +391 -0
- package/lib/components/dynamic/export-module/index.js +33 -0
- package/lib/components/dynamic/img/dynamic-P1.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P2.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P3.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P4.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P5.svg +15 -0
- package/lib/components/dynamic/img/dynamic-delay.svg +17 -0
- package/lib/components/dynamic/img/dynamic-desire.svg +61 -0
- package/lib/components/dynamic/img/dynamic-empty.png +0 -0
- package/lib/components/dynamic/img/dynamic-end.svg +17 -0
- package/lib/components/dynamic/img/dynamic-left-quoto.svg +13 -0
- package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
- package/lib/components/dynamic/img/dynamic-normal.svg +17 -0
- package/lib/components/dynamic/img/dynamic-promise.svg +61 -0
- package/lib/components/dynamic/img/dynamic-reword.svg +24 -0
- package/lib/components/dynamic/img/dynamic-right-quoto.svg +13 -0
- package/lib/components/dynamic/img/dynamic-risk.svg +17 -0
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +16 -0
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +18 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +27 -0
- package/lib/components/dynamic/interface.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +37 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +37 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +37 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +42 -0
- package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +112 -0
- package/lib/components/dynamic/request-api.js +92 -0
- package/lib/components/dynamic/util.js +140 -0
- package/lib/components/emotionsSelector/style.js +1 -1
- package/lib/components/file-list/components/single-file/index.css +84 -0
- package/lib/components/file-list/components/single-file/index.js +115 -0
- package/lib/components/file-list/img/new-file-list-doc.svg +1 -0
- package/lib/components/file-list/img/new-file-list-other.svg +1 -0
- package/lib/components/file-list/img/new-file-list-pdf.svg +1 -0
- package/lib/components/file-list/img/new-file-list-ppt.svg +1 -0
- package/lib/components/file-list/img/new-file-list-radio.svg +1 -0
- package/lib/components/file-list/img/new-file-list-video.svg +1 -0
- package/lib/components/file-list/img/new-file-list-xls.svg +1 -0
- package/lib/components/file-list/index.css +5 -0
- package/lib/components/file-list/index.js +61 -0
- package/lib/components/file-list/interface.js +5 -0
- package/lib/components/file-list/util.js +78 -0
- package/lib/components/form/form-fields/input/index.css +11 -0
- package/lib/components/form/form-fields/input/index.js +3 -1
- package/lib/components/grid-page/image/{Assistant.svg → assistant.svg} +0 -0
- package/lib/components/grid-page/image/{Boss.svg → boss.svg} +0 -0
- package/lib/components/grid-page/image/{Default-background.png → default-background.png} +0 -0
- package/lib/components/grid-page/image/{UserManager.svg → userManager.svg} +0 -0
- package/lib/components/grid-page/personal-info/index.js +5 -5
- package/lib/components/img-viewer/icon/enlarge.js +30 -0
- package/lib/components/img-viewer/icon/left-rotate.js +46 -0
- package/lib/components/img-viewer/icon/right-rotate.js +44 -0
- package/lib/components/img-viewer/icon/shrink.js +37 -0
- package/lib/components/img-viewer/image/loading.gif +0 -0
- package/lib/components/img-viewer/index.css +155 -0
- package/lib/components/img-viewer/index.js +228 -0
- package/lib/components/img-viewer/interface.js +5 -0
- package/lib/components/img-viewer/util.js +16 -0
- package/lib/components/mblog/components/MblogAction.js +10 -6
- package/lib/components/mblog/index.js +24 -11
- package/lib/components/mblog/style.js +8 -8
- package/lib/components/okr-detail/components/header/index.css +4 -0
- package/lib/components/okr-detail/components/header/o-cycle.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +15 -8
- package/lib/components/okr-flow/child-node/work-node.js +7 -1
- package/lib/components/okr-period-selector/select-cycle.js +139 -151
- package/lib/components/okr-progress-detail/index.css +1 -0
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
- package/lib/components/okr-review/ReviewPop/index.js +4 -4
- package/lib/components/period-selector/common.js +168 -17
- package/lib/components/period-selector/components/selector/index.js +103 -38
- package/lib/components/period-selector/components/selector/style.js +23 -9
- package/lib/components/period-selector/index.js +29 -28
- package/lib/components/popup/index.js +3 -1
- package/lib/components/publish-dynamic-modal/index.js +13 -0
- package/lib/components/publish-dynamic-modal/interface.js +5 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +3 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +191 -0
- package/lib/components/publish-dynamic-modal/requist-api.js +48 -0
- package/lib/components/radio/index.css +5 -0
- package/lib/components/radio/radio.js +12 -4
- package/lib/components/search-key-handle/index.js +39 -0
- package/lib/components/table/index.css +0 -1
- package/lib/components/upload/components/uploadedPreview.js +62 -54
- package/lib/components/upload/img/doc.svg +1 -0
- package/lib/components/upload/img/other.svg +1 -0
- package/lib/components/upload/img/pdf.svg +1 -0
- package/lib/components/upload/img/ppt.svg +1 -0
- package/lib/components/upload/img/radio.svg +1 -0
- package/lib/components/upload/img/video.svg +1 -0
- package/lib/components/upload/img/xls.svg +1 -0
- package/lib/components/upload/index.css +26 -0
- package/lib/components/upload/index.js +89 -57
- package/lib/components/upload/style.js +7 -7
- package/lib/components/upload/type.js +15 -15
- package/lib/components/upload/util.js +102 -0
- package/lib/components/upvote/index.js +37 -14
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +50 -24
- package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +11 -2
- package/lib/components/user-selector/layout/index.css +1 -1
- package/lib/components-v1/buttonv2/ButtonLinked.js +35 -0
- package/lib/components-v1/buttonv2/ButtonOutlined.js +64 -0
- package/lib/components-v1/buttonv2/ButtonRounded.js +101 -0
- package/lib/components-v1/buttonv2/DefaultButton.js +86 -0
- package/lib/components-v1/buttonv2/index.js +37 -0
- package/lib/components-v1/buttonv2/style/style.js +53 -0
- package/lib/components-v1/buttonv2/style/theme.css +3 -0
- package/lib/components-v1/confirm/index.js +158 -0
- package/lib/index.js +49 -5
- package/lib/pages/dynamic/index.css +5 -0
- package/lib/pages/dynamic/index.js +25 -0
- package/lib/pages/home-page/components/data-list/nav-selector/index.js +18 -0
- package/lib/pages/home-page/components/data-list/table/utils-function.js +6 -3
- package/lib/pages/like-ranking/column.js +141 -0
- package/lib/pages/like-ranking/filter-buttons/department.js +44 -0
- package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
- package/lib/pages/like-ranking/filter-buttons/index.css +19 -0
- package/lib/pages/like-ranking/filter-buttons/index.js +40 -0
- package/lib/pages/like-ranking/filter-buttons/modular.js +110 -0
- package/lib/pages/like-ranking/filter-buttons/name.js +73 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +27 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +38 -0
- package/lib/pages/like-ranking/filter-buttons/timer.js +56 -0
- package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
- package/lib/pages/like-ranking/image/loading.gif +0 -0
- package/lib/pages/like-ranking/image/ranking-1.png +0 -0
- package/lib/pages/like-ranking/image/ranking-2.png +0 -0
- package/lib/pages/like-ranking/image/ranking-3.png +0 -0
- package/lib/pages/like-ranking/index.css +185 -0
- package/lib/pages/like-ranking/index.js +252 -0
- package/lib/pages/like-ranking/mock.js +366 -0
- package/lib/pages/like-ranking/request-api.js +15 -0
- package/lib/utils/auth.js +46 -5
- package/lib/utils/bs-global.js +26 -2
- package/lib/utils/format-time.js +161 -0
- package/lib/utils/helpers.js +41 -0
- package/lib/utils/roundWeight.js +105 -0
- package/lib/utils/tools.js +140 -20
- package/package.json +2 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RoundWeight = RoundWeight;
|
|
7
|
+
exports.ReCalibratePrecision = ReCalibratePrecision;
|
|
8
|
+
exports.AccAdd = AccAdd;
|
|
9
|
+
exports.AccMul = AccMul;
|
|
10
|
+
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
function RoundWeight(value) {
|
|
18
|
+
var _value = Number(value);
|
|
19
|
+
|
|
20
|
+
if (Number.isInteger(_value)) {
|
|
21
|
+
return _value.toFixed(0);
|
|
22
|
+
} else if (_value >= 99.96) {
|
|
23
|
+
return 100;
|
|
24
|
+
} else {
|
|
25
|
+
return _value.toFixed(1);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @description 收集一组含有权重的数据,如果找到其中一个权重有小数点,那么全都是小数点后一位,否则就全是整数
|
|
31
|
+
* @export
|
|
32
|
+
* @param {any[]} milepostData
|
|
33
|
+
* @returns any[]
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
function ReCalibratePrecision(milepostData) {
|
|
38
|
+
// NOTE 后端返回的数据不一定是整数
|
|
39
|
+
var index = milepostData.findIndex(function (_ref) {
|
|
40
|
+
var krWeight = _ref.krWeight;
|
|
41
|
+
return !Number.isInteger(Number(krWeight));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
if (index !== -1) {
|
|
45
|
+
return milepostData.map(function (data) {
|
|
46
|
+
return _objectSpread(_objectSpread({}, data), {}, {
|
|
47
|
+
krWeight: Number(data.krWeight).toFixed(1)
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
return milepostData;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function AccAdd(arg1, arg2) {
|
|
56
|
+
var r1, r2, m, c;
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
r1 = arg1.toString().split(".")[1].length;
|
|
60
|
+
} catch (e) {
|
|
61
|
+
r1 = 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
r2 = arg2.toString().split(".")[1].length;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
r2 = 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
c = Math.abs(r1 - r2);
|
|
71
|
+
m = Math.pow(10, Math.max(r1, r2));
|
|
72
|
+
|
|
73
|
+
if (c > 0) {
|
|
74
|
+
var cm = Math.pow(10, c);
|
|
75
|
+
|
|
76
|
+
if (r1 > r2) {
|
|
77
|
+
arg1 = Number(arg1.toString().replace(".", ""));
|
|
78
|
+
arg2 = Number(arg2.toString().replace(".", "")) * cm;
|
|
79
|
+
} else {
|
|
80
|
+
arg1 = Number(arg1.toString().replace(".", "")) * cm;
|
|
81
|
+
arg2 = Number(arg2.toString().replace(".", ""));
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
arg1 = Number(arg1.toString().replace(".", ""));
|
|
85
|
+
arg2 = Number(arg2.toString().replace(".", ""));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return (arg1 + arg2) / m;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function AccMul(arg1, arg2) {
|
|
92
|
+
var m = 0,
|
|
93
|
+
s1 = arg1.toString(),
|
|
94
|
+
s2 = arg2.toString();
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
m += s1.split(".")[1].length;
|
|
98
|
+
} catch (e) {}
|
|
99
|
+
|
|
100
|
+
try {
|
|
101
|
+
m += s2.split(".")[1].length;
|
|
102
|
+
} catch (e) {}
|
|
103
|
+
|
|
104
|
+
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
|
|
105
|
+
}
|
package/lib/utils/tools.js
CHANGED
|
@@ -7,15 +7,18 @@ exports.htmlEncodeByRegExp = htmlEncodeByRegExp;
|
|
|
7
7
|
exports.htmlDecodeByRegExp = htmlDecodeByRegExp;
|
|
8
8
|
exports.changeQueryString = changeQueryString;
|
|
9
9
|
exports.getQueryString = getQueryString;
|
|
10
|
+
exports.getUrlForUserPage = exports.hexToRgba = exports.unHighLight = exports.highLightWord = void 0;
|
|
11
|
+
|
|
12
|
+
var _platform = require("./platform");
|
|
10
13
|
|
|
11
14
|
function htmlEncodeByRegExp(str) {
|
|
12
|
-
if (!str) return
|
|
15
|
+
if (!str) return "";
|
|
13
16
|
var htmlString = {
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
"<": "<",
|
|
18
|
+
">": ">",
|
|
16
19
|
// "&": '&',
|
|
17
|
-
"'":
|
|
18
|
-
'"':
|
|
20
|
+
"'": "'",
|
|
21
|
+
'"': """
|
|
19
22
|
};
|
|
20
23
|
return str.replace(/[<>'"]/g, function (s) {
|
|
21
24
|
return htmlString[s];
|
|
@@ -23,14 +26,14 @@ function htmlEncodeByRegExp(str) {
|
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
function htmlDecodeByRegExp(str) {
|
|
26
|
-
if (!str) return
|
|
29
|
+
if (!str) return "";
|
|
27
30
|
var arrEntities = {
|
|
28
|
-
lt:
|
|
29
|
-
gt:
|
|
30
|
-
nbsp:
|
|
31
|
-
amp:
|
|
31
|
+
lt: "<",
|
|
32
|
+
gt: ">",
|
|
33
|
+
nbsp: " ",
|
|
34
|
+
amp: "&",
|
|
32
35
|
quot: '"',
|
|
33
|
-
|
|
36
|
+
"#39": "'"
|
|
34
37
|
};
|
|
35
38
|
return str.replace(/&(lt|gt|nbsp|amp|quot|#39);/gi, function (all, t) {
|
|
36
39
|
return arrEntities[t];
|
|
@@ -40,15 +43,15 @@ function htmlDecodeByRegExp(str) {
|
|
|
40
43
|
function changeQueryString(key, value) {
|
|
41
44
|
var hash = decodeURIComponent(location.hash);
|
|
42
45
|
var queryObject = {};
|
|
43
|
-
var markIndex = hash.indexOf(
|
|
46
|
+
var markIndex = hash.indexOf("?"); // contain query string in fragments
|
|
44
47
|
|
|
45
48
|
if (markIndex > -1) {
|
|
46
49
|
// build query object
|
|
47
50
|
var hashName = hash.slice(0, markIndex);
|
|
48
51
|
var queryString = hash.slice(markIndex + 1);
|
|
49
|
-
var queryArray = queryString.split(
|
|
52
|
+
var queryArray = queryString.split("&");
|
|
50
53
|
queryArray.forEach(function (item) {
|
|
51
|
-
item = item.split(
|
|
54
|
+
item = item.split("=");
|
|
52
55
|
queryObject[item[0]] = item[1];
|
|
53
56
|
});
|
|
54
57
|
queryObject[key] = value;
|
|
@@ -58,7 +61,7 @@ function changeQueryString(key, value) {
|
|
|
58
61
|
arr.push("".concat(name, "=").concat(queryObject[name]));
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
location.hash = "".concat(hashName, "?").concat(arr.join(
|
|
64
|
+
location.hash = "".concat(hashName, "?").concat(arr.join("&"));
|
|
62
65
|
} else {
|
|
63
66
|
location.hash = hash;
|
|
64
67
|
}
|
|
@@ -68,21 +71,138 @@ function getQueryString() {
|
|
|
68
71
|
//获取Url上的参数,以{}返回
|
|
69
72
|
var hash = decodeURIComponent(location.hash);
|
|
70
73
|
var queryObject = {};
|
|
71
|
-
var markIndex = hash.indexOf(
|
|
74
|
+
var markIndex = hash.indexOf("?"); // contain query string in fragments
|
|
72
75
|
|
|
73
76
|
if (markIndex > -1) {
|
|
74
77
|
// build query object
|
|
75
78
|
var queryString = hash.slice(markIndex + 1);
|
|
76
|
-
var queryArray = queryString.split(
|
|
79
|
+
var queryArray = queryString.split("&");
|
|
77
80
|
|
|
78
81
|
for (var i = 0; i < queryArray.length; i++) {
|
|
79
|
-
var queryPair = queryArray[i].split(
|
|
82
|
+
var queryPair = queryArray[i].split("=");
|
|
80
83
|
|
|
81
|
-
if (queryPair[0] !==
|
|
84
|
+
if (queryPair[0] !== "_k") {
|
|
82
85
|
queryObject[queryPair[0]] = decodeURIComponent(queryPair[1]);
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
return queryObject;
|
|
88
|
-
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
var highLightWord = function highLightWord(_ref) {
|
|
94
|
+
var parentDom = _ref.parentDom,
|
|
95
|
+
_ref$keyWord = _ref.keyWord,
|
|
96
|
+
keyWord = _ref$keyWord === void 0 ? "" : _ref$keyWord,
|
|
97
|
+
_ref$className = _ref.className,
|
|
98
|
+
className = _ref$className === void 0 ? "highlight" : _ref$className,
|
|
99
|
+
_ref$nodeType = _ref.nodeType,
|
|
100
|
+
nodeType = _ref$nodeType === void 0 ? "span" : _ref$nodeType;
|
|
101
|
+
|
|
102
|
+
if (parentDom && keyWord) {
|
|
103
|
+
var reg = new RegExp(keyWord, "i");
|
|
104
|
+
|
|
105
|
+
if (parentDom.nodeType === 3) {
|
|
106
|
+
var match = parentDom.data.match(reg);
|
|
107
|
+
var currentDom = parentDom;
|
|
108
|
+
|
|
109
|
+
while (match) {
|
|
110
|
+
var highlight = document.createElement(nodeType);
|
|
111
|
+
highlight.className = className;
|
|
112
|
+
var wordNode = currentDom.splitText(match.index);
|
|
113
|
+
currentDom = wordNode.splitText(match[0].length);
|
|
114
|
+
var wordClone = wordNode.cloneNode(true);
|
|
115
|
+
highlight.appendChild(wordClone);
|
|
116
|
+
wordNode.parentNode.replaceChild(highlight, wordNode);
|
|
117
|
+
match = currentDom.data.match(reg);
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
var doms = Array.from(parentDom.childNodes);
|
|
121
|
+
doms && doms.length > 0 && doms.map(function (dom) {
|
|
122
|
+
// @ts-ignore 1是元素 3是文本节点
|
|
123
|
+
if (dom.nodeType === 3) {
|
|
124
|
+
var _match = dom.data.match(reg);
|
|
125
|
+
|
|
126
|
+
var _currentDom = dom;
|
|
127
|
+
|
|
128
|
+
while (_match) {
|
|
129
|
+
var _highlight = document.createElement(nodeType);
|
|
130
|
+
|
|
131
|
+
_highlight.className = className;
|
|
132
|
+
|
|
133
|
+
var _wordNode = _currentDom.splitText(_match.index);
|
|
134
|
+
|
|
135
|
+
_currentDom = _wordNode.splitText(_match[0].length);
|
|
136
|
+
|
|
137
|
+
var _wordClone = _wordNode.cloneNode(true);
|
|
138
|
+
|
|
139
|
+
_highlight.appendChild(_wordClone);
|
|
140
|
+
|
|
141
|
+
_wordNode.parentNode.replaceChild(_highlight, _wordNode);
|
|
142
|
+
|
|
143
|
+
_match = _currentDom.data.match(reg);
|
|
144
|
+
}
|
|
145
|
+
} else if (dom.nodeType === 1 && dom.childNodes) {
|
|
146
|
+
for (var i = 0; i < dom.childNodes.length; i++) {
|
|
147
|
+
i += highLightWord({
|
|
148
|
+
parentDom: dom.childNodes[i],
|
|
149
|
+
keyWord: keyWord
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
exports.highLightWord = highLightWord;
|
|
159
|
+
|
|
160
|
+
var unHighLight = function unHighLight(_ref2) {
|
|
161
|
+
var parentDom = _ref2.parentDom,
|
|
162
|
+
_ref2$className = _ref2.className,
|
|
163
|
+
className = _ref2$className === void 0 ? "highlight" : _ref2$className,
|
|
164
|
+
_ref2$nodeType = _ref2.nodeType,
|
|
165
|
+
nodeType = _ref2$nodeType === void 0 ? "span" : _ref2$nodeType;
|
|
166
|
+
var doms = parentDom.querySelectorAll("".concat(nodeType, " .").concat(className));
|
|
167
|
+
doms && doms.forEach(function (dom) {
|
|
168
|
+
var parentNode = dom.parentNode;
|
|
169
|
+
var firstChild = dom.firstChild;
|
|
170
|
+
parentNode.replaceChild(firstChild, dom);
|
|
171
|
+
parentNode.normalize();
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
exports.unHighLight = unHighLight;
|
|
176
|
+
|
|
177
|
+
var hexToRgba = function hexToRgba(hex) {
|
|
178
|
+
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
179
|
+
return "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," + parseInt("0x" + hex.slice(5, 7)) + "," + opacity + ")";
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.hexToRgba = hexToRgba;
|
|
183
|
+
|
|
184
|
+
var getUrlForUserPage = function getUrlForUserPage(options) {
|
|
185
|
+
var defults = {
|
|
186
|
+
userId: "",
|
|
187
|
+
//是否是外部联系人,外部联系人没有 2是外部联系人
|
|
188
|
+
userType: 2
|
|
189
|
+
};
|
|
190
|
+
var configs = Object.assign({}, defults, options);
|
|
191
|
+
|
|
192
|
+
if (!configs.userId || (0, _platform.isDD)(true) || (0, _platform.isFeishu)(true) || configs.userType == 2) {
|
|
193
|
+
return "";
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
var userInfo = window.BSGlobal.loginUserInfo;
|
|
197
|
+
|
|
198
|
+
if (configs.userId == undefined) {
|
|
199
|
+
configs.userId = userInfo.Id;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
var urlHost = window.BSGlobal.titaHost;
|
|
203
|
+
var homeUrl = urlHost + "/" + userInfo.Id + "/PageBuilderForEdit#/view?to_user_id=" + configs.userId;
|
|
204
|
+
var homeCenter = urlHost + "/u/" + userInfo.Id + "/Home#" + encodeURIComponent("widget/italent?iTalentFrameType=iframe&iTalentFrame=" + encodeURIComponent(homeUrl));
|
|
205
|
+
return homeCenter;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
exports.getUrlForUserPage = getUrlForUserPage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.83",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"color": "^3.2.1",
|
|
67
67
|
"dayjs": "^1.10.4",
|
|
68
68
|
"html2canvas": "1.3.2",
|
|
69
|
-
"lottie-web": "^5.7.
|
|
69
|
+
"lottie-web": "^5.7.12",
|
|
70
70
|
"moment": "^2.29.1",
|
|
71
71
|
"qs": "^6.10.1",
|
|
72
72
|
"rc-checkbox": "^2.3.2",
|