|
@@ -135,7 +135,7 @@ export default {
|
|
|
// TODO 问答给数据后将该字段替换
|
|
|
filePage: '2',
|
|
|
fileTotalPage: null,
|
|
|
- sqlAnswerKey: [],
|
|
|
+ // sqlAnswerKey: [],
|
|
|
collapseActiveNames: [],
|
|
|
main: null,
|
|
|
askUrl: '/als/algorithm/execute/qa',
|
|
@@ -252,13 +252,14 @@ export default {
|
|
|
|
|
|
const { code, data } = await handlerAsk(sendInput)
|
|
|
if (code == 200) {
|
|
|
- const newData = this.handleData(JSON.parse(data))
|
|
|
- // const newData = this.handleData(data)
|
|
|
- this.chatInfo.pop()
|
|
|
- this.chatInfo.push(newData)
|
|
|
-
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // const newData = this.handleData(data)
|
|
|
+ const newData = this.handleData(JSON.parse(data))
|
|
|
+ this.chatInfo.pop()
|
|
|
+ this.chatInfo.push(newData)
|
|
|
+ })
|
|
|
// 获取sql回答的键
|
|
|
- this.sqlAnswerKey = Object.keys(JSON.parse(data).sqlAnswer[0])
|
|
|
+ // this.sqlAnswerKey = Object.keys(JSON.parse(data).sqlAnswer[0])
|
|
|
}
|
|
|
} catch (error) {}
|
|
|
},
|
|
@@ -321,9 +322,9 @@ export default {
|
|
|
question: data.question,
|
|
|
userId: data.userId
|
|
|
})
|
|
|
- if (newData.sqlAnswer) {
|
|
|
- this.sqlAnswerKey = Object.keys(newData.sqlAnswer[0])
|
|
|
- }
|
|
|
+ // if (newData.sqlAnswer) {
|
|
|
+ // this.sqlAnswerKey = Object.keys(newData.sqlAnswer[0])
|
|
|
+ // }
|
|
|
this.chatInfo.push(newData)
|
|
|
}
|
|
|
this.chatLoading = false
|