|
@@ -84,34 +84,33 @@
|
|
|
</div>
|
|
|
<div class="cc_b_right">
|
|
|
<div v-if="showFileUrl">
|
|
|
- <div style="display: flex;">
|
|
|
+ <!-- <div style="display: flex;">
|
|
|
<div :class="['preview_file', { active: fileMenu === 1 }]" @click="fileMenu = 1">文档预览</div>
|
|
|
<div :class="['bianji_file', { active: fileMenu === 2 }]" @click="fileMenu = 2">文档编辑</div>
|
|
|
- </div>
|
|
|
- <div v-if="fileMenu == 1" style="margin:10px;">
|
|
|
- <div class="cc_b_r_menu">
|
|
|
- <div v-for="(item, index) in menuList" @click="changeMenuIndex(index)" :key="index"
|
|
|
- :class="{ 'cc_b_r_menu_active': menuIndex == index }">
|
|
|
- <el-tooltip class="item" effect="dark" :content="item.name" placement="top">
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-tooltip>
|
|
|
- <!-- <div class="cc_b_r_btn"> -->
|
|
|
- <span class="close_icon" :class="{ active: menuIndex == index }"
|
|
|
- @click="deleteMenuItem(index)"></span>
|
|
|
- <!-- </div> -->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="cc_b_r_content" style="max-height: 700px; overflow-y: auto;">
|
|
|
- <csvTableView v-if="showFileUrl" :url="showFileUrl" />
|
|
|
+ </div> -->
|
|
|
+ <!-- <div v-if="fileMenu == 1" style="margin:10px;"> -->
|
|
|
+ <div class="cc_b_r_menu">
|
|
|
+ <div v-for="(item, index) in menuList" @click="changeMenuIndex(index)" :key="index"
|
|
|
+ :class="{ 'cc_b_r_menu_active': menuIndex == index }">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="item.name" placement="top">
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ <!-- <div class="cc_b_r_btn"> -->
|
|
|
+ <span class="close_icon" :class="{ active: menuIndex == index }"
|
|
|
+ @click="deleteMenuItem(index)"></span>
|
|
|
+ <!-- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="fileMenu == 2">
|
|
|
+ <div class="cc_b_r_content">
|
|
|
+ <csvTableView v-if="showFileUrl" :url="showFileUrl" />
|
|
|
+ </div>
|
|
|
+ <!-- </div> -->
|
|
|
+ <!-- <div v-if="fileMenu == 2">
|
|
|
<div class="bianji_area">
|
|
|
<span></span>
|
|
|
</div>
|
|
|
|
|
|
- </div>
|
|
|
-
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
<div v-else style="margin: 40px 0px 0px 20px">
|
|
|
<div>--官方能力演示--</div>
|
|
@@ -152,7 +151,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="h_t_table">
|
|
|
- <el-table :data="tableData" style="width: 100%">
|
|
|
+ <el-table :data="tableData" style="width: 100%;cursor: pointer" @row-click="handleRowClick">
|
|
|
<el-table-column prop="name" label="会话名称" width="180">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="create_at" label="创建时间" width="180">
|
|
@@ -164,11 +163,11 @@
|
|
|
<div style="display: flex;">
|
|
|
<div class="bianji">
|
|
|
<i class="el-icon-edit"></i>
|
|
|
- <span @click="openUpdate(scope.row.name, scope.row.id)">重命名</span>
|
|
|
+ <span @click.stop="openUpdate(scope.row.name, scope.row.id)">重命名</span>
|
|
|
</div>
|
|
|
<div class="bianji">
|
|
|
<i class="el-icon-delete"></i>
|
|
|
- <span @click="delete_talk(scope.row.id)">删除</span>
|
|
|
+ <span @click.stop="delete_talk(scope.row.id)">删除</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -235,6 +234,7 @@ export default {
|
|
|
role: this.$route.query.role,
|
|
|
cid: this.$route.query.cid,
|
|
|
menuList: [],
|
|
|
+ aiContentArea: [],
|
|
|
menuIndex: 0,
|
|
|
courseInfoList: [],
|
|
|
page: 1,
|
|
@@ -243,7 +243,7 @@ export default {
|
|
|
talkName1: '',
|
|
|
chatId: '',
|
|
|
formLabelWidth: "100px",
|
|
|
- pageSize: 9,
|
|
|
+ pageSize: 8,
|
|
|
loading: true,
|
|
|
activeMenu: 1, // 默认激活第一个
|
|
|
fileMenu: 1,
|
|
@@ -263,6 +263,19 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleRowClick(row, column, event) {
|
|
|
+ this.activeMenu = 1;
|
|
|
+ // console.log(JSON.stringify(row))
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // 调试输出
|
|
|
+ console.log(this.$refs.aiChat);
|
|
|
+ if (this.$refs.aiChat) {
|
|
|
+ this.$refs.aiChat.getChatList(row.chatid);
|
|
|
+ } else {
|
|
|
+ console.error('aiChat ref is not available');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
openUpdate(name, id) {
|
|
|
this.talkName1 = name;
|
|
|
this.chatId = id;
|
|
@@ -380,8 +393,12 @@ export default {
|
|
|
this.menuList.push(data)
|
|
|
console.log("menuList", this.menuList);
|
|
|
|
|
|
-
|
|
|
},
|
|
|
+ // pushAiContent(data){
|
|
|
+ // this.aiContentArea.push(...data),
|
|
|
+ // console.log("aiContentArea",this.aiContentArea);
|
|
|
+
|
|
|
+ // },
|
|
|
clearFileData() {
|
|
|
this.menuList = []
|
|
|
},
|
|
@@ -506,10 +523,14 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
showFileUrl() {
|
|
|
- if (this.menuList.length) {
|
|
|
+ if(this.activeMenu == 2){
|
|
|
+ this.menuList = ''
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ else if (this.menuList.length) {
|
|
|
return this.menuList[this.menuIndex].url
|
|
|
} else {
|
|
|
- return ""
|
|
|
+ return "";
|
|
|
}
|
|
|
},
|
|
|
aiBoxRightCid() {
|
|
@@ -960,6 +981,9 @@ export default {
|
|
|
.cc_b_r_content {
|
|
|
width: 100%;
|
|
|
height: calc(100% - 50px);
|
|
|
+ max-height: 700px;
|
|
|
+ overflow-y: auto;
|
|
|
+ max-height: 83vh;
|
|
|
}
|
|
|
|
|
|
.cc_b_r_btn {
|
|
@@ -1014,7 +1038,7 @@ export default {
|
|
|
|
|
|
.history_talk {
|
|
|
background: linear-gradient(to bottom, #dfeaff, #ffffff, #f6f9ff);
|
|
|
- margin: 10px;
|
|
|
+ margin: 13px;
|
|
|
padding: 10px;
|
|
|
}
|
|
|
|
|
@@ -1033,6 +1057,11 @@ export default {
|
|
|
box-shadow: 0px 0px 12px rgb(190 193 199);
|
|
|
}
|
|
|
|
|
|
+.h_t_table>>>.el-table td,
|
|
|
+.el-table th {
|
|
|
+ padding: 9px 0;
|
|
|
+}
|
|
|
+
|
|
|
.bianji {
|
|
|
display: flex;
|
|
|
align-items: center;
|