|
@@ -79,6 +79,10 @@ import InitChart from '@/components/Charts/initChart'
|
|
import { cloneDeep } from 'lodash'
|
|
import { cloneDeep } from 'lodash'
|
|
import HomeSide from './homeSide.vue'
|
|
import HomeSide from './homeSide.vue'
|
|
import FullscreenToggle from '@/components/FullscreenToggle'
|
|
import FullscreenToggle from '@/components/FullscreenToggle'
|
|
|
|
+import {
|
|
|
|
+ getConversationsById,
|
|
|
|
+ getConversationsByIdThroughReact
|
|
|
|
+} from '@/api/dataChart'
|
|
export default {
|
|
export default {
|
|
name: 'HomeIndex',
|
|
name: 'HomeIndex',
|
|
components: {
|
|
components: {
|
|
@@ -203,8 +207,17 @@ export default {
|
|
this.chart.setOption(_option, true)
|
|
this.chart.setOption(_option, true)
|
|
this.chart.hideLoading()
|
|
this.chart.hideLoading()
|
|
},
|
|
},
|
|
- onUpdate (data) {
|
|
|
|
- this.$refs.dataChartEditChatRefs.update(data)
|
|
|
|
|
|
+ async onUpdate (conversationId) {
|
|
|
|
+ this.$refs.dataChartEditChatRefs.loading = true
|
|
|
|
+ try {
|
|
|
|
+ const getApi = this.react ? getConversationsByIdThroughReact : getConversationsById
|
|
|
|
+ const { data } = await getApi(conversationId)
|
|
|
|
+ this.$refs.dataChartEditChatRefs.update(data)
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.$snackbar.error(error)
|
|
|
|
+ } finally {
|
|
|
|
+ this.$refs.dataChartEditChatRefs.loading = false
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onUpdateConversation () {
|
|
onUpdateConversation () {
|
|
this.$refs.homeSideRefs.getConversationList()
|
|
this.$refs.homeSideRefs.getConversationList()
|