ai-question-pro 0.0.13 → 0.0.15
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/components/demo/api/index.js +5 -2
- package/components/demo/src/main.vue +14 -5
- package/components/demo/utils/request.js +6 -5
- package/dist/ai-question-pro.common.js +37 -28
- package/dist/ai-question-pro.common.js.map +1 -1
- package/dist/ai-question-pro.umd.js +37 -28
- package/dist/ai-question-pro.umd.js.map +1 -1
- package/dist/ai-question-pro.umd.min.js +3 -3
- package/dist/ai-question-pro.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,10 +17,13 @@ export const agreeQuestion = (data) => {
|
|
|
17
17
|
})
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export const checkVersion = () => {
|
|
20
|
+
export const checkVersion = (businessSource) => {
|
|
21
21
|
return request({
|
|
22
|
-
url:"/
|
|
22
|
+
url:"/xh/question/checkVersion",
|
|
23
23
|
method: "post",
|
|
24
|
+
params:{
|
|
25
|
+
businessSource:businessSource
|
|
26
|
+
}
|
|
24
27
|
});
|
|
25
28
|
};
|
|
26
29
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<template slot="title">
|
|
8
8
|
<div class="add_question_title">
|
|
9
9
|
<span>AI出题</span>
|
|
10
|
-
<img src="../static/robot.png"
|
|
10
|
+
<!-- <img src="../static/robot.png">-->
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
<div class="add_question_body">
|
|
@@ -154,6 +154,10 @@ export default {
|
|
|
154
154
|
children: 'children'
|
|
155
155
|
})
|
|
156
156
|
},
|
|
157
|
+
businessSource: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: "0", // 默认值为空字符串
|
|
160
|
+
},
|
|
157
161
|
},
|
|
158
162
|
data() {
|
|
159
163
|
return {
|
|
@@ -249,7 +253,8 @@ export default {
|
|
|
249
253
|
this.addShow = !this.addShow
|
|
250
254
|
createBurial({
|
|
251
255
|
businessType: 3,
|
|
252
|
-
operatorType: 0
|
|
256
|
+
operatorType: 0,
|
|
257
|
+
businessSource:this.businessSource
|
|
253
258
|
})
|
|
254
259
|
},
|
|
255
260
|
//生成题目
|
|
@@ -307,7 +312,8 @@ export default {
|
|
|
307
312
|
difficultys: this.form.difficultys,
|
|
308
313
|
prompt: this.form.prompt
|
|
309
314
|
},
|
|
310
|
-
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : ''
|
|
315
|
+
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : '',
|
|
316
|
+
businessSource:this.businessSource
|
|
311
317
|
}
|
|
312
318
|
getAiQuestion(obj).then(res => {
|
|
313
319
|
if (res.success) {
|
|
@@ -338,13 +344,15 @@ export default {
|
|
|
338
344
|
},
|
|
339
345
|
//发送请求
|
|
340
346
|
sendPost() {
|
|
341
|
-
checkVersion().then(
|
|
347
|
+
checkVersion(this.businessSource).then(res => {
|
|
348
|
+
console.log(res);
|
|
342
349
|
if (res.errCode === '403') {
|
|
343
350
|
this.$message.warning(res.errMessage)
|
|
344
351
|
} else {
|
|
345
352
|
this.postQuestion();
|
|
346
353
|
}
|
|
347
354
|
});
|
|
355
|
+
// this.postQuestion();
|
|
348
356
|
},
|
|
349
357
|
postQuestion() {
|
|
350
358
|
this.rebuildFlag = true;
|
|
@@ -367,7 +375,8 @@ export default {
|
|
|
367
375
|
difficultys: this.form.difficultys,
|
|
368
376
|
prompt: this.form.prompt
|
|
369
377
|
},
|
|
370
|
-
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : ''
|
|
378
|
+
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : '',
|
|
379
|
+
businessSource:this.businessSource
|
|
371
380
|
}
|
|
372
381
|
getAiQuestion(obj).then(res => {
|
|
373
382
|
// console.log("questions obj is :" + JSON.stringify(res.data.questions));
|
|
@@ -67,11 +67,12 @@ service.interceptors.response.use(res => {
|
|
|
67
67
|
if (res.data.code == 401) {
|
|
68
68
|
Message.warning(res.data.msg)
|
|
69
69
|
}
|
|
70
|
-
if (!res.data.success) {
|
|
71
|
-
|
|
72
|
-
} else {
|
|
73
|
-
|
|
74
|
-
}
|
|
70
|
+
// if (!res.data.success) {
|
|
71
|
+
// // Message.warning(res.data.errMessage)
|
|
72
|
+
// } else {
|
|
73
|
+
// return res.data
|
|
74
|
+
// }
|
|
75
|
+
return res.data
|
|
75
76
|
})
|
|
76
77
|
|
|
77
78
|
export default service
|
|
@@ -1477,7 +1477,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".tree-select__option.el-select-dropdow
|
|
|
1477
1477
|
|
|
1478
1478
|
/***/ }),
|
|
1479
1479
|
|
|
1480
|
-
/***/
|
|
1480
|
+
/***/ 2234:
|
|
1481
1481
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1482
1482
|
|
|
1483
1483
|
"use strict";
|
|
@@ -1496,7 +1496,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
|
|
|
1496
1496
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
1497
1497
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
1498
1498
|
// Module
|
|
1499
|
-
___CSS_LOADER_EXPORT___.push([module.id, "[data-v-
|
|
1499
|
+
___CSS_LOADER_EXPORT___.push([module.id, "[data-v-6d0fbaf2].ai_contain{display:inline-block}[data-v-6d0fbaf2].ai_contain .el-drawer__header{padding-top:0;height:80px;background-image:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");background-size:100% 100%}[data-v-6d0fbaf2].ai_contain .el-drawer__body{padding:0 20px}[data-v-6d0fbaf2].ai_contain .el-drawer__body{display:flex;flex-direction:column;justify-content:space-between}[data-v-6d0fbaf2].ai_contain .el-form-item__label{font-weight:700}[data-v-6d0fbaf2].ai_contain .el-input__inner{padding-right:0}[data-v-6d0fbaf2].ai_contain .el-cascader{width:100%}[data-v-6d0fbaf2].ai_contain .ai_button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:9px 6px;position:relative;color:#fff;background-color:#456bea;border-radius:4px;border:1px solid #456bea}[data-v-6d0fbaf2].ai_contain .add_question_title{display:flex;align-items:center;font-size:23px;color:#333}[data-v-6d0fbaf2].ai_contain .add_question_body .remind{font-size:14px;color:#9ba1ae}[data-v-6d0fbaf2].ai_contain .add_question_footer{padding:20px 0;border-top:1px solid #e6e6e6;display:flex;justify-content:center;align-items:center}[data-v-6d0fbaf2].ai_contain .el-loading-mask{border-radius:8px}[data-v-6d0fbaf2].ai_contain .el-dialog{background:linear-gradient(327deg,#dbecfe,#f9fcff);border-radius:8px}[data-v-6d0fbaf2].ai_contain .el-dialog .question_title{display:flex;align-items:center;font-weight:700;font-size:23px;color:#333}[data-v-6d0fbaf2].ai_contain .el-dialog .question_title img{margin-right:10px;width:35px;height:40px}[data-v-6d0fbaf2].ai_contain .el-dialog .question_body{padding:10px;min-height:500px;max-height:500px;overflow:auto}[data-v-6d0fbaf2].ai_contain .el-dialog .question_body::-webkit-scrollbar{width:4px}[data-v-6d0fbaf2].ai_contain .el-dialog .question_body::-webkit-scrollbar-button{display:none}[data-v-6d0fbaf2].ai_contain .el-dialog .question_body::-webkit-scrollbar-track-piece{background-color:transparent}[data-v-6d0fbaf2].ai_contain .el-dialog .question_body::-webkit-scrollbar-thumb{border-radius:3px;background:rgba(0,0,0,.5)}[data-v-6d0fbaf2].ai_contain .el-dialog .question_footer{display:flex;justify-content:space-between}[data-v-6d0fbaf2].ai_contain .el-dialog .question_footer .question_remind{align-self:flex-end;font-size:14px;color:#9ba1ae}", ""]);
|
|
1500
1500
|
// Exports
|
|
1501
1501
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
1502
1502
|
|
|
@@ -32984,19 +32984,19 @@ var update = add("7c65751a", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
32984
32984
|
|
|
32985
32985
|
/***/ }),
|
|
32986
32986
|
|
|
32987
|
-
/***/
|
|
32987
|
+
/***/ 4108:
|
|
32988
32988
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
32989
32989
|
|
|
32990
32990
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
32991
32991
|
|
|
32992
32992
|
// load the styles
|
|
32993
|
-
var content = __webpack_require__(
|
|
32993
|
+
var content = __webpack_require__(2234);
|
|
32994
32994
|
if(content.__esModule) content = content.default;
|
|
32995
32995
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
32996
32996
|
if(content.locals) module.exports = content.locals;
|
|
32997
32997
|
// add the styles to the DOM
|
|
32998
32998
|
var add = (__webpack_require__(8459)/* ["default"] */ .A)
|
|
32999
|
-
var update = add("
|
|
32999
|
+
var update = add("09c032a4", content, true, {"sourceMap":false,"shadowMode":false});
|
|
33000
33000
|
|
|
33001
33001
|
/***/ }),
|
|
33002
33002
|
|
|
@@ -33510,7 +33510,7 @@ if (typeof window !== 'undefined') {
|
|
|
33510
33510
|
// Indicate to webpack that this file can be concatenated
|
|
33511
33511
|
/* harmony default export */ var setPublicPath = (null);
|
|
33512
33512
|
|
|
33513
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=
|
|
33513
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=6d0fbaf2&scoped=true
|
|
33514
33514
|
var render = function render() {
|
|
33515
33515
|
var _vm = this,
|
|
33516
33516
|
_c = _vm._self._c;
|
|
@@ -33539,11 +33539,7 @@ var render = function render() {
|
|
|
33539
33539
|
slot: "title"
|
|
33540
33540
|
}, [_c('div', {
|
|
33541
33541
|
staticClass: "add_question_title"
|
|
33542
|
-
}, [_c('span', [_vm._v("AI出题")]), _c('
|
|
33543
|
-
attrs: {
|
|
33544
|
-
"src": __webpack_require__(8931)
|
|
33545
|
-
}
|
|
33546
|
-
})])]), _c('div', {
|
|
33542
|
+
}, [_c('span', [_vm._v("AI出题")])])]), _c('div', {
|
|
33547
33543
|
staticClass: "add_question_body"
|
|
33548
33544
|
}, [_c('el-form', {
|
|
33549
33545
|
ref: "form",
|
|
@@ -33739,7 +33735,7 @@ var render = function render() {
|
|
|
33739
33735
|
};
|
|
33740
33736
|
var staticRenderFns = [];
|
|
33741
33737
|
|
|
33742
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=
|
|
33738
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=6d0fbaf2&scoped=true
|
|
33743
33739
|
|
|
33744
33740
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/questionItem.vue?vue&type=template&id=a8488d3c&scoped=true
|
|
33745
33741
|
var questionItemvue_type_template_id_a8488d3c_scoped_true_render = function render() {
|
|
@@ -37826,11 +37822,12 @@ service.interceptors.response.use(res => {
|
|
|
37826
37822
|
if (res.data.code == 401) {
|
|
37827
37823
|
element_ui_common.Message.warning(res.data.msg);
|
|
37828
37824
|
}
|
|
37829
|
-
if (!res.data.success) {
|
|
37830
|
-
|
|
37831
|
-
} else {
|
|
37832
|
-
|
|
37833
|
-
}
|
|
37825
|
+
// if (!res.data.success) {
|
|
37826
|
+
// // Message.warning(res.data.errMessage)
|
|
37827
|
+
// } else {
|
|
37828
|
+
// return res.data
|
|
37829
|
+
// }
|
|
37830
|
+
return res.data;
|
|
37834
37831
|
});
|
|
37835
37832
|
/* harmony default export */ var request = (service);
|
|
37836
37833
|
;// CONCATENATED MODULE: ./components/demo/api/index.js
|
|
@@ -37849,10 +37846,13 @@ const agreeQuestion = data => {
|
|
|
37849
37846
|
data: data
|
|
37850
37847
|
});
|
|
37851
37848
|
};
|
|
37852
|
-
const checkVersion =
|
|
37849
|
+
const checkVersion = businessSource => {
|
|
37853
37850
|
return request({
|
|
37854
|
-
url: "/
|
|
37855
|
-
method: "post"
|
|
37851
|
+
url: "/xh/question/checkVersion",
|
|
37852
|
+
method: "post",
|
|
37853
|
+
params: {
|
|
37854
|
+
businessSource: businessSource
|
|
37855
|
+
}
|
|
37856
37856
|
});
|
|
37857
37857
|
};
|
|
37858
37858
|
const createBurial = data => {
|
|
@@ -37925,6 +37925,10 @@ const createBurial = data => {
|
|
|
37925
37925
|
label: 'label',
|
|
37926
37926
|
children: 'children'
|
|
37927
37927
|
})
|
|
37928
|
+
},
|
|
37929
|
+
businessSource: {
|
|
37930
|
+
type: String,
|
|
37931
|
+
default: "0" // 默认值为空字符串
|
|
37928
37932
|
}
|
|
37929
37933
|
},
|
|
37930
37934
|
data() {
|
|
@@ -38063,7 +38067,8 @@ const createBurial = data => {
|
|
|
38063
38067
|
this.addShow = !this.addShow;
|
|
38064
38068
|
createBurial({
|
|
38065
38069
|
businessType: 3,
|
|
38066
|
-
operatorType: 0
|
|
38070
|
+
operatorType: 0,
|
|
38071
|
+
businessSource: this.businessSource
|
|
38067
38072
|
});
|
|
38068
38073
|
},
|
|
38069
38074
|
//生成题目
|
|
@@ -38121,7 +38126,8 @@ const createBurial = data => {
|
|
|
38121
38126
|
difficultys: this.form.difficultys,
|
|
38122
38127
|
prompt: this.form.prompt
|
|
38123
38128
|
},
|
|
38124
|
-
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : ''
|
|
38129
|
+
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : '',
|
|
38130
|
+
businessSource: this.businessSource
|
|
38125
38131
|
};
|
|
38126
38132
|
getAiQuestion(obj).then(res => {
|
|
38127
38133
|
if (res.success) {
|
|
@@ -38152,13 +38158,15 @@ const createBurial = data => {
|
|
|
38152
38158
|
},
|
|
38153
38159
|
//发送请求
|
|
38154
38160
|
sendPost() {
|
|
38155
|
-
checkVersion().then(res => {
|
|
38161
|
+
checkVersion(this.businessSource).then(res => {
|
|
38162
|
+
console.log(res);
|
|
38156
38163
|
if (res.errCode === '403') {
|
|
38157
38164
|
this.$message.warning(res.errMessage);
|
|
38158
38165
|
} else {
|
|
38159
38166
|
this.postQuestion();
|
|
38160
38167
|
}
|
|
38161
38168
|
});
|
|
38169
|
+
// this.postQuestion();
|
|
38162
38170
|
},
|
|
38163
38171
|
postQuestion() {
|
|
38164
38172
|
this.rebuildFlag = true;
|
|
@@ -38181,7 +38189,8 @@ const createBurial = data => {
|
|
|
38181
38189
|
difficultys: this.form.difficultys,
|
|
38182
38190
|
prompt: this.form.prompt
|
|
38183
38191
|
},
|
|
38184
|
-
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : ''
|
|
38192
|
+
sessionId: this.aiResponse.sessionId ? this.aiResponse.sessionId : '',
|
|
38193
|
+
businessSource: this.businessSource
|
|
38185
38194
|
};
|
|
38186
38195
|
getAiQuestion(obj).then(res => {
|
|
38187
38196
|
// console.log("questions obj is :" + JSON.stringify(res.data.questions));
|
|
@@ -38250,9 +38259,9 @@ const createBurial = data => {
|
|
|
38250
38259
|
});
|
|
38251
38260
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
38252
38261
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
38253
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
38254
|
-
var
|
|
38255
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
38262
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=6d0fbaf2&prod&lang=scss&scoped=true
|
|
38263
|
+
var mainvue_type_style_index_0_id_6d0fbaf2_prod_lang_scss_scoped_true = __webpack_require__(4108);
|
|
38264
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=6d0fbaf2&prod&lang=scss&scoped=true
|
|
38256
38265
|
|
|
38257
38266
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue
|
|
38258
38267
|
|
|
@@ -38269,7 +38278,7 @@ var main_component = normalizeComponent(
|
|
|
38269
38278
|
staticRenderFns,
|
|
38270
38279
|
false,
|
|
38271
38280
|
null,
|
|
38272
|
-
"
|
|
38281
|
+
"6d0fbaf2",
|
|
38273
38282
|
null
|
|
38274
38283
|
|
|
38275
38284
|
)
|