|
@@ -8,11 +8,13 @@ import { chatApi } from '@/api/chat';
|
|
|
import { getAreaOptions, getOrderAreaOptions } from './config/echartOptions'
|
|
|
import * as echarts from 'echarts';
|
|
|
import dayjs from 'dayjs';
|
|
|
-import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
|
|
-import isSameOrAfter from 'dayjs/plugin/isSameOrAfter';
|
|
|
|
|
|
import { useInfinite, useScroll, useChat, useRecommend } from '@/composables';
|
|
|
|
|
|
+const { recordList, isFetching, onScrolltolower, onReset, addHistoryRecord } = useInfinite('/front/bigModel/qa/pageList', { module: 1 });
|
|
|
+const { scrollRef, scrollToBottom, scrollToBottomIfAtBottom } = useScroll();
|
|
|
+const { chatDataSource, addChat, updateChat, clearChat, updateById } = useChat();
|
|
|
+
|
|
|
const ANSWER_ID_KEY = '@@id@@';
|
|
|
|
|
|
const arr = []
|
|
@@ -27,19 +29,13 @@ for (let i = 0; i < 2; i++) {
|
|
|
|
|
|
|
|
|
const columns = ref(arr)
|
|
|
-console.log(columns);
|
|
|
+
|
|
|
const tableData = ref([{ no0: 1, no1: 2 }]);
|
|
|
|
|
|
-dayjs.extend(isSameOrBefore);
|
|
|
-dayjs.extend(isSameOrAfter);
|
|
|
|
|
|
let chart = null;
|
|
|
let controller = new AbortController();
|
|
|
|
|
|
-const { recordList, isFetching, onScrolltolower, onReset, addHistoryRecord } = useInfinite('/front/bigModel/qa/pageList', { module: 1 });
|
|
|
-const { scrollRef, scrollToBottom, scrollToBottomIfAtBottom } = useScroll();
|
|
|
-const { chatDataSource, addChat, updateChat, clearChat, updateById } = useChat();
|
|
|
-
|
|
|
const echartRef = ref([]);
|
|
|
const message = useMessage();
|
|
|
const reportDate = ref();
|
|
@@ -299,7 +295,7 @@ const dateStartDisabled = (timestamp) => {
|
|
|
if (timeEnd) {
|
|
|
const currentDate = dayjs(timestamp);
|
|
|
const endDateValue = dayjs(timeEnd);
|
|
|
- return !currentDate.isSameOrBefore(endDateValue);
|
|
|
+ return !currentDate.isBefore(endDateValue);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -308,18 +304,10 @@ const dateEndDisabled = (timestamp) => {
|
|
|
if (timeBegin) {
|
|
|
const currentDate = dayjs(timestamp);
|
|
|
const endDateValue = dayjs(timeBegin);
|
|
|
- return !currentDate.isSameOrAfter(endDateValue);
|
|
|
+ return !currentDate.isAfter(endDateValue);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-onMounted(async () => {
|
|
|
-
|
|
|
- await nextTick();
|
|
|
- console.log( echartRef.value );
|
|
|
- // chart = echarts.init(echartRef.value, 'light');
|
|
|
-})
|
|
|
-
|
|
|
onUnmounted(() => {
|
|
|
controller.abort();
|
|
|
})
|
|
@@ -355,9 +343,15 @@ onUnmounted(() => {
|
|
|
<div class="conversation-item" v-show="chatDataSource.length">
|
|
|
<div v-for="item in chatDataSource" :key="item.id">
|
|
|
<ChatAsk :content="item.showVal" :sessionId="item.sessionId"></ChatAsk>
|
|
|
- <ChatAnswer :id="item.id" :content="item.answer" :loading="item.loading" :delay-loading="item.delayLoading"
|
|
|
- :isSatisfied="item.isSatisfied" @on-click-icon="params => updateById(params)" v-if="!item.isChart">
|
|
|
- </ChatAnswer>
|
|
|
+ <ChatAnswer
|
|
|
+ :id="item.id"
|
|
|
+ :content="item.answer"
|
|
|
+ :loading="item.loading"
|
|
|
+ :delay-loading="item.delayLoading"
|
|
|
+ :isSatisfied="item.isSatisfied"
|
|
|
+ @on-click-icon="params => updateById(params)"
|
|
|
+ v-if="!item.isChart"
|
|
|
+ ></ChatAnswer>
|
|
|
<ChatAnswer content="11111111111" :loading="item.loading" :delay-loading="item.delayLoading" >
|
|
|
<div v-show="item.isChart && !item.delayLoading">
|
|
|
<div class="echart-warpper" >
|