|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="chat bg-white">
|
|
<div class="chat bg-white">
|
|
- <div class="flex items-center justify-center h-screen">
|
|
|
|
- <div class="leftInfo relative">
|
|
|
|
|
|
+ <div class="flex items-center h-screen relative" >
|
|
|
|
+ <div class="leftInfo relative" v-show="!showNodata" >
|
|
<div class="history">
|
|
<div class="history">
|
|
<!-- historyActive -->
|
|
<!-- historyActive -->
|
|
<div class="historyBox" v-for="(item, index) in allRecords" :key="index">
|
|
<div class="historyBox" v-for="(item, index) in allRecords" :key="index">
|
|
@@ -20,13 +20,31 @@
|
|
</div>
|
|
</div>
|
|
<!-- <transition name="el-zoom-in-top"> -->
|
|
<!-- <transition name="el-zoom-in-top"> -->
|
|
<div class="dialogueList mt-4" v-show="item.open">
|
|
<div class="dialogueList mt-4" v-show="item.open">
|
|
|
|
+ <div class="flex justify-between mb-2">
|
|
|
|
+ <el-button type="primary" class="flex-1" round @click="newStart_juese(item)">新的对话</el-button>
|
|
|
|
+ <el-dropdown
|
|
|
|
+ class="flex justify-end items-center ml-2"
|
|
|
|
+ trigger="click"
|
|
|
|
+ @command="handleCommand2($event, item)"
|
|
|
|
+ >
|
|
|
|
+ <div class=" w-8 h-8 bg-gray-100 rounded flex justify-center items-center cursor-pointer">
|
|
|
|
+ <i slot="reference" class="el-icon-more"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown" >
|
|
|
|
+ <el-dropdown-item command="2">删除</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
<div class="dialogue flex justify-between items-center w-full h-16 rounded-md px-2 mb-2 cursor-pointer relative"
|
|
<div class="dialogue flex justify-between items-center w-full h-16 rounded-md px-2 mb-2 cursor-pointer relative"
|
|
:class="info.id == item.id && index2 == recordsIndex && 'historyActive'"
|
|
:class="info.id == item.id && index2 == recordsIndex && 'historyActive'"
|
|
v-for="(item2, index2) in item.chatCharacterList"
|
|
v-for="(item2, index2) in item.chatCharacterList"
|
|
:key="index2"
|
|
:key="index2"
|
|
@click.self="clickDialogue(item, item2, index2)"
|
|
@click.self="clickDialogue(item, item2, index2)"
|
|
- >
|
|
|
|
- <span @click.self="clickDialogue(item, item2, index2)">{{ item2.chatTitle }}</span>
|
|
|
|
|
|
+ >
|
|
|
|
+ <span @click.self="clickDialogue(item, item2, index2)">
|
|
|
|
+ <i v-if="item2.sceneId || item2.sceneIcon" class="el-icon-video-camera"></i>
|
|
|
|
+ {{ item2.chatTitle }}
|
|
|
|
+ </span>
|
|
<span @click.self="clickDialogue(item, item2, index2)" class=" text-sm text-gray-500">{{ item2.createTime }}</span>
|
|
<span @click.self="clickDialogue(item, item2, index2)" class=" text-sm text-gray-500">{{ item2.createTime }}</span>
|
|
<el-dropdown
|
|
<el-dropdown
|
|
class="dialogueIconBg absolute h-16 w-20 right-0 flex justify-end items-center pr-4"
|
|
class="dialogueIconBg absolute h-16 w-20 right-0 flex justify-end items-center pr-4"
|
|
@@ -46,11 +64,12 @@
|
|
<!-- </transition> -->
|
|
<!-- </transition> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="chatInfo absolute top-0 left-0 w-full h-full z-30 bg-white" v-show="showInfo">
|
|
|
|
- <div class="flex flex-col p-4">
|
|
|
|
|
|
+ <!-- 角色详情 -->
|
|
|
|
+ <div class="chatInfo absolute top-0 left-0 w-full h-full z-30 bg-white" v-show="showInfo == 1">
|
|
|
|
+ <div class="flex flex-col p-4 h-full">
|
|
<div class="flex justify-between items-center text-base mb-3">
|
|
<div class="flex justify-between items-center text-base mb-3">
|
|
<div>角色详情</div>
|
|
<div>角色详情</div>
|
|
- <i class="el-icon-close cursor-pointer" @click="showInfo = false"></i>
|
|
|
|
|
|
+ <i class="el-icon-close cursor-pointer" @click="showInfoChange(0)"></i>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
<span class="chatInfo_photo">
|
|
<span class="chatInfo_photo">
|
|
@@ -64,7 +83,7 @@
|
|
<div class="flex mt-4">
|
|
<div class="flex mt-4">
|
|
<div class="hot flex w-auto items-center px-2 py-1 text-sm mr-2 rounded-full">
|
|
<div class="hot flex w-auto items-center px-2 py-1 text-sm mr-2 rounded-full">
|
|
<v-icon name="fire" scale="1"/>
|
|
<v-icon name="fire" scale="1"/>
|
|
- <span class="ml-1">855.8k</span>
|
|
|
|
|
|
+ <span class="ml-1">{{ info.hotCount }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-around mt-4">
|
|
<div class="flex justify-around mt-4">
|
|
@@ -76,7 +95,7 @@
|
|
<div class="mt-5 text-base pb-3 border-b border-gray-200">
|
|
<div class="mt-5 text-base pb-3 border-b border-gray-200">
|
|
<div>
|
|
<div>
|
|
<i class="el-icon-document"></i>
|
|
<i class="el-icon-document"></i>
|
|
- 描述
|
|
|
|
|
|
+ 简介
|
|
</div>
|
|
</div>
|
|
<div class="mt-3 text-sm max-h-48">
|
|
<div class="mt-3 text-sm max-h-48">
|
|
{{ info.prologue }}
|
|
{{ info.prologue }}
|
|
@@ -111,22 +130,39 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
</transition>
|
|
- <div class="mt-5 text-base pb-3">
|
|
|
|
|
|
+ <div class="mt-5 text-base pb-3 flex-1 flex flex-col">
|
|
<div>
|
|
<div>
|
|
<!-- <i class="el-icon-document"></i> -->
|
|
<!-- <i class="el-icon-document"></i> -->
|
|
查看场景
|
|
查看场景
|
|
</div>
|
|
</div>
|
|
<div class="mt-3 text-sm max-h-48">
|
|
<div class="mt-3 text-sm max-h-48">
|
|
- <el-empty description="暂无场景"></el-empty>
|
|
|
|
- <div class="flex justify-center">
|
|
|
|
- <el-button type="primary" round>创建场景</el-button>
|
|
|
|
|
|
+ <div v-if="info.sceneList && info.sceneList.length > 0" class="grid grid-cols-2 gap-2 mb-4 cursor-pointer">
|
|
|
|
+ <div class="flex flex-col justify-center" v-for="(item, index) in info.sceneList" :key="index" @click="sceneChange(item)">
|
|
|
|
+ <img class=" rounded w-full h-24 object-cover" :src="baseApi + item.background" alt="">
|
|
|
|
+ <div>{{ item.sceneName }}</div>
|
|
|
|
+ <div class=" text-gray-400">{{ item.sceneDescription }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <el-empty v-else description="暂无场景"></el-empty>
|
|
|
|
+ <div class="flex justify-center mt-10">
|
|
|
|
+ <el-button type="primary" round @click="toCreateScene">创建场景</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 场景详情 -->
|
|
|
|
+ <div class="absolute top-0 left-0 w-full h-full z-30 bg-white overflow-hidden" v-show="showInfo == 2">
|
|
|
|
+ <div class="flex flex-col p-4 h-full">
|
|
|
|
+ <div class="flex justify-between items-center text-base mb-3">
|
|
|
|
+ <div>场景详情</div>
|
|
|
|
+ <i class="el-icon-close cursor-pointer" @click="showInfoChange(0)"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class=" text-gray-500">{{ sceneInfo.sceneDescription }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="content">
|
|
|
|
|
|
+ <div class="content" :class="fullScreen && 'contentFull'" v-show="!showNodata" :style="{ backgroundImage: `url(${baseApi}${sceneInfo.background})`}">
|
|
<!-- <div class="leftImg">
|
|
<!-- <div class="leftImg">
|
|
<img :src="baseApi + info.picture" alt="">
|
|
<img :src="baseApi + info.picture" alt="">
|
|
<div class="aiInfo">
|
|
<div class="aiInfo">
|
|
@@ -144,13 +180,37 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
</div> -->
|
|
-
|
|
|
|
- <div class="chat-box">
|
|
|
|
|
|
+ <div class="fullScreenButton rounded-full border border-gray-200" @click="clickFullScreen">
|
|
|
|
+ <i class="el-icon-arrow-left" v-if="!fullScreen"></i>
|
|
|
|
+ <i class="el-icon-arrow-right" v-else></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="chat-box" >
|
|
<div class="chatBoxTitle absolute top-0">
|
|
<div class="chatBoxTitle absolute top-0">
|
|
<div>
|
|
<div>
|
|
{{ info.characterName }}
|
|
{{ info.characterName }}
|
|
|
|
+ <el-dropdown
|
|
|
|
+ v-if="sceneId"
|
|
|
|
+ class="flex justify-end items-center"
|
|
|
|
+ trigger="click"
|
|
|
|
+ @command="handleCommand3"
|
|
|
|
+ @visible-change="dropdown3Show = !dropdown3Show"
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ <div slot="reference" class="flex justify-center items-center cursor-pointer text-white">
|
|
|
|
+ 已进入场景:{{ sceneInfo.sceneName }}
|
|
|
|
+ <i class="el-icon-arrow-up ml-2" style="font-size: 16px;" v-if="dropdown3Show"></i>
|
|
|
|
+ <i class="el-icon-arrow-down ml-2" style="font-size: 16px;" v-else></i>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown" >
|
|
|
|
+ <el-dropdown-item command="1">场景详情</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="2">新场景对话</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="3">回到常规对话</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
</div>
|
|
</div>
|
|
- <div class="flex w-60 justify-between">
|
|
|
|
|
|
+ <div class="flex w-60 justify-end">
|
|
<el-tooltip effect="dark" content="设定" placement="bottom">
|
|
<el-tooltip effect="dark" content="设定" placement="bottom">
|
|
<el-popover
|
|
<el-popover
|
|
placement="bottom"
|
|
placement="bottom"
|
|
@@ -159,26 +219,26 @@
|
|
<div class="p-2">
|
|
<div class="p-2">
|
|
<div class="flex justify-between mb-4">
|
|
<div class="flex justify-between mb-4">
|
|
<span>语音自动播放</span>
|
|
<span>语音自动播放</span>
|
|
- <el-switch v-model="value1">
|
|
|
|
|
|
+ <el-switch v-model="setting.value1">
|
|
</el-switch>
|
|
</el-switch>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-between">
|
|
<div class="flex justify-between">
|
|
<span>全屏幕</span>
|
|
<span>全屏幕</span>
|
|
- <el-switch v-model="value1">
|
|
|
|
|
|
+ <el-switch v-model="setting.value2">
|
|
</el-switch>
|
|
</el-switch>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <i slot="reference" class="fa-solid fa-sliders cursor-pointer text-xl"></i>
|
|
|
|
|
|
+ <i slot="reference" class="fa-solid fa-sliders cursor-pointer text-xl mr-6"></i>
|
|
</el-popover>
|
|
</el-popover>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip effect="dark" content="角色详情" placement="bottom">
|
|
<el-tooltip effect="dark" content="角色详情" placement="bottom">
|
|
- <i class="fa-solid fa-file-invoice cursor-pointer text-xl" @click="showInfo = true"></i>
|
|
|
|
|
|
+ <i class="fa-solid fa-file-invoice cursor-pointer text-xl mr-6" @click="showInfoChange(1)"></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
- <el-tooltip effect="dark" content="开始新的对话" placement="bottom">
|
|
|
|
- <i class="fa-solid fa-comment-medical cursor-pointer text-xl" @click="newStart"></i>
|
|
|
|
|
|
+ <el-tooltip v-if="!sceneId" effect="dark" content="开始新的对话" placement="bottom">
|
|
|
|
+ <i class="fa-solid fa-comment-medical cursor-pointer text-xl mr-6" @click="newStart"></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip effect="dark" content="历史对话" placement="bottom">
|
|
<el-tooltip effect="dark" content="历史对话" placement="bottom">
|
|
- <i class="fa-solid fa-clock-rotate-left cursor-pointer text-xl" @click="showInfo = false"></i>
|
|
|
|
|
|
+ <i class="fa-solid fa-clock-rotate-left cursor-pointer text-xl" @click="showInfoChange(0)"></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -197,7 +257,7 @@
|
|
<div class="message mt-4 ml-4 p-2 rounded-r-md rounded-bl-md text-xs" >
|
|
<div class="message mt-4 ml-4 p-2 rounded-r-md rounded-bl-md text-xs" >
|
|
<div class="yyPlayBg mb-2 w-16 p-1 cursor-pointer" >
|
|
<div class="yyPlayBg mb-2 w-16 p-1 cursor-pointer" >
|
|
<img v-if="audioPlayIndex == index" class="yyPlay" src="@/assets/images/播放/yyPlay1.png" alt="" >
|
|
<img v-if="audioPlayIndex == index" class="yyPlay" src="@/assets/images/播放/yyPlay1.png" alt="" >
|
|
- <img v-else class="yyPlay" src="@/assets/images/播放/yyPlay.png" alt="" @click="playAudio(item, index)">
|
|
|
|
|
|
+ <img v-else class="yyPlay" src="@/assets/images/播放/yyPlay.png" alt="" @click="playAudio(index)">
|
|
<!-- <svg-icon class="icon" class-name="speech-icon" icon-class="speech" @click.stop="click" /> -->
|
|
<!-- <svg-icon class="icon" class-name="speech-icon" icon-class="speech" @click.stop="click" /> -->
|
|
</div>
|
|
</div>
|
|
<div v-show="!item.content" class="loadingMessage" >
|
|
<div v-show="!item.content" class="loadingMessage" >
|
|
@@ -246,13 +306,17 @@
|
|
<i class="el-icon-picture-outline text-2xl cursor-pointer"></i>
|
|
<i class="el-icon-picture-outline text-2xl cursor-pointer"></i>
|
|
<i class="el-icon-s-opportunity text-2xl cursor-pointer"></i>
|
|
<i class="el-icon-s-opportunity text-2xl cursor-pointer"></i>
|
|
</div>
|
|
</div>
|
|
- <button @click="getStreamChatWithWeb" class="px-4 rounded-r-lg text-sm text-gray-400" :class="content && 'planeColor'">
|
|
|
|
|
|
+ <button @click.prevent="getStreamChatWithWeb" class="px-4 rounded-r-lg text-sm text-gray-400" :class="content && 'planeColor'">
|
|
<v-icon name="paper-plane" scale="1.5"/>
|
|
<v-icon name="paper-plane" scale="1.5"/>
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div v-show="showNodata" class=" w-full h-full flex flex-col justify-center items-center">
|
|
|
|
+ <el-empty description="暂无聊天记录,点击按钮并探索新角色。"></el-empty>
|
|
|
|
+ <el-button type="primary" round @click="$router.push('/')">寻找一个角色</el-button>
|
|
|
|
+ </div>
|
|
<el-dialog
|
|
<el-dialog
|
|
title="配置"
|
|
title="配置"
|
|
:visible.sync="showConfig"
|
|
:visible.sync="showConfig"
|
|
@@ -318,6 +382,8 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // 是否全屏
|
|
|
|
+ fullScreen: false,
|
|
// 角色所有聊天列表
|
|
// 角色所有聊天列表
|
|
allRecords: [],
|
|
allRecords: [],
|
|
// 聊天记录id
|
|
// 聊天记录id
|
|
@@ -327,7 +393,7 @@ export default {
|
|
recordsIndex: null,
|
|
recordsIndex: null,
|
|
showDetail: false,
|
|
showDetail: false,
|
|
showConfig: false,
|
|
showConfig: false,
|
|
- showInfo: false,
|
|
|
|
|
|
+ showInfo: 0,
|
|
messageOptions: [],
|
|
messageOptions: [],
|
|
info: {},
|
|
info: {},
|
|
messageLoading: false,
|
|
messageLoading: false,
|
|
@@ -339,11 +405,27 @@ export default {
|
|
radio2: null,
|
|
radio2: null,
|
|
radio3: null,
|
|
radio3: null,
|
|
},
|
|
},
|
|
|
|
+ // 对话接口是否返回错误状态
|
|
|
|
+ resError: false,
|
|
// 模型列表
|
|
// 模型列表
|
|
modelList: [],
|
|
modelList: [],
|
|
- value1: '',
|
|
|
|
|
|
+ setting: {
|
|
|
|
+ value1: false,
|
|
|
|
+ value2: false,
|
|
|
|
+ },
|
|
|
|
+
|
|
//音频地址
|
|
//音频地址
|
|
- audioUrl: ''
|
|
|
|
|
|
+ audioUrl: '',
|
|
|
|
+ //场景下拉菜单
|
|
|
|
+ dropdown3Show: false,
|
|
|
|
+ // 场景对话相关
|
|
|
|
+ sceneId: null,
|
|
|
|
+ sceneInfo: {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ showNodata() {
|
|
|
|
+ return this.allRecords.length == 0 && !this.$route.query.characterId
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -366,7 +448,10 @@ export default {
|
|
await this.getChatCharacterRecords()
|
|
await this.getChatCharacterRecords()
|
|
// 如果用角色id获取角色详情
|
|
// 如果用角色id获取角色详情
|
|
if (this.$route.query.characterId) {
|
|
if (this.$route.query.characterId) {
|
|
- this.showInfo = true
|
|
|
|
|
|
+ if (this.$route.query.sceneId) {
|
|
|
|
+ this.sceneId = this.$route.query.sceneId
|
|
|
|
+ }
|
|
|
|
+ this.showInfoChange(1)
|
|
await this.getDetail(this.$route.query.characterId)
|
|
await this.getDetail(this.$route.query.characterId)
|
|
} else {
|
|
} else {
|
|
this.allRecords[0].open = true
|
|
this.allRecords[0].open = true
|
|
@@ -377,20 +462,107 @@ export default {
|
|
// 获取模型列表
|
|
// 获取模型列表
|
|
this.getModelList()
|
|
this.getModelList()
|
|
},
|
|
},
|
|
|
|
+ // 左侧面板变化
|
|
|
|
+ showInfoChange(index) {
|
|
|
|
+ this.fullScreen = false
|
|
|
|
+ this.showInfo = index
|
|
|
|
+ },
|
|
|
|
+ // 全屏
|
|
|
|
+ clickFullScreen() {
|
|
|
|
+ this.fullScreen = !this.fullScreen
|
|
|
|
+ },
|
|
|
|
+ // 点击聊天记录切换聊天
|
|
async clickDialogue(value1, value2, index) {
|
|
async clickDialogue(value1, value2, index) {
|
|
|
|
+ console.log(value2, 'value2');
|
|
|
|
+ let _this = this
|
|
this.audioUrl = ""
|
|
this.audioUrl = ""
|
|
this.messageOptions = []
|
|
this.messageOptions = []
|
|
this.returnMessage = []
|
|
this.returnMessage = []
|
|
- // 点击聊天记录切换聊天
|
|
|
|
if (this.$route.query.characterId) {
|
|
if (this.$route.query.characterId) {
|
|
this.$route.query.characterId = value1.id
|
|
this.$route.query.characterId = value1.id
|
|
}
|
|
}
|
|
- await this.getDetail(value1.id)
|
|
|
|
-
|
|
|
|
|
|
+ if (!value2) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 如果点击的是场景聊天
|
|
|
|
+ if (value2.sceneId) {
|
|
|
|
+ this.sceneId = value2.sceneId
|
|
|
|
+ await this.getDetail(value1.id)
|
|
|
|
+ // 从角色详情中获取场景列表
|
|
|
|
+ let sceneList = this.info.sceneList
|
|
|
|
+ // 获取当前聊天对应的场景
|
|
|
|
+ for (let i = 0; i < sceneList.length; i++) {
|
|
|
|
+ const element = sceneList[i];
|
|
|
|
+ if (element.sceneId == value2.sceneId) {
|
|
|
|
+ _this.sceneInfo = element
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.sceneId = null
|
|
|
|
+ this.sceneInfo = {}
|
|
|
|
+ await this.getDetail(value1.id)
|
|
|
|
+ }
|
|
|
|
+
|
|
this.recordId = value2.id
|
|
this.recordId = value2.id
|
|
this.getChatRecord(value2.id)
|
|
this.getChatRecord(value2.id)
|
|
this.recordsIndex = index
|
|
this.recordsIndex = index
|
|
},
|
|
},
|
|
|
|
+ // 场景下拉菜单
|
|
|
|
+ handleCommand3(value) {
|
|
|
|
+ if (value == 1) {
|
|
|
|
+ this.showInfoChange(2)
|
|
|
|
+ } else if (value == 2) {
|
|
|
|
+ // 情况聊天记录
|
|
|
|
+ this.returnMessage = []
|
|
|
|
+ // 新建场景对话
|
|
|
|
+ this.newStart()
|
|
|
|
+ // 增加开场白
|
|
|
|
+ this.returnMessage.push({
|
|
|
|
+ role: 'assistant',
|
|
|
|
+ content: this.sceneInfo.sceneWelcome
|
|
|
|
+ })
|
|
|
|
+ } else if (value == 3) {
|
|
|
|
+ // 回到常规对话
|
|
|
|
+ // 遍历当前聊天记录是否有常规对话
|
|
|
|
+ let messages = null
|
|
|
|
+ for (let i = 0; i < this.allRecords.length; i++) {
|
|
|
|
+ const element = this.allRecords[i];
|
|
|
|
+ if (element.id == this.info.id) {
|
|
|
|
+ messages = element
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(messages, 'messages');
|
|
|
|
+ let flag = false
|
|
|
|
+ for (let i = 0; i < messages.chatCharacterList.length; i++) {
|
|
|
|
+ const element = messages.chatCharacterList[i];
|
|
|
|
+ console.log(element, 'element');
|
|
|
|
+ if (!element.sceneId) {
|
|
|
|
+ flag = true
|
|
|
|
+ this.clickDialogue(messages, element, i)
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 如果聊天记录里没有常规对话,则新增一个常规对话
|
|
|
|
+ if (!flag) {
|
|
|
|
+ this.sceneId = null
|
|
|
|
+ this.sceneInfo = {}
|
|
|
|
+ this.newStart()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 聊天记录列表-角色下拉菜单
|
|
|
|
+ handleCommand2(value, value1) {
|
|
|
|
+ if (value == 2) {
|
|
|
|
+ this.$confirm('此操作将永久删除该角色所有聊天记录, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.clearRecord(value1)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 聊天记录列表-角色-聊天记录下拉菜单
|
|
handleCommand(value, value1, value2) {
|
|
handleCommand(value, value1, value2) {
|
|
console.log(value, 'value');
|
|
console.log(value, 'value');
|
|
if (value == 1) {
|
|
if (value == 1) {
|
|
@@ -405,6 +577,30 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 聊天记录新增对话
|
|
|
|
+ async newStart_juese(value) {
|
|
|
|
+ console.log(value, 'value');
|
|
|
|
+ this.audioUrl = ""
|
|
|
|
+ this.messageOptions = []
|
|
|
|
+ this.returnMessage = []
|
|
|
|
+ // 点击聊天记录切换聊天
|
|
|
|
+ if (this.$route.query.characterId) {
|
|
|
|
+ this.$route.query.characterId = value.id
|
|
|
|
+ }
|
|
|
|
+ await this.getDetail(value.id)
|
|
|
|
+ this.recordId = await this.addChat()
|
|
|
|
+ for (let i = 0; i < this.allRecords.length; i++) {
|
|
|
|
+ const element = this.allRecords[i];
|
|
|
|
+ if (element.id == this.info.id) {
|
|
|
|
+ element.chatCharacterList.push({
|
|
|
|
+ chatTitle: "常规聊天",
|
|
|
|
+ createTime: '',
|
|
|
|
+ id: this.recordId
|
|
|
|
+ })
|
|
|
|
+ this.recordsIndex = element.chatCharacterList.length - 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 修改聊天记录标题
|
|
// 修改聊天记录标题
|
|
editDialogueTitle(value1, value2) {
|
|
editDialogueTitle(value1, value2) {
|
|
this.$prompt('新标题名称', '修改标题', {
|
|
this.$prompt('新标题名称', '修改标题', {
|
|
@@ -428,7 +624,9 @@ export default {
|
|
clearRecord(value1, value2) {
|
|
clearRecord(value1, value2) {
|
|
let params = {
|
|
let params = {
|
|
characterId: value1.id,
|
|
characterId: value1.id,
|
|
- recordId: value2.id
|
|
|
|
|
|
+ }
|
|
|
|
+ if (value2) {
|
|
|
|
+ params.recordId = value2.id
|
|
}
|
|
}
|
|
clearRecordApi(params).then(res => {
|
|
clearRecordApi(params).then(res => {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -438,7 +636,7 @@ export default {
|
|
this.getChatCharacterRecords()
|
|
this.getChatCharacterRecords()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getChatRecord(recordId) {
|
|
|
|
|
|
+ async getChatRecord(recordId) {
|
|
let params = {
|
|
let params = {
|
|
characterId: this.info.id,
|
|
characterId: this.info.id,
|
|
recordId: recordId
|
|
recordId: recordId
|
|
@@ -457,19 +655,48 @@ export default {
|
|
searchHistory(characterId) {
|
|
searchHistory(characterId) {
|
|
// 查看对话记录是否有选中的角色
|
|
// 查看对话记录是否有选中的角色
|
|
// console.log('查看对话记录是否有选中的角色');
|
|
// console.log('查看对话记录是否有选中的角色');
|
|
- console.log(this.allRecords, 'searchHistory');
|
|
|
|
let flg = false
|
|
let flg = false
|
|
for (let i = 0; i < this.allRecords.length; i++) {
|
|
for (let i = 0; i < this.allRecords.length; i++) {
|
|
const element = this.allRecords[i];
|
|
const element = this.allRecords[i];
|
|
// 如果有则选中角色的最新一条记录并获取对话聊天记录
|
|
// 如果有则选中角色的最新一条记录并获取对话聊天记录
|
|
if (element.id == characterId) {
|
|
if (element.id == characterId) {
|
|
- flg = true
|
|
|
|
console.log(element, '查看对话记录是否有选中的角色');
|
|
console.log(element, '查看对话记录是否有选中的角色');
|
|
|
|
+ flg = true
|
|
element.open = true
|
|
element.open = true
|
|
- this.recordsIndex = element.chatCharacterList.length - 1
|
|
|
|
- let recordId = element.chatCharacterList[element.chatCharacterList.length - 1].id
|
|
|
|
- this.recordId = recordId
|
|
|
|
- this.getChatRecord(recordId)
|
|
|
|
|
|
+ // 二级对话判断当前是普通对话还是场景对话
|
|
|
|
+ // 取对应的最后一条消息记录
|
|
|
|
+ let chatCharacterList = element.chatCharacterList
|
|
|
|
+ let chatCharacter = null
|
|
|
|
+ let index = null
|
|
|
|
+ for (let i = 0; i < chatCharacterList.length; i++) {
|
|
|
|
+ const element2 = chatCharacterList[i];
|
|
|
|
+ if (this.$route.query.sceneId == element2.sceneId) {
|
|
|
|
+ chatCharacter = element2
|
|
|
|
+ index = i
|
|
|
|
+ } else if (!this.$route.query.sceneId && !element2.sceneId) {
|
|
|
|
+ chatCharacter = element2
|
|
|
|
+ index = i
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 如果有聊天记录则点击
|
|
|
|
+ if (chatCharacter) {
|
|
|
|
+ this.clickDialogue(element, chatCharacter, index)
|
|
|
|
+ } else {
|
|
|
|
+ // 如果没有场景聊天记录则新增场景聊天
|
|
|
|
+ // 从角色详情中获取场景列表
|
|
|
|
+ let sceneList = this.info.sceneList
|
|
|
|
+ // 获取当前聊天对应的场景
|
|
|
|
+ for (let i = 0; i < sceneList.length; i++) {
|
|
|
|
+ const element = sceneList[i];
|
|
|
|
+ if (element.sceneId == this.$route.query.sceneId) {
|
|
|
|
+ this.sceneInfo = element
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // this.recordsIndex = element.chatCharacterList.length - 1
|
|
|
|
+ // let recordId = element.chatCharacterList[element.chatCharacterList.length - 1].id
|
|
|
|
+ // this.recordId = recordId
|
|
|
|
+ // this.getChatRecord(recordId)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 如果没有聊天记录,则增加开场聊天引导
|
|
// 如果没有聊天记录,则增加开场聊天引导
|
|
@@ -482,7 +709,11 @@ export default {
|
|
console.log(res, '聊天记录');
|
|
console.log(res, '聊天记录');
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
const element = res.data[i];
|
|
const element = res.data[i];
|
|
- element.open = false
|
|
|
|
|
|
+ if(this.info.id == element.id) {
|
|
|
|
+ element.open = true
|
|
|
|
+ } else {
|
|
|
|
+ element.open = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.allRecords = res.data
|
|
this.allRecords = res.data
|
|
},
|
|
},
|
|
@@ -492,6 +723,9 @@ export default {
|
|
characterId: this.info.id,
|
|
characterId: this.info.id,
|
|
chatTitle: ""
|
|
chatTitle: ""
|
|
}
|
|
}
|
|
|
|
+ if (this.sceneId) {
|
|
|
|
+ params.sceneId = this.sceneId
|
|
|
|
+ }
|
|
let res = await addChatApi(params)
|
|
let res = await addChatApi(params)
|
|
console.log(res, '新增对话记录');
|
|
console.log(res, '新增对话记录');
|
|
return res.data
|
|
return res.data
|
|
@@ -503,7 +737,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
inputBoxClick() {
|
|
inputBoxClick() {
|
|
- console.log(this.$refs.input, 'this.$refs.input');
|
|
|
|
this.$refs.input.focus()
|
|
this.$refs.input.focus()
|
|
},
|
|
},
|
|
async getDetail(id) {
|
|
async getDetail(id) {
|
|
@@ -521,10 +754,23 @@ export default {
|
|
// })
|
|
// })
|
|
// localStorage.setItem(`[userId:${123},aiId:${this.info.id}]`, JSON.stringify(this.returnMessage));
|
|
// localStorage.setItem(`[userId:${123},aiId:${this.info.id}]`, JSON.stringify(this.returnMessage));
|
|
// }
|
|
// }
|
|
- this.returnMessage.push({
|
|
|
|
- role: 'assistant',
|
|
|
|
- content: this.info.firstContent
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.sceneId) {
|
|
|
|
+ let sceneList = this.info.sceneList
|
|
|
|
+ for (let i = 0; i < sceneList.length; i++) {
|
|
|
|
+ const element = sceneList[i];
|
|
|
|
+ if (element.sceneId == this.sceneId) {
|
|
|
|
+ this.returnMessage.push({
|
|
|
|
+ role: 'assistant',
|
|
|
|
+ content: element.sceneWelcome
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.returnMessage.push({
|
|
|
|
+ role: 'assistant',
|
|
|
|
+ content: this.info.firstContent
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
getGuidance(id) {
|
|
getGuidance(id) {
|
|
getGuidanceApi(id).then(res => {
|
|
getGuidanceApi(id).then(res => {
|
|
@@ -541,11 +787,20 @@ export default {
|
|
for (let i = 0; i < this.allRecords.length; i++) {
|
|
for (let i = 0; i < this.allRecords.length; i++) {
|
|
const element = this.allRecords[i];
|
|
const element = this.allRecords[i];
|
|
if (element.id == this.info.id) {
|
|
if (element.id == this.info.id) {
|
|
- element.chatCharacterList.push({
|
|
|
|
- chatTitle: "常规聊天",
|
|
|
|
- createTime: '',
|
|
|
|
- id: this.recordId
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.sceneId) {
|
|
|
|
+ element.chatCharacterList.push({
|
|
|
|
+ chatTitle: "场景聊天",
|
|
|
|
+ createTime: '',
|
|
|
|
+ id: this.recordId,
|
|
|
|
+ sceneIcon: true
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ element.chatCharacterList.push({
|
|
|
|
+ chatTitle: "常规聊天",
|
|
|
|
+ createTime: '',
|
|
|
|
+ id: this.recordId
|
|
|
|
+ })
|
|
|
|
+ }
|
|
this.recordsIndex = element.chatCharacterList.length - 1
|
|
this.recordsIndex = element.chatCharacterList.length - 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -563,6 +818,17 @@ export default {
|
|
this.getStreamChatWithWeb()
|
|
this.getStreamChatWithWeb()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 前往创建场景
|
|
|
|
+ toCreateScene() {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'CreateScene',
|
|
|
|
+ query: {
|
|
|
|
+ id: this.info.id,
|
|
|
|
+ picture: this.info.picture,
|
|
|
|
+ characterName: this.info.characterName,
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
async getStreamChatWithWeb_old() {
|
|
async getStreamChatWithWeb_old() {
|
|
this.messageLoading = true
|
|
this.messageLoading = true
|
|
if (!this.content) {
|
|
if (!this.content) {
|
|
@@ -626,6 +892,8 @@ export default {
|
|
}, 50)
|
|
}, 50)
|
|
},
|
|
},
|
|
async getStreamChatWithWeb() {
|
|
async getStreamChatWithWeb() {
|
|
|
|
+ this.textCache = ''
|
|
|
|
+ this.resError = false
|
|
this.messageLoading = true
|
|
this.messageLoading = true
|
|
if (!this.content) {
|
|
if (!this.content) {
|
|
return
|
|
return
|
|
@@ -639,16 +907,21 @@ export default {
|
|
content: this.content
|
|
content: this.content
|
|
})
|
|
})
|
|
let HistoryMessage = this.returnMessage
|
|
let HistoryMessage = this.returnMessage
|
|
|
|
+
|
|
// 历史记录取最新的20条传给后端
|
|
// 历史记录取最新的20条传给后端
|
|
if (HistoryMessage && HistoryMessage.length > 20) {
|
|
if (HistoryMessage && HistoryMessage.length > 20) {
|
|
HistoryMessage = HistoryMessage.slice(HistoryMessage.length - 1, 20)
|
|
HistoryMessage = HistoryMessage.slice(HistoryMessage.length - 1, 20)
|
|
}
|
|
}
|
|
let params = {
|
|
let params = {
|
|
- historyMessage: HistoryMessage || [],
|
|
|
|
|
|
+ historyMessage: HistoryMessage,
|
|
characterId: this.info.id,
|
|
characterId: this.info.id,
|
|
prompt: this.content,
|
|
prompt: this.content,
|
|
modelId: this.configForm.radio2,
|
|
modelId: this.configForm.radio2,
|
|
- recordId: this.recordId
|
|
|
|
|
|
+ recordId: this.recordId,
|
|
|
|
+ }
|
|
|
|
+ // 如果当前是场景对话则需要传sceneId
|
|
|
|
+ if (this.sceneId) {
|
|
|
|
+ params.sceneId = this.sceneId
|
|
}
|
|
}
|
|
// 新增一条ai信息
|
|
// 新增一条ai信息
|
|
this.returnMessage.push({
|
|
this.returnMessage.push({
|
|
@@ -674,15 +947,24 @@ export default {
|
|
const {done, value} = await reader.read()
|
|
const {done, value} = await reader.read()
|
|
// console.log(done, 'done');
|
|
// console.log(done, 'done');
|
|
if(done){
|
|
if(done){
|
|
- console.log(value, 'value');
|
|
|
|
|
|
+ console.log(value, '结束value');
|
|
// if (typeof(value) == "undefined") {
|
|
// if (typeof(value) == "undefined") {
|
|
// this.$message.error('错误')
|
|
// this.$message.error('错误')
|
|
// this.returnMessage.splice(this.returnMessage.length - 1, 1)
|
|
// this.returnMessage.splice(this.returnMessage.length - 1, 1)
|
|
// }
|
|
// }
|
|
// 每次对话完刷新聊天记录
|
|
// 每次对话完刷新聊天记录
|
|
this.getChatCharacterRecords()
|
|
this.getChatCharacterRecords()
|
|
- this.returnMessage = []
|
|
|
|
- this.getChatRecord(this.recordId)
|
|
|
|
|
|
+ let params = {
|
|
|
|
+ characterId: this.info.id,
|
|
|
|
+ recordId: this.recordId
|
|
|
|
+ }
|
|
|
|
+ let historyRes = await getChatRecordApi(params)
|
|
|
|
+ this.historyRes = historyRes.data
|
|
|
|
+ // 如果开启自动播放,则查询并播放语音
|
|
|
|
+ if (this.setting.value1 && !this.resError) {
|
|
|
|
+ let index = this.historyRes.length * 2
|
|
|
|
+ this.playAudio(index)
|
|
|
|
+ }
|
|
console.log('结束');
|
|
console.log('结束');
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -712,8 +994,10 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
if(JSON.parse(element).code == 500) {
|
|
if(JSON.parse(element).code == 500) {
|
|
|
|
+ console.log(JSON.parse(element), 'JSON.parse(element)');
|
|
this.returnMessage.splice(this.returnMessage.length - 1, 1)
|
|
this.returnMessage.splice(this.returnMessage.length - 1, 1)
|
|
- this.$message.error('系统错误请联系管理员')
|
|
|
|
|
|
+ this.$message.error(JSON.parse(element).content || '系统错误请联系管理员')
|
|
|
|
+ this.resError = true
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
let txt = JSON.parse(element).content
|
|
let txt = JSON.parse(element).content
|
|
@@ -760,40 +1044,79 @@ export default {
|
|
this.getStreamChatWithWeb()
|
|
this.getStreamChatWithWeb()
|
|
},
|
|
},
|
|
// 播放聊天语音
|
|
// 播放聊天语音
|
|
- playAudio(value, index) {
|
|
|
|
|
|
+ playAudio(index) {
|
|
console.log(index, 'index');
|
|
console.log(index, 'index');
|
|
console.log(this.historyRes, 'this.historyRes');
|
|
console.log(this.historyRes, 'this.historyRes');
|
|
- let history = this.historyRes[(index - 1) / 2]
|
|
|
|
|
|
+ let history = this.historyRes[ index / 2 - 1]
|
|
console.log(history, 'history');
|
|
console.log(history, 'history');
|
|
this.audioPlayIndex = index
|
|
this.audioPlayIndex = index
|
|
this.audioUrl = history.voiceFilePosition
|
|
this.audioUrl = history.voiceFilePosition
|
|
console.log(this.audioUrl, 'this.audioUrl');
|
|
console.log(this.audioUrl, 'this.audioUrl');
|
|
|
|
+ console.log(this.$refs.audio, 'this.$refs.audio');
|
|
this.$refs.audio.volume = 1
|
|
this.$refs.audio.volume = 1
|
|
- this.$refs.audio.play()
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs.audio.play()
|
|
|
|
+ }, 1000)
|
|
},
|
|
},
|
|
audioEnd() {
|
|
audioEnd() {
|
|
// console.log('播放结束');
|
|
// console.log('播放结束');
|
|
this.audioPlayIndex = null
|
|
this.audioPlayIndex = null
|
|
|
|
+ },
|
|
|
|
+ // 场景业务相关↓
|
|
|
|
+ async sceneChange(item) {
|
|
|
|
+ console.log(item, 'item');
|
|
|
|
+ this.$message({
|
|
|
|
+ message: `已进入场景${item.sceneName}`,
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ // 当用户选中场景
|
|
|
|
+ this.sceneInfo = item
|
|
|
|
+ // 切换当前场景id
|
|
|
|
+ this.sceneId = item.sceneId
|
|
|
|
+ // 情况聊天记录
|
|
|
|
+ this.returnMessage = []
|
|
|
|
+ // 新建场景对话
|
|
|
|
+ this.newStart()
|
|
|
|
+ // 增加开场白
|
|
|
|
+ // this.returnMessage.push({
|
|
|
|
+ // role: 'assistant',
|
|
|
|
+ // content: item.sceneWelcome
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-
|
|
|
|
|
|
+.fullScreenButton {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: 0;
|
|
|
|
+ transform: translateX(-50%) translateY(-50%);
|
|
|
|
+ z-index: 50;
|
|
|
|
+ background: #fff;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ width: 1.6rem;
|
|
|
|
+ height: 1.6rem;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
.chat {
|
|
.chat {
|
|
- min-height: 100vh;
|
|
|
|
|
|
+ height: 100vh;
|
|
}
|
|
}
|
|
.leftInfo {
|
|
.leftInfo {
|
|
width: 375px;
|
|
width: 375px;
|
|
height: 100%;
|
|
height: 100%;
|
|
padding: 32px 24px;
|
|
padding: 32px 24px;
|
|
|
|
+
|
|
|
|
|
|
>.history {
|
|
>.history {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
|
+ overflow: hidden;
|
|
>.historyBox {
|
|
>.historyBox {
|
|
padding: 8px;
|
|
padding: 8px;
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
@@ -819,6 +1142,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
>.chatInfo {
|
|
>.chatInfo {
|
|
|
|
+ overflow: hidden;
|
|
.chatInfo_photo {
|
|
.chatInfo_photo {
|
|
>img {
|
|
>img {
|
|
|
|
|
|
@@ -841,17 +1165,24 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.content {
|
|
.content {
|
|
- background-size: 100% 100%;
|
|
|
|
|
|
+ z-index: 40;
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-attachment: fixed;
|
|
|
|
+ background-size: cover;
|
|
|
|
+ background-color: #fff;
|
|
display: flex;
|
|
display: flex;
|
|
height: 100%;
|
|
height: 100%;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
width: calc(100% - 375px);
|
|
width: calc(100% - 375px);
|
|
border-left: solid 1px var(--color1);
|
|
border-left: solid 1px var(--color1);
|
|
-
|
|
|
|
|
|
+ transition: width 0.5s ease;
|
|
>.chat-box {
|
|
>.chat-box {
|
|
position: relative;
|
|
position: relative;
|
|
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgb(255, 255, 255) 20%, rgb(255, 255, 255) 75%, rgba(0, 0, 0, 0.4) 100%);
|
|
|
|
|
|
+ background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0) 75%, rgba(0, 0, 0, 0.4) 100%);
|
|
background-size: auto;
|
|
background-size: auto;
|
|
// border: 1px solid #635677 !important;
|
|
// border: 1px solid #635677 !important;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
@@ -871,6 +1202,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.contentFull {
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
.historyActive {
|
|
.historyActive {
|
|
background: var(--color1);
|
|
background: var(--color1);
|
|
}
|
|
}
|
|
@@ -970,6 +1304,8 @@ export default {
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
padding: 24px;
|
|
padding: 24px;
|
|
background: #fff;
|
|
background: #fff;
|
|
|
|
+ max-width: 900px;
|
|
|
|
+ margin: 0 auto;
|
|
}
|
|
}
|
|
.planeColor {
|
|
.planeColor {
|
|
color: var(--bg-color1);
|
|
color: var(--bg-color1);
|