systemrobotassistant 3.0.8
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.
Potentially problematic release.
This version of systemrobotassistant might be problematic. Click here for more details.
- package/.eslintignore +6 -0
- package/.eslintrc +45 -0
- package/.gitlab-ci.yml +52 -0
- package/.lecprc.ts +76 -0
- package/.yarnrc +1 -0
- package/CHANGELOG.md +114 -0
- package/README.md +14 -0
- package/custom-amd-plugin.ts +46 -0
- package/es/component/answer-itme/index.d.ts +20 -0
- package/es/component/answer-itme/index.d.ts.map +1 -0
- package/es/component/answer-itme/index.js +41 -0
- package/es/component/answer-itme/style.css +35 -0
- package/es/component/data-container/index.d.ts +19 -0
- package/es/component/data-container/index.d.ts.map +1 -0
- package/es/component/data-container/index.js +37 -0
- package/es/component/data-container/style.css +26 -0
- package/es/component/days-tab/index.d.ts +6 -0
- package/es/component/days-tab/index.d.ts.map +1 -0
- package/es/component/days-tab/index.js +119 -0
- package/es/component/days-tab/style.css +43 -0
- package/es/component/days-tab/utils.d.ts +32 -0
- package/es/component/days-tab/utils.d.ts.map +1 -0
- package/es/component/days-tab/utils.js +98 -0
- package/es/component/error-boundary/index.d.ts +2 -0
- package/es/component/error-boundary/index.d.ts.map +1 -0
- package/es/component/error-boundary/index.js +33 -0
- package/es/component/it-notice-modal/columns.d.ts +11 -0
- package/es/component/it-notice-modal/columns.d.ts.map +1 -0
- package/es/component/it-notice-modal/columns.js +108 -0
- package/es/component/it-notice-modal/double-tab.d.ts +6 -0
- package/es/component/it-notice-modal/double-tab.d.ts.map +1 -0
- package/es/component/it-notice-modal/double-tab.js +94 -0
- package/es/component/it-notice-modal/index.d.ts +6 -0
- package/es/component/it-notice-modal/index.d.ts.map +1 -0
- package/es/component/it-notice-modal/index.js +488 -0
- package/es/component/it-notice-modal/server.d.ts +8 -0
- package/es/component/it-notice-modal/server.d.ts.map +1 -0
- package/es/component/it-notice-modal/server.js +43 -0
- package/es/component/it-notice-modal/single-tab.d.ts +6 -0
- package/es/component/it-notice-modal/single-tab.d.ts.map +1 -0
- package/es/component/it-notice-modal/single-tab.js +82 -0
- package/es/component/it-notice-modal/style.css +301 -0
- package/es/component/it-notice-modal/utils.d.ts +2 -0
- package/es/component/it-notice-modal/utils.d.ts.map +1 -0
- package/es/component/it-notice-modal/utils.js +8 -0
- package/es/component/it-notice-tab/index.d.ts +6 -0
- package/es/component/it-notice-tab/index.d.ts.map +1 -0
- package/es/component/it-notice-tab/index.js +206 -0
- package/es/component/it-notice-tab/server.d.ts +3 -0
- package/es/component/it-notice-tab/server.d.ts.map +1 -0
- package/es/component/it-notice-tab/server.js +13 -0
- package/es/component/it-notice-tab/style.css +103 -0
- package/es/component/mail-list-modal/index.d.ts +2 -0
- package/es/component/mail-list-modal/index.d.ts.map +1 -0
- package/es/component/mail-list-modal/index.js +306 -0
- package/es/component/mail-list-modal/server.d.ts +7 -0
- package/es/component/mail-list-modal/server.d.ts.map +1 -0
- package/es/component/mail-list-modal/server.js +38 -0
- package/es/component/mail-list-modal/style.css +132 -0
- package/es/component/myself-chat-card/index.d.ts +15 -0
- package/es/component/myself-chat-card/index.d.ts.map +1 -0
- package/es/component/myself-chat-card/index.js +25 -0
- package/es/component/myself-chat-card/style.css +22 -0
- package/es/component/need-answer/index.d.ts +15 -0
- package/es/component/need-answer/index.d.ts.map +1 -0
- package/es/component/need-answer/index.js +60 -0
- package/es/component/need-answer/style.css +19 -0
- package/es/component/opppsition-chat-card/index.d.ts +11 -0
- package/es/component/opppsition-chat-card/index.d.ts.map +1 -0
- package/es/component/opppsition-chat-card/index.js +25 -0
- package/es/component/opppsition-chat-card/style.css +23 -0
- package/es/component/question-library/index.d.ts +10 -0
- package/es/component/question-library/index.d.ts.map +1 -0
- package/es/component/question-library/index.js +291 -0
- package/es/component/question-library/server.d.ts +4 -0
- package/es/component/question-library/server.d.ts.map +1 -0
- package/es/component/question-library/server.js +19 -0
- package/es/component/question-library/style.css +75 -0
- package/es/component/question-tag/index.d.ts +11 -0
- package/es/component/question-tag/index.d.ts.map +1 -0
- package/es/component/question-tag/index.js +23 -0
- package/es/component/question-tag/style.css +12 -0
- package/es/component/recommend-questions-card/index.d.ts +10 -0
- package/es/component/recommend-questions-card/index.d.ts.map +1 -0
- package/es/component/recommend-questions-card/index.js +104 -0
- package/es/component/recommend-questions-card/style.css +54 -0
- package/es/component/scroll-view/index.d.ts +3 -0
- package/es/component/scroll-view/index.d.ts.map +1 -0
- package/es/component/scroll-view/index.js +2 -0
- package/es/component/scroll-view/scroll-view.d.ts +18 -0
- package/es/component/scroll-view/scroll-view.d.ts.map +1 -0
- package/es/component/scroll-view/scroll-view.js +66 -0
- package/es/component/scroll-view/style.css +34 -0
- package/es/component/tab/index.d.ts +2 -0
- package/es/component/tab/index.d.ts.map +1 -0
- package/es/component/tab/index.js +18 -0
- package/es/component/tab/style.css +26 -0
- package/es/component/tips-answer/index.d.ts +15 -0
- package/es/component/tips-answer/index.d.ts.map +1 -0
- package/es/component/tips-answer/index.js +28 -0
- package/es/component/tips-answer/style.css +10 -0
- package/es/images/expire-robot.svg +16 -0
- package/es/images/pc-invalid.svg +11 -0
- package/es/images/screenshot-5.png +0 -0
- package/es/index.d.ts +92 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +506 -0
- package/es/js/const.d.ts +41 -0
- package/es/js/const.d.ts.map +1 -0
- package/es/js/const.js +46 -0
- package/es/js/gen-render-promise.d.ts +9 -0
- package/es/js/gen-render-promise.d.ts.map +1 -0
- package/es/js/gen-render-promise.js +30 -0
- package/es/js/get-time.d.ts +15 -0
- package/es/js/get-time.d.ts.map +1 -0
- package/es/js/get-time.js +35 -0
- package/es/js/hfc-space.d.ts +16 -0
- package/es/js/hfc-space.d.ts.map +1 -0
- package/es/js/hfc-space.js +71 -0
- package/es/js/render-special.d.ts +16 -0
- package/es/js/render-special.d.ts.map +1 -0
- package/es/js/render-special.js +53 -0
- package/es/js/request/fetch.d.ts +10 -0
- package/es/js/request/fetch.d.ts.map +1 -0
- package/es/js/request/fetch.js +81 -0
- package/es/js/request/request.d.ts +3 -0
- package/es/js/request/request.d.ts.map +1 -0
- package/es/js/request/request.js +63 -0
- package/es/js/showMessage.d.ts +15 -0
- package/es/js/showMessage.d.ts.map +1 -0
- package/es/js/showMessage.js +75 -0
- package/es/js/state-immer.d.ts +3 -0
- package/es/js/state-immer.d.ts.map +1 -0
- package/es/js/state-immer.js +19 -0
- package/es/js/timer-executor.d.ts +3 -0
- package/es/js/timer-executor.d.ts.map +1 -0
- package/es/js/timer-executor.js +83 -0
- package/es/js/to-hfc.d.ts +2 -0
- package/es/js/to-hfc.d.ts.map +1 -0
- package/es/js/to-hfc.js +8 -0
- package/es/js/utils.d.ts +3 -0
- package/es/js/utils.d.ts.map +1 -0
- package/es/js/utils.js +11 -0
- package/es/jsx/chat-modal.d.ts +16 -0
- package/es/jsx/chat-modal.d.ts.map +1 -0
- package/es/jsx/chat-modal.js +268 -0
- package/es/server.d.ts +8 -0
- package/es/server.d.ts.map +1 -0
- package/es/server.js +44 -0
- package/es/style.css +174 -0
- package/lib/component/answer-itme/index.d.ts +20 -0
- package/lib/component/answer-itme/index.d.ts.map +1 -0
- package/lib/component/answer-itme/index.js +51 -0
- package/lib/component/answer-itme/style.css +35 -0
- package/lib/component/data-container/index.d.ts +19 -0
- package/lib/component/data-container/index.d.ts.map +1 -0
- package/lib/component/data-container/index.js +45 -0
- package/lib/component/data-container/style.css +26 -0
- package/lib/component/days-tab/index.d.ts +6 -0
- package/lib/component/days-tab/index.d.ts.map +1 -0
- package/lib/component/days-tab/index.js +129 -0
- package/lib/component/days-tab/style.css +43 -0
- package/lib/component/days-tab/utils.d.ts +32 -0
- package/lib/component/days-tab/utils.d.ts.map +1 -0
- package/lib/component/days-tab/utils.js +110 -0
- package/lib/component/error-boundary/index.d.ts +2 -0
- package/lib/component/error-boundary/index.d.ts.map +1 -0
- package/lib/component/error-boundary/index.js +40 -0
- package/lib/component/it-notice-modal/columns.d.ts +11 -0
- package/lib/component/it-notice-modal/columns.d.ts.map +1 -0
- package/lib/component/it-notice-modal/columns.js +116 -0
- package/lib/component/it-notice-modal/double-tab.d.ts +6 -0
- package/lib/component/it-notice-modal/double-tab.d.ts.map +1 -0
- package/lib/component/it-notice-modal/double-tab.js +104 -0
- package/lib/component/it-notice-modal/index.d.ts +6 -0
- package/lib/component/it-notice-modal/index.d.ts.map +1 -0
- package/lib/component/it-notice-modal/index.js +499 -0
- package/lib/component/it-notice-modal/server.d.ts +8 -0
- package/lib/component/it-notice-modal/server.d.ts.map +1 -0
- package/lib/component/it-notice-modal/server.js +55 -0
- package/lib/component/it-notice-modal/single-tab.d.ts +6 -0
- package/lib/component/it-notice-modal/single-tab.d.ts.map +1 -0
- package/lib/component/it-notice-modal/single-tab.js +92 -0
- package/lib/component/it-notice-modal/style.css +301 -0
- package/lib/component/it-notice-modal/utils.d.ts +2 -0
- package/lib/component/it-notice-modal/utils.d.ts.map +1 -0
- package/lib/component/it-notice-modal/utils.js +15 -0
- package/lib/component/it-notice-tab/index.d.ts +6 -0
- package/lib/component/it-notice-tab/index.d.ts.map +1 -0
- package/lib/component/it-notice-tab/index.js +216 -0
- package/lib/component/it-notice-tab/server.d.ts +3 -0
- package/lib/component/it-notice-tab/server.d.ts.map +1 -0
- package/lib/component/it-notice-tab/server.js +20 -0
- package/lib/component/it-notice-tab/style.css +103 -0
- package/lib/component/mail-list-modal/index.d.ts +2 -0
- package/lib/component/mail-list-modal/index.d.ts.map +1 -0
- package/lib/component/mail-list-modal/index.js +316 -0
- package/lib/component/mail-list-modal/server.d.ts +7 -0
- package/lib/component/mail-list-modal/server.d.ts.map +1 -0
- package/lib/component/mail-list-modal/server.js +50 -0
- package/lib/component/mail-list-modal/style.css +132 -0
- package/lib/component/myself-chat-card/index.d.ts +15 -0
- package/lib/component/myself-chat-card/index.d.ts.map +1 -0
- package/lib/component/myself-chat-card/index.js +35 -0
- package/lib/component/myself-chat-card/style.css +22 -0
- package/lib/component/need-answer/index.d.ts +15 -0
- package/lib/component/need-answer/index.d.ts.map +1 -0
- package/lib/component/need-answer/index.js +70 -0
- package/lib/component/need-answer/style.css +19 -0
- package/lib/component/opppsition-chat-card/index.d.ts +11 -0
- package/lib/component/opppsition-chat-card/index.d.ts.map +1 -0
- package/lib/component/opppsition-chat-card/index.js +35 -0
- package/lib/component/opppsition-chat-card/style.css +23 -0
- package/lib/component/question-library/index.d.ts +10 -0
- package/lib/component/question-library/index.d.ts.map +1 -0
- package/lib/component/question-library/index.js +301 -0
- package/lib/component/question-library/server.d.ts +4 -0
- package/lib/component/question-library/server.d.ts.map +1 -0
- package/lib/component/question-library/server.js +27 -0
- package/lib/component/question-library/style.css +75 -0
- package/lib/component/question-tag/index.d.ts +11 -0
- package/lib/component/question-tag/index.d.ts.map +1 -0
- package/lib/component/question-tag/index.js +33 -0
- package/lib/component/question-tag/style.css +12 -0
- package/lib/component/recommend-questions-card/index.d.ts +10 -0
- package/lib/component/recommend-questions-card/index.d.ts.map +1 -0
- package/lib/component/recommend-questions-card/index.js +114 -0
- package/lib/component/recommend-questions-card/style.css +54 -0
- package/lib/component/scroll-view/index.d.ts +3 -0
- package/lib/component/scroll-view/index.d.ts.map +1 -0
- package/lib/component/scroll-view/index.js +10 -0
- package/lib/component/scroll-view/scroll-view.d.ts +18 -0
- package/lib/component/scroll-view/scroll-view.d.ts.map +1 -0
- package/lib/component/scroll-view/scroll-view.js +76 -0
- package/lib/component/scroll-view/style.css +34 -0
- package/lib/component/tab/index.d.ts +2 -0
- package/lib/component/tab/index.d.ts.map +1 -0
- package/lib/component/tab/index.js +28 -0
- package/lib/component/tab/style.css +26 -0
- package/lib/component/tips-answer/index.d.ts +15 -0
- package/lib/component/tips-answer/index.d.ts.map +1 -0
- package/lib/component/tips-answer/index.js +38 -0
- package/lib/component/tips-answer/style.css +10 -0
- package/lib/images/expire-robot.svg +16 -0
- package/lib/images/pc-invalid.svg +11 -0
- package/lib/images/screenshot-5.png +0 -0
- package/lib/index.d.ts +92 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +516 -0
- package/lib/js/const.d.ts +41 -0
- package/lib/js/const.d.ts.map +1 -0
- package/lib/js/const.js +55 -0
- package/lib/js/gen-render-promise.d.ts +9 -0
- package/lib/js/gen-render-promise.d.ts.map +1 -0
- package/lib/js/gen-render-promise.js +37 -0
- package/lib/js/get-time.d.ts +15 -0
- package/lib/js/get-time.d.ts.map +1 -0
- package/lib/js/get-time.js +43 -0
- package/lib/js/hfc-space.d.ts +16 -0
- package/lib/js/hfc-space.d.ts.map +1 -0
- package/lib/js/hfc-space.js +91 -0
- package/lib/js/render-special.d.ts +16 -0
- package/lib/js/render-special.d.ts.map +1 -0
- package/lib/js/render-special.js +61 -0
- package/lib/js/request/fetch.d.ts +10 -0
- package/lib/js/request/fetch.d.ts.map +1 -0
- package/lib/js/request/fetch.js +88 -0
- package/lib/js/request/request.d.ts +3 -0
- package/lib/js/request/request.d.ts.map +1 -0
- package/lib/js/request/request.js +71 -0
- package/lib/js/showMessage.d.ts +15 -0
- package/lib/js/showMessage.d.ts.map +1 -0
- package/lib/js/showMessage.js +83 -0
- package/lib/js/state-immer.d.ts +3 -0
- package/lib/js/state-immer.d.ts.map +1 -0
- package/lib/js/state-immer.js +27 -0
- package/lib/js/timer-executor.d.ts +3 -0
- package/lib/js/timer-executor.d.ts.map +1 -0
- package/lib/js/timer-executor.js +91 -0
- package/lib/js/to-hfc.d.ts +2 -0
- package/lib/js/to-hfc.d.ts.map +1 -0
- package/lib/js/to-hfc.js +14 -0
- package/lib/js/utils.d.ts +3 -0
- package/lib/js/utils.d.ts.map +1 -0
- package/lib/js/utils.js +19 -0
- package/lib/jsx/chat-modal.d.ts +16 -0
- package/lib/jsx/chat-modal.d.ts.map +1 -0
- package/lib/jsx/chat-modal.js +278 -0
- package/lib/server.d.ts +8 -0
- package/lib/server.d.ts.map +1 -0
- package/lib/server.js +58 -0
- package/lib/style.css +174 -0
- package/package.json +57 -0
- package/rct.config.js +8 -0
- package/src/component/answer-itme/index.jsx +64 -0
- package/src/component/answer-itme/style.less +37 -0
- package/src/component/data-container/index.jsx +45 -0
- package/src/component/data-container/style.less +27 -0
- package/src/component/days-tab/index.jsx +114 -0
- package/src/component/days-tab/style.less +55 -0
- package/src/component/days-tab/utils.js +87 -0
- package/src/component/error-boundary/index.jsx +39 -0
- package/src/component/it-notice-modal/columns.js +102 -0
- package/src/component/it-notice-modal/double-tab.jsx +83 -0
- package/src/component/it-notice-modal/index.jsx +404 -0
- package/src/component/it-notice-modal/server.js +43 -0
- package/src/component/it-notice-modal/single-tab.jsx +70 -0
- package/src/component/it-notice-modal/style.less +367 -0
- package/src/component/it-notice-modal/utils.js +8 -0
- package/src/component/it-notice-tab/index.jsx +196 -0
- package/src/component/it-notice-tab/server.js +14 -0
- package/src/component/it-notice-tab/style.less +120 -0
- package/src/component/mail-list-modal/index.jsx +270 -0
- package/src/component/mail-list-modal/server.js +38 -0
- package/src/component/mail-list-modal/style.less +154 -0
- package/src/component/myself-chat-card/index.jsx +27 -0
- package/src/component/myself-chat-card/style.less +30 -0
- package/src/component/need-answer/index.jsx +56 -0
- package/src/component/need-answer/style.less +21 -0
- package/src/component/opppsition-chat-card/index.jsx +25 -0
- package/src/component/opppsition-chat-card/style.less +33 -0
- package/src/component/question-library/index.jsx +316 -0
- package/src/component/question-library/server.js +19 -0
- package/src/component/question-library/style.less +102 -0
- package/src/component/question-tag/index.jsx +27 -0
- package/src/component/question-tag/style.less +15 -0
- package/src/component/recommend-questions-card/index.jsx +111 -0
- package/src/component/recommend-questions-card/style.less +66 -0
- package/src/component/scroll-view/index.js +3 -0
- package/src/component/scroll-view/scroll-view.jsx +74 -0
- package/src/component/scroll-view/style.less +37 -0
- package/src/component/tab/index.jsx +17 -0
- package/src/component/tab/style.less +26 -0
- package/src/component/tips-answer/index.jsx +38 -0
- package/src/component/tips-answer/style.less +11 -0
- package/src/images/expire-robot.svg +16 -0
- package/src/images/pc-invalid.svg +11 -0
- package/src/images/screenshot-5.png +0 -0
- package/src/index.jsx +554 -0
- package/src/js/const.js +48 -0
- package/src/js/gen-render-promise.js +32 -0
- package/src/js/get-time.js +35 -0
- package/src/js/hfc-space.js +91 -0
- package/src/js/render-special.js +64 -0
- package/src/js/request/fetch.js +87 -0
- package/src/js/request/request.js +74 -0
- package/src/js/showMessage.js +81 -0
- package/src/js/state-immer.js +12 -0
- package/src/js/timer-executor.js +37 -0
- package/src/js/to-hfc.js +9 -0
- package/src/js/utils.js +13 -0
- package/src/jsx/chat-modal.jsx +254 -0
- package/src/main.js +1 -0
- package/src/server.js +45 -0
- package/src/style.less +229 -0
- package/test/cases/case-01.assert.js +6 -0
- package/test/cases/case-01.source.jsx +17 -0
- package/test/cases/case-02.assert.js +6 -0
- package/test/cases/case-02.source.jsx +25 -0
- package/test/cases/case-02.style.less +15 -0
- package/test/cases/case-03.source.jsx +69 -0
- package/test/cases/case-03.style.less +3 -0
- package/tsconfig.json +48 -0
- package/typings.d.ts +5 -0
- package/umd/b415d90208c277ba3703.png +0 -0
- package/umd/index.css +1753 -0
- package/umd/index.js +36258 -0
- package/umd/index.min.css +1 -0
- package/umd/index.min.js +657 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@primaryColor: var(--primary-color, #1890FF);
|
|
2
|
+
@grayColor: #7E848F;
|
|
3
|
+
|
|
4
|
+
.itNoticeTabCon {
|
|
5
|
+
padding: 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex: 1;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
background-color: #F7F9FC;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
word-break: break-all;
|
|
12
|
+
|
|
13
|
+
.mainNoticeCon {
|
|
14
|
+
margin-top: 12px;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
flex: 1;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cardBody {
|
|
22
|
+
flex: 1;
|
|
23
|
+
overflow-y: auto;
|
|
24
|
+
margin: 0 12px;
|
|
25
|
+
.cardItem {
|
|
26
|
+
margin-bottom: 12px;
|
|
27
|
+
background-color: #FFFFFF;
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
box-shadow: 0px 1px 2px 0px rgba(25,122,250,0.15);
|
|
30
|
+
|
|
31
|
+
&:last-child {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.itemHeader {
|
|
37
|
+
padding: 8px 12px;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
box-shadow: inset 0px -1px 0px 0px #E6EAF0;
|
|
43
|
+
|
|
44
|
+
.img {
|
|
45
|
+
margin-right: 8px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.total {
|
|
49
|
+
color: @grayColor;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.headerRight {
|
|
53
|
+
margin-left: 8px;
|
|
54
|
+
color: @grayColor;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.itemBody {
|
|
59
|
+
padding: 12px;
|
|
60
|
+
margin-bottom: 0;
|
|
61
|
+
border-radius: 0px 0px 8px 8px;
|
|
62
|
+
|
|
63
|
+
.listItem {
|
|
64
|
+
margin-top: 12px;
|
|
65
|
+
padding-bottom: 12px;
|
|
66
|
+
border-bottom: 1px solid #E6EAF0;
|
|
67
|
+
|
|
68
|
+
&:first-child {
|
|
69
|
+
margin-top: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:last-child {
|
|
73
|
+
padding-bottom: 0;
|
|
74
|
+
border: none;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.checkMore {
|
|
81
|
+
margin: 12px;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
text-align: center;
|
|
84
|
+
color: #A5ACB8;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.clickText {
|
|
89
|
+
color: @primaryColor;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.noticeMenus {
|
|
94
|
+
position: absolute;
|
|
95
|
+
left: -120px;
|
|
96
|
+
top: 104px;
|
|
97
|
+
width: 120px;
|
|
98
|
+
max-height: 240px;
|
|
99
|
+
padding: 12px 8px;
|
|
100
|
+
box-shadow: 0px 4px 8px 0px rgba(20,23,55,0.05);
|
|
101
|
+
border-radius: 8px 0px 0px 8px;
|
|
102
|
+
border: 1px solid #F5F6FB;
|
|
103
|
+
background: #FFFFFF;
|
|
104
|
+
overflow-y: auto;
|
|
105
|
+
|
|
106
|
+
.menuItem {
|
|
107
|
+
padding: 5px 8px;
|
|
108
|
+
border-radius: 4px;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
|
|
114
|
+
&.active {
|
|
115
|
+
background-color: #E2F2FF;
|
|
116
|
+
color: @primaryColor;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import React, { memo, useCallback, useEffect, useRef } from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
import Ellipsis from '@shein-components/Ellipsis'
|
|
4
|
+
import Icon from '@shein-components/Icon'
|
|
5
|
+
import { Tree, Input, Button } from 'shineout'
|
|
6
|
+
import useStateByImmer from '../../js/state-immer'
|
|
7
|
+
import HeaderImg from '../../images/screenshot-5.png'
|
|
8
|
+
import styles from './style.less'
|
|
9
|
+
import * as Server from './server'
|
|
10
|
+
|
|
11
|
+
const MailListModal = memo((props) => {
|
|
12
|
+
const {
|
|
13
|
+
isHasGuarantee, checkBeforeCallWechat, groupTree, defaultSelectedGroupId, chatgptUse,
|
|
14
|
+
allConfigUserGroupIdList, t,
|
|
15
|
+
} = props
|
|
16
|
+
const inputTimer = useRef(null)
|
|
17
|
+
const reqQueue = useRef([])
|
|
18
|
+
const curReqTime = useRef(null)
|
|
19
|
+
const [state, setState] = useStateByImmer({
|
|
20
|
+
list: [],
|
|
21
|
+
userName: '',
|
|
22
|
+
selectedGroupId: defaultSelectedGroupId,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const getList = useCallback(async (params) => {
|
|
26
|
+
const { id, userName } = params || {}
|
|
27
|
+
const time = new Date().getTime()
|
|
28
|
+
curReqTime.current = time
|
|
29
|
+
reqQueue.current = [
|
|
30
|
+
...(reqQueue?.current || []),
|
|
31
|
+
time,
|
|
32
|
+
]
|
|
33
|
+
const selectedId = id || state.selectedGroupId
|
|
34
|
+
const res = await Server.handlerList({
|
|
35
|
+
// eslint-disable-next-line no-nested-ternary
|
|
36
|
+
configUserGroupIdList: selectedId === '0' ? allConfigUserGroupIdList : (selectedId ? [selectedId] : []),
|
|
37
|
+
userName: userName ? userName.replace(/\s+/g, '') : undefined,
|
|
38
|
+
})
|
|
39
|
+
// 寻找当前请求队列中是否有最新请求
|
|
40
|
+
const hasLatestReq = reqQueue?.current?.find(item => item === curReqTime.current)
|
|
41
|
+
reqQueue.current = reqQueue?.current?.filter(item => item !== time) || []
|
|
42
|
+
// 如果没有最新请求且当前返回的不是最新请求的响应,不替换响应数据
|
|
43
|
+
if (!hasLatestReq && curReqTime.current !== time) {
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
if (res) {
|
|
47
|
+
setState({
|
|
48
|
+
list: res.info || [],
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
}, [state.selectedGroupId, allConfigUserGroupIdList])
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
const collect = useCallback(async (item, isCollect) => {
|
|
55
|
+
const res = await Server.collect({
|
|
56
|
+
isCollect,
|
|
57
|
+
receiveEmployeeId: item.userNum,
|
|
58
|
+
})
|
|
59
|
+
if (res) {
|
|
60
|
+
getList({
|
|
61
|
+
userName: state.userName,
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
}, [state.userName, getList])
|
|
65
|
+
|
|
66
|
+
const callWeChat = useCallback((item) => {
|
|
67
|
+
Server.weComContactStatistics({
|
|
68
|
+
receiveEmployeeId: item.userNum,
|
|
69
|
+
}).then(() => {
|
|
70
|
+
getList({
|
|
71
|
+
userName: state.userName,
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
if (item.userType === 2) {
|
|
75
|
+
window.open(item.linkUrl)
|
|
76
|
+
return
|
|
77
|
+
}
|
|
78
|
+
Server.getWechatLaunchCode({
|
|
79
|
+
userNum: item.userNum,
|
|
80
|
+
}).then((res) => {
|
|
81
|
+
if (res) {
|
|
82
|
+
window.open(`wxwork://launch?launch_code=${res.info}`)
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}, [state.userName, getList])
|
|
86
|
+
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
setState({
|
|
89
|
+
selectedGroupId: defaultSelectedGroupId,
|
|
90
|
+
})
|
|
91
|
+
getList({ id: defaultSelectedGroupId })
|
|
92
|
+
}, [defaultSelectedGroupId])
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div
|
|
96
|
+
className={styles.modalWrapper}
|
|
97
|
+
>
|
|
98
|
+
{groupTree.length !== 0 ? (
|
|
99
|
+
<div className={styles.treeWarp}>
|
|
100
|
+
<Tree
|
|
101
|
+
className={styles.treeStyle}
|
|
102
|
+
data={groupTree}
|
|
103
|
+
keygen="value"
|
|
104
|
+
renderItem={d => (
|
|
105
|
+
<Ellipsis
|
|
106
|
+
className={
|
|
107
|
+
classNames(
|
|
108
|
+
styles.treeItem,
|
|
109
|
+
state.selectedGroupId === d.value && styles.selectedGroup,
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
value={d.label}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
line={false}
|
|
116
|
+
defaultExpandAll
|
|
117
|
+
onClick={(data) => {
|
|
118
|
+
setState({
|
|
119
|
+
selectedGroupId: data.value,
|
|
120
|
+
})
|
|
121
|
+
getList({ id: data.value, userName: state.userName })
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
) : null}
|
|
126
|
+
<div className={styles.chatWarp}>
|
|
127
|
+
<div className={styles.listWrapper}>
|
|
128
|
+
<div className={styles.searchWarp}>
|
|
129
|
+
<Input.Group style={{ width: 416, margin: 12 }}>
|
|
130
|
+
<Input
|
|
131
|
+
clearable
|
|
132
|
+
placeholder={t('输入名字或关键字搜索对接人')}
|
|
133
|
+
maxLength={20}
|
|
134
|
+
value={state.userName}
|
|
135
|
+
onChange={(v) => {
|
|
136
|
+
setState({ userName: v })
|
|
137
|
+
inputTimer.current = new Date().getTime()
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
if (new Date().getTime() - inputTimer.current >= 100) {
|
|
140
|
+
getList({ userName: v })
|
|
141
|
+
}
|
|
142
|
+
}, 100)
|
|
143
|
+
}}
|
|
144
|
+
onEnterPress={() => {
|
|
145
|
+
getList({ userName: state.userName })
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
148
|
+
<Button
|
|
149
|
+
text
|
|
150
|
+
onClick={() => {
|
|
151
|
+
getList({ userName: state.userName })
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
<Icon name="serach" />
|
|
155
|
+
</Button>
|
|
156
|
+
</Input.Group>
|
|
157
|
+
</div>
|
|
158
|
+
{state.list?.length === 0
|
|
159
|
+
? (
|
|
160
|
+
<div className={styles.empty}>
|
|
161
|
+
<Icon
|
|
162
|
+
name="dataemptying_icon"
|
|
163
|
+
fontSize={200}
|
|
164
|
+
className={styles.color}
|
|
165
|
+
/>
|
|
166
|
+
<div>{t('暂无联系人数据,请联系管理员')}</div>
|
|
167
|
+
</div>
|
|
168
|
+
)
|
|
169
|
+
: null
|
|
170
|
+
}
|
|
171
|
+
{state.list?.length > 0 ? (
|
|
172
|
+
<div className={styles.listShow}>
|
|
173
|
+
{state.list?.map(item => (
|
|
174
|
+
<div
|
|
175
|
+
className={styles.mailListModalItem}
|
|
176
|
+
onClick={() => {
|
|
177
|
+
if (chatgptUse && item.userType === 2) {
|
|
178
|
+
callWeChat(item)
|
|
179
|
+
return
|
|
180
|
+
}
|
|
181
|
+
if (typeof checkBeforeCallWechat === 'function') {
|
|
182
|
+
const bool = checkBeforeCallWechat()
|
|
183
|
+
if (bool) {
|
|
184
|
+
callWeChat(item)
|
|
185
|
+
}
|
|
186
|
+
} else {
|
|
187
|
+
callWeChat(item)
|
|
188
|
+
}
|
|
189
|
+
}}
|
|
190
|
+
>
|
|
191
|
+
<div className={styles.mailListModalItemLeft}>
|
|
192
|
+
<img
|
|
193
|
+
src={item.headImg || HeaderImg}
|
|
194
|
+
alt=""
|
|
195
|
+
className={styles.img}
|
|
196
|
+
/>
|
|
197
|
+
<div>
|
|
198
|
+
<div className={styles.problem}>{item.remark}</div>
|
|
199
|
+
<div className={styles.userName}>
|
|
200
|
+
{item.userName}
|
|
201
|
+
{item.cnName && `(${item.cnName})`}
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
<div className={styles.findRight}>
|
|
206
|
+
<div
|
|
207
|
+
className={styles.findHim}
|
|
208
|
+
>
|
|
209
|
+
{t('企微找ta聊')}
|
|
210
|
+
|
|
211
|
+
{
|
|
212
|
+
item.starUserStatus
|
|
213
|
+
? (
|
|
214
|
+
<Icon
|
|
215
|
+
name="odec-star-fill"
|
|
216
|
+
color="#1890FF"
|
|
217
|
+
onClick={(e) => {
|
|
218
|
+
e.stopPropagation()
|
|
219
|
+
collect(item, 0)
|
|
220
|
+
}}
|
|
221
|
+
/>
|
|
222
|
+
)
|
|
223
|
+
: (
|
|
224
|
+
<Icon
|
|
225
|
+
name="odec-star"
|
|
226
|
+
color="#1890FF"
|
|
227
|
+
onClick={(e) => {
|
|
228
|
+
e.stopPropagation()
|
|
229
|
+
collect(item, 1)
|
|
230
|
+
}}
|
|
231
|
+
/>
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
</div>
|
|
235
|
+
{item.visitNum && item.visitNum !== 0
|
|
236
|
+
? (
|
|
237
|
+
<div
|
|
238
|
+
className={styles.personFindedHim}
|
|
239
|
+
>
|
|
240
|
+
{t('{0}个人找过他', item?.visitNum)}
|
|
241
|
+
</div>
|
|
242
|
+
) : null
|
|
243
|
+
}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
))}
|
|
247
|
+
</div>
|
|
248
|
+
) : null}
|
|
249
|
+
</div>
|
|
250
|
+
{isHasGuarantee ? (
|
|
251
|
+
<div className={styles.systemTipsWrapper}>
|
|
252
|
+
<span
|
|
253
|
+
className={styles.onGuarantee}
|
|
254
|
+
onClick={async () => {
|
|
255
|
+
const res = await Server.systemReporting()
|
|
256
|
+
if (res) {
|
|
257
|
+
window.open(res.info?.url)
|
|
258
|
+
}
|
|
259
|
+
}}
|
|
260
|
+
>
|
|
261
|
+
{t('我要上报故障')}
|
|
262
|
+
</span>
|
|
263
|
+
</div>
|
|
264
|
+
) : null}
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
)
|
|
268
|
+
})
|
|
269
|
+
|
|
270
|
+
export default MailListModal
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// eslint-disable-next-line no-unused-vars
|
|
2
|
+
import postRequest from '../../js/request/request'
|
|
3
|
+
|
|
4
|
+
// 获取人工处理列表
|
|
5
|
+
// https://soapi.sheincorp.cn/application/3768/routes/114060
|
|
6
|
+
export function list(argument) {
|
|
7
|
+
return postRequest('/front/manual/list', argument)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 获取企微唤醒码
|
|
11
|
+
// https://soapi.sheincorp.cn/application/3768/routes/114316
|
|
12
|
+
export function getWechatLaunchCode(argument) {
|
|
13
|
+
return postRequest('/front/manual/getWechatLaunchCode', argument)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 系统报障
|
|
17
|
+
// https://soapi.sheincorp.cn/application/3768/routes/124862
|
|
18
|
+
export function systemReporting(argument) {
|
|
19
|
+
return postRequest('/front/mesAssistant/systemReporting', argument)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 收藏
|
|
23
|
+
// https://soapi.sheincorp.cn/application/5161/routes/post_front_manual_collect/doc
|
|
24
|
+
export function collect(argument) {
|
|
25
|
+
return postRequest('/front/manual/collect', argument)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 发起企业微信联系统计
|
|
29
|
+
// https://soapi.sheincorp.cn/application/5161/routes/post_front_manual_weComContactStatistics/doc
|
|
30
|
+
export function weComContactStatistics(argument) {
|
|
31
|
+
return postRequest('/front/manual/weComContactStatistics', argument)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 根据分组获取处理人列表
|
|
35
|
+
// https://soapi.sheincorp.cn/application/5161/routes/post_front_manual_handlerList/doc
|
|
36
|
+
export function handlerList(argument) {
|
|
37
|
+
return postRequest('/front/manual/handlerList', argument)
|
|
38
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
.systemTipsWrapper {
|
|
2
|
+
padding: 8px;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
color: #FFFFFF;
|
|
7
|
+
font-size: 15px;
|
|
8
|
+
box-shadow: inset 0px 1px 0px 0px rgba(217, 217, 217, 0.5);
|
|
9
|
+
|
|
10
|
+
.onGuarantee {
|
|
11
|
+
width: 100%;
|
|
12
|
+
padding: 12px;
|
|
13
|
+
border-radius: 10px;
|
|
14
|
+
text-align: center;
|
|
15
|
+
background-color: var(--primary-color, #1890ff);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.chatWarp {
|
|
22
|
+
flex: 1;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
.listWrapper {
|
|
28
|
+
flex: 1;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
position: relative;
|
|
33
|
+
padding-top: 56px;
|
|
34
|
+
|
|
35
|
+
.searchWarp {
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: 0;
|
|
38
|
+
top: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.listShow {
|
|
42
|
+
flex: 1;
|
|
43
|
+
overflow: auto;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
|
|
47
|
+
.mailListModalItem {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
padding: 10px 20px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background: #E6F5FF;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.img {
|
|
59
|
+
width: 40px;
|
|
60
|
+
height: 40px;
|
|
61
|
+
border-radius: 4px;
|
|
62
|
+
margin-right: 12px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
border-bottom: 1px solid #F4F5F8;
|
|
66
|
+
|
|
67
|
+
.mailListModalItemLeft {
|
|
68
|
+
display: flex;
|
|
69
|
+
|
|
70
|
+
.img {
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.userName {
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
font-weight: 400;
|
|
77
|
+
color: #7E848F;
|
|
78
|
+
margin-top: 4px;
|
|
79
|
+
line-height: 18px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.problem {
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
font-weight: 400;
|
|
85
|
+
color: #35383D;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
.findRight {
|
|
91
|
+
margin-left: 12px;
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
}
|
|
94
|
+
.findHim {
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
font-weight: 400;
|
|
98
|
+
color: var(--primary-color, #197AFA);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.personFindedHim {
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
color: #7E848F;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.empty {
|
|
109
|
+
flex: 1;
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
color: var(--primary-color, #1890ff);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.modalWrapper {
|
|
120
|
+
display: flex;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
flex: 1;
|
|
123
|
+
|
|
124
|
+
.treeWarp {
|
|
125
|
+
max-width: 250px;
|
|
126
|
+
padding-right: 8px;
|
|
127
|
+
padding-top: 16px;
|
|
128
|
+
display: flex;
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
box-shadow: inset -1px 1px 0px 0px rgba(217, 217, 217, 0.5);
|
|
131
|
+
border-radius: 5px 0px 0px 5px;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
|
|
134
|
+
.treeStyle {
|
|
135
|
+
color: #333E59;
|
|
136
|
+
word-break: break-all;
|
|
137
|
+
overflow-y: auto;
|
|
138
|
+
|
|
139
|
+
:global {
|
|
140
|
+
.so-tree-content .so-tree-text {
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.treeItem {
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.selectedGroup {
|
|
151
|
+
color: var(--primary-color,#197afa);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { memo } from 'react'
|
|
2
|
+
import Proptypes from 'prop-types'
|
|
3
|
+
import styles from './style.less'
|
|
4
|
+
|
|
5
|
+
const MyselfChatCard = memo((props) => {
|
|
6
|
+
const { item } = props
|
|
7
|
+
return (
|
|
8
|
+
<div className={styles.wrapper}>
|
|
9
|
+
|
|
10
|
+
<div
|
|
11
|
+
className={styles.contentBox}
|
|
12
|
+
>
|
|
13
|
+
{item.problem}
|
|
14
|
+
</div>
|
|
15
|
+
<div className={styles.time}>{item.questionTime}</div>
|
|
16
|
+
</div>
|
|
17
|
+
)
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
MyselfChatCard.propTypes = {
|
|
21
|
+
item: Proptypes.shape({
|
|
22
|
+
problem: Proptypes.string,
|
|
23
|
+
questionTime: Proptypes.string,
|
|
24
|
+
}),
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default MyselfChatCard
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
|
|
7
|
+
margin-top: 16px;
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.contentBox {
|
|
12
|
+
max-width: 560px;
|
|
13
|
+
background: var(--primary-color,#1890ff);
|
|
14
|
+
border-radius: 8px 0px 8px 8px;
|
|
15
|
+
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
|
|
19
|
+
padding: 12px 12px;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
color: #FFFFFF;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.time {
|
|
28
|
+
margin-top: 8px;
|
|
29
|
+
color: #7E848F;
|
|
30
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { memo } from 'react'
|
|
2
|
+
import Proptypes from 'prop-types'
|
|
3
|
+
import showMessage from '../../js/showMessage'
|
|
4
|
+
import OppositionChatCard from '../opppsition-chat-card'
|
|
5
|
+
import styles from './style.less'
|
|
6
|
+
import * as Server from '../../server'
|
|
7
|
+
import useStateByImmer from '../../js/state-immer'
|
|
8
|
+
|
|
9
|
+
const NeedAnswer = memo((props) => {
|
|
10
|
+
const { item, t } = props
|
|
11
|
+
const [state, setState] = useStateByImmer({ loading: false })
|
|
12
|
+
return (
|
|
13
|
+
<OppositionChatCard>
|
|
14
|
+
<div>
|
|
15
|
+
<span
|
|
16
|
+
className={styles.needAnswerContent}
|
|
17
|
+
>
|
|
18
|
+
{t('您好,您厂【{0}】有问题“{1}”需要帮助,请为其解决。若解决不了', item.userName, item.problem)}
|
|
19
|
+
</span>
|
|
20
|
+
<span
|
|
21
|
+
className={state.disabled ? styles.onDisabled : styles.onSeekHlep}
|
|
22
|
+
loading={state.loading}
|
|
23
|
+
onClick={() => {
|
|
24
|
+
if (state.disabled) return
|
|
25
|
+
setState({
|
|
26
|
+
loading: true,
|
|
27
|
+
})
|
|
28
|
+
Server.seekHelp({
|
|
29
|
+
problem: item.problem,
|
|
30
|
+
}).then((res) => {
|
|
31
|
+
setState({
|
|
32
|
+
loading: false,
|
|
33
|
+
disabled: true,
|
|
34
|
+
})
|
|
35
|
+
if (res.info && res.info.managerName) {
|
|
36
|
+
const content = t('已将您的问题反馈给管理员【{0}】,由管理员统一反馈给实施。', res.info.managerName)
|
|
37
|
+
showMessage(content, true)
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
{t('请联系我')}
|
|
43
|
+
</span>
|
|
44
|
+
</div>
|
|
45
|
+
</OppositionChatCard>
|
|
46
|
+
)
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
NeedAnswer.propTypes = {
|
|
50
|
+
item: Proptypes.shape({
|
|
51
|
+
problem: Proptypes.string,
|
|
52
|
+
userName: Proptypes.string,
|
|
53
|
+
}),
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default NeedAnswer
|