ai-read-over-pro 0.0.6 → 0.0.8
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 +31 -31
- package/components/demo/src/main.vue +58 -33
- package/components/demo/src/read-over.vue +7 -3
- package/dist/ai-read-over-pro.common.js +105 -84
- package/dist/ai-read-over-pro.common.js.map +1 -1
- package/dist/ai-read-over-pro.css +1 -1
- package/dist/ai-read-over-pro.umd.js +105 -84
- package/dist/ai-read-over-pro.umd.js.map +1 -1
- package/dist/ai-read-over-pro.umd.min.js +3 -3
- package/dist/ai-read-over-pro.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -65,36 +65,36 @@ export const setFeedback = (params, data) => {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// });
|
|
74
|
-
// }
|
|
75
|
-
|
|
76
|
-
export const registerSse = (sseSessionId, fn, successFn) => {
|
|
77
|
-
const source = new EventSourcePolyfill(baseURL + prefix + '/sse?id=' + sseSessionId, {
|
|
78
|
-
headers: {
|
|
79
|
-
'X-Id-Token': cache.session.getJSON('SRKJ_TOKEN_CACHE'),
|
|
80
|
-
},
|
|
81
|
-
// heartbeatTimeout: 120000,
|
|
82
|
-
heartbeatTimeout: 8000,
|
|
83
|
-
});
|
|
84
|
-
source.onmessage = function (event) {
|
|
85
|
-
const { data } = event;
|
|
86
|
-
if (data === '连接成功') {
|
|
87
|
-
if (successFn) successFn();
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
source.addEventListener('CRITICISM_ANSWER', (event) => {
|
|
91
|
-
const data = event.data;
|
|
92
|
-
fn(JSON.parse(data))
|
|
93
|
-
});
|
|
94
|
-
source.addEventListener('CRITICISM_COMMENT', (event) => {
|
|
95
|
-
const data = event.data;
|
|
96
|
-
fn({comments: [JSON.parse(data)]}, 'reanswer');
|
|
68
|
+
export const loopPoll = (data) => {
|
|
69
|
+
return request({
|
|
70
|
+
url: prefix + `/criticism/poll`,
|
|
71
|
+
method: 'post',
|
|
72
|
+
data,
|
|
97
73
|
});
|
|
74
|
+
}
|
|
98
75
|
|
|
99
|
-
|
|
100
|
-
|
|
76
|
+
// export const registerSse = (sseSessionId, fn, successFn) => {
|
|
77
|
+
// const source = new EventSourcePolyfill(baseURL + prefix + '/sse?id=' + sseSessionId, {
|
|
78
|
+
// headers: {
|
|
79
|
+
// 'X-Id-Token': cache.session.getJSON('SRKJ_TOKEN_CACHE'),
|
|
80
|
+
// },
|
|
81
|
+
// // heartbeatTimeout: 120000,
|
|
82
|
+
// heartbeatTimeout: 8000,
|
|
83
|
+
// });
|
|
84
|
+
// source.onmessage = function (event) {
|
|
85
|
+
// const { data } = event;
|
|
86
|
+
// if (data === '连接成功') {
|
|
87
|
+
// if (successFn) successFn();
|
|
88
|
+
// }
|
|
89
|
+
// };
|
|
90
|
+
// source.addEventListener('CRITICISM_ANSWER', (event) => {
|
|
91
|
+
// const data = event.data;
|
|
92
|
+
// fn(JSON.parse(data))
|
|
93
|
+
// });
|
|
94
|
+
// source.addEventListener('CRITICISM_COMMENT', (event) => {
|
|
95
|
+
// const data = event.data;
|
|
96
|
+
// fn({comments: [JSON.parse(data)]}, 'reanswer');
|
|
97
|
+
// });
|
|
98
|
+
//
|
|
99
|
+
// return source;
|
|
100
|
+
// }
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
<script>
|
|
65
65
|
import ReadOver from './read-over.vue';
|
|
66
66
|
import { getUserInfo } from '../utils/config';
|
|
67
|
-
import {generateReview, registerSse, criticismApply, reanswerReview} from '../api/index';
|
|
68
|
-
|
|
67
|
+
// import {generateReview, registerSse, criticismApply, reanswerReview} from '../api/index';
|
|
68
|
+
import { generateReview, loopPoll, criticismApply, reanswerReview } from '../api/index';
|
|
69
69
|
import Cookies from "js-cookie";
|
|
70
70
|
import TabFilter from './tab-filter.vue';
|
|
71
71
|
import MemberTable from './member-table.vue';
|
|
@@ -106,9 +106,10 @@ export default {
|
|
|
106
106
|
sseSessionId: '', // sse会话id,
|
|
107
107
|
tabList: [],
|
|
108
108
|
showTableList: [],
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
cacheUserId: [],
|
|
110
|
+
loopFlag: 0,
|
|
111
|
+
replayId: {},
|
|
112
|
+
// sseState: {}
|
|
112
113
|
}
|
|
113
114
|
},
|
|
114
115
|
watch: {
|
|
@@ -123,14 +124,18 @@ export default {
|
|
|
123
124
|
})
|
|
124
125
|
} else {
|
|
125
126
|
this.showFilter = false;
|
|
126
|
-
|
|
127
|
-
this.
|
|
127
|
+
this.cacheUserId = [];
|
|
128
|
+
this.replayId = {};
|
|
129
|
+
clearInterval(this.loopFlag);
|
|
130
|
+
// this.sseState.close();
|
|
128
131
|
}
|
|
129
132
|
},
|
|
130
133
|
listData: {
|
|
131
134
|
handler() {
|
|
132
|
-
this.listDataError();
|
|
133
|
-
this.
|
|
135
|
+
// this.listDataError();
|
|
136
|
+
if (this.listData && this.listData.length > 0) {
|
|
137
|
+
this.tabList = this.listData;
|
|
138
|
+
}
|
|
134
139
|
},
|
|
135
140
|
immediate: true
|
|
136
141
|
}
|
|
@@ -166,18 +171,18 @@ export default {
|
|
|
166
171
|
stretchContainer() {
|
|
167
172
|
this.stretch = !this.stretch;
|
|
168
173
|
},
|
|
169
|
-
messageBack(message, type) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
},
|
|
174
|
+
// messageBack(message, type) {
|
|
175
|
+
// const { bizId, comments: [backData] } = message;
|
|
176
|
+
// const { content } = backData;
|
|
177
|
+
// let currentId = bizId;
|
|
178
|
+
// backData.jsonContent = JSON.parse(content);
|
|
179
|
+
// if (type === 'reanswer') {
|
|
180
|
+
// currentId = this.activeItem.id;
|
|
181
|
+
// }
|
|
182
|
+
// this.$set(this.replyCache, currentId, backData);
|
|
183
|
+
// // 更新当前值
|
|
184
|
+
// this.analyzeData = this.replyCache[this.activeItem.id];
|
|
185
|
+
// },
|
|
181
186
|
async sendAiInfo() {
|
|
182
187
|
const paramsData = [];
|
|
183
188
|
this.listData.map((item) => {
|
|
@@ -188,20 +193,39 @@ export default {
|
|
|
188
193
|
answer: item.answer,
|
|
189
194
|
answerer: item.title,
|
|
190
195
|
})
|
|
191
|
-
|
|
196
|
+
this.cacheUserId.push(item.id);
|
|
192
197
|
});
|
|
193
|
-
this.sseState = await registerSse(this.sseSessionId, this.messageBack, ()=> {
|
|
194
|
-
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
// this.sseState = await registerSse(this.sseSessionId, this.messageBack, ()=> {
|
|
199
|
+
// generateReview(paramsData, this.sseSessionId, this.courseId);
|
|
200
|
+
// });
|
|
201
|
+
await generateReview(paramsData, this.sseSessionId, this.courseId);
|
|
202
|
+
|
|
203
|
+
this.loopFlag = setInterval(async () => {
|
|
204
|
+
this.loopInfo();
|
|
205
|
+
}, 3000);
|
|
206
|
+
this.loopInfo();
|
|
207
|
+
},
|
|
208
|
+
async loopInfo () {
|
|
209
|
+
const loopRes = await loopPoll(this.cacheUserId);
|
|
210
|
+
if (loopRes) {
|
|
211
|
+
for (let message of loopRes) {
|
|
212
|
+
const { bizId, comments: [backData] } = message;
|
|
213
|
+
const { content, id } = backData;
|
|
214
|
+
const currentId = bizId;
|
|
215
|
+
// 说明是重新回答
|
|
216
|
+
if (this.replayId[currentId] && this.replayId[currentId] === id) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
backData.jsonContent = JSON.parse(content);
|
|
220
|
+
this.$set(this.replyCache, currentId, backData);
|
|
221
|
+
// 更新当前值
|
|
222
|
+
this.analyzeData = this.replyCache[this.activeItem.id] || {};
|
|
223
|
+
delete this.replayId[currentId];
|
|
224
|
+
}
|
|
225
|
+
return ;
|
|
226
|
+
}
|
|
227
|
+
throw new Error('--loopRes--返回值为空');
|
|
198
228
|
},
|
|
199
|
-
// loopInfo() {
|
|
200
|
-
// this.loopFlag = setInterval(async () => {
|
|
201
|
-
// const loopRes = await loopPoll(this.cacheUserId);
|
|
202
|
-
// console.log(loopRes);
|
|
203
|
-
// }, 3000);
|
|
204
|
-
// },
|
|
205
229
|
async notyApply(data, orgData) {
|
|
206
230
|
const { id } = data;
|
|
207
231
|
await criticismApply(id);
|
|
@@ -209,6 +233,7 @@ export default {
|
|
|
209
233
|
this.$emit('on-noty-apply', data, orgData);
|
|
210
234
|
},
|
|
211
235
|
async onReanswer(list) {
|
|
236
|
+
this.replayId[this.activeItem.id] = list.id;
|
|
212
237
|
this.analyzeData = {};
|
|
213
238
|
this.replyCache[this.activeItem.id] = null;
|
|
214
239
|
await reanswerReview(this.sseSessionId, list.id);
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
}
|
|
140
140
|
.question-detail {
|
|
141
141
|
border-bottom: 1px solid #d4d5e1;
|
|
142
|
-
width: 100
|
|
142
|
+
width: calc(100% - 80px);
|
|
143
143
|
p {
|
|
144
144
|
margin: 0;
|
|
145
145
|
font-weight: 700;
|
|
@@ -160,7 +160,11 @@ export default {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
:deep(.question-detail) {
|
|
164
|
+
img {
|
|
165
|
+
width: 100% !important;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
164
168
|
.answer-container {
|
|
165
169
|
margin: 24px 0;
|
|
166
170
|
.question-detail {
|
|
@@ -212,7 +216,7 @@ export default {
|
|
|
212
216
|
color: rgba(32, 40, 64, 0.64);
|
|
213
217
|
font-size: 12px;
|
|
214
218
|
.score-number {
|
|
215
|
-
font-size:
|
|
219
|
+
font-size: 26px;
|
|
216
220
|
color: #F03030;
|
|
217
221
|
}
|
|
218
222
|
}
|
|
@@ -7523,7 +7523,7 @@ if (typeof window !== 'undefined') {
|
|
|
7523
7523
|
// Indicate to webpack that this file can be concatenated
|
|
7524
7524
|
/* harmony default export */ var setPublicPath = (null);
|
|
7525
7525
|
|
|
7526
|
-
;// 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=
|
|
7526
|
+
;// 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=80ef9b0e&scoped=true
|
|
7527
7527
|
var render = function render() {
|
|
7528
7528
|
var _vm = this,
|
|
7529
7529
|
_c = _vm._self._c;
|
|
@@ -7660,10 +7660,10 @@ var staticRenderFns = [function () {
|
|
|
7660
7660
|
}, [_vm._v("智能批阅")])]);
|
|
7661
7661
|
}];
|
|
7662
7662
|
|
|
7663
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=
|
|
7663
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=80ef9b0e&scoped=true
|
|
7664
7664
|
|
|
7665
|
-
;// 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/read-over.vue?vue&type=template&id=
|
|
7666
|
-
var
|
|
7665
|
+
;// 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/read-over.vue?vue&type=template&id=6e49adbb&scoped=true
|
|
7666
|
+
var read_overvue_type_template_id_6e49adbb_scoped_true_render = function render() {
|
|
7667
7667
|
var _vm = this,
|
|
7668
7668
|
_c = _vm._self._c;
|
|
7669
7669
|
return _c('div', {
|
|
@@ -7746,7 +7746,7 @@ var read_overvue_type_template_id_7b46a510_scoped_true_render = function render(
|
|
|
7746
7746
|
}
|
|
7747
7747
|
}) : _vm._e()], 2)] : _vm._e()], 2)]);
|
|
7748
7748
|
};
|
|
7749
|
-
var
|
|
7749
|
+
var read_overvue_type_template_id_6e49adbb_scoped_true_staticRenderFns = [];
|
|
7750
7750
|
|
|
7751
7751
|
;// 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/chat-tools.vue?vue&type=template&id=7f512de5&scoped=true
|
|
7752
7752
|
var chat_toolsvue_type_template_id_7f512de5_scoped_true_render = function render() {
|
|
@@ -11837,43 +11837,39 @@ const setFeedback = (params, data) => {
|
|
|
11837
11837
|
params
|
|
11838
11838
|
});
|
|
11839
11839
|
};
|
|
11840
|
+
const loopPoll = data => {
|
|
11841
|
+
return request({
|
|
11842
|
+
url: prefix + `/criticism/poll`,
|
|
11843
|
+
method: 'post',
|
|
11844
|
+
data
|
|
11845
|
+
});
|
|
11846
|
+
};
|
|
11840
11847
|
|
|
11841
|
-
// export const
|
|
11842
|
-
//
|
|
11843
|
-
//
|
|
11844
|
-
//
|
|
11845
|
-
//
|
|
11848
|
+
// export const registerSse = (sseSessionId, fn, successFn) => {
|
|
11849
|
+
// const source = new EventSourcePolyfill(baseURL + prefix + '/sse?id=' + sseSessionId, {
|
|
11850
|
+
// headers: {
|
|
11851
|
+
// 'X-Id-Token': cache.session.getJSON('SRKJ_TOKEN_CACHE'),
|
|
11852
|
+
// },
|
|
11853
|
+
// // heartbeatTimeout: 120000,
|
|
11854
|
+
// heartbeatTimeout: 8000,
|
|
11855
|
+
// });
|
|
11856
|
+
// source.onmessage = function (event) {
|
|
11857
|
+
// const { data } = event;
|
|
11858
|
+
// if (data === '连接成功') {
|
|
11859
|
+
// if (successFn) successFn();
|
|
11860
|
+
// }
|
|
11861
|
+
// };
|
|
11862
|
+
// source.addEventListener('CRITICISM_ANSWER', (event) => {
|
|
11863
|
+
// const data = event.data;
|
|
11864
|
+
// fn(JSON.parse(data))
|
|
11846
11865
|
// });
|
|
11866
|
+
// source.addEventListener('CRITICISM_COMMENT', (event) => {
|
|
11867
|
+
// const data = event.data;
|
|
11868
|
+
// fn({comments: [JSON.parse(data)]}, 'reanswer');
|
|
11869
|
+
// });
|
|
11870
|
+
//
|
|
11871
|
+
// return source;
|
|
11847
11872
|
// }
|
|
11848
|
-
|
|
11849
|
-
const registerSse = (sseSessionId, fn, successFn) => {
|
|
11850
|
-
const source = new eventsource.EventSourcePolyfill(baseURL + prefix + '/sse?id=' + sseSessionId, {
|
|
11851
|
-
headers: {
|
|
11852
|
-
'X-Id-Token': cache.session.getJSON('SRKJ_TOKEN_CACHE')
|
|
11853
|
-
},
|
|
11854
|
-
// heartbeatTimeout: 120000,
|
|
11855
|
-
heartbeatTimeout: 8000
|
|
11856
|
-
});
|
|
11857
|
-
source.onmessage = function (event) {
|
|
11858
|
-
const {
|
|
11859
|
-
data
|
|
11860
|
-
} = event;
|
|
11861
|
-
if (data === '连接成功') {
|
|
11862
|
-
if (successFn) successFn();
|
|
11863
|
-
}
|
|
11864
|
-
};
|
|
11865
|
-
source.addEventListener('CRITICISM_ANSWER', event => {
|
|
11866
|
-
const data = event.data;
|
|
11867
|
-
fn(JSON.parse(data));
|
|
11868
|
-
});
|
|
11869
|
-
source.addEventListener('CRITICISM_COMMENT', event => {
|
|
11870
|
-
const data = event.data;
|
|
11871
|
-
fn({
|
|
11872
|
-
comments: [JSON.parse(data)]
|
|
11873
|
-
}, 'reanswer');
|
|
11874
|
-
});
|
|
11875
|
-
return source;
|
|
11876
|
-
};
|
|
11877
11873
|
;// CONCATENATED MODULE: ./components/demo/utils/config.js
|
|
11878
11874
|
|
|
11879
11875
|
|
|
@@ -12142,10 +12138,10 @@ var component = normalizeComponent(
|
|
|
12142
12138
|
});
|
|
12143
12139
|
;// CONCATENATED MODULE: ./components/demo/src/read-over.vue?vue&type=script&lang=js
|
|
12144
12140
|
/* harmony default export */ var src_read_overvue_type_script_lang_js = (read_overvue_type_script_lang_js);
|
|
12145
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.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/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/read-over.vue?vue&type=style&index=0&id=
|
|
12141
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.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/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/read-over.vue?vue&type=style&index=0&id=6e49adbb&prod&lang=scss&scoped=true
|
|
12146
12142
|
// extracted by mini-css-extract-plugin
|
|
12147
12143
|
|
|
12148
|
-
;// CONCATENATED MODULE: ./components/demo/src/read-over.vue?vue&type=style&index=0&id=
|
|
12144
|
+
;// CONCATENATED MODULE: ./components/demo/src/read-over.vue?vue&type=style&index=0&id=6e49adbb&prod&lang=scss&scoped=true
|
|
12149
12145
|
|
|
12150
12146
|
;// CONCATENATED MODULE: ./components/demo/src/read-over.vue
|
|
12151
12147
|
|
|
@@ -12158,11 +12154,11 @@ var component = normalizeComponent(
|
|
|
12158
12154
|
|
|
12159
12155
|
var read_over_component = normalizeComponent(
|
|
12160
12156
|
src_read_overvue_type_script_lang_js,
|
|
12161
|
-
|
|
12162
|
-
|
|
12157
|
+
read_overvue_type_template_id_6e49adbb_scoped_true_render,
|
|
12158
|
+
read_overvue_type_template_id_6e49adbb_scoped_true_staticRenderFns,
|
|
12163
12159
|
false,
|
|
12164
12160
|
null,
|
|
12165
|
-
"
|
|
12161
|
+
"6e49adbb",
|
|
12166
12162
|
null
|
|
12167
12163
|
|
|
12168
12164
|
)
|
|
@@ -12651,8 +12647,8 @@ var member_table_component = normalizeComponent(
|
|
|
12651
12647
|
;// 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/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=script&lang=js
|
|
12652
12648
|
|
|
12653
12649
|
|
|
12650
|
+
// import {generateReview, registerSse, criticismApply, reanswerReview} from '../api/index';
|
|
12654
12651
|
|
|
12655
|
-
// import { generateReview, loopPoll, criticismApply, reanswerReview } from '../api/index';
|
|
12656
12652
|
|
|
12657
12653
|
|
|
12658
12654
|
|
|
@@ -12697,9 +12693,10 @@ var member_table_component = normalizeComponent(
|
|
|
12697
12693
|
// sse会话id,
|
|
12698
12694
|
tabList: [],
|
|
12699
12695
|
showTableList: [],
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12696
|
+
cacheUserId: [],
|
|
12697
|
+
loopFlag: 0,
|
|
12698
|
+
replayId: {}
|
|
12699
|
+
// sseState: {}
|
|
12703
12700
|
};
|
|
12704
12701
|
},
|
|
12705
12702
|
watch: {
|
|
@@ -12714,14 +12711,18 @@ var member_table_component = normalizeComponent(
|
|
|
12714
12711
|
});
|
|
12715
12712
|
} else {
|
|
12716
12713
|
this.showFilter = false;
|
|
12717
|
-
|
|
12718
|
-
this.
|
|
12714
|
+
this.cacheUserId = [];
|
|
12715
|
+
this.replayId = {};
|
|
12716
|
+
clearInterval(this.loopFlag);
|
|
12717
|
+
// this.sseState.close();
|
|
12719
12718
|
}
|
|
12720
12719
|
},
|
|
12721
12720
|
listData: {
|
|
12722
12721
|
handler() {
|
|
12723
|
-
this.listDataError();
|
|
12724
|
-
this.
|
|
12722
|
+
// this.listDataError();
|
|
12723
|
+
if (this.listData && this.listData.length > 0) {
|
|
12724
|
+
this.tabList = this.listData;
|
|
12725
|
+
}
|
|
12725
12726
|
},
|
|
12726
12727
|
immediate: true
|
|
12727
12728
|
}
|
|
@@ -12757,23 +12758,18 @@ var member_table_component = normalizeComponent(
|
|
|
12757
12758
|
stretchContainer() {
|
|
12758
12759
|
this.stretch = !this.stretch;
|
|
12759
12760
|
},
|
|
12760
|
-
messageBack(message, type) {
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
}
|
|
12773
|
-
this.$set(this.replyCache, currentId, backData);
|
|
12774
|
-
// 更新当前值
|
|
12775
|
-
this.analyzeData = this.replyCache[this.activeItem.id];
|
|
12776
|
-
},
|
|
12761
|
+
// messageBack(message, type) {
|
|
12762
|
+
// const { bizId, comments: [backData] } = message;
|
|
12763
|
+
// const { content } = backData;
|
|
12764
|
+
// let currentId = bizId;
|
|
12765
|
+
// backData.jsonContent = JSON.parse(content);
|
|
12766
|
+
// if (type === 'reanswer') {
|
|
12767
|
+
// currentId = this.activeItem.id;
|
|
12768
|
+
// }
|
|
12769
|
+
// this.$set(this.replyCache, currentId, backData);
|
|
12770
|
+
// // 更新当前值
|
|
12771
|
+
// this.analyzeData = this.replyCache[this.activeItem.id];
|
|
12772
|
+
// },
|
|
12777
12773
|
async sendAiInfo() {
|
|
12778
12774
|
const paramsData = [];
|
|
12779
12775
|
this.listData.map(item => {
|
|
@@ -12784,20 +12780,44 @@ var member_table_component = normalizeComponent(
|
|
|
12784
12780
|
answer: item.answer,
|
|
12785
12781
|
answerer: item.title
|
|
12786
12782
|
});
|
|
12787
|
-
|
|
12783
|
+
this.cacheUserId.push(item.id);
|
|
12788
12784
|
});
|
|
12789
|
-
this.sseState = await registerSse(this.sseSessionId, this.messageBack, ()
|
|
12790
|
-
|
|
12791
|
-
});
|
|
12792
|
-
|
|
12793
|
-
|
|
12785
|
+
// this.sseState = await registerSse(this.sseSessionId, this.messageBack, ()=> {
|
|
12786
|
+
// generateReview(paramsData, this.sseSessionId, this.courseId);
|
|
12787
|
+
// });
|
|
12788
|
+
await generateReview(paramsData, this.sseSessionId, this.courseId);
|
|
12789
|
+
this.loopFlag = setInterval(async () => {
|
|
12790
|
+
this.loopInfo();
|
|
12791
|
+
}, 3000);
|
|
12792
|
+
this.loopInfo();
|
|
12793
|
+
},
|
|
12794
|
+
async loopInfo() {
|
|
12795
|
+
const loopRes = await loopPoll(this.cacheUserId);
|
|
12796
|
+
if (loopRes) {
|
|
12797
|
+
for (let message of loopRes) {
|
|
12798
|
+
const {
|
|
12799
|
+
bizId,
|
|
12800
|
+
comments: [backData]
|
|
12801
|
+
} = message;
|
|
12802
|
+
const {
|
|
12803
|
+
content,
|
|
12804
|
+
id
|
|
12805
|
+
} = backData;
|
|
12806
|
+
const currentId = bizId;
|
|
12807
|
+
// 说明是重新回答
|
|
12808
|
+
if (this.replayId[currentId] && this.replayId[currentId] === id) {
|
|
12809
|
+
continue;
|
|
12810
|
+
}
|
|
12811
|
+
backData.jsonContent = JSON.parse(content);
|
|
12812
|
+
this.$set(this.replyCache, currentId, backData);
|
|
12813
|
+
// 更新当前值
|
|
12814
|
+
this.analyzeData = this.replyCache[this.activeItem.id] || {};
|
|
12815
|
+
delete this.replayId[currentId];
|
|
12816
|
+
}
|
|
12817
|
+
return;
|
|
12818
|
+
}
|
|
12819
|
+
throw new Error('--loopRes--返回值为空');
|
|
12794
12820
|
},
|
|
12795
|
-
// loopInfo() {
|
|
12796
|
-
// this.loopFlag = setInterval(async () => {
|
|
12797
|
-
// const loopRes = await loopPoll(this.cacheUserId);
|
|
12798
|
-
// console.log(loopRes);
|
|
12799
|
-
// }, 3000);
|
|
12800
|
-
// },
|
|
12801
12821
|
async notyApply(data, orgData) {
|
|
12802
12822
|
const {
|
|
12803
12823
|
id
|
|
@@ -12807,6 +12827,7 @@ var member_table_component = normalizeComponent(
|
|
|
12807
12827
|
this.$emit('on-noty-apply', data, orgData);
|
|
12808
12828
|
},
|
|
12809
12829
|
async onReanswer(list) {
|
|
12830
|
+
this.replayId[this.activeItem.id] = list.id;
|
|
12810
12831
|
this.analyzeData = {};
|
|
12811
12832
|
this.replyCache[this.activeItem.id] = null;
|
|
12812
12833
|
await reanswerReview(this.sseSessionId, list.id);
|
|
@@ -12859,10 +12880,10 @@ var member_table_component = normalizeComponent(
|
|
|
12859
12880
|
});
|
|
12860
12881
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
12861
12882
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
12862
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.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/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
12883
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.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/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=80ef9b0e&prod&lang=scss&scoped=true
|
|
12863
12884
|
// extracted by mini-css-extract-plugin
|
|
12864
12885
|
|
|
12865
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
12886
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=80ef9b0e&prod&lang=scss&scoped=true
|
|
12866
12887
|
|
|
12867
12888
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue
|
|
12868
12889
|
|
|
@@ -12879,7 +12900,7 @@ var main_component = normalizeComponent(
|
|
|
12879
12900
|
staticRenderFns,
|
|
12880
12901
|
false,
|
|
12881
12902
|
null,
|
|
12882
|
-
"
|
|
12903
|
+
"80ef9b0e",
|
|
12883
12904
|
null
|
|
12884
12905
|
|
|
12885
12906
|
)
|