touchstudy-core 0.1.123 → 0.1.125
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/dist/index.modern.js
CHANGED
@@ -5105,9 +5105,6 @@ var PrintExamView2 = function PrintExamView2(_ref) {
|
|
5105
5105
|
setErrorLinks([]);
|
5106
5106
|
setState(PrintState.Printing);
|
5107
5107
|
};
|
5108
|
-
console.log({
|
5109
|
-
status: status
|
5110
|
-
});
|
5111
5108
|
var print = function print(_ref2) {
|
5112
5109
|
var examSessionId = _ref2.examSessionId,
|
5113
5110
|
studentId = _ref2.studentId,
|
@@ -5126,7 +5123,7 @@ var PrintExamView2 = function PrintExamView2(_ref) {
|
|
5126
5123
|
code: code,
|
5127
5124
|
examSessionId: "" + examSessionId,
|
5128
5125
|
studentId: "" + studentId,
|
5129
|
-
message: isTeacher ? "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print" : "/student/exam-results/" + code + "/print"
|
5126
|
+
message: isTeacher ? "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print?status=" + status.join(",") : "/student/exam-results/" + code + "/print"
|
5130
5127
|
}]);
|
5131
5128
|
});
|
5132
5129
|
if (!isTeacher) {
|
@@ -5213,7 +5210,7 @@ var PrintExamView2 = function PrintExamView2(_ref) {
|
|
5213
5210
|
code: (_event$data = event.data) === null || _event$data === void 0 ? void 0 : _event$data.code,
|
5214
5211
|
examSessionId: (_event$data2 = event.data) === null || _event$data2 === void 0 ? void 0 : _event$data2.examSessionId,
|
5215
5212
|
studentId: "" + studentId,
|
5216
|
-
message: isTeacher ? "/teacher/exam-results/" + event.data.examSessionId + "/students/" + event.data.studentId + "/print" : "/student/exam-results/" + event.data.code + "/print"
|
5213
|
+
message: isTeacher ? "/teacher/exam-results/" + event.data.examSessionId + "/students/" + event.data.studentId + "/print?status=" + status.join(",") : "/student/exam-results/" + event.data.code + "/print"
|
5217
5214
|
}]);
|
5218
5215
|
});
|
5219
5216
|
}
|
@@ -5250,7 +5247,7 @@ var PrintExamView2 = function PrintExamView2(_ref) {
|
|
5250
5247
|
className: "mt-2"
|
5251
5248
|
}, React__default.createElement(Typography, {
|
5252
5249
|
fontWeight: 700
|
5253
|
-
}, t("download_failed"), ":"), Array.from(new Set(errorLinks)).map(function (i) {
|
5250
|
+
}, t("download_failed"), ":"), Array.from(new Set(errorLinks)).map(function (i, index) {
|
5254
5251
|
var _info$createdBy;
|
5255
5252
|
var info = isTeacher ? dataExamSession.find(function (exam) {
|
5256
5253
|
return "" + (exam === null || exam === void 0 ? void 0 : exam.examSessionId) === "" + (i === null || i === void 0 ? void 0 : i.examSessionId) && "" + (exam === null || exam === void 0 ? void 0 : exam.studentId) === "" + (i === null || i === void 0 ? void 0 : i.studentId);
|
@@ -5258,6 +5255,7 @@ var PrintExamView2 = function PrintExamView2(_ref) {
|
|
5258
5255
|
return (exam === null || exam === void 0 ? void 0 : exam.code) === (i === null || i === void 0 ? void 0 : i.code);
|
5259
5256
|
});
|
5260
5257
|
return React__default.createElement(Stack, {
|
5258
|
+
key: index,
|
5261
5259
|
borderBottom: 1,
|
5262
5260
|
borderColor: theme.palette.grey[500]
|
5263
5261
|
}, React__default.createElement("a", {
|
@@ -5287,10 +5285,11 @@ var PrintExamView2 = function PrintExamView2(_ref) {
|
|
5287
5285
|
gap: 1,
|
5288
5286
|
flexWrap: "wrap"
|
5289
5287
|
}
|
5290
|
-
}, TabList.map(function (_ref3) {
|
5288
|
+
}, TabList.map(function (_ref3, index) {
|
5291
5289
|
var label = _ref3.label,
|
5292
5290
|
value = _ref3.value;
|
5293
5291
|
return React__default.createElement(FormControlLabel, {
|
5292
|
+
key: index,
|
5294
5293
|
control: React__default.createElement(Checkbox, {
|
5295
5294
|
onChange: handleChangeStatus,
|
5296
5295
|
value: value,
|
@@ -18569,7 +18568,6 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
18569
18568
|
textbookResult = _ref.textbookResult,
|
18570
18569
|
chapterId = _ref.chapterId,
|
18571
18570
|
examTime = _ref.examTime,
|
18572
|
-
status = _ref.status,
|
18573
18571
|
isShow = _ref.isShow,
|
18574
18572
|
isStudent = _ref.isStudent,
|
18575
18573
|
totalTime = _ref.totalTime,
|
@@ -18582,11 +18580,6 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
18582
18580
|
longTimeSpend = _ref.longTimeSpend,
|
18583
18581
|
contentRef = _ref.contentRef,
|
18584
18582
|
setRenderedChart = _ref.setRenderedChart;
|
18585
|
-
console.log({
|
18586
|
-
bang: status,
|
18587
|
-
chapterId: chapterId,
|
18588
|
-
bang2: isShow === null || isShow === void 0 ? void 0 : isShow(TabList$2[1].value)
|
18589
|
-
});
|
18590
18583
|
var academy = useSelector(function (state) {
|
18591
18584
|
var _state$common;
|
18592
18585
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.academy;
|
@@ -18760,7 +18753,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
18760
18753
|
fontWeight: 600,
|
18761
18754
|
color: styles.gray_700
|
18762
18755
|
}
|
18763
|
-
}, resultData === null || resultData === void 0 ? void 0 : resultData.teacherName)))))),
|
18756
|
+
}, resultData === null || resultData === void 0 ? void 0 : resultData.teacherName)))))), !isShow || isShow(TabList$2[0].value) && React__default.createElement(Stack, {
|
18764
18757
|
display: "flex",
|
18765
18758
|
flexDirection: "column",
|
18766
18759
|
gap: "12px"
|
@@ -18774,7 +18767,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
18774
18767
|
data: resultData,
|
18775
18768
|
categories: categoryResponses,
|
18776
18769
|
isStudent: isStudent
|
18777
|
-
})),
|
18770
|
+
})), !isShow || isShow(TabList$2[1].value) && React__default.createElement(Stack, {
|
18778
18771
|
display: "flex",
|
18779
18772
|
flexDirection: "column",
|
18780
18773
|
gap: "12px",
|
@@ -18801,7 +18794,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
18801
18794
|
series: allSeries[index],
|
18802
18795
|
setIsRendered: setRenderedChart
|
18803
18796
|
});
|
18804
|
-
})),
|
18797
|
+
})), !isShow || isShow(TabList$2[2].value) && React__default.createElement(Stack, {
|
18805
18798
|
display: "flex",
|
18806
18799
|
flexDirection: "column",
|
18807
18800
|
gap: "12px",
|
@@ -18810,7 +18803,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
18810
18803
|
sx: textStyle
|
18811
18804
|
}, t$1(TabList$2[2].label)), React__default.createElement(CompareGrass, {
|
18812
18805
|
effectSize: effectSize
|
18813
|
-
})),
|
18806
|
+
})), !isShow || isShow(TabList$2[3].value) && React__default.createElement(Stack, {
|
18814
18807
|
display: "flex",
|
18815
18808
|
flexDirection: "column",
|
18816
18809
|
gap: "12px",
|
@@ -19644,7 +19637,6 @@ var useExamResultData = function useExamResultData(props) {
|
|
19644
19637
|
var _temp6 = _catch(function () {
|
19645
19638
|
return Promise.resolve(Promise.all([getChapterResultsApi(chapterId), getChapterResultsLongTimeSpendApi(chapterId), getChapterResultsEffectSizeApi(chapterId), getChapterResultsTimeOrderQuestionApi(chapterId), getChapterResultsCategoriesApi(chapterId)])).then(function (result) {
|
19646
19639
|
var _result$0$data3, _result$1$data3, _result$2$data3, _result$3$data3, _result$4$data3;
|
19647
|
-
console.log(result);
|
19648
19640
|
handleChangeTab === null || handleChangeTab === void 0 ? void 0 : handleChangeTab(0);
|
19649
19641
|
setDataChartIndex(0);
|
19650
19642
|
setTextbookResult((_result$0$data3 = result[0].data) === null || _result$0$data3 === void 0 ? void 0 : _result$0$data3.data);
|
@@ -20206,7 +20198,7 @@ var usePrintExamResult = function usePrintExamResult(isDataFetching, fileName, t
|
|
20206
20198
|
quality: 1
|
20207
20199
|
},
|
20208
20200
|
html2canvas: {
|
20209
|
-
scale:
|
20201
|
+
scale: 1.5
|
20210
20202
|
},
|
20211
20203
|
jsPDF: {
|
20212
20204
|
format: 'a4',
|
@@ -20908,12 +20900,10 @@ var usePrintView = function usePrintView(_ref) {
|
|
20908
20900
|
var search = window.location.search;
|
20909
20901
|
var query = new URLSearchParams(search);
|
20910
20902
|
var status = query.get('status') || '';
|
20911
|
-
var isPrintAll = status
|
20912
|
-
var isShow = function
|
20913
|
-
return (status === null || status === void 0 ? void 0 : status.split(',').
|
20914
|
-
|
20915
|
-
})) || false;
|
20916
|
-
};
|
20903
|
+
var isPrintAll = !(status !== null && status !== void 0 && status.length);
|
20904
|
+
var isShow = useCallback(function (value) {
|
20905
|
+
return isPrintAll || (status === null || status === void 0 ? void 0 : status.split(',').includes(value.toString()));
|
20906
|
+
}, [isPrintAll, status]);
|
20917
20907
|
var handelPrintSuccess = function handelPrintSuccess() {
|
20918
20908
|
var _window$opener$postMe, _window$opener;
|
20919
20909
|
var data;
|
@@ -21037,11 +21027,10 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
|
|
21037
21027
|
}),
|
21038
21028
|
fileName = _usePrintView.fileName,
|
21039
21029
|
isDone = _usePrintView.isDone,
|
21040
|
-
status = _usePrintView.status,
|
21041
21030
|
isShow = _usePrintView.isShow,
|
21042
21031
|
handelPrintSuccess = _usePrintView.handelPrintSuccess,
|
21043
21032
|
handelPrintError = _usePrintView.handelPrintError;
|
21044
|
-
var _usePrintExamResult = usePrintExamResult(isLoading, fileName, !
|
21033
|
+
var _usePrintExamResult = usePrintExamResult(isLoading, fileName, !isShow || isShow(TabList$2[1].value) ? timelyOrderQuestions.length : 0, handelPrintSuccess, handelPrintError, true),
|
21045
21034
|
contentRef = _usePrintExamResult.contentRef,
|
21046
21035
|
setRenderedChart = _usePrintExamResult.setRenderedChart;
|
21047
21036
|
var isTabletUp = useMediaQuery("(min-width:900px)");
|
@@ -21068,7 +21057,6 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
|
|
21068
21057
|
fileName: fileName,
|
21069
21058
|
isShow: isShow,
|
21070
21059
|
totalTime: totalTime,
|
21071
|
-
status: status,
|
21072
21060
|
setRenderedChart: setRenderedChart
|
21073
21061
|
}) : isLoading === undefined || isLoading === true ? React__default.createElement(LoadingComponent, {
|
21074
21062
|
isLoading: !!isLoading,
|