Compare commits

..

52 Commits

Author SHA1 Message Date
zxj
4c453e3974 fix:跳转登录判断是否被嵌入 2025-11-22 14:28:58 +08:00
zxj
47dde458de fix:修复被嵌页面token过期不一致问题 2025-11-21 10:33:35 +08:00
joshen
bf20eced9b Merge branch 'master' into ebiz-uat-2025-11-06 2025-11-17 18:58:49 +08:00
670788339
8f2da1c736 取消processStatus setup写法 2025-11-17 18:25:29 +08:00
670788339
322172edec Merge branch 'master-20251023-tag' into merge-20251113-tag
# Conflicts:
#	src/components/Course/courseTag.vue
2025-11-17 13:28:18 +08:00
670788339
c801dc8a3d 精品课导航样式 2025-11-14 10:32:42 +08:00
670788339
838e704ab0 精品课导航样式 2025-11-14 08:58:42 +08:00
670788339
d3e891e5cc 精品课导航样式 2025-11-14 08:45:27 +08:00
670788339
40ac85f1fe 在线标签提示改版 2025-11-13 18:43:33 +08:00
670788339
6ee8eaca00 课程库样式调整 2025-11-13 14:29:23 +08:00
670788339
d78cc1f97c 标签选择后直接关闭下拉框 2025-11-13 09:00:48 +08:00
670788339
2576174e95 当输入文字与标签匹配时 选择下拉框匹配标签 手动输入文字未直接消失 2025-11-13 08:51:51 +08:00
670788339
7316215809 当输入文字与标签匹配时 选择下拉框匹配标签 手动输入文字未直接消失 2025-11-13 08:47:31 +08:00
670788339
c5e794ef45 Merge branch 'master-20251023-tag' into merge-20251113-tag 2025-11-12 17:16:17 +08:00
670788339
720cff1d1e 提示修改 2025-11-12 14:54:24 +08:00
hz
f3cc59d313 feat: 修复 setup 异常 2025-11-12 12:41:34 +08:00
670788339
dc57becb0d 精品课点击全部未显示选中 2025-11-12 11:20:11 +08:00
670788339
a94d101853 还原 2025-11-12 10:55:35 +08:00
670788339
426ed75bc3 精品课全部切换 2025-11-12 10:51:14 +08:00
670788339
7e8b807825 标签提示样式调整 2025-11-12 10:19:26 +08:00
670788339
bf13c953be 标签提示 2025-11-12 09:17:39 +08:00
670788339
8d07122420 标签提示 2025-11-12 09:05:16 +08:00
670788339
471a790010 课程详情页 标签与x人学习 留点间距 2025-11-11 18:13:01 +08:00
670788339
d39e1e98ef 提示文案更改 2025-11-11 18:06:29 +08:00
670788339
a82a65da8e 课程库样式调整 2025-11-11 16:58:59 +08:00
670788339
2070466786 在线课标签样式 2025-11-11 16:38:51 +08:00
670788339
57d9f9b483 课程库标签高亮显示 2025-11-11 15:42:36 +08:00
670788339
1710e34f89 全部选中样式 2025-11-11 14:26:57 +08:00
670788339
e292a57b20 课程详情页标签样式 2025-11-11 10:44:24 +08:00
670788339
88c83af460 1111修改课程库内容导航底色样式 2025-11-11 09:10:04 +08:00
670788339
a78bac9368 1110修改样式 2025-11-10 19:26:10 +08:00
670788339
f121a2aaf9 1110修改样式 2025-11-10 19:01:19 +08:00
670788339
8228b33cb0 提示 2025-11-10 18:49:54 +08:00
670788339
702255d9d0 精品课标签导航调整样式 2025-11-10 10:29:56 +08:00
670788339
df3e246d25 精品课标签导航取消加粗 2025-11-10 10:24:02 +08:00
670788339
1d20f11861 精品类型加标签 2025-11-10 08:54:17 +08:00
670788339
d5ec4c1833 开发 2025-11-09 16:25:03 +08:00
670788339
89a9be76d4 开发 2025-11-09 15:25:13 +08:00
670788339
73026b0ab5 在线标签无数据显示调整 2025-11-08 14:46:53 +08:00
670788339
9b11cc3f92 课程详情页标签调整 2025-11-08 11:42:43 +08:00
670788339
372a7c22ed 搜索条件取消红色标记 2025-11-08 09:29:40 +08:00
670788339
2678d22302 修改导航区域结构 2025-11-08 09:06:44 +08:00
hz
914b80c374 Merge branch '20250922-cyd' into ebiz-uat-2025-11-06
# Conflicts:
#	src/views/portal/case/Index.vue
#	src/views/portal/case/components/messages.vue
#	src/views/portal/case/components/sendMessage.vue
2025-11-06 09:45:06 +08:00
陈昱达
5d81f72f5f feat(ai-call):优化AI对话组件初始化逻辑
- 添加组件准备就绪状态标识
- 确保组件挂载完成后再执行自动滚动
-重置对话时正确处理组件状态
- 避免未初始化完成时的滚动操作
2025-11-06 17:20:26 +08:00
陈昱达
c9c34501ce feat(ai-call): 实现对话框尺寸和位置状态持久化
- 添加对话框尺寸状态保存与恢复功能
- 支持通过 sessionStorage 存储对话框宽高及坐标
-优化欢迎消息区域高度计算逻辑- 移除旧的状态处理机制,采用事件驱动方式- 确保在无保存状态时使用默认尺寸配置
2025-11-06 16:42:14 +08:00
陈昱达
1812c0901c feat(portal): 调整AI通话弹窗宽度
- 设置AI通话弹窗默认宽度为800px
- 优化弹窗显示效果和用户体验
2025-11-06 16:29:50 +08:00
陈昱达
13281d8a7d feat(portal): 调整AI通话弹窗宽度
- 设置AI通话弹窗默认宽度为800px
- 优化弹窗显示效果和用户体验
2025-11-06 15:53:38 +08:00
陈昱达
5fdf8efedb fix(portal): 调整AI通话弹窗显示逻辑
- 修改弹窗显示条件,确保仅在最大化状态下显示
- 移除冗余的宽度设置
-优化窗口状态控制逻辑
2025-11-06 15:46:11 +08:00
hz
58f517d2fb Merge remote-tracking branch 'origin/20250922-da' into ebiz-uat-2025-11-06 2025-11-06 09:40:28 +08:00
陈昱达
1a475c8612 feat(ai-call):优化对话框拖拽与缩放功能- 增强对话框拖拽逻辑,防止事件冒泡
- 完善对话框缩放功能,动态调整欢迎消息区域高度
- 修正机器人欢迎文本中的错别字
- 调整消息列表区域样式,优化滚动条显示
- 监听对话框可见性变化,确保内容正确渲染
2025-11-04 17:14:38 +08:00
陈昱达
01e4c676fc feat(portal/case): 增强AI对话窗口交互功能
-为sendMessage组件添加textarea输入框,支持多行输入
- 为AI对话窗口添加拖拽和调整大小功能
- 在最小化窗口中添加关闭按钮- 优化窗口样式和布局,提升用户体验
- 添加拖拽手柄和窗口控制按钮
- 实现窗口位置和大小的动态调整
- 引入open.png图标用于最小化窗口操作
2025-11-04 14:54:51 +08:00
陈昱达
2c630eac70 feat(ai-chat): 实现案例专家功能入口权限控制及消息展示优化- 修改AI聊天接口地址为本地开发环境地址
- 新增showCaseAiEntrance接口用于控制案例专家功能入口显示
- 优化消息组件中的案例引用展示逻辑,支持展开/收起功能
- 增加案例引用的上传时间、作者机构等信息展示
- 实现打字机效果的文本逐字显示功能
- 优化AI消息响应处理逻辑,支持think标签内容解析
2025-09-28 11:40:35 +08:00
17 changed files with 2480 additions and 1803 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div id="app">
<div id="app" style="width: 100vw">
<keep-alive :include="['case']">
<router-view />
12312

View File

