-
{{item.str}}
+
+
+ {{item.str}}
+
+
+
+
![]()
+
+
+
+
+
+
+
@@ -45,7 +60,36 @@ export default defineComponent({
let timeTop:any = 0;
let timeInput:any = 0;
let record:any = ref([
-
+ {
+ state:1,
+ str:"1111111111"
+ },
+ {
+ state:2,
+ str:"2222222222222"
+ },
+ {
+ state:1,
+ str:"1111111111"
+ },
+ {
+ state:2,
+ str:"2222222222222"
+ },
+ {
+ state:1,
+ str:"1111111111",
+ img:[
+ {url:'http://18.167.251.121:9000/aida-clothing/image/image_1695621083.572033.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20230926%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230926T064349Z&X-Amz-Expires=28800&X-Amz-SignedHeaders=host&X-Amz-Signature=74f33d78f94925b1cd2e0198efad99432d7f285f951d5fc1ac11bf77fc802238'},
+ {url:'http://18.167.251.121:9000/aida-clothing/image/image_1695621083.572033.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20230926%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230926T064349Z&X-Amz-Expires=28800&X-Amz-SignedHeaders=host&X-Amz-Signature=74f33d78f94925b1cd2e0198efad99432d7f285f951d5fc1ac11bf77fc802238'},
+ {url:'http://18.167.251.121:9000/aida-clothing/image/image_1695621083.572033.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20230926%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230926T064349Z&X-Amz-Expires=28800&X-Amz-SignedHeaders=host&X-Amz-Signature=74f33d78f94925b1cd2e0198efad99432d7f285f951d5fc1ac11bf77fc802238'},
+ {url:'http://18.167.251.121:9000/aida-clothing/image/image_1695621083.572033.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20230926%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230926T064349Z&X-Amz-Expires=28800&X-Amz-SignedHeaders=host&X-Amz-Signature=74f33d78f94925b1cd2e0198efad99432d7f285f951d5fc1ac11bf77fc802238'},
+ ]
+ },
+ {
+ state:2,
+ str:"2222222222222"
+ },
])
const userInfo:any = {}
@@ -89,6 +133,9 @@ export default defineComponent({
},
methods: {
robotBtn(){
+
+
+ console.log(2323);
if(!this.robotTop||!this.robotInput){
this.robotTop = true
this.robotInput = true
@@ -97,22 +144,23 @@ export default defineComponent({
this.robotTop = false
this.robotInput = false
}
+ // let noRefresh = false;
+ // this.$router.push({ name: 'library', params: { noRefresh: false } });
this.textScroll()//聊天定位到最低部
this.createTimer()
},
textScroll(){
this.$nextTick(()=>{
if(this.robotDom && this.robotChildDom){
- // const items = this.robotChildDom._rawValue
- let num = 0
- for (let index = 0; index < (this.$refs.robotChildDom as any).length; index++) {
- const height = (this.$refs.robotChildDom as any)[index].clientHeight;
- num = num+40+height
+ // const items = this.robotChildDom._rawValue
+ let num = 0
+ for (let index = 0; index < (this.$refs.robotChildDom as any).length; index++) {
+ const height = (this.$refs.robotChildDom as any)[index].clientHeight;
+ num = num+40+height
+ }
+ this.robotDom.scrollTop = num
}
- this.robotDom.scrollTop = num
- }
})
-
},
robotmax(){//点击内容就设置为true显示 重置定时器
this.createTimer()
@@ -128,13 +176,26 @@ export default defineComponent({
str:this.chatCentent
})
this.textScroll()
+ let sessionId
+ if(sessionStorage.getItem("sessionId") == null){
+ let randomNum:any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
+ sessionStorage.setItem('sessionId', randomNum);
+ sessionId = randomNum
+ }else{
+ sessionId = sessionStorage.getItem("sessionId")
+ }
+ // sessionStorage.setItem('username', '23123123123');
+ // sessionStorage.getItem("username")
+ // sessionStorage.removeItem
+ console.log(sessionId);
+
let a = true
let data = {
"user_id" : this.userInfo.userId,
// "message" : this.chatCentent,
// // "message" : "Hello, can you tell me what holiday is on July 1st",
// "session_id":""
- "session_id":"session_1",
+ "session_id":sessionId,
"message" : this.chatCentent,
}
let interaction = {onDownloadProgress: (progressEvent:any) => {
@@ -155,6 +216,8 @@ export default defineComponent({
// Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
(rv) => {
if(rv){
+ console.log(rv);
+
this.record.push({
state:1,
str:rv.output
@@ -168,6 +231,35 @@ export default defineComponent({
});
this.chatCentent = ""
},
+ likeFile(item:any,str:string){
+ if(str == 'like'){
+ let data = {
+ generateDetailId:item.id,
+ level1Type:"Moodboard",
+ level2Type: '',
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
+ }
+ Https.axiosPost(Https.httpUrls.generateLike, data).then(
+ (rv) => {
+ console.log(rv);
+ item.like = true
+
+ }
+ ).catch(res=>{
+ });
+ }else{
+ let data = {
+ generateDetailId:item.id,
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
+ }
+ Https.axiosGet(Https.httpUrls.generateDislike, {params:data}).then(
+ (rv) => {
+ item.like = false
+ }
+ ).catch(res=>{
+ });
+ }
+ },
//创建定时器
createTimer() {
if (this.robotTop || this.robotInput) {
@@ -201,10 +293,11 @@ export default defineComponent({
z-index: 9999;
// width: 400px;
.robot_top{
- // width: 70%;
- width: 25rem;
+ // width: 25rem;
+ width: 30rem;
margin-left: auto;
- height: 14rem;
+ height: 30rem;
+ // height: 20rem;
overflow-x: hidden;
transition: .3s all;
opacity: 0;
@@ -215,10 +308,60 @@ export default defineComponent({
&.robot_top::-webkit-scrollbar{display: none;}
.robot_text{
font-size: 1.4rem;
- padding: .5rem 1rem;
+ padding: 1rem 1.5rem;
display: inline-block;
border-radius: 2rem;
max-width: 80%;
+ .robot_img{
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: center;
+ .robot_img_item{
+ margin-bottom: 5%;
+ margin-right: 2.5%;
+ max-height: 100%;
+ position: relative;
+ width: 40%;
+ .delete_like_file_block{
+ display: none;
+ width: 3.2rem;
+ height: 3.2rem;
+ background: rgba(0,0,0,0.6);
+ border-radius: 0.4rem;
+ position: absolute;
+ top: 0rem;
+ right: 0rem;
+ text-align: center;
+ line-height: 3.2rem;
+ left: auto;
+ cursor: pointer;
+ i{
+ font-size: 1.6rem;
+ color: #fff;
+ &.fi-rr-heart{
+
+ }
+ &.fi-sr-heart{
+ color: red;
+ }
+ }
+ }
+ &:hover .delete_like_file_block{
+ display: block;
+ }
+ }
+ img{
+ width: 100%;
+ height: 8rem;
+ object-fit: contain;
+ cursor: auto;
+ // width: auto;
+ }
+ img:nth-child(2n-1){
+ // margin-right: 5%;
+ }
+ }
}
.text_left,.text_right{
margin: 2rem 0;
diff --git a/src/tool/https.js b/src/tool/https.js
index e6d66ba3..fa71cf28 100644
--- a/src/tool/https.js
+++ b/src/tool/https.js
@@ -21,7 +21,7 @@ import { message } from 'ant-design-vue';
// }
let httpIp
if(process.env.NODE_ENV == 'development'){
- httpIp = 'http://192.168.1.6:10086'
+ httpIp = 'http://192.168.1.12:10086'
}else{
httpIp = ''
}
@@ -106,7 +106,9 @@ export const Https = {
saveOrEditTemplatePoint:'/api/library/saveOrEditTemplatePoint',//保存或者编辑template打点
libraryModelsDot:'/api/library/modelsDot',//Models打点预览
// pythonChatStream:'/api/python/chatStream',//机器人助力
- chatStreamTest:`${httpIp}/robot/chat_stream_test`,//机器人助力
+ // chatStreamTest:`${httpIp}/robot/chat_stream_test`,//机器人助力
+ chatStreamTest:`${httpIp}/api/python/chatStream`,//机器人助力
+
workspaceDetail:`${httpIp}/api/workspace/detail`,//用户习惯详情
workspaceenumValues:`${httpIp}/api/workspace/enumValues`,//getSex