|
@@ -1,8 +1,23 @@
|
|
<template>
|
|
<template>
|
|
<div class="heightFull widthFull d-flex">
|
|
<div class="heightFull widthFull d-flex">
|
|
- <HomeSide @update="onUpdate"></HomeSide>
|
|
|
|
|
|
+ <HomeSide ref="homeSideRefs" @update="onUpdate">
|
|
|
|
+ <template #header>
|
|
|
|
+ <v-list-item light>
|
|
|
|
+ <v-list-item-content>
|
|
|
|
+ <v-list-item-title>
|
|
|
|
+ <v-btn color="primary" outlined @click="onNew">
|
|
|
|
+ <v-icon left>
|
|
|
|
+ mdi-chat-plus-outline
|
|
|
|
+ </v-icon>
|
|
|
|
+ 新对话
|
|
|
|
+ </v-btn>
|
|
|
|
+ </v-list-item-title>
|
|
|
|
+ </v-list-item-content>
|
|
|
|
+ </v-list-item>
|
|
|
|
+ </template>
|
|
|
|
+ </HomeSide>
|
|
<div class="d-flex chart heightFull widthFull pa-3">
|
|
<div class="d-flex chart heightFull widthFull pa-3">
|
|
- <div class="chart-list heightFull overflow-y-auto mr-3">
|
|
|
|
|
|
+ <div v-if="showChart" class="chart-list heightFull overflow-y-auto mr-3">
|
|
<div v-for="item in items" :key="item.key" class="chart-type mb-3" @click="onChange(item.key)">
|
|
<div v-for="item in items" :key="item.key" class="chart-type mb-3" @click="onChange(item.key)">
|
|
<div>
|
|
<div>
|
|
<span class="mdi" :class="item.icon"></span>
|
|
<span class="mdi" :class="item.icon"></span>
|
|
@@ -17,13 +32,22 @@
|
|
<FullscreenToggle v-if="showChart" class="chart-content-show heightFull white mr-3 overflow-hidden pa-3 position-relative" ref="box">
|
|
<FullscreenToggle v-if="showChart" class="chart-content-show heightFull white mr-3 overflow-hidden pa-3 position-relative" ref="box">
|
|
<template v-slot="{ toggle, isFullscreen }">
|
|
<template v-slot="{ toggle, isFullscreen }">
|
|
<div class="position-absolute d-flex flex-column" style="right: 10px; top: 80px; z-index: 999">
|
|
<div class="position-absolute d-flex flex-column" style="right: 10px; top: 80px; z-index: 999">
|
|
- <v-btn
|
|
|
|
- icon
|
|
|
|
- color="primary"
|
|
|
|
- @click="toggle"
|
|
|
|
- >
|
|
|
|
- <v-icon>{{ isFullscreen ? 'mdi-arrow-collapse' : 'mdi-arrow-expand'}}</v-icon>
|
|
|
|
- </v-btn>
|
|
|
|
|
|
+ <v-tooltip left>
|
|
|
|
+ <template v-slot:activator="{ on, attrs }">
|
|
|
|
+ <v-btn icon color="primary" v-bind="attrs" v-on="on" @click="toggle">
|
|
|
|
+ <v-icon>{{ isFullscreen ? 'mdi-arrow-collapse' : 'mdi-arrow-expand'}}</v-icon>
|
|
|
|
+ </v-btn>
|
|
|
|
+ </template>
|
|
|
|
+ <span>全屏</span>
|
|
|
|
+ </v-tooltip>
|
|
|
|
+ <v-tooltip left>
|
|
|
|
+ <template v-slot:activator="{ on, attrs }">
|
|
|
|
+ <v-btn icon color="primary" v-bind="attrs" v-on="on" @click="onSave">
|
|
|
|
+ <v-icon>mdi-content-save-check-outline</v-icon>
|
|
|
|
+ </v-btn>
|
|
|
|
+ </template>
|
|
|
|
+ <span>保存</span>
|
|
|
|
+ </v-tooltip>
|
|
<v-btn
|
|
<v-btn
|
|
icon
|
|
icon
|
|
color="primary"
|
|
color="primary"
|
|
@@ -36,7 +60,12 @@
|
|
<InitChart ref="chart" class="heightFull widthFull"></InitChart>
|
|
<InitChart ref="chart" class="heightFull widthFull"></InitChart>
|
|
</template>
|
|
</template>
|
|
</FullscreenToggle>
|
|
</FullscreenToggle>
|
|
- <DataChartEditChat ref="dataChartEditChatRefs" :class="showChart ? 'widthHalf' : 'widthFull'" @render="onRender"></DataChartEditChat>
|
|
|
|
|
|
+ <DataChartEditChat
|
|
|
|
+ ref="dataChartEditChatRefs"
|
|
|
|
+ :class="showChart ? 'widthHalf' : 'widthFull'"
|
|
|
|
+ @render="onRender"
|
|
|
|
+ @new="onUpdateConversation"
|
|
|
|
+ ></DataChartEditChat>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -83,6 +112,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onNew () {
|
|
|
|
+ this.$refs.dataChartEditChatRefs.onNew()
|
|
|
|
+ },
|
|
onClose () {
|
|
onClose () {
|
|
this.showChart = false
|
|
this.showChart = false
|
|
this.chart = null
|
|
this.chart = null
|
|
@@ -165,7 +197,13 @@ export default {
|
|
},
|
|
},
|
|
onUpdate (data) {
|
|
onUpdate (data) {
|
|
this.$refs.dataChartEditChatRefs.update(data)
|
|
this.$refs.dataChartEditChatRefs.update(data)
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ onUpdateConversation () {
|
|
|
|
+ this.$refs.homeSideRefs.getConversationList()
|
|
|
|
+ },
|
|
|
|
+ // 保存图表
|
|
|
|
+ onSave () {}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|