@@ -52,7 +52,12 @@ const formRequest=axios.create({
if (code === 401) {
//Message({message: msg, type: 'error'});
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = this.webBaseUrl + ReLoginUrl;
} else {
window.location.href = this.webBaseUrl + ReLoginUrl;
}
// location.href = this.webBaseUrl + ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';

View File

@@ -54,7 +54,12 @@ const formRequest=axios.create({
} else {
if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = this.webBaseUrl + ReLoginUrl;
} else {
window.location.href = this.webBaseUrl + ReLoginUrl;
}
// location.href = this.webBaseUrl + ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';

View File

@@ -53,7 +53,12 @@ jsonRequest.interceptors.response.use(res => {
} else {
if (code == 6001) { //对方是字符串,所以这里不要使用三个等号
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';
@@ -117,7 +122,12 @@ formRequest.interceptors.response.use(res => {
} else {
if (code == 6001) { //对方是字符串,所以这里不要使用三个等号
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';

View File

@@ -50,7 +50,12 @@ jsonRequest.interceptors.response.use(res => {
} else {
if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = this.webBaseUrl + ReLoginUrl;
} else {
window.location.href = this.webBaseUrl + ReLoginUrl;
}
// location.href = this.webBaseUrl + ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';
@@ -112,7 +117,12 @@ formRequest.interceptors.response.use(res => {
} else {
if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = this.webBaseUrl + ReLoginUrl;
} else {
window.location.href = this.webBaseUrl + ReLoginUrl;
}
// location.href = this.webBaseUrl + ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';

View File

@@ -50,7 +50,12 @@ jsonRequest.interceptors.response.use(res => {
} else {
if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = this.webBaseUrl + ReLoginUrl;
} else {
window.location.href = this.webBaseUrl + ReLoginUrl;
}
// location.href = this.webBaseUrl + ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';
@@ -112,7 +117,12 @@ formRequest.interceptors.response.use(res => {
} else {
if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = this.webBaseUrl + ReLoginUrl;
} else {
window.location.href = this.webBaseUrl + ReLoginUrl;
}
// location.href = this.webBaseUrl + ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';

View File

@@ -440,6 +440,12 @@ const queryCrowd=function(query){
const ids=function (data){
return ajax.postJson('/xboe/m/course/manage/ids',data);
}
const saveTip = function() {
return ajax.postJson('/xboe/m/course/manage/saveTip');
}
export default {
saveBase,
submitCourse,
@@ -482,6 +488,7 @@ export default {
exportCourseAudit,
exportCourse,
queryCrowd,
ids
ids,
saveTip
}

View File

@@ -41,6 +41,43 @@
<el-button @click="toInputCourse()" type="primary">确定</el-button>
</span> -->
</el-dialog>
<!-- 蒙层引导组件 -->
<div v-if="showGuidance" class="guidance-overlay" @click="closeGuidance">
<div class="guidance-content">
<div class="guidance-title"></div> <!--新功能引导-->
<div class="guidance-steps">
<div class="guidance-step" :class="{ active: currentStep === 1 }">
<div class="step-number"></div>
<div class="step-content">
<div class="step-title">用标签为课程精准定位吸引更多学员可从以下维度构思</div>
<div class="step-desc" style="padding-left: 20px;"> 讲领域品质管理</div>
<div class="step-desc" style="padding-left: 20px;"> 教技能沟通技巧</div>
<div class="step-desc" style="padding-left: 20px;"> 涉内容5W1H分析法</div>
</div>
</div>
<!-- <div class="guidance-step" :class="{ active: currentStep === 2 }">
<div class="step-number">2</div>
<div class="step-content">
<div class="step-title">添加课程标签</div>
<div class="step-desc">为课程添加相关标签,最多5个便于搜索和分类,可回车创建新标签</div>
</div>
</div>-->
</div>
<!-- <div class="guidance-actions">
<el-button @click="previousStep1" v-if="currentStep > 1">上一步</el-button>
<el-button type="primary" @click="nextStep">
{{ currentStep === 2 ? '完成' : '下一步' }}
</el-button>
<el-button @click="closeGuidance">跳过引导</el-button>
</div>-->
</div>
</div>
<!-- 高亮指引元素 -->
<!-- <div v-if="showGuidance" class="highlight-element" :style="highlightStyle"></div>-->
<!--微课-->
<el-dialog v-if="weike.dlgShow" width="980px" :title="curCourseId == '' ? '新建课程' : '编辑课程'" :visible.sync="weike.dlgShow" :close-on-click-modal="false" custom-class="g-dialog" top="8vh">
<el-form label-width="100px" size="small" class="wei-from" style="min-height: 600px;">
@@ -71,11 +108,22 @@
clearable
v-model="sysTypeList"
:props="{ value: 'id', label: 'name' }"
:options="sysTypeListMap"></el-cascader>
:options="sysTypeListMap"
@focus="onContentTypeFocus"
@change="onContentTypeChange">
</el-cascader>
</el-form-item>
<el-form-item label="标签" required>
<courseTag ref="courseTag" :courseId="curCourseId" :sysTypeList="sysTypeList" :initialTags="courseTags" @change="handleTagsChange"></courseTag>
<el-form-item label="标签" required class="guidance-highlight" data-step="1" style="display: flex" >
<courseTag ref="courseTag" :courseId="curCourseId" :sysTypeList="sysTypeList"
:initialTags="courseTags" @change="handleTagsChange"
@focus="onTagFocus" style="width: 95%;">
</courseTag>
<el-tooltip content="点击查看标签新功能引导" placement="top">
<i class="el-icon-question" style="color: #409EFF; cursor: pointer;" @click="handleTagHelp"></i>
</el-tooltip>
</el-form-item>
<el-form-item label="资源归属" required>
<el-input placeholder="请选择" v-model="orgName" >
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
@@ -228,7 +276,9 @@
clearable
v-model="sysTypeList"
:props="{ value: 'id', label: 'name' }"
:options="sysTypeListMap">
:options="sysTypeListMap"
@focus="onContentTypeFocus"
@change="onContentTypeChange">
</el-cascader>
</el-form-item>
@@ -256,9 +306,16 @@
</el-select> -->
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
</el-form-item>
<el-form-item label="标签" required>
<courseTag ref="courseTag" :courseId="curCourseId" :sysTypeList="sysTypeList" :initialTags="courseTags" @change="handleTagsChange"></courseTag>
<el-form-item label="标签" required class="tag-from-item" data-step="1" >
<courseTag ref="courseTag" :courseId="curCourseId" :sysTypeList="sysTypeList"
:initialTags="courseTags" @change="handleTagsChange"
@focus="onTagFocus" >
</courseTag>
<el-tooltip content="点击查看标签新功能引导" placement="top">
<i class="el-icon-question" style="color: #409EFF; cursor: pointer;" @click="handleTagHelp"></i>
</el-tooltip>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model.trim="keywords" maxlength="100" @keyup.enter.native="changeKeywords" placeholder="请输入关键字"></el-input>
<el-tag v-for="(tag,index) in tips" size="small" :key="index" closable type="info" @close="closeKeywordsTag(tag,index)">
@@ -536,7 +593,13 @@ export default {
dlgShow: false
},
rightTypeId: {},
catalogSortDialogShow: false
catalogSortDialogShow: false,
// 蒙层引导相关数据
showGuidance: false,
currentStep: 1,
highlightStyle: {},
guidanceElements: [],
isFirstCreate: false, // 标记是否为首次创建
};
},
created() {
@@ -590,6 +653,9 @@ export default {
this.loadUserGroup();
},
methods: {
handleTagHelp(){
this.checkAndShowGuidance();
},
// 关键字的更改
changeKeywords(option){
if(option.target.value){
@@ -849,7 +915,7 @@ export default {
},
resetCurCourseContent() {
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentName: '', contentRefId: '', courseId: this.courseInfo.id };
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentRefId: '', courseId: this.courseInfo.id };
},
// chooseCourseType(item, idx, open) {
// this.courseChooseId = item.id;
@@ -897,19 +963,106 @@ export default {
this.courseInfo = rs.result;
this.curCourseId = this.courseInfo.id
console.log('保存课程成功',this.curCourseId)
console.log('isTip ',this.courseInfo.isTip)
// if(this.courseInfo.isTip){
// // 检查是否为首次创建,显示引导
// this.checkAndShowGuidance();
// }
if (this.courseChooseId == 1) {
this.weike.dlgShow = true;
} else {
this.biaoke.dlgShow = true;
}
this.$nextTick(() => {
this.initTagComponent();
});
// this.$nextTick(() => {
// this.initTagComponent();
// // 如果显示引导,初始化高亮元素
// if (this.showGuidance) {
// this.$nextTick(() => {
// this.initGuidanceElements();
// this.highlightCurrentStep();
// });
// }
// });
} else {
this.$message.error(rs.message);
}
});
},
// 检查并显示引导
checkAndShowGuidance() {
// 检查本地存储,判断是否为首次创建
// const hasShownGuidance = localStorage.getItem('course_creation_guidance_shown');
// if (!hasShownGuidance) {
this.showGuidance = true;
this.currentStep = 1;
this.isFirstCreate = true;
// 标记引导已显示
localStorage.setItem('course_creation_guidance_shown', 'true');
// apiCourse.saveTip();
// }
},
// 初始化引导元素
initGuidanceElements() {
this.guidanceElements = Array.from(document.querySelectorAll('.guidance-highlight'));
},
// 高亮当前步骤对应的元素
highlightCurrentStep() {
if (this.guidanceElements.length === 0) return;
const currentElement = this.guidanceElements[this.currentStep - 1];
if (currentElement) {
currentElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
},
// 下一步
nextStep() {
if (this.currentStep < 2) {
this.currentStep++;
this.highlightCurrentStep();
} else {
this.closeGuidance();
}
},
// 上一步
previousStep1() {
if (this.currentStep > 1) {
this.currentStep--;
this.highlightCurrentStep();
}
},
// 关闭引导
closeGuidance() {
this.showGuidance = false;
this.currentStep = 1;
this.highlightStyle = {};
},
// 内容分类获得焦点时的处理
onContentTypeFocus() {
if (this.showGuidance && this.currentStep === 1) {
this.currentStep = 2;
this.highlightCurrentStep();
}
},
// 内容分类改变时的处理
onContentTypeChange() {
if (this.showGuidance && this.currentStep === 1) {
this.currentStep = 2;
this.highlightCurrentStep();
}
},
// 标签获得焦点时的处理
onTagFocus() {
if (this.showGuidance && this.currentStep === 2) {
this.closeGuidance();
}
},
// 新增初始化标签方法
initTagComponent() {
if (this.$refs.courseTag) {
@@ -1816,4 +1969,126 @@ export default {
}
}
}
/* 蒙层样式 */
.guidance-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.guidance-content {
position: fixed;
background: white;
border-radius: 8px;
padding: 24px;
max-width: 500px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
z-index: 10000;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.guidance-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 20px;
text-align: center;
}
.guidance-steps {
margin-bottom: 20px;
}
.guidance-step {
display: flex;
align-items: flex-start;
margin-bottom: 16px;
opacity: 0.5;
transition: opacity 0.3s;
}
.guidance-step.active {
opacity: 1;
}
.step-number {
//width: 24px;
height: 24px;
//background: #409EFF;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12px;
font-size: 14px;
}
.step-content {
flex: 1;
}
.step-title {
font-weight: bold;
margin-bottom: 4px;
}
.step-desc {
color: #666;
font-size: 14px;
}
.guidance-actions {
display: flex;
justify-content: center;
gap: 12px;
}
/* 高亮元素样式 */
.highlight-element {
position: fixed;
border: 2px solid #409EFF;
border-radius: 4px;
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 15px rgba(64, 158, 255, 0.5);
z-index: 9998;
pointer-events: none;
transition: all 0.3s ease;
}
/* 被高亮元素的样式 */
.guidance-highlight {
position: relative;
z-index: 10001;
}
//.el-form-item__content {
// display: flex;
// width: 80%;
// .tag-container {
// width: 95%;
// }
//}
.tag-from-item .el-form-item__content {
margin-left: 0 !important;
display: flex;
//align-items: center;
.tag-container {
width: 95%;
}
}
.guidance-highlight .el-form-item__content {
margin-left: 0 !important;
display: flex;
width: 75%;
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<div class="tag-container">
<div class="tag-container" @click="handleContainerClick">
<el-select style="width: 100%;"
v-model="selectedTags"
multiple
@@ -11,6 +10,7 @@
:remote-method="debouncedSearch"
:loading="loading"
:placeholder="'回车创建新标签'"
:no-data-text="'无此标签,按回车键创建'"
@remove-tag="handleTagRemove"
@change="handleSelectionChange"
@keyup.enter.native="handleEnterKey"
@@ -141,6 +141,11 @@ export default {
if (this.sysTypeList.length > 0) {
await this.doSearch('');
}
this.$emit('focus');
},
handleContainerClick() {
// 容器点击时也触发焦点事件
this.$emit('focus');
},
// 新增:重置标签状态的方法
resetTagState() {
@@ -212,6 +217,9 @@ export default {
this.$emit('change', this.displayTags);
this.clearInput();
this.$nextTick(() => {
this.$refs.tagSelect.visible = false;
});
},
clearInput() {
@@ -313,7 +321,7 @@ export default {
this.searchResults = tags
// 当搜索结果为空时,提示用户可以按回车键创建标签
if (tags.length === 0) {
this.$message.info('无此标签,按回车键创建')
// this.$message.info('无此标签,按回车键创建')
}
} finally {
this.loading = false
@@ -359,8 +367,9 @@ export default {
flex-wrap: wrap;
align-items: center;
}
/*
::v-deep(.el-tag) {
flex: 0 0 calc(50% - 8px);
max-width: calc(50% - 8px);
box-sizing: border-box;
margin-right: 8px;
@@ -368,6 +377,20 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}*/
::v-deep(.el-tag) {
flex: 1 1 auto; /* 自动调整宽度 */
min-width: 30%; /* 设置最小宽度 */
max-width: 48%; /* 设置最大宽度,留出边距 */
box-sizing: border-box;
margin-right: 8px;
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
justify-content: center;
text-align: center;
}
::v-deep(.el-select__input) {

View File

@@ -86,7 +86,12 @@ router.beforeEach((to, from, next) => {
//console.log(location.href,'location.href');
//let urlPre=window.location.protocol+'//'+window.location.host;
//let backUrl=location.href.substring(urlPre.length); encodeURIComponent()
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+encodeURIComponent(location.href);
if (top !== window) { // 判断当前是否在iframe内
top.location.href = process.env.VUE_APP_LOGIN_URL + "?returnUrl=" + encodeURIComponent(location.href);
} else {
window.location.href = process.env.VUE_APP_LOGIN_URL + "?returnUrl=" + encodeURIComponent(location.href);
}
// location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+encodeURIComponent(location.href);
NProgress.done()
}

View File

@@ -53,15 +53,30 @@ jsonRequest.interceptors.response.use(res => {
} else {
if (code == 6001) { //针对于老系统的处理
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 402) {
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';
@@ -69,7 +84,12 @@ jsonRequest.interceptors.response.use(res => {
return Promise.reject(new Error(msg))
//return res.data;
} else if (code === 302) {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
} else {
//Message({message: res.data.message, type: 'error'});
//console.log('err:' + res.data.error);
@@ -127,22 +147,42 @@ formRequest.interceptors.response.use(res => {
} else {
if (code == 6001) { //针对于老系统的处理,因为老系统是字符串,所以这里不使用三等于号
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 401) {
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 402) {
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
})
} else if (code === 403) {
var msg = '当前操作没有权限';
Message({ message: msg, type: 'error' });
return Promise.reject(new Error(msg))
} else if (code === 302) {
location.href = ReLoginUrl;
if (top !== window) { // 判断当前是否在iframe内
top.location.href = ReLoginUrl;
} else {
window.location.href = ReLoginUrl;
}
// location.href = ReLoginUrl;
} else {
//Message({message: res.data.message, type: 'error'});
//console.log('err' + res.data.error);

View File

@@ -5,9 +5,9 @@
</template>
<script>
import Cookies from 'vue-cookies'
import apiLogin from '@/api/login.js'
import { getToken,setToken } from '@/utils/token'
import Cookies from "vue-cookies";
import apiLogin from "@/api/login.js";
import { getToken, setToken } from "@/utils/token";
export default {
mounted() {
this.toUrl = this.$route.query.returnUrl;
@@ -19,11 +19,16 @@
$this.curToken = getToken();
if (!$this.curToken) {
//console.log(token,'第二次未获取token');
location.href = process.env.VUE_APP_LOGIN_URL;
if (top !== window) {
// 判断当前是否在iframe内
top.location.href = process.env.VUE_APP_LOGIN_URL;
} else {
window.location.href = process.env.VUE_APP_LOGIN_URL;
}
// location.href = process.env.VUE_APP_LOGIN_URL;
} else {
$this.boeLogin();
}
}, 500);
} else {
this.curToken = token;
@@ -32,29 +37,29 @@
},
data() {
return {
curToken:'',
toUrl:''
}
curToken: "",
toUrl: "",
};
},
methods: {
boeLogin() {
apiLogin.boeLogin(this.curToken).then(rs=>{
apiLogin.boeLogin(this.curToken).then((rs) => {
if (rs.status == 200) {
//setToken(rs.result.access_token);
localStorage.setItem(this.$xpage.constants.newLoginKey, 1);
if (this.toUrl) {
location.href = this.toUrl;
} else {
this.$router.push({ path: "/index" })
this.$router.push({ path: "/index" });
}
//this.$router.push({ path: "/index" })
} else {
this.$message.error("登录失败:" + rs.message);
}
})
}
}
}
});
},
},
};
</script>
<style>

View File

@@ -123,16 +123,6 @@
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
<el-table-column label="创建时间" prop="sysCreateTime" width="230px" show-overflow-tooltip></el-table-column>
<el-table-column label="审核人" prop="auditUser" width="130px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.auditUser || '-' }}
</template>
</el-table-column>
<el-table-column label="审核时间" prop="auditTime" width="230px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.auditTime || '-' }}
</template>
</el-table-column>
<el-table-column label="是否停用" width="130px">
<template slot-scope="scope">
{{ scope.row.enabled == true ? '启用' : '停用' }}

View File

@@ -2,9 +2,9 @@
<div>
<!-- 最大化状态的弹窗 -->
<el-dialog
v-show=" windowState === 'maximized'"
v-if="dialogVisible"
:visible="true"
width="800px"
:close-on-click-modal="false"
:show-close="true"
@close="onClose"
@@ -13,7 +13,6 @@
:append-to-body="true"
:fullscreen="false"
top="10vh"
v-show="windowState === 'maximized'"
v-resizeable
v-draggable
>
@@ -136,10 +135,18 @@ export default {
const headerEl = dialogEl.querySelector('.dialog-title');
if (!headerEl) return;
// 检查是否有保存的位置状态
const savedPosition = sessionStorage.getItem('aiCallDialogPosition');
if (savedPosition) {
const { left, top } = JSON.parse(savedPosition);
dialogEl.style.left = left + 'px';
dialogEl.style.top = top + 'px';
} else {
// 设置初始样式
dialogEl.style.position = 'fixed';
dialogEl.style.top = '100px';
dialogEl.style.left = (window.innerWidth - dialogEl.offsetWidth) / 2 + 'px';
}
dialogEl.style.margin = '0';
let isDragging = false;
@@ -176,15 +183,18 @@ export default {
dialogEl.style.left = (startLeft + deltaX) + 'px';
dialogEl.style.top = (startTop + deltaY) + 'px';
};
const stopDrag = () => {
isDragging = false;
// 保存当前位置到 sessionStorage
const currentPosition = {
left: parseInt(dialogEl.style.left),
top: parseInt(dialogEl.style.top)
};
sessionStorage.setItem('aiCallDialogPosition', JSON.stringify(currentPosition));
// 移除全局事件监听
document.removeEventListener('mousemove', handleMouseMove);
document.removeEventListener('mouseup', stopDrag);
@@ -203,10 +213,20 @@ export default {
const dialogEl = el.querySelector('.el-dialog');
if (!dialogEl) return;
// 检查是否有保存的尺寸状态
const savedSize = sessionStorage.getItem('aiCallDialogSize');
if (savedSize) {
const { width, height, left, top } = JSON.parse(savedSize);
dialogEl.style.width = width + 'px';
dialogEl.style.height = height + 'px';
dialogEl.style.left = left + 'px';
dialogEl.style.top = top + 'px';
} else {
// 设置初始样式
dialogEl.style.position = 'fixed';
dialogEl.style.top = '100px';
dialogEl.style.left = (window.innerWidth - dialogEl.offsetWidth) / 2 + 'px';
}
// 创建拖拽手柄
const createHandle = (direction) => {
@@ -335,65 +355,93 @@ export default {
const deltaX = event.clientX - startX;
const deltaY = event.clientY - startY;
let newWidth, newHeight, newLeft, newTop;
switch (resizeDirection) {
case 'right':
dialogEl.style.width = Math.max(400, startWidth + deltaX) + 'px';
newWidth = Math.max(400, startWidth + deltaX);
dialogEl.style.width = newWidth + 'px';
break;
case 'left':
const newWidth = Math.max(400, startWidth - deltaX);
newWidth = Math.max(400, startWidth - deltaX);
newLeft = startLeft + startWidth - newWidth;
dialogEl.style.width = newWidth + 'px';
dialogEl.style.left = (startLeft + startWidth - newWidth) + 'px';
dialogEl.style.left = newLeft + 'px';
break;
case 'bottom':
dialogEl.style.height = Math.max(600, startHeight + deltaY) + 'px';
newHeight = Math.max(600, startHeight + deltaY);
dialogEl.style.height = newHeight + 'px';
break;
case 'top':
// 当窗口高度达到最小值时,不再调整高度和位置
if (startHeight - deltaY >= 600) {
dialogEl.style.height = (startHeight - deltaY) + 'px';
dialogEl.style.top = (startTop + deltaY) + 'px';
newHeight = startHeight - deltaY;
newTop = startTop + deltaY;
dialogEl.style.height = newHeight + 'px';
dialogEl.style.top = newTop + 'px';
}
break;
case 'bottom-right':
dialogEl.style.width = Math.max(400, startWidth + deltaX) + 'px';
dialogEl.style.height = Math.max(600, startHeight + deltaY) + 'px';
newWidth = Math.max(400, startWidth + deltaX);
newHeight = Math.max(600, startHeight + deltaY);
dialogEl.style.width = newWidth + 'px';
dialogEl.style.height = newHeight + 'px';
break;
case 'bottom-left':
const newWidthBL = Math.max(400, startWidth - deltaX);
dialogEl.style.width = newWidthBL + 'px';
dialogEl.style.left = (startLeft + startWidth - newWidthBL) + 'px';
dialogEl.style.height = Math.max(600, startHeight + deltaY) + 'px';
newWidth = Math.max(400, startWidth - deltaX);
newHeight = Math.max(600, startHeight + deltaY);
newLeft = startLeft + startWidth - newWidth;
dialogEl.style.width = newWidth + 'px';
dialogEl.style.left = newLeft + 'px';
dialogEl.style.height = newHeight + 'px';
break;
case 'top-right':
// 当窗口高度达到最小值时,不再调整高度和位置
if (startHeight - deltaY >= 600) {
dialogEl.style.height = (startHeight - deltaY) + 'px';
dialogEl.style.top = (startTop + deltaY) + 'px';
newHeight = startHeight - deltaY;
newTop = startTop + deltaY;
newWidth = Math.max(400, startWidth + deltaX);
dialogEl.style.height = newHeight + 'px';
dialogEl.style.top = newTop + 'px';
dialogEl.style.width = newWidth + 'px';
}
dialogEl.style.width = Math.max(400, startWidth + deltaX) + 'px';
break;
case 'top-left':
// 当窗口高度达到最小值时,不再调整高度和位置
if (startHeight - deltaY >= 600) {
dialogEl.style.height = (startHeight - deltaY) + 'px';
dialogEl.style.top = (startTop + deltaY) + 'px';
newHeight = startHeight - deltaY;
newTop = startTop + deltaY;
newWidth = Math.max(400, startWidth - deltaX);
newLeft = startLeft + startWidth - newWidth;
dialogEl.style.height = newHeight + 'px';
dialogEl.style.top = newTop + 'px';
dialogEl.style.width = newWidth + 'px';
dialogEl.style.left = newLeft + 'px';
}
const newWidthTL = Math.max(400, startWidth - deltaX);
dialogEl.style.width = newWidthTL + 'px';
dialogEl.style.left = (startLeft + startWidth - newWidthTL) + 'px';
break;
}
let doc = document.querySelector('.welcome-message')
let sendBox = document.querySelector('.input-area-wrapper');
// sendBox 的高度
if (doc && sendBox) {
doc.style.height = `calc(${dialogEl.style.height} - ${sendBox.offsetHeight}px - 120px)`;
}
};
const stopResize = () => {
isResizing = false;
resizeDirection = '';
// 保存当前尺寸和位置到 sessionStorage
const currentSize = {
width: parseInt(dialogEl.style.width),
height: parseInt(dialogEl.style.height),
left: parseInt(dialogEl.style.left),
top: parseInt(dialogEl.style.top)
};
sessionStorage.setItem('aiCallDialogSize', JSON.stringify(currentSize));
// 移除全局事件监听
document.removeEventListener('mousemove', handleMouseMove);
document.removeEventListener('mouseup', stopResize);
@@ -436,26 +484,69 @@ export default {
}
],
suggestions:[],
isAutoScroll: true // 是否自动滚动
isAutoScroll: true, // 是否自动滚动
// 添加一个标志位,用于标识组件是否已经初始化完成
isComponentReady: false
}
},
mounted() {
// 组件挂载完成后,标记为已准备就绪
this.$nextTick(() => {
this.isComponentReady = true;
});
},
watch: {
dialogVisible(newVal) {
dialogVisible: {
handler(newVal) {
if (newVal) {
this.$nextTick(() => {
let doc = document.querySelector('.welcome-message')
let sendBox = document.querySelector('.input-area-wrapper');
doc.style.height = `calc(600px - ${sendBox.offsetHeight}px - 120px)`;
});
// 获取对话框元素
const dialogEl = document.querySelector('.case-expert-dialog .el-dialog');
if (dialogEl) {
// 检查是否有保存的尺寸状态
const savedSize = sessionStorage.getItem('aiCallDialogSize');
if (savedSize) {
const { width, height, left, top } = JSON.parse(savedSize);
dialogEl.style.width = width + 'px';
dialogEl.style.height = height + 'px';
dialogEl.style.left = left + 'px';
dialogEl.style.top = top + 'px';
}
// 移除之前的逻辑,因为现在通过事件机制处理状态恢复
// 检查是否有保存的位置状态
const savedPosition = sessionStorage.getItem('aiCallDialogPosition');
if (savedPosition) {
const { left, top } = JSON.parse(savedPosition);
dialogEl.style.left = left + 'px';
dialogEl.style.top = top + 'px';
}
}
let doc = document.querySelector('.welcome-message')
let sendBox = document.querySelector('.input-area-wrapper');
// 只有在没有保存的尺寸状态时才使用默认值
if (doc && sendBox) {
const savedSize = sessionStorage.getItem('aiCallDialogSize');
if (!savedSize) {
doc.style.height = `calc(600px - ${sendBox.offsetHeight}px - 120px)`;
} else {
const { height } = JSON.parse(savedSize);
doc.style.height = `calc(${height}px - ${sendBox.offsetHeight}px - 120px)`;
}
}
});
}
},
immediate: true
},
messageList: {
handler() {
// 只有在组件准备就绪后才执行滚动操作
if (this.isComponentReady) {
this.$nextTick(() => {
this.scrollToBottom();
});
}
},
deep: true
}
@@ -473,6 +564,9 @@ closeMinimizedWindow() {
},
onClose() {
console.log('关闭弹窗')
// 清除保存的状态
sessionStorage.removeItem('aiCallDialogSize');
sessionStorage.removeItem('aiCallDialogPosition');
this.$emit('close')
// 可以在这里执行其他逻辑
},
@@ -522,6 +616,9 @@ closeMinimizedWindow() {
},500)
},
startNewConversation() {
// 重置对话时,先标记组件为未准备就绪状态
this.isComponentReady = false;
this.messageList = [
{
isBot: true,
@@ -533,6 +630,11 @@ closeMinimizedWindow() {
];
this.AIContent = '';
this.isLoading = false;
// 在下一个 tick 中重新标记为准备就绪
this.$nextTick(() => {
this.isComponentReady = true;
});
},
// 处理滚动事件
@@ -641,7 +743,7 @@ closeMinimizedWindow() {
flex-direction: column;
align-items: flex-start;
margin-bottom: 10px;
//height: 200px;
height: 400px;
//flex:1;
overflow-y: auto;

View File

@@ -30,8 +30,13 @@
<!-- <div class="course-title-right"> -->
<!-- <interactBar :readonly="!stuStusts || stuStusts==0" :type="1" :data="courseInfo" :comments="false" :views="false"></interactBar> -->
<!-- </div> -->
<div class="label-div">
<!-- <div class="label-div">
<el-tag class="label-item" effect="plain" v-for="(item,tagIdx) in tagArray" :key="tagIdx">{{item}}</el-tag>
</div>-->
<div class="label-div">
<div v-for="(item, tagIdx) in tagArray" :key="tagIdx" class="keyword-tag">
{{ item }}
</div>
</div>
<div>
<div class="study-count">{{courseInfo.studys}}人学习</div>
@@ -420,7 +425,7 @@ export default {
.course-title{
position: relative;
height: 60px;
height: auto;
display: flex;
justify-content: space-between;
.title {
@@ -453,18 +458,43 @@ export default {
padding: 24px 24px 5px 24px;
// margin-right: 361px;
.study-count {
margin-top: 10px;
margin-top: 30px;
font-size: 16px;
color: #444444;
}
.label-div {
/*.label-div {
margin: 5px 0;
min-height: 20px;
.label-item {
padding: 0 7px;
padding: 0px 8px;
margin-top: 5px;
float: left;
line-height: 24px;
font-size: 12px;
border-radius: 2px;
margin-right: 8px;
margin-bottom: 0px;
color: #2C68FF;
height: 24px;
background: rgba(44, 104, 255, 0.06);
border: none; // 或者使用 border-color: transparent;
}
}*/
.label-div {
margin: 5px 0;
min-height: 20px;
.keyword-tag {
padding: 0px 10px;
margin-top: 7px;
float: left;
line-height: 24px;
font-size: 12px;
border-radius: 2px;
margin-right: 10px;
color: #2C68FF;
height: 24px;
background: rgba(44, 104, 255, 0.06);
}
}
::v-deep .el-rate__icon {

View File

@@ -62,279 +62,65 @@
</div>
</div>
<div id="fixd-box">
<!-- 好评榜 -->
<!-- <div class="portal-ranking-list ranking-bg">
<div class="ranking-title">好评榜</div>
<ul class="ranking-data">
<li class="list-info" v-for="(item, index) in scorelist" :key="index"
style="cursor: pointer;margin-top:24px;line-height: 30px;display: flex;">
<a style="display: inherit" @click="toCourseDetail(item)">
<span class="portal-right-text blue-one" v-if="index == 0">
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
</span>
<span class="portal-right-text blue-tow" v-if="index == 1">
<img :src="`${webBaseUrl}/images/listblue02.png`" alt="">
</span>
<span class="portal-right-text blue-three" v-if="index == 2">
<img :src="`${webBaseUrl}/images/listblue03.png`" alt="">
</span>
<span class="portal-right-text" v-if="index == 3">
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
</span>
<span class="portal-right-text" v-if="index == 4">
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
</span>
<span class="portal-title-desc title-line-ellipsis" v-if="item.images == ''"
style="font-size: 14px;">{{ item.name }}</span>
<span class="portal-title-desc" v-else style="font-size: 14px;">
<span class="portal-images-title two-line-ellipsis">{{ item.name }}</span>
</span>
<div class="list-active">
<div class="list-content">
<div class="list-img">
<course-image :course="item" :text="false" width="108px" height="60px"></course-image>
<span v-if="item.type < 21" class="course-type">录播</span>
<span v-if="item.type == 30" class="course-type">线下课</span>
<span v-if="item.type == 40" class="course-type">学习项目</span>
</div>
<div class="list-text">
<h6 class="index-one-line-ellipsis">{{ item.name }}</h6>
<span class="index-one-line-ellipsis">{{ item.publishTime }}</span>
</div>
</div>
<div class="list-bottom">
<couresinteract :type="1" :data="item"></couresinteract>
</div>
</div>
</a>
</li>
</ul>
</div> -->
<!-- 人气榜 -->
<!-- <div style="margin-top:26px" class="portal-ranking-list ranking-bg1">
<div class="ranking-title">人气榜</div>
<ul class="ranking-data">
<li class="list-info" v-for="(item, index) in ankingList" :key="index"
style="cursor: pointer;margin-top:24px;line-height: 30px;display: flex;">
<a style="display: inherit" @click="toCourseDetail(item)">
<span class="portal-right-text orange-one" v-if="index == 0">
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
</span>
<span class="portal-right-text orange-tow" v-if="index == 1">
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
</span>
<span class="portal-right-text orange-three" v-if="index == 2">
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
</span>
<span class="portal-right-text" v-if="index == 3">
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
</span>
<span class="portal-right-text" v-if="index == 4">
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
</span>
<span class="portal-title-desc title-line-ellipsis" v-if="item.images == ''"
style="font-size: 14px;">{{ item.name }}</span>
<span class="portal-title-desc" v-else style="font-size: 14px;">
<span class="portal-images-title two-line-ellipsis">{{ item.name }}</span>
</span>
<div class="list-active">
<div class="list-content">
<div class="list-img">
<course-image :course="item" :text="false" width="108px" height="60px"></course-image>
<span v-if="item.type < 21" class="course-type">录播</span>
<span v-if="item.type == 30" class="course-type">线下课</span>
<span v-if="item.type == 40" class="course-type">学习项目</span>
</div>
<div class="list-text">
<h6 class="index-one-line-ellipsis">{{ item.name }}</h6>
<span class="index-one-line-ellipsis">{{ item.publishTime }}</span>
</div>
</div>
<div class="list-bottom">
<couresinteract :type="1" :data="item"></couresinteract>
</div>
</div>
</a>
</li>
</ul>
</div> -->
<!-- 热榜 -->
<!-- <div style="margin-top:26px" class="portal-ranking-list ranking-bg2">
<div class="ranking-title">热度榜</div>
<ul class="ranking-data">
<li class="list-info" v-for="(item, index) in hotList" :key="index"
style="cursor: pointer;margin-top:24px;line-height: 30px;display: flex;">
<a style="display: inherit" @click="toCourseDetail(item)">
<span class="portal-right-text orange-one" v-if="index == 0">
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
</span>
<span class="portal-right-text orange-tow" v-if="index == 1">
<img :src="`${webBaseUrl}/images/listred02.png`" alt="">
</span>
<span class="portal-right-text orange-three" v-if="index == 2">
<img :src="`${webBaseUrl}/images/listred03.png`" alt="">
</span>
<span class="portal-right-text" v-if="index == 3">
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
</span>
<span class="portal-right-text" v-if="index == 4">
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
</span>
<span class="portal-title-desc title-line-ellipsis list-lidex" v-if="item.images == ''"
style="font-size: 14px;">{{ item.courseName }}</span>
<span class="portal-title-desc " v-else style="font-size: 14px;">
<span class="portal-images-title two-line-ellipsis">{{ item.courseName }}</span>
</span>
<div class="list-active">
<div class="list-content">
<div class="list-img">
<course-image :course="item" :text="false" width="108px" height="60px"></course-image>
<span v-if="item.type < 21" class="course-type">录播</span>
<span v-if="item.type == 30" class="course-type">线下课</span>
<span v-if="item.type == 40" class="course-type">学习项目</span>
</div>
<div class="list-text">
<h6 class="index-one-line-ellipsis">{{ item.courseName }}</h6>
<span class="index-one-line-ellipsis">{{ item.publishTime }}</span>
</div>
</div>
<div class="list-bottom">
<couresinteract :type="1" :data="item"></couresinteract>
</div>
</div>
</a>
</li>
</ul>
</div> -->
</div>
</div>
<!-- 右侧 -->
<div class="xcontent2-main content-div">
<!-- 之前的 -->
<!-- <div class="search-div" style="margin-right:36px">
<div class="searchbar" style="padding-right: 40px;" v-if="stagList.length > 0">
<span @click="handleClearTags" style="float: right;margin-top: 6px;margin-right: -20px;color: #858585;cursor: pointer;" title="清除查询条件"><i class="el-icon-close"></i> 清除</span>
<div style="line-height: 30px;">
<span class="item-title"> 搜索条件</span>
<el-tag closable v-for="(tag, tagIdx) in stagList" :key="'t'+tagIdx" @close="stagClose(tag,tagIdx)">{{ tag.name }}</el-tag>
</div>
</div>
<div class="search-item">
<div style="margin-top:10px; display: flex;">
<div style="line-height: 25px;padding-right: 10px;">
<span class="item-title" style="padding-right: 5px;">授课方式:</span>
</div>
<div>
<a @click="handleTypeAllClick(1)" class="option-item" :class="{'option-active':ctypeTagAll}">全部</a>
<a @click="handleTypeClick(ctypeList[0],ctypeList)" class="option-item" :class="{'option-active':ctypeList[0].checked}">录播课</a>
<a @click="handleTypeClick(ctypeList[1],ctypeList)" class="option-item" :class="{'option-active':ctypeList[1].checked}">线下课</a>
<a class="option-border"> </a>
<a @click="handleTypeClick(ctypeList[2],ctypeList)" class="option-item" :class="{'option-active':ctypeList[2].checked}">学习项目</a>
</div>
</div>
</div>
<div class="search-item">
<div style="line-height: 25px;margin-top:10px; display: flex;">
<div class="search-item-type">
<span class="item-title" style="padding-right: 5px;">一级分类:</span>
</div>
<div>
<a @click="handleTypeAllClick(11)" class="option-item" :class="{'option-active':oneTagAll}">全部</a>
<a v-for="one in oneList" @click="handleOptionClick(one,oneList,1)" class="option-item" :class="{'option-active':one.checked}">{{one.name}}</a>
<a class="option-border"> </a>
<a class="option-item">
<span @click="uClassClick" class="Uxtext" style=""> U选小课堂
<span class="uxicon">
<svg-icon icon-class="hot" style="font-size:22px"></svg-icon>
</span>
</span>
</a>
</div>
</div>
</div>
<div class="search-item" v-if="twoList.length>0">
<div style="line-height: 25px;margin-top:10px; display: flex;justify-content: flex-start;">
<div class="search-item-type">
<span class="item-title" style="padding-right: 5px;">二级分类:</span>
</div>
<div style="white-space: nowrap;">
<a @click="handleTypeAllClick(12)" class="option-item" :class="{'option-active':twoTagAll}">全部</a>
</div>
<div>
<a v-for="two in twoList" @click="handleOptionClick(two,twoList,2)" class="option-item" :class="{'option-active':two.checked}">{{two.name}}</a>
</div>
</div>
</div>
<div class="search-item" v-if="threeList.length>0">
<div style="line-height: 25px;margin-top:10px; display: flex;justify-content: flex-start;">
<div class="search-item-type">
<span class="item-title" style="padding-right: 5px;">三级分类:</span>
</div>
<div style="white-space: nowrap;">
<a @click="handleTypeAllClick(13)" class="option-item" :class="{'option-active':threeTagAll}">全部</a>
</div>
<div>
<a v-for="three in threeList" :key="three.id" @click="handleOptionClick(three,threeList,3)" class="option-item" :class="{'option-active':three.checked}">{{three.name}}</a>
</div>
</div>
</div>
</div> -->
<!-- 内容导航 -->
<div class="topNav" v-if="!newData">
<div class="search-div nav" style="height: 100px;flex: 1;">
<div @click="handleTypeAllClick(1)" class="option-item" style="font-weight: bold;position: relative;margin-right: 20px;" :class="{ 'option-active': ctypeTagAll }">
<div class="search-div nav" style="flex: 1;height: auto;background: #fff;">
<div class="nav-primary" style="gap: 15px;display: flex;margin-top: 20px;">
<div @click="handleTypeAllClick(1)" class="option-item" style="position: relative;" :class="{ 'option-active': ctypeTagAll }">
<a>全部</a>
<span :class="ctypeTagAll ? 'nav-bottbor' : ''"></span>
</div>
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item" style="font-weight: bold"
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item"
:class="{ 'option-active': ctypeList[0].checked }">
<a>录播课</a>
<span :class="ctypeList[0].checked ? 'nav-bottbor' : ''"></span>
</div>
<div @click="handleTypeClick(ctypeList[1], ctypeList)" class="option-item" style="font-weight: bold"
<div @click="handleTypeClick(ctypeList[1], ctypeList)" class="option-item"
:class="{ 'option-active': ctypeList[1].checked }">
<a>线下课</a>
<span :class="ctypeList[1].checked ? 'nav-bottbor' : ''"></span>
</div>
<div @click="handleTypeClick(ctypeList[2], ctypeList)" class="option-item" style="font-weight: bold"
<div @click="handleTypeClick(ctypeList[2], ctypeList)" class="option-item"
:class="{ 'option-active': ctypeList[2].checked }">
<a>学习项目</a>
<span :class="ctypeList[2].checked ? 'nav-bottbor' : ''"></span>
</div>
<a class="option-item">
<span @click="uClassClick" class="Uxtext" style="font-weight: bold"> U选小课堂
<span @click="uClassClick" class="Uxtext" > U选小课堂
<span class="uxicon">
<svg-icon icon-class="hot" style="font-size:22px"></svg-icon>
</span>
</span>
</a>
</div>
<!-- 修改热点标签区域 -->
<div style="margin-top:10px;flex: 1;">
<!-- <div class="search-item-type" style="padding-top: 2px; float: left;">
<span class="item-title" style="padding-right: 5px;">热点标签:</span>
</div>-->
<div style="margin:20px 0;flex: 1;">
<!-- 修改热点标签容器支持换行 -->
<div class="hot-tags-wrapper">
<div>
<div style="display: flex">
<div
class="option-item" style="font-weight: bold; padding-top: 2px;"
class="option-item" style=" padding-top: 2px;"
:class="{ 'option-active': isAllHotTagsSelected }"
@click="handleClearHotTags"
>
<span>全部</span>
<span :class="isAllHotTagsSelected ? 'nav-bottbor' : ''"></span>
</div>
<div class="fieldbox" style="padding-left: 15px;">
<div
class="option-item" style="font-weight: bold; padding-top: 2px;"
class="option-item" style=" padding-top: 2px;"
v-for="tag in hotTagsList"
:key="tag.id"
@click="handleTagClick(tag, hotTagsList,1)"
:class="{ 'option-active': tag.checked }"
>
<span>{{tag.tagName}} </span>
<span :class="tag.checked ? 'nav-bottbor' : ''"></span>
<!-- <span :class="tag.checked ? 'nav-bottbor' : ''"></span>-->
</div>
</div>
</div>
</div>
</div>
@@ -350,12 +136,11 @@
</div>-->
</div>
<!-- 清除 -->
<div v-if="stagList.length > 0 && !newData" class="search-div" style="padding: 0;margin-bottom: 20px;">
<div class="searchbar" style="background-color:#f6f7fb;display: flex;justify-content: space-between;">
<div v-if="stagList.length > 0 && !newData" class="search-div" style="padding: 0">
<div class="searchbar" style="display: flex;justify-content: space-between;">
<div style="line-height: 30px;">
<span class="item-title"> 搜索条件:</span>
<el-tag closable v-for="(tag, tagIdx) in stagList" :key="'t' + tagIdx" @close="stagClose(tag, tagIdx)"
:style="{ color: tag.type === 0 ? '#ff0000' : '' }">
<el-tag closable v-for="(tag, tagIdx) in stagList" :key="'t' + tagIdx" @close="stagClose(tag, tagIdx)" >
{{ tag.tagName }}
</el-tag>
</div>
@@ -397,10 +182,10 @@
v-for="(tag, tagIndex) in cinfo.tagsList"
:key="tagIndex"
size="mini"
type="info" style="margin: 2px 2px; border-radius: 2px;"
:style="{ color: isTagMatched(tag) ? '#387DF7' : '#333333' }"
type="info"
style="margin: 2px 2px; border-radius: 2px;"
>
{{ tag }}
<span v-html="highlightTagKeyword(tag)"></span>
</el-tag>
</div>
<!-- 关键字 -->
@@ -466,10 +251,6 @@
</template>
<!-- 暂无数据 -->
<div class="pagination-div">
<!-- <span class="pag-text" @click="loadMore()"
v-if="moreState == 1 && courseList.length >= course.pageSize">加载更多</span> -->
<!-- <span class="pag-text-msg" v-if="moreState == 2">数据加载中</span> -->
<!-- <span class="pag-text-msg" v-else-if="moreState == 3 && courseList.length > 0">没有更多数据了</span> -->
<span class="notcoures" v-if="moreState == 3 && courseList.length == 0">
<img :src="`${webBaseUrl}/images/nocouresimg.png`" alt="">
<h5>暂无课程请优先学习其它课程吧</h5>
@@ -740,7 +521,8 @@ export default {
searchRecords: [],
hotList: [],
totalPages: 1,
localSessionKey: this.$xpage.constants.localCourseFiltersKey
localSessionKey: this.$xpage.constants.localCourseFiltersKey,
// isAllHotTagsSelected: true,
};
},
// 受众需要每次刷新
@@ -847,6 +629,131 @@ export default {
// window.removeEventListener("scroll", this.handleScroll);
},
methods: {
getSearchMode() {
const hasKeyword = this.keyword && this.keyword.trim() !== '';
// 检查是否有导航标签被选中
const hasNavigationTags = this.stagList.some(tag => {
// 课程类型(1)、热点标签(14)、分类标签(11,12,13)
return [1, 11, 12, 13, 14].includes(tag.type) && tag.checked;
});
if (hasKeyword && hasNavigationTags) {
return 'mixed'; // 混合模式:关键字 + 导航标签
} else if (hasKeyword) {
return 'keyword'; // 纯关键字搜索
} else if (hasNavigationTags) {
return 'navigation'; // 纯导航标签搜索
} else {
return 'none'; // 无搜索条件
}
},
// 高亮标签关键字
highlightTagKeyword(tag) {
const searchMode = this.getSearchMode();
switch (searchMode) {
case 'keyword':
return this.highlightPartialMatch(tag);
case 'navigation':
return this.highlightExactMatch(tag);
case 'mixed':
return this.highlightMixedMode(tag);
default:
return tag;
}
},
// 部分匹配高亮(纯关键字搜索模式)
highlightPartialMatch(tag) {
const searchKeywords = this.stagList
.filter(searchTag => searchTag.type === 0) // 只处理关键字类型
.map(searchTag => searchTag.tagName || searchTag.name)
.filter(keyword => keyword && keyword.trim());
if (searchKeywords.length === 0) {
return tag;
}
let highlightedTag = tag;
searchKeywords.forEach(keyword => {
if (tag.includes(keyword)) {
const regex = new RegExp(`(${this.escapeRegExp(keyword)})`, 'gi');
highlightedTag = highlightedTag.replace(regex, '<span class="keyword-highlight">$1</span>');
}
});
return highlightedTag;
},
// 完全匹配高亮(纯导航标签模式)
highlightExactMatch(tag) {
const isMatched = this.stagList.some(searchTag => {
// 只检查导航标签类型
if (searchTag.type === 0) return false;
const searchName = searchTag.tagName || searchTag.name;
return searchName === tag;
});
if (isMatched) {
return `<span class="exact-match-highlight">${tag}</span>`;
}
return tag;
},
// 混合模式高亮(关键字 + 导航标签)
highlightMixedMode(tag) {
// 1. 先检查是否完全匹配导航标签
const exactMatched = this.stagList.some(searchTag => {
if (searchTag.type === 0) return false;
const searchName = searchTag.tagName || searchTag.name;
return searchName === tag;
});
// 2. 如果完全匹配导航标签,整个标签高亮
if (exactMatched) {
return `<span class="exact-match-highlight">${tag}</span>`;
}
// 3. 否则检查是否包含关键字,进行部分高亮
const searchKeywords = this.stagList
.filter(searchTag => searchTag.type === 0)
.map(searchTag => searchTag.tagName || searchTag.name)
.filter(keyword => keyword && keyword.trim());
if (searchKeywords.length === 0) {
return tag;
}
let highlightedTag = tag;
let hasKeywordMatch = false;
searchKeywords.forEach(keyword => {
if (tag.includes(keyword)) {
const regex = new RegExp(`(${this.escapeRegExp(keyword)})`, 'gi');
highlightedTag = highlightedTag.replace(regex, '<span class="keyword-highlight">$1</span>');
hasKeywordMatch = true;
}
});
// 4. 如果有关键字匹配,返回部分高亮结果
if (hasKeywordMatch) {
return highlightedTag;
}
// 5. 都不匹配,返回原标签
return tag;
},
// 辅助方法:转义正则表达式特殊字符
escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
},
isTagMatched(tag) {
// 检查stagList中是否有匹配的标签
@@ -1076,6 +983,7 @@ handleClearTags() {
},
//点击标签
handleTagClick(item, list,type) {
item.checked = !item.checked;
// 更新course.tags
@@ -1856,6 +1764,9 @@ handleClearTags() {
.topNav {
display: flex;
margin-bottom: 20px;
height: auto;
min-height: 80px;
align-items: center;
.nav {
display: flex;
@@ -1863,10 +1774,11 @@ handleClearTags() {
.option-item {
position: relative;
margin: 0 15px;
.nav-bottbor {
position: absolute;
top: 130%;
top: 100%;
left: 0;
width: 100%;
height: 4px;
@@ -2094,13 +2006,6 @@ handleClearTags() {
color: #999;
}
.couderbox {
// width: 5px;
// padding: 0;
// display: inline-block;
// text-align: center;
}
.coures-border {
width: 2px;
height: 15px;
@@ -2237,7 +2142,7 @@ handleClearTags() {
right: 23.5%;
// bottom: 26%;
top: 0;
height: 20;
height: 20px;
line-height: 20px;
font-size: 12px;
color: #FFFFFF;
@@ -2333,8 +2238,8 @@ handleClearTags() {
margin-left: 15px;
font-size: 14px;
color: #3d3d3d;
cursor: pointer;
position: relative;
//cursor: pointer;
//position: relative;
}
.uxicon {
@@ -2344,16 +2249,6 @@ handleClearTags() {
left: 98%;
}
// .el-radio-button{
// margin-right: 10px;
// margin-bottom: 10px;
// .el-radio-button__inner{
// background: #fff;
// border: none;
// height: 20px;
// }
// }
::v-deep .el-radio-button__inner,
.el-radio-group {
vertical-align: top;
@@ -2407,13 +2302,6 @@ handleClearTags() {
}
}
.searchbar {
background-color: #ffffff;
// border: 1px solid #f3f3f3;
// width: 900px;
// padding: 5px 20px;
}
.fixed {
position: fixed;
top: 0px;
@@ -2462,9 +2350,12 @@ handleClearTags() {
}
.search-div {
background: #fff;
//background: #fff;
padding: 10px 25px;
border-radius: 8px;
height: auto;
min-height: 60px;
::v-deep .el-input {
width: 420px;
@@ -2502,14 +2393,6 @@ handleClearTags() {
}
}
// .tip{
// color:#999999;
// font-size: 12px;
// >span{
// margin-right: 8px;
// cursor: pointer;
// }
// }
.search-item {
// padding: 10px 0;
}
@@ -2552,30 +2435,6 @@ handleClearTags() {
}
}
}
// .course-form {
// width: 100%;
// margin: 10px 0;
// ::v-deep.el-button {
// width: 100%;
// color: #fff;
// }
// }
// .right-box {
// .add-btn {
// width: 100%;
// padding: 15px 0;
// }
// .ranking-card {
// margin-top: 0px;
// }
// .ranking-data {
// margin: 10px 0;
// color: #999999;
// }
// }]
.search-item-type {
line-height: 25px;
padding-right: 10px;
@@ -2588,7 +2447,8 @@ handleClearTags() {
color: #3d3d3d;
display: inline-block;
font-size: 14px;
margin: 0px 15px;
//margin: 0px 15px;
font-weight: normal;
}
.option-border {
@@ -2628,12 +2488,13 @@ handleClearTags() {
padding: 0 !important;
}
/* ---end--- */
/* ---标签管理 added by zhengsongbo on 2025-08-01--- */
.search-div.nav {
display: block;
width: 100%;
clear: both;
}
.option-item {
margin: 0px 5px;
}
@@ -2672,7 +2533,7 @@ a.custom2 {
.hot-tags-container {
display: inline-block;
white-space: nowrap;
//white-space: nowrap;
overflow-x: auto;
vertical-align: top;
}
@@ -2681,22 +2542,6 @@ a.custom2 {
display: none;
}
/* 添加标签样式 */
//.course-tags {
// margin: 5px 0;
// min-height: 20px;
//}
//.course-tags ::v-deep .el-tag {
// color: #387DF7 !important;
// border-color: #387DF7 !important;
//}
//.course-tags ::v-deep .el-tag .el-tag__close {
// color: #387DF7 !important;
//}
//.course-tags ::v-deep .el-tag .el-tag__close:hover {
// background-color: #387DF7 !important;
// color: white !important;
//}
.course-tag-item {
color: #333333; // 默认深灰色
@@ -2705,16 +2550,6 @@ a.custom2 {
color: #387DF7 !important; // 匹配时的蓝色
}
/* 添加热点标签容器样式,支持换行 */
.hot-tags-wrapper {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: center;
padding-top: 2px;
//margin-left: 90px; /* 为"热点标签:"文本留出空间 */
}
/* 调整option-item样式以适应换行布局 */
.option-item {
position: relative;
@@ -2725,7 +2560,7 @@ a.custom2 {
/* 保持原有的导航底部横线样式 */
.nav-bottbor {
position: absolute;
top: 130%;
top: 100%;
left: 0;
width: 100%;
height: 4px;
@@ -2745,5 +2580,78 @@ a.custom2 {
gap: 5px;
}
}
/* ---end--- */
.hot-tags-wrapper {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: center;
padding-top: 2px;
}
.course-tags {
margin: 5px 0;
min-height: 20px;
}
.course-tag-item {
color: #333333;
}
.course-tag-item[style*="color: #387DF7"] {
color: #387DF7 !important;
}
/* 关键字部分匹配高亮样式 */
.keyword-highlight {
color: #387DF7 !important;
font-weight: bold;
background-color: transparent !important;
}
/* 导航标签完全匹配高亮样式 */
.exact-match-highlight {
color: #387DF7 !important;
font-weight: bold;
background-color: transparent !important;
}
/* 混合模式下的特殊样式(可选) */
.mixed-exact-highlight {
color: #387DF7 !important;
font-weight: bold;
background-color: #f0f7ff !important;
padding: 1px 3px;
border-radius: 2px;
}
/* 确保标签基础样式 */
.course-tags ::v-deep .el-tag {
color: #333333;
background-color: #f4f4f5;
border-color: #e9e9eb;
}
.course-tags ::v-deep .el-tag .keyword-highlight,
.course-tags ::v-deep .el-tag .exact-match-highlight {
color: #387DF7 !important;
font-weight: bold;
background-color: transparent !important;
}
.fieldbox {
display: flex;
white-space: nowrap;
flex-wrap: wrap;
div {
margin: 0 15px;
display: inline-block;
font-size: 14px;
line-height: 25px;
//color: #3d3d3d;
font-weight: 500;
}
.fieldactive {
color: #387DF7;
}
}
</style>

File diff suppressed because it is too large Load Diff