@focus-teach/ui 1.1.4 → 1.1.5
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/api/index.js +73 -69
- package/lib/ui.common.js +9569 -20184
- package/lib/ui.css +1 -1
- package/lib/ui.umd.js +9569 -20184
- package/lib/ui.umd.min.js +9 -17
- package/package.json +1 -1
package/api/index.js
CHANGED
|
@@ -64,9 +64,9 @@ export function getResourcePoolIndex(options, success, error) {
|
|
|
64
64
|
value: {
|
|
65
65
|
...res?.value,
|
|
66
66
|
ResourceSourceTypeList: res?.value?.ResourceSourceTypeList || [],
|
|
67
|
-
examTopicDto:res?.value?.examTopicDto,
|
|
68
|
-
examTopicDtos:res?.value?.examTopicDtos || [],
|
|
69
|
-
resourceShareCategoryTypeList:res?.value?.resourceShareCategoryTypeList || [],
|
|
67
|
+
examTopicDto: res?.value?.examTopicDto,
|
|
68
|
+
examTopicDtos: res?.value?.examTopicDtos || [],
|
|
69
|
+
resourceShareCategoryTypeList: res?.value?.resourceShareCategoryTypeList || [],
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
res = data
|
|
@@ -105,9 +105,9 @@ export function getResourcePoolList(options, success, error) {
|
|
|
105
105
|
(res) => {
|
|
106
106
|
let data = {
|
|
107
107
|
...res,
|
|
108
|
-
value:{
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
value: {
|
|
109
|
+
...res?.value,
|
|
110
|
+
result: res?.value?.result || [],
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
res = data
|
|
@@ -211,9 +211,9 @@ export function getProvince(options, success, error) {
|
|
|
211
211
|
.then((res) => {
|
|
212
212
|
let data = {
|
|
213
213
|
...res,
|
|
214
|
-
value:{
|
|
214
|
+
value: {
|
|
215
215
|
...res?.value,
|
|
216
|
-
countryList:res?.value?.countryList || [],
|
|
216
|
+
countryList: res?.value?.countryList || [],
|
|
217
217
|
},
|
|
218
218
|
}
|
|
219
219
|
res = data
|
|
@@ -248,9 +248,9 @@ export function getClassifications(options, success, error) {
|
|
|
248
248
|
(res) => {
|
|
249
249
|
let data = {
|
|
250
250
|
...res,
|
|
251
|
-
value:res?.value || [],
|
|
251
|
+
value: res?.value || [],
|
|
252
252
|
}
|
|
253
|
-
res= data
|
|
253
|
+
res = data
|
|
254
254
|
success && success(res);
|
|
255
255
|
},
|
|
256
256
|
(res) => {
|
|
@@ -267,7 +267,7 @@ export function getZoneList(options, success, error) {
|
|
|
267
267
|
...res,
|
|
268
268
|
value: res?.value || [],
|
|
269
269
|
}
|
|
270
|
-
res= data
|
|
270
|
+
res = data
|
|
271
271
|
success && success(res);
|
|
272
272
|
},
|
|
273
273
|
(res) => {
|
|
@@ -337,8 +337,8 @@ export function getBankData(options, success, error) {
|
|
|
337
337
|
...res,
|
|
338
338
|
value: {
|
|
339
339
|
...res?.value,
|
|
340
|
-
ItemBankQuery:res?.value?.ItemBankQuery,
|
|
341
|
-
itemInfoList:res?.value?.itemInfoList || [],
|
|
340
|
+
ItemBankQuery: res?.value?.ItemBankQuery,
|
|
341
|
+
itemInfoList: res?.value?.itemInfoList || [],
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
res = data
|
|
@@ -461,7 +461,11 @@ export function getQuestion(options, success, error) {
|
|
|
461
461
|
//获取题目
|
|
462
462
|
export function getQuestionApi(options) {
|
|
463
463
|
return new Promise((resolve) => {
|
|
464
|
-
axios.get(`/files/${options.itemId}?type=2
|
|
464
|
+
axios.get(`/files/${options.itemId}?type=2`, {
|
|
465
|
+
header: {
|
|
466
|
+
"Content-Type": "text/html;charset=UTF-8"
|
|
467
|
+
}
|
|
468
|
+
}).then(
|
|
465
469
|
(res) => {
|
|
466
470
|
resolve([null, res]);
|
|
467
471
|
},
|
|
@@ -517,7 +521,7 @@ export function getItemType(options, success, error) {
|
|
|
517
521
|
(res) => {
|
|
518
522
|
let data = {
|
|
519
523
|
...res,
|
|
520
|
-
value:res?.value || [],
|
|
524
|
+
value: res?.value || [],
|
|
521
525
|
}
|
|
522
526
|
res = data
|
|
523
527
|
success && success(res);
|
|
@@ -554,13 +558,13 @@ export function getMistakeIndex(options, success, error) {
|
|
|
554
558
|
let data = {
|
|
555
559
|
...res,
|
|
556
560
|
value: {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
561
|
+
...res?.value,
|
|
562
|
+
clazzGradeList: res?.value?.clazzGradeList || [],
|
|
563
|
+
difficultyList: res?.value?.difficultyList || [],
|
|
564
|
+
errorRateList: res?.value?.errorRateList || [],
|
|
565
|
+
examSourceList: res?.value?.examSourceList || [],
|
|
566
|
+
itemCategoryList: res?.value?.itemCategoryList || [],
|
|
567
|
+
termList: res?.value?.termList || [],
|
|
564
568
|
}
|
|
565
569
|
}
|
|
566
570
|
res = data
|
|
@@ -579,16 +583,16 @@ export function getMistakeData(options, success, error) {
|
|
|
579
583
|
}).then(
|
|
580
584
|
(res) => {
|
|
581
585
|
let data = {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
586
|
+
...res,
|
|
587
|
+
value: {
|
|
588
|
+
...res?.value,
|
|
589
|
+
chapterList: res?.value?.chapterList || [],
|
|
590
|
+
classId: res?.value?.classId,
|
|
591
|
+
errorRateId: res?.value?.errorRateId,
|
|
592
|
+
gradeId: res?.value?.gradeId,
|
|
593
|
+
knowledgeSource: res?.value?.knowledgeSource,
|
|
594
|
+
subjectId: res?.value?.subjectId,
|
|
595
|
+
},
|
|
592
596
|
}
|
|
593
597
|
res = data
|
|
594
598
|
success && success(res);
|
|
@@ -621,13 +625,13 @@ export function getMistakeNewItems(options, success, error) {
|
|
|
621
625
|
(res) => {
|
|
622
626
|
let data = {
|
|
623
627
|
...res,
|
|
624
|
-
value:{
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
628
|
+
value: {
|
|
629
|
+
...res?.value,
|
|
630
|
+
itemIds: res?.value?.itemIds || [],
|
|
631
|
+
commonPageDto: {
|
|
632
|
+
...res?.value?.commonPageDto,
|
|
633
|
+
lists: res?.value?.commonPageDto?.lists || [],
|
|
634
|
+
}
|
|
631
635
|
}
|
|
632
636
|
}
|
|
633
637
|
res = data
|
|
@@ -718,7 +722,7 @@ export function getExamStatistics(options, success, error) {
|
|
|
718
722
|
(res) => {
|
|
719
723
|
let data = {
|
|
720
724
|
...res,
|
|
721
|
-
value:res?.value || [],
|
|
725
|
+
value: res?.value || [],
|
|
722
726
|
}
|
|
723
727
|
res = data
|
|
724
728
|
success && success(res);
|
|
@@ -836,7 +840,7 @@ export function getTeachaidListApi(options, success, error) {
|
|
|
836
840
|
axios.get(`/teach-aid/list/data`, { params: options }).then(res => {
|
|
837
841
|
let data = {
|
|
838
842
|
...res,
|
|
839
|
-
value:res?.value || [],
|
|
843
|
+
value: res?.value || [],
|
|
840
844
|
}
|
|
841
845
|
res = data
|
|
842
846
|
resolve([null, res])
|
|
@@ -857,10 +861,10 @@ export function getTeachaidYearGrade(options, success, error) {
|
|
|
857
861
|
(res) => {
|
|
858
862
|
let data = {
|
|
859
863
|
...res,
|
|
860
|
-
value:{
|
|
864
|
+
value: {
|
|
861
865
|
...res?.value,
|
|
862
|
-
clazzGradeDtos:res?.value?.clazzGradeDtos || [],
|
|
863
|
-
schoolYears:res?.value?.schoolYears || [],
|
|
866
|
+
clazzGradeDtos: res?.value?.clazzGradeDtos || [],
|
|
867
|
+
schoolYears: res?.value?.schoolYears || [],
|
|
864
868
|
}
|
|
865
869
|
}
|
|
866
870
|
res = data
|
|
@@ -894,7 +898,7 @@ export function getTeachaidCatalogue(options, success, error) {
|
|
|
894
898
|
(res) => {
|
|
895
899
|
let data = {
|
|
896
900
|
...res,
|
|
897
|
-
value:res?.value || [],
|
|
901
|
+
value: res?.value || [],
|
|
898
902
|
}
|
|
899
903
|
res = data
|
|
900
904
|
resolve([null, res])
|
|
@@ -913,7 +917,7 @@ export function getTeachaidPaper(options, success, error) {
|
|
|
913
917
|
(res) => {
|
|
914
918
|
let data = {
|
|
915
919
|
...res,
|
|
916
|
-
value:res?.value || [],
|
|
920
|
+
value: res?.value || [],
|
|
917
921
|
}
|
|
918
922
|
res = data
|
|
919
923
|
resolve([null, res])
|
|
@@ -959,9 +963,9 @@ export function addPaper(options) {
|
|
|
959
963
|
value: {
|
|
960
964
|
...res?.value,
|
|
961
965
|
coreResourceCfgDto: res?.value?.coreResourceCfgDto,
|
|
962
|
-
exam:res?.value?.exam,
|
|
963
|
-
itemList:res?.value?.itemList || [],
|
|
964
|
-
layoutJson:res?.value?.layoutJson
|
|
966
|
+
exam: res?.value?.exam,
|
|
967
|
+
itemList: res?.value?.itemList || [],
|
|
968
|
+
layoutJson: res?.value?.layoutJson
|
|
965
969
|
}
|
|
966
970
|
}
|
|
967
971
|
res = data
|
|
@@ -981,12 +985,12 @@ export function getExamQuestion(options) {
|
|
|
981
985
|
(res) => {
|
|
982
986
|
let data = {
|
|
983
987
|
...res,
|
|
984
|
-
value:{
|
|
988
|
+
value: {
|
|
985
989
|
...res?.value,
|
|
986
|
-
examCardInfoDto:res?.value?.examCardInfoDto,
|
|
987
|
-
examCardItemResultDtoList:res?.value?.examCardItemResultDtoList || [],
|
|
988
|
-
layout:res?.value?.layout,
|
|
989
|
-
layoutJson:res?.value?.layoutJson,
|
|
990
|
+
examCardInfoDto: res?.value?.examCardInfoDto,
|
|
991
|
+
examCardItemResultDtoList: res?.value?.examCardItemResultDtoList || [],
|
|
992
|
+
layout: res?.value?.layout,
|
|
993
|
+
layoutJson: res?.value?.layoutJson,
|
|
990
994
|
}
|
|
991
995
|
}
|
|
992
996
|
res = data
|
|
@@ -1058,7 +1062,7 @@ export function getCategoryList(params) {
|
|
|
1058
1062
|
axios.get('/item/common/category/list', { params }).then(res => {
|
|
1059
1063
|
let data = {
|
|
1060
1064
|
...res,
|
|
1061
|
-
value:res?.value || [],
|
|
1065
|
+
value: res?.value || [],
|
|
1062
1066
|
}
|
|
1063
1067
|
res = data
|
|
1064
1068
|
resolve([null, res])
|
|
@@ -1212,7 +1216,7 @@ export function getVariantList(options) {
|
|
|
1212
1216
|
(res) => {
|
|
1213
1217
|
let data = {
|
|
1214
1218
|
...res,
|
|
1215
|
-
value:res?.value || [],
|
|
1219
|
+
value: res?.value || [],
|
|
1216
1220
|
}
|
|
1217
1221
|
res = data
|
|
1218
1222
|
resolve([null, res])
|
|
@@ -1511,7 +1515,7 @@ export function checkScoreRuleApi(options) {
|
|
|
1511
1515
|
})
|
|
1512
1516
|
}
|
|
1513
1517
|
|
|
1514
|
-
export function setHtml2Ocr(options,param) {
|
|
1518
|
+
export function setHtml2Ocr(options, param) {
|
|
1515
1519
|
const apiAxios = axios.create({
|
|
1516
1520
|
// baseURL: '/ocr',
|
|
1517
1521
|
timeout: 30000,
|
|
@@ -1520,21 +1524,21 @@ export function setHtml2Ocr(options,param) {
|
|
|
1520
1524
|
});
|
|
1521
1525
|
let params = qs.stringify(param)
|
|
1522
1526
|
return new Promise((resolve) => {
|
|
1523
|
-
apiAxios.post("http:///10.110.6.72:8000/ocr_image?"+params, options).then(
|
|
1527
|
+
apiAxios.post("http:///10.110.6.72:8000/ocr_image?" + params, options).then(
|
|
1524
1528
|
(res) => {
|
|
1525
|
-
let arr = [],strList = []
|
|
1526
|
-
if(res?.data?.message && typeof res?.data?.message == 'string') arr = JSON.parse(res?.data?.message ?? '[]')
|
|
1527
|
-
if(arr?.length){
|
|
1529
|
+
let arr = [], strList = []
|
|
1530
|
+
if (res?.data?.message && typeof res?.data?.message == 'string') arr = JSON.parse(res?.data?.message ?? '[]')
|
|
1531
|
+
if (arr?.length) {
|
|
1528
1532
|
let flatList = arr.flat(Infinity)
|
|
1529
|
-
flatList?.map(item=>{
|
|
1530
|
-
|
|
1533
|
+
flatList?.map(item => {
|
|
1534
|
+
if (typeof item == 'string') strList.push(item)
|
|
1531
1535
|
})
|
|
1532
1536
|
}
|
|
1533
|
-
console.log('strList',strList)
|
|
1534
|
-
resolve([null,strList?.join()]);
|
|
1537
|
+
console.log('strList', strList)
|
|
1538
|
+
resolve([null, strList?.join()]);
|
|
1535
1539
|
},
|
|
1536
1540
|
(err) => {
|
|
1537
|
-
resolve([err,null]);
|
|
1541
|
+
resolve([err, null]);
|
|
1538
1542
|
}
|
|
1539
1543
|
);
|
|
1540
1544
|
})
|
|
@@ -1542,13 +1546,13 @@ export function setHtml2Ocr(options,param) {
|
|
|
1542
1546
|
|
|
1543
1547
|
/* 调百度ocr接口将图片转文字 */
|
|
1544
1548
|
export function getOcrToText(options) {
|
|
1545
|
-
|
|
1549
|
+
return new Promise((resolve) => {
|
|
1546
1550
|
axios.post("/ybk/baidu-ocr", options).then(
|
|
1547
1551
|
(res) => {
|
|
1548
|
-
resolve([null,res?.value ?? '']);
|
|
1552
|
+
resolve([null, res?.value ?? '']);
|
|
1549
1553
|
},
|
|
1550
1554
|
(err) => {
|
|
1551
|
-
resolve([err,null]);
|
|
1555
|
+
resolve([err, null]);
|
|
1552
1556
|
}
|
|
1553
1557
|
);
|
|
1554
1558
|
});
|