eli-video-interview 1.2.42-alpha.11 → 1.2.42-alpha.12
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/esm/components/Charts/ReportPie.js +4 -3
- package/esm/components/Charts/const.js +3 -3
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +1 -1
- package/esm/modules/ai-report-v2/components/Form/Form.js +9 -4
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +1 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +1 -1
- package/lib/components/Charts/ReportPie.js +4 -3
- package/lib/components/Charts/const.js +3 -3
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +1 -1
- package/lib/modules/ai-report-v2/components/Form/Form.js +9 -4
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +1 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +1 -1
- package/package.json +1 -1
|
@@ -125,15 +125,16 @@ var ReportPie = function (props) {
|
|
|
125
125
|
formatter: function (_a) {
|
|
126
126
|
var _b;
|
|
127
127
|
var value = _a.value, dataIndex = _a.dataIndex;
|
|
128
|
-
return ((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight) || 0;
|
|
128
|
+
return "".concat(((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight.toFixed(2)) || 0, "%");
|
|
129
129
|
},
|
|
130
130
|
fontSize: 14,
|
|
131
131
|
},
|
|
132
132
|
itemStyle: {
|
|
133
133
|
color: function (_a) {
|
|
134
|
-
var _b;
|
|
134
|
+
var _b, _c;
|
|
135
135
|
var level = _a.data.level;
|
|
136
|
-
|
|
136
|
+
console.log((_b = levelMapping[level]) === null || _b === void 0 ? void 0 : _b.itemColor, level);
|
|
137
|
+
return (_c = levelMapping[level]) === null || _c === void 0 ? void 0 : _c.itemColor;
|
|
137
138
|
},
|
|
138
139
|
shadowBlur: 4,
|
|
139
140
|
shadowColor: 'rgba(0, 0, 0, 0.16)',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export var levelMapping = {
|
|
2
2
|
3: {
|
|
3
3
|
text: '优秀',
|
|
4
|
-
itemColor: '
|
|
4
|
+
itemColor: 'rgba(255, 153,2)',
|
|
5
5
|
color: 'rgb(255, 153, 3)',
|
|
6
6
|
},
|
|
7
7
|
2: {
|
|
8
8
|
text: '适中',
|
|
9
|
-
itemColor: '
|
|
9
|
+
itemColor: 'rgba(0, 217,157)',
|
|
10
10
|
color: 'rgba(0, 217, 157)',
|
|
11
11
|
},
|
|
12
12
|
1: {
|
|
13
13
|
text: '欠佳',
|
|
14
|
-
itemColor: '
|
|
14
|
+
itemColor: 'rgba(99, 156,255)',
|
|
15
15
|
color: 'rgb(98, 156, 255)',
|
|
16
16
|
},
|
|
17
17
|
};
|
|
@@ -24,6 +24,6 @@ var Index = function () {
|
|
|
24
24
|
}); });
|
|
25
25
|
if (!showAiDimension)
|
|
26
26
|
return null;
|
|
27
|
-
return (_jsx(Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: _jsx(Box, __assign({ component: Paper, elevation: 0, bgcolor: "transparent", mb: 2, pb: 2 }, { children: _jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ mt: 2, flex: 1 }, { children: _jsx(Graph, { items: items }) })), _jsx(Report, {})] })), (reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation) && (_jsx(Evaluate, { token: "", canEdit: canEditAiDimension, evaluations: reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation, title: "\u8BC4\u4EF7
|
|
27
|
+
return (_jsx(Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: _jsx(Box, __assign({ component: Paper, elevation: 0, bgcolor: "transparent", mb: 2, pb: 2 }, { children: _jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ mt: 2, flex: 1 }, { children: _jsx(Graph, { items: items }) })), _jsx(Report, {})] })), (reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation) && (_jsx(Evaluate, { token: "", canEdit: canEditAiDimension, evaluations: reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation, title: "\u7EFC\u5408\u8BC4\u4EF7", field: "evaluations", mode: "show" }))] }) })) })));
|
|
28
28
|
};
|
|
29
29
|
export default Index;
|
|
@@ -30,8 +30,8 @@ export var QUESTION_TYPE;
|
|
|
30
30
|
QUESTION_TYPE[QUESTION_TYPE["NPS"] = 9] = "NPS";
|
|
31
31
|
})(QUESTION_TYPE || (QUESTION_TYPE = {}));
|
|
32
32
|
var Image = function (answer) {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
return (_jsx(PhotoProvider, __assign({ maskOpacity: 0.5 }, { children: (_b = (_a = answer.formAnswer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.map(function (url) { return (_jsx(PhotoView, __assign({ src: url }, { children: _jsx("img", { src: url, alt: url, width: 48, height: 32 }) }), url)); }) })));
|
|
33
|
+
var _a, _b, _c;
|
|
34
|
+
return (_jsx(PhotoProvider, __assign({ maskOpacity: 0.5 }, { children: (_c = (_b = (_a = answer.formAnswer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.filter(function (v) { return v; })) === null || _c === void 0 ? void 0 : _c.map(function (url) { return (_jsx(PhotoView, __assign({ src: url }, { children: _jsx("img", { src: url, alt: url, width: 48, height: 32 }) }), url)); }) })));
|
|
35
35
|
};
|
|
36
36
|
var fillBlanks = function (answer) { var _a, _b; return _jsx(Typography, __assign({ variant: "body2" }, { children: (_b = (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer) === null || _b === void 0 ? void 0 : _b.join(',') })); };
|
|
37
37
|
var Choice = function (answer) {
|
|
@@ -47,7 +47,12 @@ var template = (_a = {},
|
|
|
47
47
|
_a[QUESTION_TYPE.RADIO] = Choice,
|
|
48
48
|
_a[QUESTION_TYPE.CHECKBOX] = Choice,
|
|
49
49
|
_a[QUESTION_TYPE.ESSAY_QUESTION] = function (answer) { var _a; return (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer; },
|
|
50
|
-
_a[QUESTION_TYPE.TIME] = function (answer) {
|
|
50
|
+
_a[QUESTION_TYPE.TIME] = function (answer) {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
return ((_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.dateTime) &&
|
|
53
|
+
!isNaN((_b = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _b === void 0 ? void 0 : _b.dateTime) &&
|
|
54
|
+
dayjs(Number((_c = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _c === void 0 ? void 0 : _c.dateTime) * 1000).format('YYYY年MM月DD日');
|
|
55
|
+
},
|
|
51
56
|
_a[QUESTION_TYPE.SCHOOL] = function (answer) { var _a; return (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer; },
|
|
52
57
|
_a[QUESTION_TYPE.FILL_BLANKS] = fillBlanks,
|
|
53
58
|
_a[QUESTION_TYPE.NPS] = Nps,
|
|
@@ -79,7 +84,7 @@ var Form = function (_a) {
|
|
|
79
84
|
return (_jsxs(_Fragment, { children: [_jsxs(Stack, __assign({ direction: "row", sx: {
|
|
80
85
|
py: 1,
|
|
81
86
|
px: 2,
|
|
82
|
-
} }, { children: [
|
|
87
|
+
} }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { width: 52 } }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", flex: 1, mr: 7 }, { children: answer.formTypeKey })), _jsx(Typography, __assign({ variant: "body2", flex: 1 }, { children: (_a = template[answer.formTypeId]) === null || _a === void 0 ? void 0 : _a.call(template, answer) }))] }), index), _jsx(Box, { sx: { background: '#fff', height: 2, mx: 1 } })] }));
|
|
83
88
|
}) }))] }))] })));
|
|
84
89
|
};
|
|
85
90
|
export default Form;
|
|
@@ -78,6 +78,7 @@ var ReportHeader = function (_a) {
|
|
|
78
78
|
width: 'calc(100% - 180px)',
|
|
79
79
|
position: 'absolute',
|
|
80
80
|
top: 0,
|
|
81
|
+
zIndex: 2,
|
|
81
82
|
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", pl: 3, py: 3 }, { children: [_jsxs(Typography, __assign({ variant: "caption", sx: {
|
|
82
83
|
color: 'rgba(74, 74, 74, 0.86)',
|
|
83
84
|
} }, { children: ["\u62A5\u544A\u751F\u6210\u65F6\u95F4\uFF1A", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () { return setOpenRefresh(true); } }, { children: _jsx(RefreshIcon, { sx: {
|
|
@@ -118,7 +118,7 @@ var QuestionItem = function (props) {
|
|
|
118
118
|
mt: 0.5,
|
|
119
119
|
} }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: desc }))] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
120
120
|
return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
121
|
-
})] })), _jsx(Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })),
|
|
121
|
+
})] })), _jsx(Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), _jsx(Typography, { variant: "caption", sx: {
|
|
122
122
|
color: '#424242',
|
|
123
123
|
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
124
124
|
};
|
|
@@ -130,15 +130,16 @@ var ReportPie = function (props) {
|
|
|
130
130
|
formatter: function (_a) {
|
|
131
131
|
var _b;
|
|
132
132
|
var value = _a.value, dataIndex = _a.dataIndex;
|
|
133
|
-
return ((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight) || 0;
|
|
133
|
+
return "".concat(((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight.toFixed(2)) || 0, "%");
|
|
134
134
|
},
|
|
135
135
|
fontSize: 14,
|
|
136
136
|
},
|
|
137
137
|
itemStyle: {
|
|
138
138
|
color: function (_a) {
|
|
139
|
-
var _b;
|
|
139
|
+
var _b, _c;
|
|
140
140
|
var level = _a.data.level;
|
|
141
|
-
|
|
141
|
+
console.log((_b = const_1.levelMapping[level]) === null || _b === void 0 ? void 0 : _b.itemColor, level);
|
|
142
|
+
return (_c = const_1.levelMapping[level]) === null || _c === void 0 ? void 0 : _c.itemColor;
|
|
142
143
|
},
|
|
143
144
|
shadowBlur: 4,
|
|
144
145
|
shadowColor: 'rgba(0, 0, 0, 0.16)',
|
|
@@ -4,17 +4,17 @@ exports.levelMapping = void 0;
|
|
|
4
4
|
exports.levelMapping = {
|
|
5
5
|
3: {
|
|
6
6
|
text: '优秀',
|
|
7
|
-
itemColor: '
|
|
7
|
+
itemColor: 'rgba(255, 153,2)',
|
|
8
8
|
color: 'rgb(255, 153, 3)',
|
|
9
9
|
},
|
|
10
10
|
2: {
|
|
11
11
|
text: '适中',
|
|
12
|
-
itemColor: '
|
|
12
|
+
itemColor: 'rgba(0, 217,157)',
|
|
13
13
|
color: 'rgba(0, 217, 157)',
|
|
14
14
|
},
|
|
15
15
|
1: {
|
|
16
16
|
text: '欠佳',
|
|
17
|
-
itemColor: '
|
|
17
|
+
itemColor: 'rgba(99, 156,255)',
|
|
18
18
|
color: 'rgb(98, 156, 255)',
|
|
19
19
|
},
|
|
20
20
|
};
|
|
@@ -29,6 +29,6 @@ var Index = function () {
|
|
|
29
29
|
}); });
|
|
30
30
|
if (!showAiDimension)
|
|
31
31
|
return null;
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ component: mui_1.Paper, elevation: 0, bgcolor: "transparent", mb: 2, pb: 2 }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2, flex: 1 }, { children: (0, jsx_runtime_1.jsx)(Graph_1.default, { items: items }) })), (0, jsx_runtime_1.jsx)(Report_1.default, {})] })), (reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation) && ((0, jsx_runtime_1.jsx)(Evaluate_1.default, { token: "", canEdit: canEditAiDimension, evaluations: reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation, title: "\u8BC4\u4EF7
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ component: mui_1.Paper, elevation: 0, bgcolor: "transparent", mb: 2, pb: 2 }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2, flex: 1 }, { children: (0, jsx_runtime_1.jsx)(Graph_1.default, { items: items }) })), (0, jsx_runtime_1.jsx)(Report_1.default, {})] })), (reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation) && ((0, jsx_runtime_1.jsx)(Evaluate_1.default, { token: "", canEdit: canEditAiDimension, evaluations: reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation, title: "\u7EFC\u5408\u8BC4\u4EF7", field: "evaluations", mode: "show" }))] }) })) })));
|
|
33
33
|
};
|
|
34
34
|
exports.default = Index;
|
|
@@ -36,8 +36,8 @@ var QUESTION_TYPE;
|
|
|
36
36
|
QUESTION_TYPE[QUESTION_TYPE["NPS"] = 9] = "NPS";
|
|
37
37
|
})(QUESTION_TYPE = exports.QUESTION_TYPE || (exports.QUESTION_TYPE = {}));
|
|
38
38
|
var Image = function (answer) {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(react_photo_view_1.PhotoProvider, __assign({ maskOpacity: 0.5 }, { children: (_b = (_a = answer.formAnswer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.map(function (url) { return ((0, jsx_runtime_1.jsx)(react_photo_view_1.PhotoView, __assign({ src: url }, { children: (0, jsx_runtime_1.jsx)("img", { src: url, alt: url, width: 48, height: 32 }) }), url)); }) })));
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(react_photo_view_1.PhotoProvider, __assign({ maskOpacity: 0.5 }, { children: (_c = (_b = (_a = answer.formAnswer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.filter(function (v) { return v; })) === null || _c === void 0 ? void 0 : _c.map(function (url) { return ((0, jsx_runtime_1.jsx)(react_photo_view_1.PhotoView, __assign({ src: url }, { children: (0, jsx_runtime_1.jsx)("img", { src: url, alt: url, width: 48, height: 32 }) }), url)); }) })));
|
|
41
41
|
};
|
|
42
42
|
var fillBlanks = function (answer) { var _a, _b; return (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: (_b = (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer) === null || _b === void 0 ? void 0 : _b.join(',') })); };
|
|
43
43
|
var Choice = function (answer) {
|
|
@@ -53,7 +53,12 @@ var template = (_a = {},
|
|
|
53
53
|
_a[QUESTION_TYPE.RADIO] = Choice,
|
|
54
54
|
_a[QUESTION_TYPE.CHECKBOX] = Choice,
|
|
55
55
|
_a[QUESTION_TYPE.ESSAY_QUESTION] = function (answer) { var _a; return (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer; },
|
|
56
|
-
_a[QUESTION_TYPE.TIME] = function (answer) {
|
|
56
|
+
_a[QUESTION_TYPE.TIME] = function (answer) {
|
|
57
|
+
var _a, _b, _c;
|
|
58
|
+
return ((_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.dateTime) &&
|
|
59
|
+
!isNaN((_b = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _b === void 0 ? void 0 : _b.dateTime) &&
|
|
60
|
+
(0, dayjs_1.default)(Number((_c = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _c === void 0 ? void 0 : _c.dateTime) * 1000).format('YYYY年MM月DD日');
|
|
61
|
+
},
|
|
57
62
|
_a[QUESTION_TYPE.SCHOOL] = function (answer) { var _a; return (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer; },
|
|
58
63
|
_a[QUESTION_TYPE.FILL_BLANKS] = fillBlanks,
|
|
59
64
|
_a[QUESTION_TYPE.NPS] = Nps_1.default,
|
|
@@ -85,7 +90,7 @@ var Form = function (_a) {
|
|
|
85
90
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", sx: {
|
|
86
91
|
py: 1,
|
|
87
92
|
px: 2,
|
|
88
|
-
} }, { children: [(0, jsx_runtime_1.
|
|
93
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { width: 52 } }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", flex: 1, mr: 7 }, { children: answer.formTypeKey })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", flex: 1 }, { children: (_a = template[answer.formTypeId]) === null || _a === void 0 ? void 0 : _a.call(template, answer) }))] }), index), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { sx: { background: '#fff', height: 2, mx: 1 } })] }));
|
|
89
94
|
}) }))] }))] })));
|
|
90
95
|
};
|
|
91
96
|
exports.default = Form;
|
|
@@ -83,6 +83,7 @@ var ReportHeader = function (_a) {
|
|
|
83
83
|
width: 'calc(100% - 180px)',
|
|
84
84
|
position: 'absolute',
|
|
85
85
|
top: 0,
|
|
86
|
+
zIndex: 2,
|
|
86
87
|
} }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", pl: 3, py: 3 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", sx: {
|
|
87
88
|
color: 'rgba(74, 74, 74, 0.86)',
|
|
88
89
|
} }, { children: ["\u62A5\u544A\u751F\u6210\u65F6\u95F4\uFF1A", (0, dayjs_1.default)(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: function () { return setOpenRefresh(true); } }, { children: (0, jsx_runtime_1.jsx)(fbm_icons_1.RefreshIcon, { sx: {
|
|
@@ -123,7 +123,7 @@ var QuestionItem = function (props) {
|
|
|
123
123
|
mt: 0.5,
|
|
124
124
|
} }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: desc }))] })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
125
125
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
126
|
-
})] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })),
|
|
126
|
+
})] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
|
|
127
127
|
color: '#424242',
|
|
128
128
|
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
129
129
|
};
|