@focus-teach/ui 1.0.60 → 1.1.0
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 +669 -412
- package/lib/ui.common.js +2010 -1227
- package/lib/ui.css +1 -1
- package/lib/ui.umd.js +2010 -1227
- package/lib/ui.umd.min.js +8 -8
- package/package.json +1 -1
package/api/index.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import qs from "qs";
|
|
6
|
-
|
|
6
|
+
import { Message } from 'element-ui';
|
|
7
7
|
const VUE_APP_SSO_LOGIN_URL = 'http://ssoedu.focusteach.com/sso/authentication/require?client_id=focusteachsmartclass&equipmentType=epxIumhmRz0'
|
|
8
|
-
|
|
8
|
+
let timer = null
|
|
9
9
|
let token = "";
|
|
10
10
|
axios.defaults.timeout = 30000;
|
|
11
11
|
//axios请求时,如果不显示的设置Content-Type,那么默认是text/plain,这时服务器就不知道怎么解析数据
|
|
@@ -15,57 +15,76 @@ axios.defaults.crossDomain = true;
|
|
|
15
15
|
axios.defaults.withCredentials = true; //设置cross跨域
|
|
16
16
|
axios.defaults.baseURL = window.location.port && window.location.port != 8085 && window.location.port != 8086 ? '/backend' : ''
|
|
17
17
|
axios.interceptors.request.use(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
(config) => {
|
|
19
|
+
if (config.method === "post") {
|
|
20
|
+
let data = qs.parse(config.data);
|
|
21
|
+
config.data = qs.stringify({
|
|
22
|
+
// token: token,
|
|
23
|
+
...data,
|
|
24
|
+
}, {
|
|
25
|
+
arrayFormat: "brackets"
|
|
26
|
+
});
|
|
27
|
+
} else if (config.method === "get") {
|
|
28
|
+
config.params = {
|
|
29
|
+
// token: token,
|
|
30
|
+
...config.params,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//判断没网的情况下 只提示一次
|
|
34
|
+
if (!timer && !navigator.onLine) {
|
|
35
|
+
Message({ message: '网络异常,请检查网络', type: 'error' })
|
|
36
|
+
timer = setTimeout(() => {
|
|
37
|
+
timer = null
|
|
38
|
+
clearTimeout(timer)
|
|
39
|
+
}, 2000)
|
|
40
|
+
}
|
|
41
|
+
return config;
|
|
42
|
+
},
|
|
43
|
+
(error) => { }
|
|
36
44
|
);
|
|
37
45
|
|
|
38
46
|
axios.interceptors.response.use(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
(res) => {
|
|
48
|
+
if ((res.data && res.data.code == '1005') || res.code == "10005") {
|
|
49
|
+
//跳转到登录页
|
|
50
|
+
window.location.href = VUE_APP_SSO_LOGIN_URL;
|
|
51
|
+
// return false
|
|
52
|
+
}
|
|
53
|
+
return res.data || res;
|
|
54
|
+
},
|
|
55
|
+
(error) => { }
|
|
48
56
|
);
|
|
49
57
|
|
|
50
58
|
//资源库-首页接口
|
|
51
59
|
export function getResourcePoolIndex(options, success, error) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
axios.get("/resource/pool/index", { params: options }).then(
|
|
61
|
+
(res) => {
|
|
62
|
+
let data = {
|
|
63
|
+
...res,
|
|
64
|
+
value: {
|
|
65
|
+
...res?.value,
|
|
66
|
+
ResourceSourceTypeList: res?.value?.ResourceSourceTypeList || [],
|
|
67
|
+
examTopicDto:res?.value?.examTopicDto,
|
|
68
|
+
examTopicDtos:res?.value?.examTopicDtos || [],
|
|
69
|
+
resourceShareCategoryTypeList:res?.value?.resourceShareCategoryTypeList || [],
|
|
58
70
|
}
|
|
59
|
-
|
|
71
|
+
}
|
|
72
|
+
res = data
|
|
73
|
+
success && success(res);
|
|
74
|
+
},
|
|
75
|
+
(res) => {
|
|
76
|
+
error && error(res);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
60
79
|
}
|
|
61
80
|
export function getEditorData(options, success, error) {
|
|
62
81
|
axios.get('/ybk/editor/data', { params: options }).then(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
(res) => {
|
|
83
|
+
success && success(res);
|
|
84
|
+
},
|
|
85
|
+
(res) => {
|
|
86
|
+
error && error(res);
|
|
87
|
+
}
|
|
69
88
|
);
|
|
70
89
|
}
|
|
71
90
|
|
|
@@ -82,28 +101,43 @@ export function aWaitGetGradeList(options, success, error) {
|
|
|
82
101
|
}
|
|
83
102
|
//资源库-分页接口
|
|
84
103
|
export function getResourcePoolList(options, success, error) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
104
|
+
axios.get("/resource/pool/list", { params: options }).then(
|
|
105
|
+
(res) => {
|
|
106
|
+
let data = {
|
|
107
|
+
...res,
|
|
108
|
+
value:{
|
|
109
|
+
...res?.value,
|
|
110
|
+
result:res?.value?.result || [],
|
|
91
111
|
}
|
|
92
|
-
|
|
112
|
+
}
|
|
113
|
+
res = data
|
|
114
|
+
success && success(res);
|
|
115
|
+
},
|
|
116
|
+
(res) => {
|
|
117
|
+
error && error(res);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
93
120
|
}
|
|
94
121
|
|
|
95
122
|
//同步练习>试卷编辑>教材版本(张磊)
|
|
96
123
|
export function getMaterialsGrades(options, success, error) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
124
|
+
axios.get("/ybk/item/materialsGrades", {
|
|
125
|
+
params: options
|
|
126
|
+
}).then(
|
|
127
|
+
(res) => {
|
|
128
|
+
let data = {
|
|
129
|
+
...res,
|
|
130
|
+
value: res?.value,
|
|
131
|
+
checkTeachMaterialId: res?.value?.checkTeachMaterialId,
|
|
132
|
+
list: res?.value?.list || [],
|
|
133
|
+
}
|
|
134
|
+
res = data
|
|
135
|
+
success && success(res);
|
|
136
|
+
},
|
|
137
|
+
(res) => {
|
|
138
|
+
error && error(res);
|
|
139
|
+
}
|
|
140
|
+
);
|
|
107
141
|
}
|
|
108
142
|
//同步练习>试卷编辑>教材版本(张磊)
|
|
109
143
|
export function getMaterialsGradesApi(options) {
|
|
@@ -112,6 +146,13 @@ export function getMaterialsGradesApi(options) {
|
|
|
112
146
|
params: options
|
|
113
147
|
}).then(
|
|
114
148
|
(res) => {
|
|
149
|
+
let data = {
|
|
150
|
+
...res,
|
|
151
|
+
value: res?.value,
|
|
152
|
+
checkTeachMaterialId: res?.value?.checkTeachMaterialId,
|
|
153
|
+
list: res?.value?.list || [],
|
|
154
|
+
}
|
|
155
|
+
res = data
|
|
115
156
|
resolve([null, res])
|
|
116
157
|
},
|
|
117
158
|
(err) => {
|
|
@@ -123,16 +164,23 @@ export function getMaterialsGradesApi(options) {
|
|
|
123
164
|
|
|
124
165
|
//同步练习>试卷编辑>课程集合(张磊)
|
|
125
166
|
export function getEditorCourse(options, success, error) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
167
|
+
axios.get("/ybk/item/course", {
|
|
168
|
+
params: options
|
|
169
|
+
}).then(
|
|
170
|
+
(res) => {
|
|
171
|
+
let data = {
|
|
172
|
+
...res,
|
|
173
|
+
value: res?.value,
|
|
174
|
+
checkTeachMaterialId: res?.value?.checkTeachMaterialId,
|
|
175
|
+
list: res?.value?.list || [],
|
|
176
|
+
}
|
|
177
|
+
res = data
|
|
178
|
+
success && success(res);
|
|
179
|
+
},
|
|
180
|
+
(res) => {
|
|
181
|
+
error && error(res);
|
|
182
|
+
}
|
|
183
|
+
);
|
|
136
184
|
}
|
|
137
185
|
//同步练习>试卷编辑>课程集合(张磊)
|
|
138
186
|
export function getEditorCourseApi(options) {
|
|
@@ -141,6 +189,13 @@ export function getEditorCourseApi(options) {
|
|
|
141
189
|
params: options
|
|
142
190
|
}).then(
|
|
143
191
|
(res) => {
|
|
192
|
+
let data = {
|
|
193
|
+
...res,
|
|
194
|
+
value: res?.value,
|
|
195
|
+
checkTeachMaterialId: res?.value?.checkTeachMaterialId,
|
|
196
|
+
list: res?.value?.list || [],
|
|
197
|
+
}
|
|
198
|
+
res = data
|
|
144
199
|
resolve([null, res])
|
|
145
200
|
},
|
|
146
201
|
(err) => {
|
|
@@ -152,93 +207,111 @@ export function getEditorCourseApi(options) {
|
|
|
152
207
|
|
|
153
208
|
//通用-获取国家省市
|
|
154
209
|
export function getProvince(options, success, error) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
210
|
+
axios.get("/region/common/index", { params: options })
|
|
211
|
+
.then((res) => {
|
|
212
|
+
let data = {
|
|
213
|
+
...res,
|
|
214
|
+
value:{
|
|
215
|
+
...res?.value,
|
|
216
|
+
countryList:res?.value?.countryList || [],
|
|
217
|
+
},
|
|
218
|
+
}
|
|
219
|
+
res = data
|
|
220
|
+
success && success(res)
|
|
221
|
+
}, (res) => {
|
|
222
|
+
error && error(res)
|
|
223
|
+
})
|
|
161
224
|
}
|
|
162
225
|
|
|
163
226
|
//【同步】hq_studyfun 获取历史记录 2云备课,3智慧教学
|
|
164
227
|
export function getUserOperate(options, success, error) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
228
|
+
return axios.get("/user/operate/get", {
|
|
229
|
+
params: options
|
|
230
|
+
});
|
|
168
231
|
}
|
|
169
232
|
|
|
170
233
|
//hq_studyfun 保存记录 2云备课,3智慧教学
|
|
171
234
|
export function setUserOperate(options, success, error) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
235
|
+
axios.post("/user/operate/save", options).then(
|
|
236
|
+
(res) => {
|
|
237
|
+
success && success(res);
|
|
238
|
+
},
|
|
239
|
+
(res) => {
|
|
240
|
+
error && error(res);
|
|
241
|
+
}
|
|
242
|
+
);
|
|
180
243
|
}
|
|
181
244
|
|
|
182
245
|
//获取册别
|
|
183
246
|
export function getClassifications(options, success, error) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
247
|
+
axios.get("/ybk/editor/classifications", { params: options }).then(
|
|
248
|
+
(res) => {
|
|
249
|
+
let data = {
|
|
250
|
+
...res,
|
|
251
|
+
value:res?.value || [],
|
|
252
|
+
}
|
|
253
|
+
res= data
|
|
254
|
+
success && success(res);
|
|
255
|
+
},
|
|
256
|
+
(res) => {
|
|
257
|
+
error && error(res);
|
|
258
|
+
}
|
|
259
|
+
);
|
|
192
260
|
}
|
|
193
261
|
|
|
194
262
|
//云备课左侧全部课程专区接口:
|
|
195
263
|
export function getZoneList(options, success, error) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
264
|
+
axios.get("/ybk/editor/zone", { params: options }).then(
|
|
265
|
+
(res) => {
|
|
266
|
+
let data = {
|
|
267
|
+
...res,
|
|
268
|
+
value: res?.value || [],
|
|
269
|
+
}
|
|
270
|
+
res= data
|
|
271
|
+
success && success(res);
|
|
272
|
+
},
|
|
273
|
+
(res) => {
|
|
274
|
+
error && error(res);
|
|
275
|
+
}
|
|
276
|
+
);
|
|
204
277
|
}
|
|
205
278
|
|
|
206
279
|
//通用-根据省份获取城市信息【USP】(张磊>chenxianyong)
|
|
207
280
|
export function getAreas(options, success, error) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
281
|
+
axios.get("/region/common/areas", {
|
|
282
|
+
params: options
|
|
283
|
+
}).then(
|
|
284
|
+
(res) => {
|
|
285
|
+
success && success(res);
|
|
286
|
+
},
|
|
287
|
+
(res) => {
|
|
288
|
+
error && error(res);
|
|
289
|
+
}
|
|
290
|
+
);
|
|
218
291
|
}
|
|
219
292
|
// 获取全品题目科目ID
|
|
220
293
|
export function getQptkSubjectID(options, success, error) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
294
|
+
axios.get("/qptk/subject", { params: options }).then(
|
|
295
|
+
(res) => {
|
|
296
|
+
success && success(res);
|
|
297
|
+
},
|
|
298
|
+
(res) => {
|
|
299
|
+
error && error(res);
|
|
300
|
+
}
|
|
301
|
+
);
|
|
229
302
|
}
|
|
230
303
|
//题库列表查询【USP】(chenxianyong)
|
|
231
304
|
export function getBankIndex(options, success, error) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
305
|
+
axios.get("/ybk/item/index", {
|
|
306
|
+
params: options
|
|
307
|
+
}).then((res) => {
|
|
308
|
+
success && success(res);
|
|
309
|
+
},
|
|
310
|
+
(err) => {
|
|
311
|
+
error && error(err);
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
}
|
|
242
315
|
//题库列表查询【USP】(chenxianyong)
|
|
243
316
|
export function getBankIndexApi(options) {
|
|
244
317
|
return new Promise(resolve => {
|
|
@@ -254,65 +327,84 @@ export function getBankIndexApi(options) {
|
|
|
254
327
|
);
|
|
255
328
|
})
|
|
256
329
|
}
|
|
257
|
-
|
|
330
|
+
//题库分页查询【USP】(chenxianyong)
|
|
258
331
|
export function getBankData(options, success, error) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
332
|
+
axios.get("/ybk/item/bank", {
|
|
333
|
+
params: options
|
|
334
|
+
}).then(
|
|
335
|
+
(res) => {
|
|
336
|
+
let data = {
|
|
337
|
+
...res,
|
|
338
|
+
value: {
|
|
339
|
+
...res?.value,
|
|
340
|
+
ItemBankQuery:res?.value?.ItemBankQuery,
|
|
341
|
+
itemInfoList:res?.value?.itemInfoList || [],
|
|
342
|
+
}
|
|
267
343
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
344
|
+
res = data
|
|
345
|
+
success && success(res);
|
|
346
|
+
},
|
|
347
|
+
(res) => {
|
|
348
|
+
error && error(res);
|
|
349
|
+
}
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
//题库分页查询【USP】(chenxianyong)
|
|
271
353
|
export function getBankDataApi(options) {
|
|
272
|
-
return new Promise(resolve=> {
|
|
354
|
+
return new Promise(resolve => {
|
|
273
355
|
axios.get("/ybk/item/bank", {
|
|
274
356
|
params: options
|
|
275
357
|
}).then(
|
|
276
358
|
(res) => {
|
|
277
|
-
resolve([null,res])
|
|
359
|
+
resolve([null, res])
|
|
278
360
|
},
|
|
279
361
|
(err) => {
|
|
280
|
-
resolve([err,null])
|
|
362
|
+
resolve([err, null])
|
|
281
363
|
}
|
|
282
364
|
);
|
|
283
365
|
})
|
|
284
366
|
}
|
|
285
|
-
|
|
367
|
+
//通用-获取知识点【后台管理】(chenxianyong)
|
|
286
368
|
export function getKnowledge(options, success, error) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
369
|
+
axios.get("/item/common/kl", {
|
|
370
|
+
params: options
|
|
371
|
+
}).then(
|
|
372
|
+
(res) => {
|
|
373
|
+
success && success(res);
|
|
374
|
+
},
|
|
375
|
+
(res) => {
|
|
376
|
+
error && error(res);
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
//通用-获取专题【USP】(张磊>chenxianyong)
|
|
299
381
|
export function getTopic(options, success, error) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
382
|
+
axios.get("/ybk/item/topic", {
|
|
383
|
+
params: options
|
|
384
|
+
})
|
|
385
|
+
.then((res) => {
|
|
386
|
+
let data = {
|
|
387
|
+
...res,
|
|
388
|
+
value: res?.value || [],
|
|
389
|
+
}
|
|
390
|
+
res = data
|
|
391
|
+
success && success(res)
|
|
392
|
+
}, (res) => {
|
|
393
|
+
error && error(res)
|
|
394
|
+
})
|
|
395
|
+
}
|
|
396
|
+
//通用-获取专题【USP】(张磊>chenxianyong)
|
|
310
397
|
export function getTopicApi(options) {
|
|
311
398
|
return new Promise(resolve => {
|
|
312
399
|
axios.get("/ybk/item/topic", {
|
|
313
400
|
params: options
|
|
314
401
|
}).then(
|
|
315
402
|
(res) => {
|
|
403
|
+
let data = {
|
|
404
|
+
...res,
|
|
405
|
+
value: res?.value || [],
|
|
406
|
+
}
|
|
407
|
+
res = data
|
|
316
408
|
resolve([null, res])
|
|
317
409
|
},
|
|
318
410
|
(err) => {
|
|
@@ -323,15 +415,15 @@ export function getTopicApi(options) {
|
|
|
323
415
|
}
|
|
324
416
|
//难度知识点是否必填【hq_studyfun】(sunqb)
|
|
325
417
|
export function getKldftNecessary(options, success, error) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
418
|
+
axios.get("/kldft/necessary", {
|
|
419
|
+
params: options
|
|
420
|
+
})
|
|
421
|
+
.then((res) => {
|
|
422
|
+
success && success(res)
|
|
423
|
+
}, (res) => {
|
|
424
|
+
error && error(res)
|
|
425
|
+
})
|
|
426
|
+
}
|
|
335
427
|
//难度知识点是否必填【hq_studyfun】(sunqb)
|
|
336
428
|
export function getKldftNecessaryApi(options) {
|
|
337
429
|
return new Promise(resolve => {
|
|
@@ -350,72 +442,72 @@ export function getKldftNecessaryApi(options) {
|
|
|
350
442
|
|
|
351
443
|
//获取题目
|
|
352
444
|
export function getQuestion(options, success, error) {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
(res) => {
|
|
359
|
-
// console.log('全品题目',res);
|
|
360
|
-
success && success(res);
|
|
361
|
-
resolve(res);
|
|
362
|
-
},
|
|
363
|
-
(res) => {
|
|
364
|
-
error && error(res);
|
|
365
|
-
}
|
|
366
|
-
);
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
//获取题目
|
|
370
|
-
export function getQuestionApi(options) {
|
|
371
|
-
return new Promise((resolve) => {
|
|
372
|
-
axios.get(`/files/${options.itemId}?type=2`).then(
|
|
373
|
-
(res) => {
|
|
374
|
-
resolve([null, res]);
|
|
375
|
-
},
|
|
376
|
-
(err) => {
|
|
377
|
-
resolve([err, null]);
|
|
378
|
-
}
|
|
379
|
-
);
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
export function getTitleHtml(options, params) {
|
|
383
|
-
return new Promise((resolve) => {
|
|
384
|
-
axios.get(`/files/${options.itemId}?type=2`, params, {
|
|
385
|
-
header: {
|
|
386
|
-
"Content-Type": "text/html;charset=UTF-8"
|
|
387
|
-
}
|
|
388
|
-
}).then(res => {
|
|
389
|
-
resolve([null, res])
|
|
390
|
-
}).catch(err => {
|
|
391
|
-
resolve([err, null])
|
|
392
|
-
})
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
//通用-获取单题的答案与解析【后台管理】(chenxianyong)
|
|
396
|
-
export function getAnswer(options, success, error) {
|
|
397
|
-
axios.get("/ybk/item/detail", {
|
|
398
|
-
params: options
|
|
399
|
-
}).then(
|
|
445
|
+
return new Promise((resolve) => {
|
|
446
|
+
// const instance = axios.create();
|
|
447
|
+
// instance.defaults.headers.post["Content-Type"] = "text/html;charset=UTF-8";
|
|
448
|
+
// instance.defaults.responseType = 'json'
|
|
449
|
+
axios.get(`/files/${options.itemId}?type=2`).then(
|
|
400
450
|
(res) => {
|
|
451
|
+
// console.log('全品题目',res);
|
|
401
452
|
success && success(res);
|
|
453
|
+
resolve(res);
|
|
402
454
|
},
|
|
403
455
|
(res) => {
|
|
404
456
|
error && error(res);
|
|
405
457
|
}
|
|
406
458
|
);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
//获取题目
|
|
462
|
+
export function getQuestionApi(options) {
|
|
463
|
+
return new Promise((resolve) => {
|
|
464
|
+
axios.get(`/files/${options.itemId}?type=2`).then(
|
|
411
465
|
(res) => {
|
|
412
|
-
|
|
466
|
+
resolve([null, res]);
|
|
413
467
|
},
|
|
414
|
-
(
|
|
415
|
-
|
|
468
|
+
(err) => {
|
|
469
|
+
resolve([err, null]);
|
|
416
470
|
}
|
|
417
471
|
);
|
|
418
|
-
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
export function getTitleHtml(options, params) {
|
|
475
|
+
return new Promise((resolve) => {
|
|
476
|
+
axios.get(`/files/${options.itemId}?type=2`, params, {
|
|
477
|
+
header: {
|
|
478
|
+
"Content-Type": "text/html;charset=UTF-8"
|
|
479
|
+
}
|
|
480
|
+
}).then(res => {
|
|
481
|
+
resolve([null, res])
|
|
482
|
+
}).catch(err => {
|
|
483
|
+
resolve([err, null])
|
|
484
|
+
})
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
//通用-获取单题的答案与解析【后台管理】(chenxianyong)
|
|
488
|
+
export function getAnswer(options, success, error) {
|
|
489
|
+
axios.get("/ybk/item/detail", {
|
|
490
|
+
params: options
|
|
491
|
+
}).then(
|
|
492
|
+
(res) => {
|
|
493
|
+
success && success(res);
|
|
494
|
+
},
|
|
495
|
+
(res) => {
|
|
496
|
+
error && error(res);
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
//试卷编辑>引用题目(张磊)
|
|
501
|
+
export function quoteQuestion(options, success, error) {
|
|
502
|
+
axios.post("/ybk/item/quote", options).then(
|
|
503
|
+
(res) => {
|
|
504
|
+
success && success(res);
|
|
505
|
+
},
|
|
506
|
+
(res) => {
|
|
507
|
+
error && error(res);
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
}
|
|
419
511
|
//获取题目类别
|
|
420
512
|
export function getItemType(options, success, error) {
|
|
421
513
|
//参数subjectId
|
|
@@ -423,6 +515,11 @@ export function getItemType(options, success, error) {
|
|
|
423
515
|
params: options
|
|
424
516
|
}).then(
|
|
425
517
|
(res) => {
|
|
518
|
+
let data = {
|
|
519
|
+
...res,
|
|
520
|
+
value:res?.value || [],
|
|
521
|
+
}
|
|
522
|
+
res = data
|
|
426
523
|
success && success(res);
|
|
427
524
|
return Promise.resolve(res);
|
|
428
525
|
},
|
|
@@ -454,6 +551,19 @@ export function getMistakeIndex(options, success, error) {
|
|
|
454
551
|
params: options
|
|
455
552
|
}).then(
|
|
456
553
|
(res) => {
|
|
554
|
+
let data = {
|
|
555
|
+
...res,
|
|
556
|
+
value: {
|
|
557
|
+
...res?.value,
|
|
558
|
+
clazzGradeList:res?.value?.clazzGradeList || [],
|
|
559
|
+
difficultyList:res?.value?.difficultyList || [],
|
|
560
|
+
errorRateList:res?.value?.errorRateList || [],
|
|
561
|
+
examSourceList:res?.value?.examSourceList || [],
|
|
562
|
+
itemCategoryList:res?.value?.itemCategoryList || [],
|
|
563
|
+
termList:res?.value?.termList || [],
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
res = data
|
|
457
567
|
success && success(res);
|
|
458
568
|
},
|
|
459
569
|
(res) => {
|
|
@@ -468,6 +578,19 @@ export function getMistakeData(options, success, error) {
|
|
|
468
578
|
params: options
|
|
469
579
|
}).then(
|
|
470
580
|
(res) => {
|
|
581
|
+
let data = {
|
|
582
|
+
...res,
|
|
583
|
+
value:{
|
|
584
|
+
...res?.value,
|
|
585
|
+
chapterList:res?.value?.chapterList || [],
|
|
586
|
+
classId:res?.value?.classId,
|
|
587
|
+
errorRateId:res?.value?.errorRateId,
|
|
588
|
+
gradeId:res?.value?.gradeId,
|
|
589
|
+
knowledgeSource:res?.value?.knowledgeSource,
|
|
590
|
+
subjectId:res?.value?.subjectId,
|
|
591
|
+
},
|
|
592
|
+
}
|
|
593
|
+
res = data
|
|
471
594
|
success && success(res);
|
|
472
595
|
},
|
|
473
596
|
(res) => {
|
|
@@ -496,6 +619,18 @@ export function getMistakeNewItems(options, success, error) {
|
|
|
496
619
|
params: options
|
|
497
620
|
}).then(
|
|
498
621
|
(res) => {
|
|
622
|
+
let data = {
|
|
623
|
+
...res,
|
|
624
|
+
value:{
|
|
625
|
+
...res?.value,
|
|
626
|
+
itemIds:res?.value?.itemIds || [],
|
|
627
|
+
commonPageDto:{
|
|
628
|
+
...res?.value?.commonPageDto,
|
|
629
|
+
lists:res?.value?.commonPageDto?.lists || [],
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
res = data
|
|
499
634
|
success && success(res);
|
|
500
635
|
},
|
|
501
636
|
(res) => {
|
|
@@ -536,13 +671,13 @@ export function quoteWrongQuestion(options, success, error) {
|
|
|
536
671
|
}
|
|
537
672
|
|
|
538
673
|
//根据试卷id,题目id获取变式题
|
|
539
|
-
export function getVariantListbyqdui(options,success,error){
|
|
674
|
+
export function getVariantListbyqdui(options, success, error) {
|
|
540
675
|
return axios.get("/ybk/variant/list", { params: options }).then(
|
|
541
676
|
(res) => {
|
|
542
|
-
|
|
677
|
+
success && success(res);
|
|
543
678
|
},
|
|
544
679
|
(res) => {
|
|
545
|
-
|
|
680
|
+
error(res);
|
|
546
681
|
}
|
|
547
682
|
);
|
|
548
683
|
}
|
|
@@ -550,15 +685,15 @@ export function getVariantListbyqdui(options,success,error){
|
|
|
550
685
|
//获取资源分享 的类型list
|
|
551
686
|
export function reqShareCategoryTypeList(options, success, error) {
|
|
552
687
|
axios.get("/ybk/resource/share", {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
688
|
+
params: options
|
|
689
|
+
}).then(
|
|
690
|
+
(res) => {
|
|
691
|
+
success && success(res);
|
|
692
|
+
},
|
|
693
|
+
(res) => {
|
|
694
|
+
error && error(res);
|
|
695
|
+
}
|
|
696
|
+
)
|
|
562
697
|
.catch(() => {
|
|
563
698
|
error();
|
|
564
699
|
});
|
|
@@ -576,27 +711,32 @@ export function doShareExam(options, success, error) {
|
|
|
576
711
|
);
|
|
577
712
|
}
|
|
578
713
|
//获取试卷概述统计
|
|
579
|
-
export function getExamStatistics
|
|
714
|
+
export function getExamStatistics(options, success, error) {
|
|
580
715
|
axios.get("/ybk/editor/exam/title", {
|
|
581
716
|
params: options
|
|
582
717
|
}).then(
|
|
583
718
|
(res) => {
|
|
719
|
+
let data = {
|
|
720
|
+
...res,
|
|
721
|
+
value:res?.value || [],
|
|
722
|
+
}
|
|
723
|
+
res = data
|
|
584
724
|
success && success(res);
|
|
585
725
|
},
|
|
586
726
|
(res) => {
|
|
587
727
|
error && error(res);
|
|
588
728
|
}
|
|
589
729
|
)
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
730
|
+
.catch(() => {
|
|
731
|
+
error();
|
|
732
|
+
});
|
|
593
733
|
}
|
|
594
734
|
|
|
595
735
|
/**
|
|
596
736
|
* 新增/编辑模板
|
|
597
737
|
*/
|
|
598
738
|
//获取学段
|
|
599
|
-
export function eduLevelList_temp
|
|
739
|
+
export function eduLevelList_temp(options, success, error) {
|
|
600
740
|
axios.get("/exam-paper/template/index.json", {}).then(
|
|
601
741
|
(res) => {
|
|
602
742
|
success && success(res);
|
|
@@ -605,12 +745,12 @@ export function eduLevelList_temp (options, success, error) {
|
|
|
605
745
|
error && error(res);
|
|
606
746
|
}
|
|
607
747
|
)
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
748
|
+
.catch(() => {
|
|
749
|
+
error();
|
|
750
|
+
});
|
|
611
751
|
}
|
|
612
752
|
//获取科目
|
|
613
|
-
export function subjectList_temp
|
|
753
|
+
export function subjectList_temp(options, success, error) {
|
|
614
754
|
axios.get("/exam-paper/template/list/subject", {
|
|
615
755
|
params: options
|
|
616
756
|
}).then(
|
|
@@ -621,12 +761,12 @@ export function subjectList_temp (options, success, error) {
|
|
|
621
761
|
error && error(res);
|
|
622
762
|
}
|
|
623
763
|
)
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
764
|
+
.catch(() => {
|
|
765
|
+
error();
|
|
766
|
+
});
|
|
627
767
|
}
|
|
628
768
|
//新增和修改试卷模板
|
|
629
|
-
export function aouExam_temp
|
|
769
|
+
export function aouExam_temp(options, success, error) {
|
|
630
770
|
axios.post("/exam-paper/template/aou", options).then(
|
|
631
771
|
(res) => {
|
|
632
772
|
success && success(res);
|
|
@@ -637,7 +777,7 @@ export function aouExam_temp (options, success, error) {
|
|
|
637
777
|
);
|
|
638
778
|
}
|
|
639
779
|
//获取试卷模板详情
|
|
640
|
-
export function examTemplateInfo
|
|
780
|
+
export function examTemplateInfo(options, success, error) {
|
|
641
781
|
axios.get("/exam-paper/template/get", {
|
|
642
782
|
params: options
|
|
643
783
|
}).then(
|
|
@@ -648,13 +788,13 @@ export function examTemplateInfo (options, success, error) {
|
|
|
648
788
|
error && error(res);
|
|
649
789
|
}
|
|
650
790
|
)
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
791
|
+
.catch(() => {
|
|
792
|
+
error();
|
|
793
|
+
});
|
|
654
794
|
}
|
|
655
795
|
|
|
656
796
|
//获取模板年级
|
|
657
|
-
export function examTemplateGradeList
|
|
797
|
+
export function examTemplateGradeList(options, success, error) {
|
|
658
798
|
axios.get("/exam-paper/template/list-grade", {
|
|
659
799
|
params: options
|
|
660
800
|
}).then(
|
|
@@ -665,13 +805,13 @@ export function examTemplateGradeList (options, success, error) {
|
|
|
665
805
|
error && error(res);
|
|
666
806
|
}
|
|
667
807
|
)
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
808
|
+
.catch(() => {
|
|
809
|
+
error();
|
|
810
|
+
});
|
|
671
811
|
}
|
|
672
812
|
|
|
673
813
|
//检测作业模板上限
|
|
674
|
-
export function checkTemplateLimit
|
|
814
|
+
export function checkTemplateLimit(options, success, error) {
|
|
675
815
|
axios.get("/exam-paper/template/check", {
|
|
676
816
|
params: options
|
|
677
817
|
}).then(
|
|
@@ -682,26 +822,31 @@ export function checkTemplateLimit (options, success, error) {
|
|
|
682
822
|
error && error(res);
|
|
683
823
|
}
|
|
684
824
|
)
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
825
|
+
.catch(() => {
|
|
826
|
+
error();
|
|
827
|
+
});
|
|
688
828
|
}
|
|
689
829
|
|
|
690
830
|
/**
|
|
691
831
|
* 教辅相关
|
|
692
832
|
*/
|
|
693
833
|
//获取教辅列表
|
|
694
|
-
export function
|
|
834
|
+
export function getTeachaidListApi(options, success, error) {
|
|
695
835
|
return new Promise((resolve) => {
|
|
696
836
|
axios.get(`/teach-aid/list/data`, { params: options }).then(res => {
|
|
697
|
-
|
|
837
|
+
let data = {
|
|
838
|
+
...res,
|
|
839
|
+
value:res?.value || [],
|
|
840
|
+
}
|
|
841
|
+
res = data
|
|
842
|
+
resolve([null, res])
|
|
698
843
|
}).catch(err => {
|
|
699
|
-
|
|
844
|
+
resolve([err, null])
|
|
700
845
|
})
|
|
701
|
-
});
|
|
702
|
-
return axios.get("/teach-aid/list/data", {
|
|
703
|
-
|
|
704
|
-
})
|
|
846
|
+
});
|
|
847
|
+
// return axios.get("/teach-aid/list/data", {
|
|
848
|
+
// params: options
|
|
849
|
+
// })
|
|
705
850
|
}
|
|
706
851
|
|
|
707
852
|
//获取学年
|
|
@@ -710,21 +855,29 @@ export function getTeachaidYearGrade(options, success, error) {
|
|
|
710
855
|
params: options
|
|
711
856
|
}).then(
|
|
712
857
|
(res) => {
|
|
858
|
+
let data = {
|
|
859
|
+
...res,
|
|
860
|
+
value:{
|
|
861
|
+
...res?.value,
|
|
862
|
+
clazzGradeDtos:res?.value?.clazzGradeDtos || [],
|
|
863
|
+
schoolYears:res?.value?.schoolYears || [],
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
res = data
|
|
713
867
|
success && success(res);
|
|
714
868
|
},
|
|
715
869
|
(res) => {
|
|
716
870
|
error && error(res);
|
|
717
871
|
}
|
|
718
872
|
)
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
873
|
+
.catch(() => {
|
|
874
|
+
error();
|
|
875
|
+
});
|
|
722
876
|
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
export function getTeachaidCatalogue(options, success, error) {
|
|
877
|
+
//获取学年
|
|
878
|
+
export function getTeachaidYearGradeApi(options) {
|
|
726
879
|
return new Promise((resolve) => {
|
|
727
|
-
axios.get("/teach-aid/
|
|
880
|
+
axios.get("/teach-aid/list/year-grade", { params: options }).then(
|
|
728
881
|
(res) => {
|
|
729
882
|
resolve([null, res])
|
|
730
883
|
},
|
|
@@ -732,21 +885,44 @@ export function getTeachaidCatalogue(options, success, error) {
|
|
|
732
885
|
resolve([err, null])
|
|
733
886
|
}
|
|
734
887
|
);
|
|
735
|
-
})
|
|
888
|
+
})
|
|
889
|
+
}
|
|
890
|
+
//获取教辅目录列表
|
|
891
|
+
export function getTeachaidCatalogue(options, success, error) {
|
|
892
|
+
return new Promise((resolve) => {
|
|
893
|
+
axios.get("/teach-aid/catalogue/list/data", { params: options }).then(
|
|
894
|
+
(res) => {
|
|
895
|
+
let data = {
|
|
896
|
+
...res,
|
|
897
|
+
value:res?.value || [],
|
|
898
|
+
}
|
|
899
|
+
res = data
|
|
900
|
+
resolve([null, res])
|
|
901
|
+
},
|
|
902
|
+
(err) => {
|
|
903
|
+
resolve([err, null])
|
|
904
|
+
}
|
|
905
|
+
);
|
|
906
|
+
})
|
|
736
907
|
}
|
|
737
908
|
|
|
738
909
|
//根据教辅id和目录获取试卷
|
|
739
910
|
export function getTeachaidPaper(options, success, error) {
|
|
740
911
|
return new Promise((resolve) => {
|
|
741
912
|
axios.get("/teach-aid/resource/list/data", { params: options }).then(
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
resolve([err, null])
|
|
913
|
+
(res) => {
|
|
914
|
+
let data = {
|
|
915
|
+
...res,
|
|
916
|
+
value:res?.value || [],
|
|
747
917
|
}
|
|
918
|
+
res = data
|
|
919
|
+
resolve([null, res])
|
|
920
|
+
},
|
|
921
|
+
(err) => {
|
|
922
|
+
resolve([err, null])
|
|
923
|
+
}
|
|
748
924
|
);
|
|
749
|
-
})
|
|
925
|
+
})
|
|
750
926
|
}
|
|
751
927
|
|
|
752
928
|
/**
|
|
@@ -777,59 +953,81 @@ export function removeResource(options, success, error) {
|
|
|
777
953
|
export function addPaper(options) {
|
|
778
954
|
return new Promise((resolve) => {
|
|
779
955
|
axios.post("/ybk/editor/exam", options).then(
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
956
|
+
(res) => {
|
|
957
|
+
let data = {
|
|
958
|
+
...res,
|
|
959
|
+
value: {
|
|
960
|
+
...res?.value,
|
|
961
|
+
coreResourceCfgDto: res?.value?.coreResourceCfgDto,
|
|
962
|
+
exam:res?.value?.exam,
|
|
963
|
+
itemList:res?.value?.itemList || [],
|
|
964
|
+
layoutJson:res?.value?.layoutJson
|
|
965
|
+
}
|
|
785
966
|
}
|
|
967
|
+
res = data
|
|
968
|
+
resolve([null, res])
|
|
969
|
+
},
|
|
970
|
+
(err) => {
|
|
971
|
+
resolve([err, null])
|
|
972
|
+
}
|
|
786
973
|
);
|
|
787
|
-
});
|
|
974
|
+
});
|
|
788
975
|
}
|
|
789
976
|
|
|
790
977
|
// 获取试卷题目信息
|
|
791
978
|
export function getExamQuestion(options) {
|
|
792
979
|
return new Promise((resolve) => {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
980
|
+
axios.get("/ybk/editor/exam/list-score", { params: options }).then(
|
|
981
|
+
(res) => {
|
|
982
|
+
let data = {
|
|
983
|
+
...res,
|
|
984
|
+
value:{
|
|
985
|
+
...res?.value,
|
|
986
|
+
examCardInfoDto:res?.value?.examCardInfoDto,
|
|
987
|
+
examCardItemResultDtoList:res?.value?.examCardItemResultDtoList || [],
|
|
988
|
+
layout:res?.value?.layout,
|
|
989
|
+
layoutJson:res?.value?.layoutJson,
|
|
799
990
|
}
|
|
800
|
-
|
|
991
|
+
}
|
|
992
|
+
res = data
|
|
993
|
+
resolve([null, res])
|
|
994
|
+
},
|
|
995
|
+
(err) => {
|
|
996
|
+
resolve([err, null])
|
|
997
|
+
}
|
|
998
|
+
);
|
|
801
999
|
})
|
|
802
1000
|
}
|
|
803
1001
|
|
|
804
1002
|
//获取题目自增试卷配置
|
|
805
|
-
export function getResourceCfg
|
|
1003
|
+
export function getResourceCfg(options) {
|
|
806
1004
|
return new Promise((resolve) => {
|
|
807
1005
|
axios.get("/ybk/item/getResourceCfg", { params: options }).then(
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
1006
|
+
(res) => {
|
|
1007
|
+
resolve([null, res])
|
|
1008
|
+
},
|
|
1009
|
+
(err) => {
|
|
1010
|
+
resolve([err, null])
|
|
1011
|
+
}
|
|
814
1012
|
);
|
|
815
|
-
})
|
|
1013
|
+
})
|
|
816
1014
|
}
|
|
817
1015
|
export function getExamCard(params) {
|
|
818
1016
|
return new Promise((resolve) => {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1017
|
+
axios.get('/ybk/exam-card/edit.json', { params }).then(res => {
|
|
1018
|
+
resolve([null, res])
|
|
1019
|
+
}).catch(err => {
|
|
1020
|
+
resolve([err, null])
|
|
1021
|
+
})
|
|
824
1022
|
});
|
|
825
1023
|
}
|
|
826
1024
|
export function getPreviewJSON(params) {
|
|
827
1025
|
return new Promise((resolve) => {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
1026
|
+
axios.get('/ybk/editor/exam/preview.json', { params }).then(res => {
|
|
1027
|
+
resolve([null, res])
|
|
1028
|
+
}).catch(err => {
|
|
1029
|
+
resolve([err, null])
|
|
1030
|
+
})
|
|
833
1031
|
});
|
|
834
1032
|
}
|
|
835
1033
|
//引用试卷内题目【异步】
|
|
@@ -847,22 +1045,27 @@ export function quotePaperQuestion(options, success, error) {
|
|
|
847
1045
|
//获取模板列表
|
|
848
1046
|
export function getExamTemplateList(params) {
|
|
849
1047
|
return new Promise((resolve) => {
|
|
850
|
-
axios.get('/exam-paper/template/list/data', {params}).then(res => {
|
|
851
|
-
|
|
1048
|
+
axios.get('/exam-paper/template/list/data', { params }).then(res => {
|
|
1049
|
+
resolve([null, res])
|
|
852
1050
|
}).catch(err => {
|
|
853
|
-
|
|
1051
|
+
resolve([err, null])
|
|
854
1052
|
})
|
|
855
|
-
});
|
|
1053
|
+
});
|
|
856
1054
|
}
|
|
857
1055
|
//获取题型列表
|
|
858
1056
|
export function getCategoryList(params) {
|
|
859
1057
|
return new Promise((resolve) => {
|
|
860
|
-
axios.get('/item/common/category/list', {params}).then(res => {
|
|
861
|
-
|
|
1058
|
+
axios.get('/item/common/category/list', { params }).then(res => {
|
|
1059
|
+
let data = {
|
|
1060
|
+
...res,
|
|
1061
|
+
value:res?.value || [],
|
|
1062
|
+
}
|
|
1063
|
+
res = data
|
|
1064
|
+
resolve([null, res])
|
|
862
1065
|
}).catch(err => {
|
|
863
|
-
|
|
1066
|
+
resolve([err, null])
|
|
864
1067
|
})
|
|
865
|
-
});
|
|
1068
|
+
});
|
|
866
1069
|
}
|
|
867
1070
|
|
|
868
1071
|
//获取智能打标知识点集合
|
|
@@ -876,72 +1079,73 @@ export function getAIKlList(options) {
|
|
|
876
1079
|
resolve([err, null])
|
|
877
1080
|
}
|
|
878
1081
|
);
|
|
879
|
-
});
|
|
1082
|
+
});
|
|
880
1083
|
}
|
|
881
1084
|
|
|
882
1085
|
// 获取当前试卷题目列表
|
|
883
1086
|
export function getItemList(options) {
|
|
884
1087
|
return new Promise((resolve) => {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
1088
|
+
axios.get("/ybk/editor/exam", { params: options }).then(
|
|
1089
|
+
(res) => {
|
|
1090
|
+
resolve([null, res])
|
|
1091
|
+
},
|
|
1092
|
+
(err) => {
|
|
1093
|
+
resolve([err, null])
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
893
1096
|
})
|
|
894
1097
|
}
|
|
895
1098
|
//获取当前目录下面的试卷列表(异步)
|
|
896
1099
|
export function getExamListAsync(options, success, error) {
|
|
897
1100
|
axios.get('/teach-aid/resource/list/data', { params: options }).then(
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
1101
|
+
(res) => {
|
|
1102
|
+
success && success(res);
|
|
1103
|
+
},
|
|
1104
|
+
(res) => {
|
|
1105
|
+
error && error(res);
|
|
1106
|
+
}
|
|
904
1107
|
);
|
|
905
1108
|
}
|
|
906
1109
|
//答题是否下载过
|
|
907
1110
|
export function getAnswerDownload(options, success, error) {
|
|
908
1111
|
return new Promise((resolve) => {
|
|
909
1112
|
axios.get("/ybk/exam-card/edit.json", { params: options }).then(
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
1113
|
+
(res) => {
|
|
1114
|
+
resolve([null, res])
|
|
1115
|
+
},
|
|
1116
|
+
(err) => {
|
|
1117
|
+
resolve([err, null])
|
|
1118
|
+
}
|
|
916
1119
|
);
|
|
917
1120
|
})
|
|
918
1121
|
}
|
|
919
1122
|
|
|
920
1123
|
//下载试卷>是否下载听力
|
|
921
|
-
export function getPaperAudio
|
|
1124
|
+
export function getPaperAudio(options) {
|
|
922
1125
|
return new Promise((resolve) => {
|
|
923
1126
|
axios.get("/ybk/editor/exam/check-audio", { params: options }).then(
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1127
|
+
(res) => {
|
|
1128
|
+
resolve([null, res])
|
|
1129
|
+
},
|
|
1130
|
+
(err) => {
|
|
1131
|
+
resolve([err, null])
|
|
1132
|
+
}
|
|
930
1133
|
);
|
|
931
|
-
})
|
|
1134
|
+
})
|
|
1135
|
+
}
|
|
932
1136
|
|
|
933
1137
|
|
|
934
1138
|
// 获取题目难度列表
|
|
935
1139
|
export function getItemDiffList(options) {
|
|
936
1140
|
return new Promise((resolve) => {
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
1141
|
+
axios.get("/ybk/item/difficult", { params: options }).then(
|
|
1142
|
+
(res) => {
|
|
1143
|
+
resolve([null, res])
|
|
1144
|
+
},
|
|
1145
|
+
(err) => {
|
|
1146
|
+
resolve([err, null])
|
|
1147
|
+
}
|
|
1148
|
+
);
|
|
945
1149
|
})
|
|
946
1150
|
}
|
|
947
1151
|
|
|
@@ -956,7 +1160,7 @@ export function getJYWVariantList(options) {
|
|
|
956
1160
|
resolve([err, null])
|
|
957
1161
|
}
|
|
958
1162
|
);
|
|
959
|
-
});
|
|
1163
|
+
});
|
|
960
1164
|
}
|
|
961
1165
|
|
|
962
1166
|
//保存或者移除变式题目
|
|
@@ -970,7 +1174,7 @@ export function saveOrRemoveVariantItem(options,) {
|
|
|
970
1174
|
resolve([err, null])
|
|
971
1175
|
}
|
|
972
1176
|
);
|
|
973
|
-
});
|
|
1177
|
+
});
|
|
974
1178
|
}
|
|
975
1179
|
|
|
976
1180
|
//查询菁优网答案与解析
|
|
@@ -984,7 +1188,7 @@ export function getJYWVariantDetailList(options,) {
|
|
|
984
1188
|
resolve([err, null])
|
|
985
1189
|
}
|
|
986
1190
|
);
|
|
987
|
-
});
|
|
1191
|
+
});
|
|
988
1192
|
}
|
|
989
1193
|
|
|
990
1194
|
//引用菁优网变式题到教育系统
|
|
@@ -998,19 +1202,24 @@ export function getItemToVariant(options) {
|
|
|
998
1202
|
resolve([err, null])
|
|
999
1203
|
}
|
|
1000
1204
|
);
|
|
1001
|
-
});
|
|
1205
|
+
});
|
|
1002
1206
|
}
|
|
1003
1207
|
|
|
1004
1208
|
//根据试卷id,题目id获取变式题列表
|
|
1005
|
-
export function getVariantList(options){
|
|
1209
|
+
export function getVariantList(options) {
|
|
1006
1210
|
return new Promise((resolve) => {
|
|
1007
1211
|
axios.get("/ybk/variant/list", { params: options }).then(
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
resolve([err, null])
|
|
1212
|
+
(res) => {
|
|
1213
|
+
let data = {
|
|
1214
|
+
...res,
|
|
1215
|
+
value:res?.value || [],
|
|
1013
1216
|
}
|
|
1217
|
+
res = data
|
|
1218
|
+
resolve([null, res])
|
|
1219
|
+
},
|
|
1220
|
+
(err) => {
|
|
1221
|
+
resolve([err, null])
|
|
1222
|
+
}
|
|
1014
1223
|
);
|
|
1015
1224
|
})
|
|
1016
1225
|
}
|
|
@@ -1031,7 +1240,7 @@ export function getItem(itemFileId) {
|
|
|
1031
1240
|
//上下移动变式题
|
|
1032
1241
|
export function moveVariantItem(options) {
|
|
1033
1242
|
return new Promise((resolve) => {
|
|
1034
|
-
axios.post('/ybk/variant/reorder',options).then(
|
|
1243
|
+
axios.post('/ybk/variant/reorder', options).then(
|
|
1035
1244
|
(res) => {
|
|
1036
1245
|
resolve([null, res])
|
|
1037
1246
|
},
|
|
@@ -1056,44 +1265,44 @@ export function getStudyfunEnv(options) {
|
|
|
1056
1265
|
}
|
|
1057
1266
|
|
|
1058
1267
|
// 获取自制卡题目信息(分值、答案)
|
|
1059
|
-
export function getCustomCardInfo(options){
|
|
1268
|
+
export function getCustomCardInfo(options) {
|
|
1060
1269
|
return new Promise((resolve) => {
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1270
|
+
axios.get("/ybk/exam/blank/item/list/score", { params: options }).then(res => {
|
|
1271
|
+
resolve([null, res])
|
|
1272
|
+
}).catch(err => {
|
|
1273
|
+
resolve([err, null])
|
|
1274
|
+
})
|
|
1066
1275
|
});
|
|
1067
1276
|
}
|
|
1068
1277
|
|
|
1069
1278
|
//获取资源分享信息
|
|
1070
1279
|
export function getResourceShareInfo(options) {
|
|
1071
|
-
return new Promise(resolve=>{
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1280
|
+
return new Promise(resolve => {
|
|
1281
|
+
axios.get("/ybk/resource/share", {
|
|
1282
|
+
params: options
|
|
1283
|
+
}).then(
|
|
1284
|
+
(res) => {
|
|
1285
|
+
resolve([null, res])
|
|
1286
|
+
},
|
|
1287
|
+
(err) => {
|
|
1288
|
+
resolve([err, null])
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1082
1291
|
})
|
|
1083
1292
|
}
|
|
1084
1293
|
//获取自制卡信息
|
|
1085
1294
|
export function getCustomCardRecord(options) {
|
|
1086
|
-
return new Promise(resolve=>{
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1295
|
+
return new Promise(resolve => {
|
|
1296
|
+
axios.get("/ybk/exam/blank/item/get/record", {
|
|
1297
|
+
params: options
|
|
1298
|
+
}).then(
|
|
1299
|
+
(res) => {
|
|
1300
|
+
resolve([null, res])
|
|
1301
|
+
},
|
|
1302
|
+
(err) => {
|
|
1303
|
+
resolve([err, null])
|
|
1304
|
+
}
|
|
1305
|
+
);
|
|
1097
1306
|
})
|
|
1098
1307
|
}
|
|
1099
1308
|
//获取用户搜索内容
|
|
@@ -1101,9 +1310,9 @@ export function getSearchList(options, success, error) {
|
|
|
1101
1310
|
axios.get("/paper-exam/user/like-name", {params: options})
|
|
1102
1311
|
.then((res) => {
|
|
1103
1312
|
success && success(res)
|
|
1104
|
-
}, (res) => {
|
|
1313
|
+
}, (res) => {
|
|
1105
1314
|
error && error(res)
|
|
1106
|
-
|
|
1315
|
+
})
|
|
1107
1316
|
}
|
|
1108
1317
|
//搜索学生列表
|
|
1109
1318
|
export const getSearchStudentList = (params) => {
|
|
@@ -1191,7 +1400,7 @@ export function getPermissionList(options) {
|
|
|
1191
1400
|
resolve([err, null])
|
|
1192
1401
|
}
|
|
1193
1402
|
);
|
|
1194
|
-
})
|
|
1403
|
+
});
|
|
1195
1404
|
}
|
|
1196
1405
|
/* 获取学科网变式题 */
|
|
1197
1406
|
export function getXkwRecVariantList(options) {
|
|
@@ -1217,10 +1426,10 @@ export function uploadUrlApi(options) {
|
|
|
1217
1426
|
return new Promise((resolve) => {
|
|
1218
1427
|
axios.post("/item/common/upload/url", options).then(
|
|
1219
1428
|
(res) => {
|
|
1220
|
-
resolve([null,res]);
|
|
1429
|
+
resolve([null, res]);
|
|
1221
1430
|
},
|
|
1222
1431
|
(err) => {
|
|
1223
|
-
resolve([err,null]);
|
|
1432
|
+
resolve([err, null]);
|
|
1224
1433
|
}
|
|
1225
1434
|
);
|
|
1226
1435
|
});
|
|
@@ -1228,9 +1437,43 @@ export function uploadUrlApi(options) {
|
|
|
1228
1437
|
|
|
1229
1438
|
|
|
1230
1439
|
//根据试卷id,题目id获取变式题个数
|
|
1231
|
-
export function getVariantCountApi(options){
|
|
1440
|
+
export function getVariantCountApi(options) {
|
|
1232
1441
|
return new Promise((resolve) => {
|
|
1233
1442
|
axios.get("/ybk/variant/count", { params: options }).then(
|
|
1443
|
+
(res) => {
|
|
1444
|
+
resolve([null, res])
|
|
1445
|
+
},
|
|
1446
|
+
(err) => {
|
|
1447
|
+
resolve([err, null])
|
|
1448
|
+
}
|
|
1449
|
+
);
|
|
1450
|
+
})
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
//获取知识点
|
|
1454
|
+
export function getKnowledgeListApi(options) {
|
|
1455
|
+
return new Promise((resolve) => {
|
|
1456
|
+
axios.get("/ybk/item/get-knowledge-list", { params: options }).then(
|
|
1457
|
+
(res) => {
|
|
1458
|
+
let data = {
|
|
1459
|
+
...res,
|
|
1460
|
+
value: res?.value || [],
|
|
1461
|
+
}
|
|
1462
|
+
res = data
|
|
1463
|
+
resolve([null, res])
|
|
1464
|
+
},
|
|
1465
|
+
(err) => {
|
|
1466
|
+
resolve([err, null])
|
|
1467
|
+
}
|
|
1468
|
+
);
|
|
1469
|
+
})
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
//【同步】hq_studyfun 获取历史记录
|
|
1474
|
+
export function getUserOperateApi(options){
|
|
1475
|
+
return new Promise((resolve) => {
|
|
1476
|
+
axios.get("/user/operate/get", { params: options }).then(
|
|
1234
1477
|
(res) => {
|
|
1235
1478
|
resolve([null, res])
|
|
1236
1479
|
},
|
|
@@ -1239,4 +1482,18 @@ export function getVariantCountApi(options){
|
|
|
1239
1482
|
}
|
|
1240
1483
|
);
|
|
1241
1484
|
})
|
|
1242
|
-
}
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
//hq_studyfun 保存记录 2云备课,3智慧教学
|
|
1488
|
+
export function setUserOperateApi(options) {
|
|
1489
|
+
return new Promise((resolve) => {
|
|
1490
|
+
axios.post("/user/operate/save", options).then(
|
|
1491
|
+
(res) => {
|
|
1492
|
+
resolve([null,res]);
|
|
1493
|
+
},
|
|
1494
|
+
(err) => {
|
|
1495
|
+
resolve([err,null]);
|
|
1496
|
+
}
|
|
1497
|
+
);
|
|
1498
|
+
});
|
|
1499
|
+
}
|