Compare commits

..

182 Commits

Author SHA1 Message Date
xu
7bbc3904e0 Merge branch 'refs/heads/master-20251105-xc' into test1024 2025-11-11 16:17:27 +08:00
xu
3d7ca1cc20 【bug:SZX-1155】在线课程管理列表中,增加两列:审核人和审核时间。 2025-11-11 16:16:41 +08:00
xu
b529695751 Merge branch 'refs/heads/master-20251105-xc' into test1024 2025-11-11 16:07:13 +08:00
xu
ebae7f6c0b 【bug:SZX-1155】在线课程管理列表中,增加两列:审核人和审核时间。并修改页面样式,让表格可以左右滚动显示完整。 2025-11-11 16:06:32 +08:00
xu
16355a1e5e Merge branch 'refs/heads/master-20251105-xc' into test1024 2025-11-11 15:30:49 +08:00
xu
91f06d4ed6 【bug:SZX-1155】在线课程管理列表中,增加两列:审核人和审核时间。并修改页面样式,让表格可以左右滚动显示完整。 2025-11-11 15:30:20 +08:00
xu
4ee084cff2 Merge branch 'refs/heads/master-20251105-xc' into test1024 2025-11-11 14:56:15 +08:00
xu
9b3b3b94ef 【bug:SZX-1155】在线课程管理列表中,增加两列:审核人和审核时间。并修改页面样式,让表格可以左右滚动显示完整。 2025-11-11 14:49:14 +08:00
xu
427ff20531 Revert "【bug:SZX-1155】在线课程管理列表中,增加两列:审核人和审核时间。"
This reverts commit 6c5e189448.
2025-11-07 15:48:21 +08:00
xu
43aaeabf99 Merge branch 'refs/heads/master-20251105-xc' into test1024 2025-11-07 15:20:11 +08:00
xu
6c5e189448 【bug:SZX-1155】在线课程管理列表中,增加两列:审核人和审核时间。 2025-11-05 15:49:29 +08:00
670788339
38fe26c146 Merge branch 'master-20251023-tag' into test1024 2025-11-05 14:38:33 +08:00
670788339
ef9e4a0f68 检查标签是否在下拉框中已存在 2025-11-05 14:38:00 +08:00
670788339
27e3f37033 课程库标签样式 2025-11-04 19:07:16 +08:00
670788339
f5ac82769f 课程库标签样式 2025-11-04 19:00:01 +08:00
670788339
ce4be998a4 Merge branch 'master-20251023-tag' into test1024 2025-11-04 18:50:55 +08:00
670788339
a2640771fb 课程库标签样式 2025-11-04 18:50:08 +08:00
670788339
2f034447b6 Merge branch 'master-20251023-tag' into test1024
# Conflicts:
#	src/components/Course/courseTag.vue
#	src/views/portal/course/Index.vue
2025-11-04 18:45:49 +08:00
670788339
25cb97f462 课程库标签样式 2025-11-04 18:44:09 +08:00
670788339
8524f7ec6f 样式调整 2025-11-04 18:32:10 +08:00
670788339
3f108ab9b7 样式调整 2025-11-04 18:26:11 +08:00
670788339
9c3b1f8857 样式调整 2025-11-04 18:19:04 +08:00
670788339
57c01d2519 样式调整 2025-11-04 18:08:29 +08:00
670788339
e9f872dd07 样式调整 2025-11-04 17:59:54 +08:00
670788339
3a5462465b 样式调整 2025-11-04 17:54:31 +08:00
670788339
51c3d29854 样式调整 2025-11-04 17:48:59 +08:00
670788339
fb2e07cea3 Merge branch 'master-20251023-tag' into test1024
# Conflicts:
#	src/views/portal/course/Index.vue
2025-11-04 17:46:41 +08:00
670788339
c49d69dede 样式调整 2025-11-04 17:35:06 +08:00
670788339
6a764dd698 样式调整 2025-11-04 17:29:39 +08:00
670788339
24de64d8e5 样式调整 2025-11-04 17:28:45 +08:00
陈昱达
86ec8138dd feat(ai-call):优化对话框拖拽与缩放功能- 增强对话框拖拽逻辑,防止事件冒泡
- 完善对话框缩放功能,动态调整欢迎消息区域高度
- 修正机器人欢迎文本中的错别字
- 调整消息列表区域样式,优化滚动条显示
- 监听对话框可见性变化,确保内容正确渲染
2025-11-04 17:18:38 +08:00
670788339
bc15ec9e21 Merge branch 'master-20251023-tag' into test1024 2025-11-04 17:17:15 +08:00
670788339
af10b1fa32 样式调整 2025-11-04 17:16:41 +08:00
670788339
79040580a1 样式调整 2025-11-04 17:03:23 +08:00
Caojr
4b2285a6f9 Merge branch '20251104-1282-fix-gj' into test1024 2025-11-04 15:54:31 +08:00
Caojr
782bcc31e5 szx-1282 超时清空展示文件 2025-11-04 15:54:23 +08:00
670788339
a15c8510c2 Merge branch 'master-20251023-tag' into test1024 2025-11-04 15:29:37 +08:00
670788339
7be0bdee6c 样式调整 2025-11-04 15:26:21 +08:00
joshen
109122f1c1 Merge remote-tracking branch '121/test1024' into test1024 2025-11-04 15:01:33 +08:00
joshen
6d6d0e4539 Merge remote-tracking branch 'aliyun/test1024_new' into test1024 2025-11-04 15:00:54 +08:00
670788339
f88a3a0b53 在线标签交互 2025-11-04 14:58:31 +08:00
Caojr
5e561930e1 Merge branch '20251104-1282-fix-gj' into test1024 2025-11-04 14:55:29 +08:00
Caojr
1a95852912 szx-1282 超时清空展示文件 2025-11-04 14:55:16 +08:00
670788339
556eaea825 调试 2025-11-04 14:53:19 +08:00
670788339
2fd3ac0de2 调试 2025-11-04 14:48:10 +08:00
670788339
bbafde31b5 调试 2025-11-04 14:30:12 +08:00
670788339
3eae32b617 调试 2025-11-04 14:20:35 +08:00
670788339
48ec56dcbc 创建调整 2025-11-04 13:51:02 +08:00
670788339
dfdba51202 Merge remote-tracking branch '121/test1024' into test1024 2025-11-04 13:50:08 +08:00
670788339
0b5d0e3180 调试 2025-11-04 13:49:44 +08:00
Caojr
9bc6af207b Merge branch '20251104-1282-fix-gj' into test1024 2025-11-04 13:47:37 +08:00
Caojr
f5d865ccc3 szx-1282 增加超时配置 2025-11-04 13:47:02 +08:00
670788339
8711bbaabb 调试 2025-11-04 13:13:11 +08:00
670788339
a25198f80f 调试 2025-11-04 12:41:09 +08:00
670788339
cc7801d42d 调试 2025-11-04 12:26:35 +08:00
670788339
ef868f8165 调试 2025-11-04 12:13:27 +08:00
670788339
417d911f5d 调试 2025-11-04 12:06:58 +08:00
670788339
aa1301575e 调试 2025-11-04 12:03:05 +08:00
670788339
2a633e25e5 调试 2025-11-04 11:27:55 +08:00
670788339
81b8ef168c 调整 2025-11-04 11:19:32 +08:00
670788339
7f587138ff 调整日志 2025-11-04 11:01:50 +08:00
670788339
973e3f947d 调整日志 2025-11-04 10:23:30 +08:00
670788339
6afc19d21c 调整日志 2025-11-04 10:08:26 +08:00
670788339
305a5481c8 调整日志 2025-11-04 10:02:27 +08:00
670788339
01bbe6c5c4 调整 2025-11-04 09:53:18 +08:00
670788339
be10b56885 调整 2025-11-04 09:46:23 +08:00
670788339
b2458b6b92 调整 2025-11-04 09:43:05 +08:00
670788339
f7d247dca2 调整 2025-11-04 09:38:43 +08:00
670788339
560d180583 调整 2025-11-04 09:26:20 +08:00
670788339
e9953f2ac6 调整 2025-11-04 09:06:05 +08:00
670788339
b2908ba75e 调整 2025-11-04 09:02:33 +08:00
670788339
d087082613 调整 2025-11-04 08:58:20 +08:00
陈昱达
f8c6f55e73 feat(portal/case): 增强AI对话窗口交互功能
-为sendMessage组件添加textarea输入框,支持多行输入
- 为AI对话窗口添加拖拽和调整大小功能
- 在最小化窗口中添加关闭按钮- 优化窗口样式和布局,提升用户体验
- 添加拖拽手柄和窗口控制按钮
- 实现窗口位置和大小的动态调整
- 引入open.png图标用于最小化窗口操作
2025-11-04 06:59:05 +08:00
670788339
25c2e673dc 调整计数样式 2025-11-03 19:20:20 +08:00
670788339
f0ea689166 调整 2025-11-03 19:19:39 +08:00
670788339
5b2a6d304c 调整 2025-11-03 19:15:50 +08:00
670788339
44ccf8db6d 调整 2025-11-03 19:10:51 +08:00
670788339
5f42a95f47 调整 2025-11-03 19:06:22 +08:00
670788339
b0bc517936 调整 2025-11-03 18:58:33 +08:00
670788339
897684b4f2 调整 2025-11-03 18:53:40 +08:00
670788339
c9185722f8 调整 2025-11-03 18:48:08 +08:00
670788339
f43a03b661 调整 2025-11-03 18:43:57 +08:00
670788339
69294e0d49 Merge branch 'master-20251023-tag' into test1024 2025-11-03 18:38:02 +08:00
670788339
78cc822464 调整 2025-11-03 18:37:28 +08:00
670788339
b00e2c80b0 还原 2025-11-03 13:24:48 +08:00
670788339
a901e488b4 标签清除调试 2025-11-03 12:14:31 +08:00
670788339
512144d7d7 标签清除调试 2025-11-03 12:07:24 +08:00
670788339
fd85b8b5d0 标签清除调试 2025-11-03 11:06:37 +08:00
670788339
d1d65d41ca 标签清除调试 2025-11-03 10:43:39 +08:00
670788339
526e5e0e48 标签清除调试 2025-11-03 10:24:47 +08:00
670788339
366f1dc45b 标签清除 2025-11-02 18:08:19 +08:00
670788339
cee45f82cb 调试 2025-11-02 17:36:52 +08:00
670788339
4b668cf186 调试 2025-11-02 17:27:51 +08:00
670788339
a656c27e24 还原 2025-11-02 17:20:31 +08:00
670788339
743478655e 调试 2025-11-02 17:15:30 +08:00
670788339
f07ef38cd5 调试 2025-11-02 17:06:37 +08:00
670788339
47ab19db7e Merge branch 'master-20251023-tag' into test1024 2025-11-02 15:28:49 +08:00
670788339
4ee6697166 默认提示 2025-11-02 15:28:16 +08:00
670788339
254344a528 Merge branch 'master-20251023-tag' into test1024
# Conflicts:
#	src/components/Course/courseTag.vue
2025-11-02 10:23:41 +08:00
670788339
a54c642f4b 标签调整 2025-11-02 10:22:23 +08:00
670788339
55b8ee7840 标签调整 2025-11-02 09:35:11 +08:00
670788339
109d154387 Merge branch 'master-20251023-tag' into test1024 2025-11-01 15:04:50 +08:00
670788339
6a77bd9dc4 在线新增 2025-11-01 15:04:02 +08:00
670788339
e48cb36917 Merge branch 'master-20251023-tag' into test1024 2025-10-31 20:20:14 +08:00
670788339
8e51663b86 详情页标签调整 2025-10-31 20:19:35 +08:00
670788339
79cd4d2e03 Merge branch 'master-20251023-tag' into test1024
# Conflicts:
#	src/components/Course/courseForm.vue
2025-10-31 19:09:58 +08:00
670788339
cbe7981abd 调试 2025-10-31 19:08:54 +08:00
670788339
cc4909897b 调试 2025-10-31 18:42:29 +08:00
670788339
2e7fa1cc2e 调试 2025-10-31 18:36:22 +08:00
670788339
dfc22479bb Merge branch 'master-20251023-tag' into test1024 2025-10-31 18:23:34 +08:00
670788339
1ad2816622 调试 2025-10-31 18:21:08 +08:00
670788339
ac788d59f3 Merge branch 'master-20251023-tag' into test1024 2025-10-31 18:11:04 +08:00
670788339
03b3c61c6b 调试 2025-10-31 18:10:32 +08:00
670788339
4f74216c6e JavaScript heap out of memory 2025-10-31 17:54:17 +08:00
670788339
a5279210c7 JavaScript heap out of memory 2025-10-31 17:49:07 +08:00
670788339
e0db15c85d Merge branch 'master-20251023-tag' into test1024 2025-10-31 17:00:48 +08:00
670788339
b3756280cf 调试 2025-10-31 16:58:56 +08:00
670788339
b38a4768a6 热点标签+保存标签调试 2025-10-31 16:45:48 +08:00
670788339
63439cb57f Merge branch 'master-20251023-tag' into test1024 2025-10-31 16:38:54 +08:00
670788339
f34d2a6e94 热点标签+保存标签调试 2025-10-31 16:36:07 +08:00
Caojr
478890ff09 Merge branch '20251031-1280-fix-gj' into test1024 2025-10-31 16:17:30 +08:00
Caojr
65673561d8 szx-1280 编辑时长无效问题修复 2025-10-31 16:16:29 +08:00
670788339
b18f9d132b Merge branch 'master-20251023-tag' into test1024
# Conflicts:
#	src/views/portal/course/Index.vue
2025-10-31 15:57:42 +08:00
670788339
4d5b462b61 热点标签调试 2025-10-31 15:55:13 +08:00
670788339
a1047420fb 热点标签 2025-10-31 15:47:36 +08:00
670788339
7b02644cde Merge branch 'master-20251023-tag' into test1024 2025-10-31 14:59:27 +08:00
670788339
055476c583 热点标签 2025-10-31 14:54:05 +08:00
670788339
2f6e38430e Merge branch 'master-20251023-tag' into test1024 2025-10-31 13:35:21 +08:00
670788339
78f681b4cb 热点标签 2025-10-31 13:33:41 +08:00
670788339
6a875182d7 Merge branch 'master-20251023-tag' into test1024 2025-10-31 11:14:07 +08:00
670788339
520fb4ee5e 取消无分类时限制标签 2025-10-31 11:13:16 +08:00
670788339
ba7bfe5f11 课程库标签 2025-10-31 11:09:09 +08:00
670788339
a7ccf26932 标签输入框下拉调整 日志 2025-10-30 20:12:33 +08:00
670788339
a2760f2ec6 Merge branch 'master-20251023-tag' into test1024 2025-10-30 20:08:58 +08:00
670788339
86bcf06d87 标签输入框下拉调整 日志 2025-10-30 20:08:16 +08:00
670788339
5d8f9874c8 Merge branch 'master-20251023-tag' into test1024 2025-10-30 19:44:40 +08:00
670788339
3e1b545d2a 标签输入框下拉调整 2025-10-30 19:42:31 +08:00
670788339
fbf3b19e40 Merge branch 'master-20251023-tag' into test1024 2025-10-30 19:11:01 +08:00
670788339
3f028e5cd8 标签输入框调整 2025-10-30 19:10:17 +08:00
670788339
1d2d20acb0 Merge branch 'master-20251023-tag' into test1024 2025-10-30 15:43:52 +08:00
670788339
d94bcf96a1 还原释在线保存前创建标签 2025-10-30 15:39:17 +08:00
670788339
3cc0f690a4 Merge branch 'master-20251023-tag' into test1024 2025-10-30 14:12:44 +08:00
670788339
36b739d139 注释在线保存前创建标签 2025-10-30 14:10:54 +08:00
Caojr
2cbb379fa6 样式修改 2025-10-29 18:10:07 +08:00
670788339
0d01f7da86 Merge branch 'master-20251023-tag' into test1024 2025-10-29 15:28:14 +08:00
670788339
8bf7a8e8e7 注释在线保存前创建标签 2025-10-29 15:27:43 +08:00
670788339
803d9c2dbb Merge branch 'master-20251023-tag' into test1024 2025-10-29 14:59:55 +08:00
670788339
4b92308d1d 注释在线保存前创建标签 2025-10-29 14:59:23 +08:00
670788339
101ebdbbad Merge branch 'master-20251023-tag' into test1024 2025-10-29 14:55:16 +08:00
670788339
a25ea0c4ba 注释在线保存前创建标签 2025-10-29 14:46:25 +08:00
670788339
1b47071a99 Merge remote-tracking branch '121/test1024' into test1024 2025-10-28 16:52:53 +08:00
670788339
e55aa09409 日志 2025-10-28 16:42:07 +08:00
joshen
8a39d424a2 纠正 setup 错误的问题 2025-10-28 16:40:57 +08:00
joshen
43a8ae3606 Merge remote-tracking branch 'yx/20250922-cyd' into test1024 2025-10-28 16:19:49 +08:00
670788339
5a3b57bd1c Merge branch '104-master' into master-20251023-tag 2025-10-28 15:13:59 +08:00
670788339
6d4af3aa2d 还原视频状态 调试 2025-10-24 13:29:09 +08:00
joshen
ebf99e8a7f Merge remote-tracking branch '121-git/test1024' into test1024 2025-10-24 10:01:50 +08:00
陈昱达
6d37310bc4 feat(portal): 添加消息组件最小化窗口功能
- 在消息组件中新增 getMinWindow事件触发
- 在 AI 呼叫页面监听并处理最小化事件
- 实现窗口状态管理,支持最小化显示
-优化组件间通信逻辑,确保状态同步准确- 修复可能引起状态异常的注释代码问题- 调整样式以适配最小化窗口显示效果
2025-10-24 10:00:45 +08:00
陈昱达
f9675b1ab7 更新lock 2025-10-24 10:00:41 +08:00
陈昱达
ed6fb14367 feat(case): 支持消息内容Markdown渲染并优化样式
- 消息内容支持Markdown格式渲染
- 注释掉推荐问题模块,暂时不显示
- 调整消息气泡样式,去除背景色和边框
- 修改消息气泡圆角大小,提升视觉效果
- 调整链接颜色为黑色,增强可读性- 提高打字机效果速度,改善用户体验
2025-10-24 10:00:36 +08:00
陈昱达
ee43ea7b0c fix(portal): 禁用消息组件中的打字机效果
- 注释掉了启动打字机效果的函数调用
- 直接设置显示文本以避免延迟
2025-10-24 10:00:33 +08:00
陈昱达
83bda2e8a5 feat(portal):优化AI对话框宽度与消息展示
- 将AI对话框宽度从65%调整为800px- 修改初始欢迎消息格式,使用HTML标签替换Markdown语法-修复机器人消息显示逻辑,确保displayText正确赋值- 优化消息渲染流程,提升用户体验
2025-10-24 10:00:28 +08:00
陈昱达
90622d6ebc feat(portal): 实现消息组件支持 Mermaid 图表渲染
- 添加 markdown-it-mermaid 插件支持 Mermaid 语法
- 集成 mermaid 库并初始化配置
- 实现打字机效果与 Mermaid 渲染结合
-优化案例引用展示逻辑与样式- 添加推荐问题展示功能
- 改进消息组件的响应式与样式细节
- 修复组件销毁时定时器未清除的问题
- 更新依赖包引入 Mermaid 相关库
2025-10-24 10:00:22 +08:00
陈昱达
b7273410a0 feat(portal): 支持消息内容的 Markdown 和 LaTeX 渲染- 引入 markdown-it 与 highlight.js 实现 Markdown 渲染- 集成 KaTeX 支持数学公式显示
- 更新消息组件以支持实时渲染 Markdown 与 LaTeX
- 调整 AI 对话框宽度为百分比布局
- 优化初始欢迎文案格式并添加段落间距
- 添加必要的依赖项:katex、markdown-it、markdown-it-highlightjs 等- 配置 vue-katex 插件并定义分隔符规则
- 使用 null-loader 处理部分资源加载问题
2025-10-24 10:00:18 +08:00
joshen
9580dd9735 添加 Accept : EventStream 请求头 2025-10-24 09:59:08 +08:00
670788339
b8ba52731f Merge remote-tracking branch 'nyx/20250912-tag-add' into master-20251023-tag 2025-10-24 09:28:26 +08:00
joshen
5ebee96ce4 Merge remote-tracking branch 'yx/202599-da' 2025-09-29 17:42:32 +08:00
408d6a1612 修复视频 status 状态 2025-09-29 17:26:53 +08:00
王卓煜
581be5567f 标签管理未选择分类给个提示语 2025-09-28 11:59:09 +08:00
王卓煜
c9465492f4 标签管理未选择分类给个提示语 2025-09-28 11:46:33 +08:00
王卓煜
b18500bad7 标签管理查询条件 缺少重置按钮 2025-09-28 11:12:06 +08:00
王卓煜
5536fc06e1 标签管理修改无数据也可以回车创建 2025-09-28 11:07:08 +08:00
王卓煜
18f3804536 标签管理修改提示语 2025-09-28 11:03:09 +08:00
王卓煜
7230bd18e8 标签管理无目录课程添加标签 2025-09-26 19:03:56 +08:00
b1508ad226 更新精品课图片 2025-09-26 09:18:51 +08:00
a9764bf2f8 更新精品课图片 2025-09-26 09:15:55 +08:00
王卓煜
fd10d99454 标签管理去除无效功能 2025-09-22 10:17:37 +08:00
王卓煜
a51d87fbe8 标签关联课程下面展示标签 2025-09-19 17:12:24 +08:00
王卓煜
2aa36c82ab 标签管理搜索关键字和搜索条件区别显示 2025-09-19 11:12:58 +08:00
王卓煜
0bba87cb3d 标签管理前端友好提示 2025-09-18 09:45:33 +08:00
王卓煜
98ba239494 标签管理添加图片(社招新员工的样式影响了所以添加一下) 2025-09-12 16:14:43 +08:00
王卓煜
df3b1d7162 标签管理 2025-09-12 15:47:26 +08:00
17 changed files with 1572 additions and 479 deletions

View File

@@ -1,12 +1,12 @@
<template>
<div id="app" style="width: 100vw">
<div id="app">
<keep-alive :include="['case']">
<router-view />
12312
</keep-alive>
<!-- 添加AI Call组件 -->
<AICall
:dialogVisible="showAICall"
<AICall
:dialogVisible="showAICall"
@close="onCloseAICall"
@restore="onRestoreAICall"
/>
@@ -16,7 +16,7 @@
<script>
import { mapGetters, mapState } from 'vuex';
import AICall from '@/views/portal/case/AICall.vue';
export default{
name: 'App',
components: {
@@ -31,12 +31,12 @@
// 通过Vuex关闭AI Call组件
this.$store.dispatch('app/setShowAICall', false);
},
onRestoreAICall() {
// 通过Vuex显示AI Call组件
this.$store.dispatch('app/setShowAICall', true);
},
// 检查当前路由是否应该显示AI弹窗
checkRouteForAICall() {
const currentRoute = this.$route.name;
@@ -59,7 +59,7 @@
// if(this.userInfo && this.userInfo.name!=''){
// this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
// }
// 初始化检查路由
this.checkRouteForAICall();
},
@@ -87,4 +87,4 @@
border: 1px solid #e7e7e7 !important;
box-shadow: 0px 1px 5px 1px rgba(92,98,111,.3);
}
</style>
</style>

View File

@@ -22,7 +22,7 @@ const pageList = function(data) {
/**
* 选择课件的查询,这里也是分页查询,只是返回的内容,字段会很少,用于课件制作那选择已有课件内容。
*
*
* @param {Object} data
* 查询参数如上面pageList方法
*/
@@ -47,7 +47,9 @@ const findList = function(data) {
}
*/
const saveUpload = function(data) {
return ajax.post('/xboe/m/course/file/upload/save', data);
return ajax.post('/xboe/m/course/file/upload/save', data, {
timeout: 60000
});
}
/**
@@ -88,4 +90,4 @@ export default {
batchUpdate,
detail,
delFile
}
}

View File

@@ -0,0 +1,64 @@
/**课程标签模块的相关处理*/
import ajax from '@/utils/xajax.js'
/**
* 分页查询:标签列表
* @param {Object} query
*/
const portalPageList = function(query) {
return ajax.post('/xboe/m/coursetag/page', query);
}
//改变标签的公共属性
const changeTagPublic = function (row){
// 返回 Promise 的 API 调用
return ajax.post('/xboe/m/coursetag/changePublicStatus', {
id: row.id,
isPublic: row.isPublic
});
}
//改变标签的热点属性
const changeTagHot = function (row){
// 返回 Promise 的 API 调用
return ajax.post('/xboe/m/coursetag/changeHotStatus', {
id: row.id,
isHot: row.isHot
});
}
//查询指定id的标签关联的所有课程
const showCourseByTag = function (query){
return ajax.post('/xboe/m/coursetag/showCourseByTag', query);
}
//解除指定id的课程和某个标签之间的关联关系
const unbindCourseTagRelation = function (params){
return ajax.post('/xboe/m/coursetag/unbind', params);
}
//编辑课程:标签模糊查询
const searchTags = function (params){
return ajax.post('/xboe/m/coursetag/searchTags', params);
}
//编辑课程:创建标签(与当前课程关联)
const createTag = function (params){
return ajax.post('/xboe/m/coursetag/createTag', params);
}
//获取最新前10个热点标签
const getHotTagList = function (params){
return ajax.post('/xboe/m/coursetag/getHotTagList', params);
}
export default {
portalPageList,
changeTagPublic,
changeTagHot,
showCourseByTag,
unbindCourseTagRelation,
searchTags,
createTag,
getHotTagList
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -50,7 +50,7 @@
<el-input-number v-model="duration" size="mini" :min="1" :max="100"></el-input-number>
</span>
</div>
<el-upload class="upload-demo" :headers="headers" :data="data" drag :action="uploadFileUrl" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
<el-upload ref="uploadRef" class="upload-demo" :headers="headers" :data="data" drag :action="uploadFileUrl" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">文件大小限制{{curComType.maxSizeName}},支持的文件类型{{curComType.fileTypes.join(',')}}</div>
@@ -195,6 +195,7 @@
// this.cware.content.content=result.filePath;
}else{
this.$message.error(rs.message);
this.$refs.uploadRef.clearFiles();
}
});
}else{

View File

@@ -5,15 +5,15 @@
<el-form label-width="120px" label-position="left" >
<el-form-item label="课程名称" required><el-input maxlength="90" v-model="courseInfo.name" show-word-limit placeholder="课程名称(限90字以内)"></el-input></el-form-item>
<el-form-item label="是否设置目录" required>
<div>
<el-radio v-model="courseInfo.type" :label="20"></el-radio>
<el-radio v-model="courseInfo.type" :label="10"></el-radio>
</div>
<div>
<el-radio v-model="courseInfo.type" :label="20"></el-radio>
<el-radio v-model="courseInfo.type" :label="10"></el-radio>
</div>
</el-form-item>
<!-- <div style="margin-top:40px">适合您<span style="color:#e83d3a;font-size: 16px;">快速</span>分享<span style="color:#e83d3a;font-size: 16px;">单一</span>的视频音频或者文档制作说明</div> -->
<!-- <div v-show="courseExample == 1">适合您<span class="tip">快速</span>分享<span class="tip">单一</span>的视频音频或者文档制作说明</div>
<div v-show="courseExample == 2">适合您分享<span class="tip">体系化</span>、<span class="tip">结构化</span>的课程内容制作说明</div>
-->
<!-- <div style="margin-top:40px">适合您<span style="color:#e83d3a;font-size: 16px;">快速</span>分享<span style="color:#e83d3a;font-size: 16px;">单一</span>的视频音频或者文档制作说明</div> -->
<!-- <div v-show="courseExample == 1">适合您<span class="tip">快速</span>分享<span class="tip">单一</span>的视频音频或者文档制作说明</div>
<div v-show="courseExample == 2">适合您分享<span class="tip">体系化</span>、<span class="tip">结构化</span>的课程内容制作说明</div>
-->
</el-form>
</div>
<!-- <div style="height:100px"></div> -->
@@ -73,10 +73,13 @@
:props="{ value: 'id', label: 'name' }"
:options="sysTypeListMap"></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>
<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>
</el-input>
<el-input placeholder="请选择" v-model="orgName" >
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
</el-input>
</el-form-item>
<el-form-item label="场景" v-show="!weike.onlyRequired">
<el-col :span="18">
@@ -109,11 +112,11 @@
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item v-if="visibleShow" label="学员可见">
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
</el-form-item>
<el-form-item label="受众" v-if="!weike.onlyRequired">
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :disabled="item.disabled" :label="item.name" :value="item"></el-option>
<el-option v-for="item in userGroupList" :key="item.id" :disabled="item.disabled" :label="item.name" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程价值" v-if="!weike.onlyRequired">
@@ -141,7 +144,6 @@
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="1">PC端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="2">移动端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="3">多端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" v-if="isPermission" :label="4">仅内网访问</el-radio>
</el-form-item>
<el-form-item v-if="!weike.onlyRequired" label="课程来源">
<el-radio-group v-model="courseInfo.source">
@@ -151,11 +153,11 @@
</el-form-item>
<el-form-item v-if="!weike.onlyRequired" label="课程简介">
<el-input type="textarea"
maxlength="255"
show-word-limit
:rows="3"
v-model="courseInfo.summary"
placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息">
maxlength="255"
show-word-limit
:rows="3"
v-model="courseInfo.summary"
placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息">
</el-input>
</el-form-item>
</el-col>
@@ -254,18 +256,21 @@
</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>
<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)">
{{ tag }}
</el-tag>
<el-tag v-for="(tag,index) in tips" size="small" :key="index" closable type="info" @close="closeKeywordsTag(tag,index)">
{{ tag }}
</el-tag>
</el-form-item>
</el-col>
</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>
</el-input>
<el-input placeholder="请选择" v-model="orgName" >
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
</el-input>
</el-form-item>
<el-form-item label="目标人群" required>
<el-col :span="14">
@@ -273,13 +278,13 @@
</el-col>
<el-col :span="10">
<el-form-item v-if="visibleShow" label="学员可见">
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="受众"><!--:disabled="item.disabled"-->
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :label="item.name" :value="item"></el-option>
<el-option v-for="item in userGroupList" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程价值"><el-input maxlength="200" v-model="courseInfo.value" show-word-limit placeholder="课程价值(限200字以内)"></el-input></el-form-item>
@@ -306,7 +311,6 @@
<el-radio v-model="courseInfo.device" :label="1">PC端可见</el-radio>
<el-radio v-model="courseInfo.device" :label="2">移动端可见</el-radio>
<el-radio v-model="courseInfo.device" :label="3">多端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" v-if="isPermission" :label="4">仅内网访问</el-radio>
</el-col>
<el-col :span="10">
<el-form-item label="课程来源">
@@ -393,8 +397,8 @@
</span>
</el-dialog>
<el-dialog class="checked-show" :visible.sync="courseInfoFormCheckedShow" top="14vh" width="800px" :show-close="false" :modal="false">
<agreement></agreement>
<span slot="footer" class="dialog-footer">
<agreement></agreement>
<span slot="footer" class="dialog-footer">
<el-button style="margin-right:10px" type="primary" @click="courseInfoFormCheckedShow = false"> </el-button>
</span>
</el-dialog>
@@ -404,6 +408,7 @@
</div>
</template>
<script>
import courseTag from "@/components/Course/courseTag.vue";
import choice from '@/components/Course/choice.vue';
import agreement from '@/components/Portal/agreement.vue';
import weikeContent from '@/components/Course/weikeContent.vue';
@@ -420,6 +425,7 @@ import apiCourse from '../../api/modules/course.js';
import apiCourseAudit from '../../api/modules/courseAudit.js';
import apiOrg from '../../api/system/organiza.js';
import apiUser from '../../api/system/user.js';
import apiCourseTag from '../../api/modules/courseTag.js';
import WxEditor from '@/components/Editor/index.vue';
import catalogSort from '@/components/Course/catalogSort.vue';
import { courseType, getType } from '../../utils/tools.js';
@@ -428,7 +434,7 @@ import filecloud from '@/components/FileCloud/index.vue';
import chooseOrg from '@/components/System/chooseOrg.vue';
export default {
props: {},
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
components: { courseTag, weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
data() {
return {
keywords:'',//关键字的定义
@@ -468,6 +474,7 @@ export default {
orgName:'',
orgNamePath:'',
orgKid:'',
courseTags:[],
courseInfo: {
id: '',
name: '',
@@ -490,8 +497,6 @@ export default {
refType:''
},
visibleShow:false,
isPermission:false,
dicts:[],
extendRefId:'',
extendRefType:'',
courseTeachers: [], //课程的老师
@@ -531,11 +536,7 @@ export default {
dlgShow: false
},
rightTypeId: {},
catalogSortDialogShow: false,
selectedOrg: {
orgId: null,
name: ''
}
catalogSortDialogShow: false
};
},
created() {
@@ -560,18 +561,14 @@ export default {
},
watch: {
courseInfo: {
handler(newVal, oldVal) {
// 需要保存
handler(newVal) {
//需要保存
this.requireSaveCourse = true;
console.log("--- watch比较 = ", oldVal.orgId, newVal.orgId);
this.checkOrgPermission(newVal.orgId);
},
deep: true
}
},
mounted() {
this.getDictIds();
let extendFlag=this.$route.query.f; //是否是管理端过来的
this.extendRefId=this.$route.query.refId;
this.extendRefType=this.$route.query.refType;
@@ -593,19 +590,6 @@ export default {
this.loadUserGroup();
},
methods: {
// 检查机构权限
checkOrgPermission(orgId) {
console.log("--- 监测组织id orgId = ",orgId)
console.log("--- this.isPermission = ",this.isPermission)
console.log("--- device = ",this.courseInfo.device)
if (!orgId) {
this.isPermission = false;
return;
}
console.log("--- this.dicts = ",this.dicts)
this.isPermission = this.dicts.includes(orgId);
console.log("--- 监听结束 this.isPermission = ",this.isPermission)
},
// 关键字的更改
changeKeywords(option){
if(option.target.value){
@@ -617,15 +601,33 @@ export default {
closeKeywordsTag(item,index){
this.tips.splice(index, 1);
},
// 处理标签变化事件
handleTagsChange(tags) {
console.log("父组件:",tags)
// 限制最多5个标签
if (tags.length > 5) {
this.$message.warning('最多只能选择5个标签')
// 强制限制为5个
tags = tags.slice(0, 5);
return
}
let ids = "";
tags.forEach(tag=>{
console.log("父组件name : ",tag.tagName)
ids += tag.id + ',';
})
this.courseInfo.tags = ids;
this.$emit('change', tags.slice(0, 5)); // 确保传出数据也不超过5个
},
showChooseOrg(){
this.$refs.refChooseOrg.dlgShow = true;
this.$refs.refChooseOrg.dlgShow = true;
},
removeCrowd(e){
//console.log(e);
if(e.disabled){
this.$message.error("您不能移除创建人加的受众");
this.courseCrowds.push(e);
return false;
this.$message.error("您不能移除创建人加的受众");
this.courseCrowds.push(e);
return false;
}
},
confirmChooseOrg(orgInfo,parentInfo){
@@ -694,17 +696,17 @@ export default {
// }
// });
apiUserBasic.getUserAudiences(params).then(rs=>{
if(rs.status==200){
let crowdList=[];
rs.result.list.forEach(item=>{
crowdList.push({
id:item.id,
name:item.audienceName,
disabled:false
})
});
this.userGroupList=crowdList;
}
if(rs.status==200){
let crowdList=[];
rs.result.list.forEach(item=>{
crowdList.push({
id:item.id,
name:item.audienceName,
disabled:false
})
});
this.userGroupList=crowdList;
}
})
},
resOwnerName(code) {
@@ -747,6 +749,7 @@ export default {
this.$emit('close');
},
initShow(editData) {
console.log('初始化显示内容============', editData)
//console.log(this.$refs.weikePanel,'this.$refs.weikePanel');
//this.$refs.weikePanel.init();
//this.$refs.onlineCourse.resetData();
@@ -794,9 +797,11 @@ export default {
this.tips=[];
if (!editData) {
//console.log("新建课程?");
//以下为了保证初始化处理
this.weikeReset = Math.round(Math.random()) + '';
this.tips=[];
this.courseTags=[],
//console.log("新建课程?");
//以下为了保证初始化处理
this.weikeReset = Math.round(Math.random()) + '';
this.onlineReset = Math.round(Math.random()) + '';
this.courseChooseShow = true;
this.biaoke.tabIndex = 'base';
@@ -817,11 +822,11 @@ export default {
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
this.orgName=rs.result.name;
this.courseInfo.orgName=rs.result.name;
//this.orgKid=rs.result.kid;
this.orgNamePath=rs.result.namePath;
}
this.orgName=rs.result.name;
this.courseInfo.orgName=rs.result.name;
//this.orgKid=rs.result.kid;
this.orgNamePath=rs.result.namePath;
}
});
}
@@ -890,16 +895,30 @@ export default {
if (rs.status == 200) {
this.courseChooseShow = false;
this.courseInfo = rs.result;
this.curCourseId = this.courseInfo.id
console.log('保存课程成功',this.curCourseId)
if (this.courseChooseId == 1) {
this.weike.dlgShow = true;
} else {
this.biaoke.dlgShow = true;
}
this.$nextTick(() => {
this.initTagComponent();
});
} else {
this.$message.error(rs.message);
}
});
},
// 新增初始化标签方法
initTagComponent() {
if (this.$refs.courseTag) {
// 确保组件已渲染后再调用搜索
setTimeout(() => {
this.$refs.courseTag.debouncedSearch('');
}, 100);
}
},
//上传课程图片处理
uploadCoverImgSuccess(res) {
//console.log(res,'res');
@@ -910,30 +929,16 @@ export default {
this.courseCoverurl = '';
this.courseInfo.coverImg = '';
},
//获取字典信息
async getDictIds() {
console.log("--- 获取字典信息 1 = ", this.dicts);
try {
const response = await apiCourse.getDictIds(637, 1); // 确保返回 Promise
console.log("--- 获取字典信息 2 result= ", response);
if (response.status === 200) {
this.dicts = response.result.dicts; // 正确提取 dicts
console.log("--- 获取字典信息 3 = ", this.dicts);
}
} catch (error) {
console.error("获取字典信息失败:", error);
}
},
//获取课程信息
async getDetail(id) {
this.curCourseId = id;
this.orgName='';
this.isPermission = false;
let $this = this;
let $this = this;
try {
const { result, status } = await apiCourse.detail(id);
if (status === 200) {
this.courseTags = result.tagList;
console.log('获取课程信息成功', this.courseTags);
//把数据附给三个对象
if(result.course.visible==''){
result.course.visible=false;
@@ -947,36 +952,33 @@ export default {
this.contentInfo.list = result.contents;
this.sectionInfo.list = result.sections;
this.courseTeachers = result.teachers; //课程的老师信息
this.isPermission = result.isPermission; //课程的老师信息
this.dicts = result.dicts; //课程的老师信息
console.log("--- 编辑查看 this.isPermission = ",this.isPermission)
console.log("--- 编辑查看 this.dicts = ",this.dicts)
if(!this.courseInfo.orgId){
//根据课程创建者获取机构id
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
if(ors.status==200){
$this.courseInfo.orgId=ors.result.id;
// apiOrg.getSimple(ors.result.id).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// $this.orgKid=rrs.result.kid;
// $this.orgNamePath=rrs.result.namePath;
// }
// })
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
this.courseInfo.orgName=rrs.result.name;
//$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
this.courseInfo.orgId='';
//this.$message.error('资源归属已变更,请重新选择');
}
})
}else{
//this.$message.error('无机构关联,不需要提示');
}
if(ors.status==200){
$this.courseInfo.orgId=ors.result.id;
// apiOrg.getSimple(ors.result.id).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// $this.orgKid=rrs.result.kid;
// $this.orgNamePath=rrs.result.namePath;
// }
// })
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
this.courseInfo.orgName=rrs.result.name;
//$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
this.courseInfo.orgId='';
//this.$message.error('资源归属已变更,请重新选择');
}
})
}else{
//this.$message.error('无机构关联,不需要提示');
}
})
}else{
@@ -992,17 +994,16 @@ export default {
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
$this.orgName=rs.result.name;
$this.courseInfo.orgName=rs.result.name;
//$this.orgKid=rs.result.kid;
$this.orgNamePath=rs.result.namePath;
}else{
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
}
$this.orgName=rs.result.name;
$this.courseInfo.orgName=rs.result.name;
//$this.orgKid=rs.result.kid;
$this.orgNamePath=rs.result.namePath;
}else{
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
}
});
}
this.resOwnerArray=[];
if (result.course.resOwner1 == '') {
this.resOwnerArray.push(result.course.resOwner1);
@@ -1015,33 +1016,33 @@ export default {
}
this.sysTypeList=[];
if(result.course.sysType1!='' && result.course.sysType1!='0'){
this.sysTypeList.push(result.course.sysType1);
this.sysTypeList.push(result.course.sysType1);
}
if(result.course.sysType2!='' && result.course.sysType2!='0'){
this.sysTypeList.push(result.course.sysType2);
this.sysTypeList.push(result.course.sysType2);
}
if(result.course.sysType3!='' && result.course.sysType3!='0'){
this.sysTypeList.push(result.course.sysType3);
this.sysTypeList.push(result.course.sysType3);
}
//console.log(this.sysTypeList,'this.sysTypeList');
//受众处理crowds
let crowdList=[];
if(result.crowds && result.crowds.length>0){
result.crowds.forEach(crowd=>{
let newCrowd={
id:crowd.groupId,
name:crowd.groupName,
disabled:false
}
crowdList.push(newCrowd);
let hasUG=$this.userGroupList.some(ug=>{
return ug.id==crowd.groupId;
});
if(!hasUG){
newCrowd.disabled=true;
$this.userGroupList.push(newCrowd);
}
result.crowds.forEach(crowd=>{
let newCrowd={
id:crowd.groupId,
name:crowd.groupName,
disabled:false
}
crowdList.push(newCrowd);
let hasUG=$this.userGroupList.some(ug=>{
return ug.id==crowd.groupId;
});
if(!hasUG){
newCrowd.disabled=true;
$this.userGroupList.push(newCrowd);
}
});
}
this.courseCrowds=crowdList;
//反向看userGroupList是否有
@@ -1109,7 +1110,7 @@ export default {
inputValue: sec.name,
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern:/^(a-z|A-Z|0-9)*[^$%^&*;:,<>?()\""\']{1,20}$/,
inputPattern:/^(a-z|A-Z|0-9)*[^$%^&*;:,<>?()\""\']{1,20}$/,
inputErrorMessage:'不要超过20个字'
})
.then(({ value }) => {
@@ -1170,7 +1171,7 @@ export default {
let order = [];
if(cha.contents.length > 0) {
cha.contents.forEach(con=>{
order.push(con.sortIndex);
order.push(con.sortIndex);
})
let addOrder = order.sort(function(a,b) {return b-a;})
this.addOrder = addOrder[0] + 1;
@@ -1222,12 +1223,17 @@ export default {
},
//保存课程信息并进入下一步
saveAndNext(btnType) {
console.log("courseForm 保存课程信息 btnType = " + btnType);
//if(this.courseInfo.type)
//console.log(this.courseCrowds,'courseCrowds');
//标签,多个,转化为逗号分隔的
if (this.showTags.length > 0) {
this.courseInfo.tags = this.showTags.join();
}
console.log("courseForm 保存课程信息 this.showTags = " + this.showTags);
console.log("courseForm 保存课程信息 this.courseInfo.tags = " + this.courseInfo.tags);
// if (this.showTags.length > 0) {
// this.courseInfo.tags = this.courseInfo.tags.join();
// }
// console.log("courseForm 保存课程信息 this.courseInfo.tags = " + this.courseInfo.tags);
this.courseInfo.keywords = this.tips.join(',') || ''
//检查输入是否合法
//if(!this.requireSaveCourse){
@@ -1287,7 +1293,7 @@ export default {
teachers: saveTeachers,
crowds:crowds
};
//console.log(postData);
console.log(postData);
//this.btnLoading=false;
apiCourse
.saveBase(postData)
@@ -1333,9 +1339,9 @@ export default {
if(this.curContent.id == '') {// 新增
if(this.curContent.contentType == 60) { // 判断作业是否保存
if(courseware.homework.content || courseware.homework.name || courseware.homework.deadTime){
pass = false;
}
if(courseware.homework.content || courseware.homework.name || courseware.homework.deadTime){
pass = false;
}
} else if(this.curContent.contentType == 61) { //考试
// if(courseware.exam.paperContent != '') {
@@ -1346,11 +1352,11 @@ export default {
// }
}else if(this.curContent.contentType == 41) { //图文
if(courseware.htmlContent.length > 7){
pass = false;
pass = false;
}
}else if(this.curContent.contentType == 52) { //外部链接
if(courseware.linkInfo.url != '') {
pass = false;
pass = false;
}
}
} else {// 编辑
@@ -1365,15 +1371,15 @@ export default {
// }
} else if(this.curContent.contentType == 41) { //图文
if(this.curContent.content !== courseware.htmlContent) {
pass = false;
pass = false;
}
} else if(this.curContent.contentType == 52) { //外部链接
if(this.curContent.content !== JSON.stringify(courseware.linkInfo)) {
pass = false;
pass = false;
}
} else if(this.curContent.contentType == 10 || this.curContent.contentType == 20) {// 视频
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
pass = false;
pass = false;
}
}
}
@@ -1410,6 +1416,9 @@ export default {
return true;
},
submitCourse() {
console.log("courseForm 课程提交审核 this.showTags = " + this.showTags);
console.log("courseForm 课程提交审核 this.courseInfo.tags = " + this.courseInfo.tags);
if(this.biaoke.dlgShow && !this.unsavedContent()){
this.$message.error('您有未保存的内容,请先保存');
return;
@@ -1447,7 +1456,7 @@ export default {
return;
}
if (this.showTags.length > 0) {
this.courseInfo.tags = this.showTags.join();
// this.courseInfo.tags = this.showTags.join();
}
if (this.sysTypeList.length < 1) {
this.$message.error('请选择内容分类');
@@ -1532,61 +1541,61 @@ export default {
//2023-1-5 对于默认管理员不需要提交hrbp。直接提交并发布
let adminType=this.userInfo.adminType;
if(adminType==1){ //默认管理员,直接审核通过
apiCourseAudit.submitAndPublish(postData).then(res=>{
setTimeout(function() {
$this.btnLoading = false;
}, 1000);
if (res.status === 200) {
//提交成功,直接关闭当前窗口
this.$message.success('提交成功!!!');
} else {
this.$message.error(res.message);
}
this.biaoke.dlgShow = false;
this.weike.dlgShow = false;
this.$emit('submitSuccess');
});
apiCourseAudit.submitAndPublish(postData).then(res=>{
setTimeout(function() {
$this.btnLoading = false;
}, 1000);
if (res.status === 200) {
//提交成功,直接关闭当前窗口
this.$message.success('提交成功!!!');
} else {
this.$message.error(res.message);
}
this.biaoke.dlgShow = false;
this.weike.dlgShow = false;
this.$emit('submitSuccess');
});
}else{
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200 && rs.result){
postData.auditUser={
email:rs.result.email,
code:rs.result.userNo,
name:rs.result.name,
aid:rs.result.id,
orgId:rs.result.orgId
}
//下面的机构名称,路径不对,应该取课程的资源归属(机构)的路径
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false;
setTimeout(function() {
$this.btnLoading = false;
}, 1000);
if (res.status === 200) {
//提交成功,直接关闭当前窗口
this.$message.success('提交成功!!!');
this.biaoke.dlgShow = false;
this.weike.dlgShow = false;
//提交成功回调处理
this.$emit('submitSuccess');
} else {
this.$message.error(res.message);
this.biaoke.dlgShow = false;
this.weike.dlgShow = false;
this.$emit('submitSuccess');
}
});
}else{
$this.btnLoading = false;
this.$message.error('获取审核HRBP失败:'+rs.message);
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200 && rs.result){
postData.auditUser={
email:rs.result.email,
code:rs.result.userNo,
name:rs.result.name,
aid:rs.result.id,
orgId:rs.result.orgId
}
}).catch(err=>{
//this.$message.error('获取审核HRBP失败:'+err);
this.$message.error('获取审核HRBP失败请检查资源归属下是否有HRBP审核人员');
$this.btnLoading = false;
})
//下面的机构名称,路径不对,应该取课程的资源归属(机构)的路径
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false;
setTimeout(function() {
$this.btnLoading = false;
}, 1000);
if (res.status === 200) {
//提交成功,直接关闭当前窗口
this.$message.success('提交成功!!!');
this.biaoke.dlgShow = false;
this.weike.dlgShow = false;
//提交成功回调处理
this.$emit('submitSuccess');
} else {
this.$message.error(res.message);
this.biaoke.dlgShow = false;
this.weike.dlgShow = false;
this.$emit('submitSuccess');
}
});
}else{
$this.btnLoading = false;
this.$message.error('获取审核HRBP失败:'+rs.message);
}
}).catch(err=>{
//this.$message.error('获取审核HRBP失败:'+err);
this.$message.error('获取审核HRBP失败请检查资源归属下是否有HRBP审核人员');
$this.btnLoading = false;
})
}
},
// 教师列标,远程查询
@@ -1695,19 +1704,19 @@ export default {
</script>
<style lang="scss" scoped>
.red-tip{
margin-top: 8px;
color: red;
font-size: 14px;
float: left;
font-weight: 600;
}
.red-tip{
margin-top: 8px;
color: red;
font-size: 14px;
float: left;
font-weight: 600;
}
::v-deep .wei-from{
.el-form-item{
margin-bottom: 10px;
margin-bottom: 10px;
}
.el-textarea__inner{
padding-right: 40px;
padding-right: 40px;
}
}
::v-deep .checked-show{
@@ -1716,9 +1725,9 @@ export default {
}
}
.el-dialog__body {
padding: 10px 10px;
// overflow-y: auto;
max-height: calc(70vh - 140px);
padding: 10px 10px;
// overflow-y: auto;
max-height: calc(70vh - 140px);
}
.example {
height: 100%;
@@ -1771,8 +1780,8 @@ export default {
margin-left: 5px;
}
.tip{
font-size: 16px;
color:#ffb30f;
font-size: 16px;
color:#ffb30f;
}
.cctree {
.cctree-chapter {
@@ -1798,13 +1807,13 @@ export default {
</style>
<style lang="scss">
.cusprompt{
padding: 20px 30px;
.el-message-box__content{
margin-top: 30px;
.el-message-box__input{
.cusprompt{
padding: 20px 30px;
.el-message-box__content{
margin-top: 30px;
.el-message-box__input{
}
}
}
}
}
</style>

View File

@@ -0,0 +1,377 @@
<template>
<div class="tag-container">
<el-select style="width: 100%;"
v-model="selectedTags"
multiple
filterable
value-key="id"
remote
reserve-keyword
:remote-method="debouncedSearch"
:loading="loading"
:placeholder="'回车创建新标签'"
@remove-tag="handleTagRemove"
@change="handleSelectionChange"
@keyup.enter.native="handleEnterKey"
@keyup.delete.native="handleDeleteKey"
@focus="handleFocus"
ref="tagSelect"
>
<el-option
v-for="item in searchResults"
:key="item.id"
:label="item.tagName"
:value="item"
:disabled="isTagDisabled(item)"
/>
</el-select>
<!-- 添加标签计数显示 -->
<div class="tag-count">
{{ selectedTags.length }}/5
</div>
</div>
</template>
<script>
import { debounce } from 'lodash'
import apiCourseTag from '@/api/modules/courseTag.js'
import { mapGetters } from 'vuex';
export default {
props: {
courseId:{
type:String,
require:true,
},
sysTypeList:{
type:Array,
require:true,
default: []
},
maxTags: {
type: Number,
default: 5
},
// 添加接收初始标签数据的props
initialTags: {
type: Array,
default: () => []
}
},
data() {
return {
selectedTags: [],
searchResults: [],
loading: false,
tagMap: new Map(),
inputBuffer: '',
params: {},
tag: {},
// 添加临时存储用于回滚
previousTags: []
}
},
computed: {
...mapGetters(['userInfo']),
displayTags() {
return this.selectedTags.map(tag =>
typeof tag === 'object' ? tag : this.tagMap.get(tag)
).filter(Boolean)
}
},
created() {
this.debouncedSearch = debounce(this.doSearch, 500)
console.log("----------sysTypeList.length---------->"+this.sysTypeList.length)
console.log("----------sysTypeList.length---------->"+(this.sysTypeList.length===0))
},
// 添加:挂载时初始化标签数据
mounted() {
if (this.initialTags && this.initialTags.length > 0) {
this.selectedTags = this.initialTags;
this.searchResults = this.initialTags;
// 将初始标签添加到tagMap中确保删除功能正常
this.initialTags.forEach(tag => {
if (tag.id) {
this.tagMap.set(tag.id, tag);
}
});
}
},
watch: {
// 监听课程ID变化重置所有状态
courseId(newVal) {
this.resetTagState();
},
// 监听初始标签变化,重新加载
initialTags(newVal) {
this.selectedTags = newVal || [];
this.searchResults = newVal || [];
this.tagMap.clear(); // 清空旧缓存
newVal.forEach(tag => {
if (tag.id) this.tagMap.set(tag.id, tag);
});
},
// 监听分类变化,重新加载搜索结果
sysTypeList: {
handler() {
// 只有在已选择分类且有焦点时才重新加载
if (this.sysTypeList.length > 0 && this.$refs.tagSelect && this.$refs.tagSelect.visible) {
this.doSearch('');
}
},
deep: true
}
},
methods: {
// 新增:检查标签是否应该被禁用
isTagDisabled(tag) {
// 如果标签已经被选中,不应该禁用(允许取消选择)
const isSelected = this.selectedTags.some(selectedTag => selectedTag.id === tag.id);
if (isSelected) {
return false;
}
// 如果标签未被选中且已达到最大数量,则禁用
return this.selectedTags.length >= this.maxTags;
},
// 新增:处理输入框获得焦点事件
async handleFocus() {
this.previousTags = [...this.selectedTags];
// 当输入框获得焦点时,加载默认的搜索结果
if (this.sysTypeList.length > 0) {
await this.doSearch('');
}
},
// 新增:重置标签状态的方法
resetTagState() {
this.selectedTags = [];
this.searchResults = [];
this.tagMap.clear();
this.loading = false;
this.params = {};
},
handleTagRemove(tagId) {
this.selectedTags = this.selectedTags.filter(id => id !== tagId)
this.$emit('change', this.displayTags)
this.clearInput();
},
removeTag(tagId) {
this.handleTagRemove(tagId)
},
// 新增:处理删除键事件
handleDeleteKey(event) {
// 如果输入框内容为空,不执行任何搜索
if (!event.target.value.trim()) {
this.searchResults = []
}
},
//按回车键,创建新标签
handleEnterKey(event) {
const inputVal = event.target.value?.trim()
if (!inputVal) return;
// 检查是否与已选择的标签重复
const isDuplicate = this.selectedTags.some(tag => tag.tagName === inputVal);
if (isDuplicate) {
this.$message.warning('该标签已存在,无需重复创建');
event.target.value = '';
return;
}
if (!isDuplicate && inputVal && this.selectedTags.length < this.maxTags) {
this.createNewTag(event.target.value.trim())
this.clearInput();
} else if (this.selectedTags.length >= this.maxTags) {
this.$message.warning('最多只能添加5个标签')
this.clearInput();
} else {
this.clearInput();
}
},
// 新增:处理选择变化事件
handleSelectionChange(newValues) {
// 检查每个标签对象是否完整
newValues.forEach((tag, index) => {
if (!tag.tagName) {
console.error(`${index}个标签缺少tagName:`, tag);
}
});
// 检查数量限制
if (newValues.length > this.maxTags) {
this.$message.warning(`最多只能选择${this.maxTags}个标签`);
// 回滚到之前的状态
this.selectedTags = [...this.previousTags];
return;
}
// 更新前保存当前状态
this.previousTags = [...newValues];
this.$emit('change', this.displayTags);
this.clearInput();
},
clearInput() {
if (this.$refs.tagSelect) {
const input = this.$refs.tagSelect.$refs.input;
if (input) {
input.value = '';
}
}
},
//创建新标签
async createNewTag(tagName) {
// 标签不能超过八个字
if (tagName.length > 8) {
this.$message.error('标签不能超过8个字')
return;
}
// 检查标签是否在下拉框中已存在
const isExistInSearch = this.searchResults.some(tag => tag.tagName === tagName);
if (isExistInSearch) {
this.$message.warning('已存在此标签,请选择');
return;
}
// 首先检查是否与已选择的标签重复
const isDuplicate = this.selectedTags.some(tag => tag.tagName === tagName);
if (isDuplicate) {
this.$message.warning('该标签已存在,无需重复创建');
return;
}
// 标签格式验证:仅支持中文、英文、数字、下划线、中横线
const tagPattern = /^[\u4e00-\u9fa5a-zA-Z0-9_-]+$/;
if (!tagPattern.test(tagName)) {
this.$message.error('标签名称仅支持中文、英文、数字、下划线(_)和中横线(-),不支持空格、点和特殊字符');
return;
}
// 添加标签数量限制检查
if (this.selectedTags.length >= this.maxTags) {
this.$message.warning('最多只能添加5个标签')
return;
}
this.loading = true
try {
this.params.courseId = this.courseId;
this.params.tagName = tagName;
// 分类
if (this.sysTypeList.length > 0) {
this.params.sysType1 = this.sysTypeList[0]; //一级的id
}
if (this.sysTypeList.length > 1) {
this.params.sysType2 = this.sysTypeList[1]; //二级的id
}
if (this.sysTypeList.length > 2) {
this.params.sysType3 = this.sysTypeList[2]; //三级的id
}
const {result:newTag} = await apiCourseTag.createTag(this.params)
this.$message.success('标签创建成功',newTag);
this.selectedTags = [...this.selectedTags, newTag];
// 更新搜索结果的逻辑保持不变
this.searchResults = [newTag, ...this.searchResults];
this.tagMap.set(newTag.id, newTag)
this.$emit('change', this.displayTags)
this.$nextTick(() => {
// 强制重新设置selectedTags来触发更新
const tempTags = [...this.selectedTags];
this.selectedTags = [];
this.$nextTick(() => {
this.selectedTags = tempTags;
});
this.$refs.tagSelect.visible = false;
});
} finally {
this.loading = false
}
},
// 修改doSearch方法添加搜索结果为空时的提示
async doSearch(query) {
// 不再在空查询时清空搜索结果
// if (!query.trim()) {
// this.searchResults = []
// return
// }
console.log("---- doSearch ------ query = " + query )
this.loading = true
try {
// 获取 typeId取 sysTypeList 最后一个有效的值
const typeId = this.sysTypeList.length > 2 ? this.sysTypeList[2] :
this.sysTypeList.length > 1 ? this.sysTypeList[1] :
this.sysTypeList.length > 0 ? this.sysTypeList[0] : null;
console.log("---- doSearch searchTags ------ query = " + query + " , typeId = " + typeId )
const {result:tags} = await apiCourseTag.searchTags({tagName:query,typeId:typeId})
console.log("-- searchTags 查询结果 tags = " + tags )
tags.forEach(item => {
this.tagMap.set(item.id, item)
})
this.searchResults = tags
// 当搜索结果为空时,提示用户可以按回车键创建标签
if (tags.length === 0) {
this.$message.info('无此标签,按回车键创建')
}
} finally {
this.loading = false
}
}
}
}
</script>
<style scoped>
.tag-container {
position: relative;
}
.tag-preview {
margin-top: 8px;
}
.el-tag {
margin-right: 6px;
margin-bottom: 6px;
}
/* 添加标签计数样式 */
.tag-count {
position: absolute;
right: 10px;
top: 47%;
transform: translateY(-40%);
font-size: 12px;
color: #999;
background: white;
padding: 0 5px;
pointer-events: none;
/* 添加高度限制 */
height: 25px;
line-height: 25px; /* 垂直居中文字 */
box-sizing: border-box; /* 确保padding包含在height内 */
}
::v-deep(.el-select__tags) {
display: flex;
flex-wrap: wrap;
align-items: center;
}
::v-deep(.el-tag) {
max-width: calc(50% - 8px);
box-sizing: border-box;
margin-right: 8px;
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep(.el-select__input) {
flex: 1;
min-width: 60px;
}
</style>

View File

@@ -1,4 +1,4 @@
<script setup>
<script>
import {getCertificationProcess} from "@/api/modules/lecturer";
export default {

View File

@@ -128,7 +128,8 @@ export const iframes=[
{title:'查看受众', path:'/iframe/ugroup/view',hidden:false,component:'manage/AudienceView'},
{title:'问答管理', path:'/iframe/qa/manages',hidden:false,component:'qa/ManageList'},
{title:'待审核课程', path:'/iframe/course/noapproved',hidden:false,component:'examine/NotApproved'},
{title:'已审核课程', path:'/iframe/course/reviewed',hidden:false,component:'examine/Reviewed'}
{title:'已审核课程', path:'/iframe/course/reviewed',hidden:false,component:'examine/Reviewed'},
{title:'标签管理', path:'/iframe/tag/manages',hidden:false,component:'tag/TagManageList'},
]

View File

@@ -483,8 +483,11 @@ export default {
} else if (this.form.device2 === true) {
this.form.device = 2;
}
//时长,秒与分钟的转化
//if(this.form.)
// 时长,秒与分钟的转化
if (this.form.minute) {
this.form.duration = this.form.minute * 60;
}
try {
const { status,message} = await coueseFile.batchUpdate([this.form]);
if (status === 200) {

View File

@@ -123,6 +123,16 @@
</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,6 +13,7 @@
:append-to-body="true"
:fullscreen="false"
top="10vh"
v-show="windowState === 'maximized'"
v-resizeable
v-draggable
>
@@ -135,18 +136,10 @@ 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.position = 'fixed';
dialogEl.style.top = '100px';
dialogEl.style.left = (window.innerWidth - dialogEl.offsetWidth) / 2 + 'px';
dialogEl.style.margin = '0';
let isDragging = false;
@@ -183,18 +176,15 @@ 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);
@@ -213,20 +203,10 @@ 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';
}
// 设置初始样式
dialogEl.style.position = 'fixed';
dialogEl.style.top = '100px';
dialogEl.style.left = (window.innerWidth - dialogEl.offsetWidth) / 2 + 'px';
// 创建拖拽手柄
const createHandle = (direction) => {
@@ -355,93 +335,65 @@ export default {
const deltaX = event.clientX - startX;
const deltaY = event.clientY - startY;
let newWidth, newHeight, newLeft, newTop;
switch (resizeDirection) {
case 'right':
newWidth = Math.max(400, startWidth + deltaX);
dialogEl.style.width = newWidth + 'px';
dialogEl.style.width = Math.max(400, startWidth + deltaX) + 'px';
break;
case 'left':
newWidth = Math.max(400, startWidth - deltaX);
newLeft = startLeft + startWidth - newWidth;
const newWidth = Math.max(400, startWidth - deltaX);
dialogEl.style.width = newWidth + 'px';
dialogEl.style.left = newLeft + 'px';
dialogEl.style.left = (startLeft + startWidth - newWidth) + 'px';
break;
case 'bottom':
newHeight = Math.max(600, startHeight + deltaY);
dialogEl.style.height = newHeight + 'px';
dialogEl.style.height = Math.max(600, startHeight + deltaY) + 'px';
break;
case 'top':
// 当窗口高度达到最小值时,不再调整高度和位置
if (startHeight - deltaY >= 600) {
newHeight = startHeight - deltaY;
newTop = startTop + deltaY;
dialogEl.style.height = newHeight + 'px';
dialogEl.style.top = newTop + 'px';
dialogEl.style.height = (startHeight - deltaY) + 'px';
dialogEl.style.top = (startTop + deltaY) + 'px';
}
break;
case 'bottom-right':
newWidth = Math.max(400, startWidth + deltaX);
newHeight = Math.max(600, startHeight + deltaY);
dialogEl.style.width = newWidth + 'px';
dialogEl.style.height = newHeight + 'px';
dialogEl.style.width = Math.max(400, startWidth + deltaX) + 'px';
dialogEl.style.height = Math.max(600, startHeight + deltaY) + 'px';
break;
case 'bottom-left':
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';
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';
break;
case 'top-right':
// 当窗口高度达到最小值时,不再调整高度和位置
if (startHeight - deltaY >= 600) {
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.height = (startHeight - deltaY) + 'px';
dialogEl.style.top = (startTop + deltaY) + 'px';
}
dialogEl.style.width = Math.max(400, startWidth + deltaX) + 'px';
break;
case 'top-left':
// 当窗口高度达到最小值时,不再调整高度和位置
if (startHeight - deltaY >= 600) {
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';
dialogEl.style.height = (startHeight - deltaY) + 'px';
dialogEl.style.top = (startTop + deltaY) + '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)`;
}
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);
@@ -484,69 +436,26 @@ export default {
}
],
suggestions:[],
isAutoScroll: true, // 是否自动滚动
// 添加一个标志位,用于标识组件是否已经初始化完成
isComponentReady: false
isAutoScroll: true // 是否自动滚动
}
},
mounted() {
// 组件挂载完成后,标记为已准备就绪
this.$nextTick(() => {
this.isComponentReady = true;
});
},
watch: {
dialogVisible: {
handler(newVal) {
if (newVal) {
this.$nextTick(() => {
// 获取对话框元素
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';
}
dialogVisible(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 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();
});
}
this.$nextTick(() => {
this.scrollToBottom();
});
},
deep: true
}
@@ -564,9 +473,6 @@ closeMinimizedWindow() {
},
onClose() {
console.log('关闭弹窗')
// 清除保存的状态
sessionStorage.removeItem('aiCallDialogSize');
sessionStorage.removeItem('aiCallDialogPosition');
this.$emit('close')
// 可以在这里执行其他逻辑
},
@@ -616,9 +522,6 @@ closeMinimizedWindow() {
},500)
},
startNewConversation() {
// 重置对话时,先标记组件为未准备就绪状态
this.isComponentReady = false;
this.messageList = [
{
isBot: true,
@@ -630,11 +533,6 @@ closeMinimizedWindow() {
];
this.AIContent = '';
this.isLoading = false;
// 在下一个 tick 中重新标记为准备就绪
this.$nextTick(() => {
this.isComponentReady = true;
});
},
// 处理滚动事件
@@ -743,7 +641,7 @@ closeMinimizedWindow() {
flex-direction: column;
align-items: flex-start;
margin-bottom: 10px;
height: 400px;
//height: 200px;
//flex:1;
overflow-y: auto;

View File

@@ -30,13 +30,14 @@
<!-- <div class="course-title-right"> -->
<!-- <interactBar :readonly="!stuStusts || stuStusts==0" :type="1" :data="courseInfo" :comments="false" :views="false"></interactBar> -->
<!-- </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>
<div class="study-count">{{courseInfo.studys}}人学习</div>
<!-- <div><span style="font-size:20px;color:#ff8e00">{{courseInfo.score ? courseInfo.score.toFixed(1) : 0}}</span><span style="font-size:12px;color:#ff8e00"></span></div> -->
</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 style="width:160px;height:50px"> -->
<!-- </div> -->
<!-- <div class="label-div">
@@ -419,7 +420,7 @@ export default {
.course-title{
position: relative;
height: 90px;
height: 60px;
display: flex;
justify-content: space-between;
.title {

View File

@@ -43,7 +43,7 @@
:disabled="!twoList.children.length" :open-delay="0" :close-delay="0" trigger="hover"
:visible-arrow="false" @hide="leaveIndex" @show="changeIndex(twoList.id)" transition="none">
<div class="course-two-content" slot="reference">{{
twoList.name }}</div>
twoList.name }}</div>-
<!-- 内容 -->
<div class="course-three-box">
<div class="course-three-box-title">
@@ -284,34 +284,62 @@
<!-- 内容导航 -->
<div class="topNav" v-if="!newData">
<div class="search-div nav" style="height: 100px;flex: 1;">
<div @click="handleTypeAllClick(1)" class="option-item" :class="{ 'option-active': ctypeTagAll }">
<div @click="handleTypeAllClick(1)" class="option-item" style="font-weight: bold;position: relative;margin-right: 20px;" :class="{ 'option-active': ctypeTagAll }">
<a>全部</a>
<span :class="ctypeTagAll ? 'nav-bottbor' : ''"></span>
</div>
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item"
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item" style="font-weight: bold"
: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"
<div @click="handleTypeClick(ctypeList[1], ctypeList)" class="option-item" style="font-weight: bold"
: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"
<div @click="handleTypeClick(ctypeList[2], ctypeList)" class="option-item" style="font-weight: bold"
: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=""> U选小课堂
<span @click="uClassClick" class="Uxtext" style="font-weight: bold"> U选小课堂
<span class="uxicon">
<svg-icon icon-class="hot" style="font-size:22px"></svg-icon>
</span>
</span>
</a>
<!-- 修改热点标签区域 -->
<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 class="hot-tags-wrapper">
<div
class="option-item" style="font-weight: bold; padding-top: 2px;"
:class="{ 'option-active': isAllHotTagsSelected }"
@click="handleClearHotTags"
>
<span>全部</span>
<span :class="isAllHotTagsSelected ? 'nav-bottbor' : ''"></span>
</div>
<div
class="option-item" style="font-weight: bold; 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>
</div>
</div>
</div>
</div>
<div id="fixd-box" class="upload" style="margin-left: 26px;">
<!-- <div id="fixd-box" class="upload" style="margin-left: 26px;">
<div v-if="identity == 2 || identity == 3 || identity == 5">
<div class="portal-model-btn pointer" style="margin-bottom: 0px;height: 100px;line-height: 100px;"
@click="toNeedCourse">
@@ -319,15 +347,17 @@
上传课程
</div>
</div>
</div>
</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 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>
<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' : '' }">
{{ tag.tagName }}
</el-tag>
</div>
<div>
<el-button type="primary" size="mini" @click="handleClearTags">清除</el-button>
@@ -361,6 +391,18 @@
<span v-if="cinfo.type == 40" class="course-type-left">学习项目</span>
</div>
<div class="course-title two-line-ellipsis" :title="cinfo.title" v-html="cinfo.name"></div>
<!-- 添加标签显示区域 -->
<div class="course-tags" v-if="cinfo.tagsList && cinfo.tagsList.length > 0">
<el-tag
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' }"
>
{{ tag }}
</el-tag>
</div>
<!-- 关键字 -->
<div class="keywordInfo-every">
<div class="keywordInfo" v-for="(keyword, index) in cinfo.keywordsActive" :key="index">
@@ -507,12 +549,14 @@ import apiTeacher from "@/api/modules/teacher.js";
import apiUser from "@/api/system/user.js";
import scene from "@/api/modules/scene.js";
import apiUserbasic from "@/api/boe/userbasic.js";
import apiManage from '@/api/manage/manage.js';
import interactBar from "@/components/Portal/interactBar.vue";
import courseImage from "@/components/Course/courseImage.vue";
import { courseType, getType, toScore, formatDate, formatUserNumber, formatDateByFmt } from "@/utils/tools.js";
import { deepClone, param } from "../../../utils";
import apiSearchterm from "@/api/modules/searchterm.js";
import apiPlace from "@/api/phase2/place.js"
import apiCourseTag from '@/api/modules/courseTag.js'
export default {
name: "index",
components: {
@@ -534,21 +578,43 @@ export default {
},
stagList() { //计算出选择的内容
let list = [];
// 关键词
if (this.keyword) {
list.push({
type: 0,
id: 'keyword',
name: this.keyword,
tagName: this.keyword,
checked: true
})
});
}
// 课程类型
this.ctypeList.forEach(item => {
if (item.checked) {
list.push(item);
list.push({
...item,
tagName: item.name
});
}
});
// 热点标签 - 这是关键修复
this.hotTagsList.forEach(item => {
if (item.checked) {
list.push({
...item,
name: item.tagName || item.name,
tagName: item.tagName || item.name,
type: 14
});
}
});
// 三级分类
this.oneList.forEach(one => {
var twoChildChecked = false;//是否有下级
var twoChildChecked = false;
one.children.forEach(two => {
if (two.checked) {
twoChildChecked = true;
@@ -556,34 +622,28 @@ export default {
var threeChildChecked = false;
two.children.forEach(three => {
if (three.checked) {
list.push(three);
list.push({
...three,
tagName: three.name
});
threeChildChecked = true;
}
});
if (two.checked && !threeChildChecked) {
list.push(two);
list.push({
...two,
tagName: two.name
});
}
});
if (one.checked && !twoChildChecked) {
list.push(one);
list.push({
...one,
tagName: one.name
});
}
})
// this.oneList.forEach(item=>{
// if(item.checked){
// list.push(item);
// }
// });
// this.twoList.forEach(item=>{
// if(item.checked){
// list.push(item);
// }
// });
// this.threeList.forEach(item=>{
// if(item.checked){
// list.push(item);
// }
// });
//console.log(list,'list');
});
return list;
},
ctypeTagAll() {
@@ -610,15 +670,22 @@ export default {
// });
// return !flag;
// }
// 添加计算是否所有热点标签都未选中(即"全部"选中状态)
isAllHotTagsSelected() {
return !this.hotTagsList.some(tag => tag.checked);
}
},
data() {
return {
hotTagsList: [],
newData: false,//线上品牌系列隐藏
navTitle: [],
// 设置高亮
twoId: '',
count: 0,//分页总条条数
showUClass: false,
projectDialogVisible: false,
ctypeList: [
{ type: 1, id: 20, name: '录播课', checked: false },
{ type: 1, id: 30, name: '线下课', checked: false },
@@ -629,7 +696,7 @@ export default {
twoList: [], //二级分类{type:12}
threeList: [],//三级分类{type:13}
searching: false,//是否正在搜索中
studentInfo: {},
resonimg: {},
formatDate,
formatNum: formatUserNumber,
@@ -687,6 +754,17 @@ export default {
console.log(rs.message);
}
})
//初始化:获取最新前10个热点标签
apiCourseTag.getHotTagList(null).then(rs => {
if (rs.status == 200) {
this.hotTagsList = rs.result.map(tag => ({
...tag,
checked: false
}));
} else {
console.log(rs.message);
}
})
},
mounted() {
let screenWidth = window.screen.availWidth;
@@ -769,6 +847,27 @@ export default {
// window.removeEventListener("scroll", this.handleScroll);
},
methods: {
isTagMatched(tag) {
// 检查stagList中是否有匹配的标签
return this.stagList.some(searchTag =>
searchTag.tagName === tag || searchTag.name === tag
);
},
// 添加清除热点标签选中的方法
handleClearHotTags() {
// 清除所有热点标签的选中状态
this.hotTagsList.forEach(tag => {
tag.checked = false;
});
// 清空course.tags
this.course.tags = '';
// 触发搜索
this.searchData();
},
// 改变分页
currentChange(val) {
this.course.pageIndex = val
@@ -852,10 +951,54 @@ export default {
//搜索条件
stagClose(tag, tagIndex) {
tag.checked = false;
// 根据标签类型处理不同的清除逻辑
if (tag.type == 0) {
// 关键词类型
this.keyword = '';
} else if (tag.type == 1) {
// 课程类型(录播课、线下课、学习项目)
this.ctypeList.forEach(item => {
if (item.id == tag.id) {
item.checked = false;
}
});
} else if (tag.type == 14) {
// 热点标签类型
this.hotTagsList.forEach(item => {
if (item.id == tag.id) {
item.checked = false;
}
});
// 更新course.tags移除被删除的热点标签
const checkedHotTags = this.hotTagsList.filter(tag => tag.checked);
let tagIds = checkedHotTags.map(tag => tag.id).join(',');
this.course.tags = tagIds;
} else if (tag.type == 11 || tag.type == 12 || tag.type == 13) {
// 三级分类标签
this.oneList.forEach(one => {
if (one.id == tag.id) {
one.checked = false;
}
one.children.forEach(two => {
if (two.id == tag.id) {
two.checked = false;
}
two.children.forEach(three => {
if (three.id == tag.id) {
three.checked = false;
}
});
});
});
}
this.navTitle = []
// 重置导航标题
this.navTitle = [];
// 触发搜索更新
this.searchData();
},
@@ -890,31 +1033,36 @@ export default {
ct.checked = false;
})
}
this.searchData();
this.searchData(1);
},
// 清除
handleClearTags() {
//清空所有的条件
this.keyword = '';
this.ctypeList.forEach(item => {
item.checked = false;
handleClearTags() {
//清空所有的条件
this.keyword = '';
this.ctypeList.forEach(item => {
item.checked = false;
});
this.hotTagsList.forEach(item => {
item.checked = false;
});
this.course.tags = ''; // 清空标签ID
// 添加清除三级分类的逻辑
this.oneList.forEach(one => {
one.checked = false;
one.children.forEach(two => {
two.checked = false;
two.children.forEach(three => {
three.checked = false;
});
this.oneList.forEach(one => {
one.checked = false;
one.children.forEach(two => {
two.checked = false;
two.children.forEach(three => {
three.checked = false;
})
})
});
this.twoList = [];
this.threeList = [];
this.navTitle = [];
this.newData = false;
sessionStorage.removeItem(this.localSessionKey)
this.searchData();
},
});
});
// 清空导航标题
this.navTitle = [];
this.searchData();
},
// 导航切换(录播课,线下课,学习项目)
handleTypeClick(item, list) {
item.checked = !item.checked;
@@ -924,13 +1072,26 @@ export default {
// })
// item.checked=true;
this.searchData();
this.searchData(1);
},
//点击标签
handleTagClick(item, list,type) {
item.checked = !item.checked;
// 更新course.tags
const checkedTags = this.hotTagsList.filter(tag => tag.checked);
let tagIds = checkedTags.map(tag => tag.id).join(',');
this.course.tags = tagIds;
// 强制触发stagList重新计算
this.$nextTick(() => {
this.searchData(type);
});
},
//三级分类
handleOptionClick(item, level, list) {
// 线上品牌展示效果
this.newData = item.newData;
console.log(this.newData);
// 单选,排除法
this.oneList.forEach(one => {
one.checked = false;
@@ -1165,13 +1326,13 @@ export default {
this.$refs.floatTools.toNeedCourse();
},
searchData() {
searchData(type) {
this.course.pageIndex = 1;
this.noPageList = true; //判断接口是否还有数据
this.noDataList = true; //判断接口是否还有数据
this.courseList = [];
this.totalPages = 4;
this.search();
this.search(type);
},
inputOn() {
this.$forceUpdate();
@@ -1307,12 +1468,18 @@ export default {
},
getAllChecked() { //获取全部选中的标签
let list = [];
//获取选中的课程类型
this.ctypeList.forEach(item => {
if (item.checked) {
list.push(item);
}
});
//获取选中的热点标签
this.hotTagsList.forEach(item => {
if (item.checked) {
list.push(item);
}
});
this.oneList.forEach(one => {
one.children.forEach(two => {
two.children.forEach(three => {
@@ -1331,7 +1498,7 @@ export default {
return list;
},
// 查询
async search() {
async search(type) {
//
if (this.searching) {
this.$message.warning("正在搜索中,请待搜索完成后再重新搜索");
@@ -1375,7 +1542,20 @@ export default {
that.course.sysType3 += item.id;
}
});
if (!type && type !== 1){
apiCourseTag.getHotTagList(that.course).then(rs => {
if (rs.status == 200) {
// 保留已选中标签的状态
const currentCheckedTags = this.hotTagsList.filter(tag => tag.checked);
this.hotTagsList = rs.result.map(tag => ({
...tag,
checked: currentCheckedTags.some(checkedTag => checkedTag.id === tag.id)
}));
} else {
console.log(rs.message);
}
})
}
this.isFind = true;
this.course.device = 1;
if (this.course.pageIndex == 1) {
@@ -1417,7 +1597,7 @@ export default {
item.name = item.name;
}
});
console.log(res.result.list,'data')
console.log(res.result.list,'data')
this.courseList = res?.result?.list ?? []
console.log(this.courseList);
if (this.newData) {
@@ -2421,4 +2601,149 @@ console.log(res.result.list,'data')
.option-active {
color: #387DF7;
}</style>
}
/* 项目简介 方法一:外部 CSS 类 */
::v-deep.el-dialog {
border-radius: 3% 3% 1% 1%;
padding: 0;
}
::v-deep.custom-class .el-dialog__header {
height: 100px;
margin: 0 !important;
padding: 0 !important;
background-image: url('../../../assets/images/project/title-bg.png');
background-size: 100% 100%; /* 完全填充 */
display: block; /* 避免行内元素空隙 */
}
::v-deep.custom-class .el-dialog__header .el-dialog__title {
padding: 0 !important;
font-size: 35px;
font-weight: bold;
color: white;
margin: 60px;
line-height: 100px;
}
::v-deep.custom-class .el-dialog__body {
margin: 0 !important;
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;
}
/* 热点标签:自定义按钮样式 */
a.custom {
/* 基础样式 */
display: inline-block; /* 使内边距生效 */
padding: 1px; /* 按钮内边距 */
margin: 1px 5px;
background-color: #F2F2F2; /* 淡灰色背景 */
color: #333; /* 文字颜色 */
text-decoration: none; /* 去除下划线 */
border-radius: 3px; /* 圆角设计 */
font-family: Arial, sans-serif; /* 字体 */
font-size: 14px; /* 文字大小 */
height: 24px;
line-height: 20px;
/* 过渡效果,使颜色变化更平滑 */
transition: background-color 0.2s ease;
}
/* 鼠标悬停效果 */
a.custom:hover {
background-color: #DDEDFF; /* 浅蓝色背景 */
}
/* 可选:点击时效果 */
a.custom:active {
background-color: #757575; /* 点击时更深的灰色 */
}
/* 鼠标悬停效果 */
a.custom2 {
background-color: #DDEDFF; /* 浅蓝色背景 */
}
.hot-tags-container {
display: inline-block;
white-space: nowrap;
overflow-x: auto;
vertical-align: top;
}
.hot-tags-container::-webkit-scrollbar {
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; // 默认深灰色
}
.course-tag-item[style*="color: #387DF7"] {
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;
cursor: pointer;
white-space: nowrap;
}
/* 保持原有的导航底部横线样式 */
.nav-bottbor {
position: absolute;
top: 130%;
left: 0;
width: 100%;
height: 4px;
background: #387DF7;
border-radius: 5px;
}
/* 响应式调整,当屏幕较小时减小标签间距 */
@media (max-width: 1600px) {
.hot-tags-wrapper {
gap: 10px;
}
}
@media (max-width: 1400px) {
.hot-tags-wrapper {
gap: 5px;
}
}
/* ---end--- */
</style>

View File

@@ -480,6 +480,7 @@
defaultMaxTime:1800, //非音频默认最大时间
warn:"测试内容",
warnTitle:"测试标题",
isFinishingStudyItem: false, // 防止重复调用完成状态更新接口
}
},
mounted() {
@@ -1684,12 +1685,17 @@
//这种可能没有不过这里也是为了万中那个1
!this.tentative && this.saveStudyInfo();
} else {
// 如果正在处理完成请求,则直接返回,避免重复调用
if (this.isFinishingStudyItem) {
return;
}
let params = {
itemId: this.contentData.studyItemId,
studyId: this.studyId,
courseId: this.courseId,
cnum: this.totalContent
}
this.isFinishingStudyItem = true; // 设置标志位
apiVideoStudy.finishStudyItem(params).then(res => {
if (res.status == 200) {
this.contentData.status = 9;
@@ -1697,6 +1703,10 @@
} else {
console.log("记录完成学习失败:" + res.message + "" + res.error);
}
this.isFinishingStudyItem = false; // 重置标志位
}).catch(error => {
console.error("记录完成学习出错:", error);
this.isFinishingStudyItem = false; // 出错时也重置标志位
});
}
},
@@ -1960,16 +1970,19 @@
}
.player-box {
position: relative;
position: absolute;
width: 100%;
max-width: 300px;
margin: 20px auto;
height: 187px;
background: rgba(74, 74, 74, .5);
background: rgba(74, 74, 74, .8);
border-radius: 33px;
text-align: center;
padding: 20px;
top: 50%;
box-sizing: border-box;
left: 50%;
transform: translate(-50%, -50%);
.player-praise {
margin-top: 25px;

View File

@@ -0,0 +1,389 @@
<template>
<div class="u-page" style="padding-right:32px">
<div style="width: 100%; margin-left: 12px;padding: 2px 0px 10px 12px;background-color: white">
<el-form :inline="true" style="margin-left: 12px;" :model="pageData" class="demo-form-inline">
<el-form-item label="标签ID:" label-width="60px">
<el-input id="tag-id" placeholder="请输入标签ID" v-model="pageData.id" clearable />
</el-form-item>
<el-form-item label="标签名称:" label-width="80px">
<el-input id="tag-id" placeholder="请输入标签名称" v-model="pageData.tagName" clearable />
</el-form-item>
<el-form-item label="热点标签:" label-width="80px">
<el-select v-model="pageData.isHot" style="width: 120px;" clearable placeholder="请选择状态">
<el-option label="开启" value="true"></el-option>
<el-option label="关闭" value="false"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getsearch" icon="el-icon-search" type="primary">查询</el-button>
<!-- 添加重置按钮 -->
<el-button @click="resetSearch" icon="el-icon-refresh">重置</el-button>
</el-form-item>
</el-form>
</div>
<div style="padding: 5px 0px 2px 12px;">
<!-- <el-checkbox label="前台公共显示"></el-checkbox>-->
<!-- <el-checkbox label="热点标签展示"></el-checkbox>-->
</div>
<div style="width: 100%; margin-left: 12px;padding: 2px 0px 10px 12px;background-color: white">
<el-table style="width: 96%; margin:2px 32px 10px 12px;" :data="pageData.list" border stripe
:header-cell-style="{ background: '#E9F0FF' }"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange">
<el-table-column type="selection" width="80px"></el-table-column>
<el-table-column label="标签ID" width="200px" prop="id"></el-table-column>
<el-table-column label="标签名称" width="235px" prop="tagName"></el-table-column>
<el-table-column label="已关联课程" width="220px"
prop="useCount"
sortable="custom"
:sort-orders="['descending', 'ascending']"
>
<template #default="scope">
<a v-if="scope.row.useCount > 0"
@click="showCourseByTag(`${scope.row.id}`)"
style="font-weight:bold; color: #409EFF; text-decoration: underline;">
{{ scope.row.useCount }}
</a>
<span style="font-weight:bold; color: #409EFF; text-decoration: underline;" v-else>0</span>
</template>
</el-table-column>
<el-table-column label="前台公共显示" width="220px" prop="isPublic">
<template #default="scope"><!-- 开关状态会直接修改 pageData.list 中的数据 -->
<el-switch
v-model="scope.row.isPublic"
:disabled="scope.row.isHot==1?true:false"
@change="handlePublicChange(scope.row)"
>
</el-switch>
</template>
</el-table-column>
<el-table-column label="热点标签展示" width="220px" prop="isHot">
<template #default="scope">
<el-switch
v-model="scope.row.isHot"
:disabled="scope.row.isPublic==0?true:false"
@change="handleHotChange(scope.row)"
>
</el-switch>
</template>
</el-table-column>
</el-table>
<div v-if="pageData.list.length > 0" style="text-align: center;margin-top: 50px;">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageData.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
</div>
<!-- 标签关联课程弹窗 -->
<el-dialog custom-class="g-dialog" title="关联课程"
width="850px" top="20px"
:visible.sync="dialogVisible"
:modal-append-to-body="true"
:append-to-body="true">
<div class="dialog-content-container">
<el-table
:data="pageData.list2"
border stripe style="width: 100%"
:header-cell-style="{ background: '#E9F0FF' }"
@sort-change="handleSortChange2">
<el-table-column label="序号" width="60px" align="center">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="关联课程名称" width="200px" prop="courseName"></el-table-column>
<el-table-column label="关联课程ID" width="100px" prop="courseId"></el-table-column>
<el-table-column label="关联人" width="80px" prop="sysCreateBy"></el-table-column>
<el-table-column label="关联时间" width="110px" prop="sysCreateTime"
:formatter="dateFormat" sortable="custom"
:sort-orders="['descending', 'ascending']"></el-table-column>
<el-table-column label="本课程绑定的其他标签" width="200px" prop="otherTags"></el-table-column>
<el-table-column label="操作" width="60px">
<template #default="scope">
<a @click="unbindCurrentTag(scope.row)"
style="font-weight:bold; color: #409EFF;">
解绑
</a>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div v-if="pageData.list2.length > 0" class="pagination-container">
<el-pagination
background
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
:current-page="pageData.pageIndex2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageData.pageSize2"
layout="total, sizes, prev, pager, next, jumper"
:total="total2">
</el-pagination>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import moment from 'moment';
import apiCourseTag from '@/api/modules/courseTag.js'
import { mapGetters } from 'vuex';
export default {
name: 'courseTagItems',
computed: {
...mapGetters(['userInfo'])
},
data() {
return {
pageData: {
pageIndex: 1,
pageIndex2: 1,
pageSize: 10,
pageSize2: 10,
list:[],
list2:[],
orderField: null,
orderAsc: null,
orderField2: null,
orderAsc2: null,
},
total: 0,
total2: 0,
dialogVisible: false,
tagId: null,
}
},
created() {
this.getCourseTagList()
},
methods: {
//重置搜索条件
resetSearch() {
this.pageData.id = '';
this.pageData.tagName = '';
this.pageData.isHot = '';
this.pageData.pageIndex = 1;
this.getCourseTagList(); // 重置后重新加载列表
},
//初始化:课程标签列表
getsearch(){
this.pageData.pageIndex = 1;
this.getCourseTagList()
},
//课程标签列表:排序
handleSortChange({ prop, order }) {
this.pageData.orderField = prop; // 当前排序字段
this.pageData.orderAsc = order === 'ascending'; // 排序方向
this.getCourseTagList(); // 重新获取数据
},
//TODO:课程标签列表:监听选中项变化(批量的设置标签公共显示|热点标签)
handleSelectionChange(selection) {
this.selectedRows = selection; // 更新选中的行数据
},
//课程标签列表:获取课程标签列表数据
getCourseTagList() {
const { pageIndex, pageSize, orderField, orderAsc } = this.pageData
let query = { pageIndex, pageSize, orderField, orderAsc}
//拼接查询条件
if (this.pageData.id) {
const { id } = this.pageData
query.id = id
}
if (this.pageData.tagName) {
const { tagName } = this.pageData
query.tagName = tagName
}
if (this.pageData.isHot) {
const { isHot } = this.pageData
query.isHot = isHot
}
apiCourseTag.portalPageList(query).then((res) => {
if (res.status == 200) {
this.total = res.result.count
this.pageData.list = res.result.list
}
})
.catch((err) => {
this.$message.error('获取数据失败')
})
},
//课程标签列表:改变标签的公共属性
async handlePublicChange(row) {
// 保存原始状态用于回滚
const originalStatus = row.isPublic;
try {
// 调用 API 更新状态
await apiCourseTag.changeTagPublic(row);
this.$message.success('更新成功');
} catch (error) {
// 发生错误时回滚状态
row.isPublic = originalStatus;
this.$message.error('更新失败:' + error.message);
}
},
//课程标签列表:改变标签的热点属性
async handleHotChange(row) {
const isPublic=row.isPublic;
// 保存原始状态用于回滚
const originalStatus = row.isHot;
try {
// 调用 API 更新状态
await apiCourseTag.changeTagHot(row).then((res)=>{
if (res.status == 200){
this.$message.success(res.message);
}else {
row.isHot=false;
this.$message.warning(res.message);
}
});
} catch (error) {
// 发生错误时回滚状态
row.isHot = originalStatus;
this.$message.error('更新失败:' + error.message);
}
},
//课程标签列表:改变条数的回调
handleSizeChange(value) {
this.pageData.pageIndex = 1;
this.pageData.pageSize = value;
this.getCourseTagList();
},
//课程标签列表:改变页数的回调
handleCurrentChange(value) {
this.pageData.pageIndex = value;
this.getCourseTagList();
},
//标签关联的所有课程弹出框显示指定标签id关联的课程列表
showCourseByTag(tagId) {
this.tagId=tagId;
this.getCourseOfTagList(tagId);
this.dialogVisible=true;
},
//分页查询指定标签关联的所有课程
getCourseOfTagList(){
const { pageIndex2:pageIndex, pageSize2:pageSize, orderField2:orderField, orderAsc2:orderAsc } = this.pageData
let query = { pageIndex, pageSize, orderField, orderAsc }
//拼接查询条件
if (this.tagId) {
query.id = this.tagId
apiCourseTag.showCourseByTag(query).then((res) => {
if (res.status == 200) {
this.total2 = res.result.count
this.pageData.list2 = res.result.list
if (this.total2==0){
this.dialogVisible=false
this.getCourseTagList(); // 重新获取课程标签列表数据
}
}
})
.catch((err) => {
this.$message.error('获取数据失败')
});
}
},
//标签关联课程列表:排序
handleSortChange2({ prop, order }) {
this.pageData.orderField2 = prop; // 当前排序字段
this.pageData.orderAsc2 = order === 'ascending'; // 排序方向
this.getCourseOfTagList(); // 重新获取数据
},
//标签关联的所有课程列表:改变条数的回调
handleSizeChange2(value) {
this.pageData.pageIndex2= 1;
this.pageData.pageSize2 = value;
this.getCourseOfTagList();
},
//标签关联的所有课程列表:改变页数的回调
handleCurrentChange2(value) {
this.pageData.pageIndex2 = value;
this.getCourseOfTagList();
},
//关联时间格式化
dateFormat(row, column) {
return row[column.property] ?
moment(row[column.property]).format('YYYY-MM-DD') : '';
},
//解除指定课程和当前标签的关联关系
unbindCurrentTag (row) {
let id = row.id;
let tagId = this.tagId;
let courseId = row.courseId;
//拼接查询条件
if (tagId && courseId) {
let params = { id, tagId, courseId }
apiCourseTag.unbindCourseTagRelation(params).then((res) => {
if (res.status == 200) {
//刷新列表
this.getCourseOfTagList(this.tagId);
}
})
.catch((err) => {
this.$message.error('解绑失败!')
});
}
}
}
}
</script>
<style>
.demo-form-inline {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px; /* 间距 */
}
.demo-form-inline .el-form-item {
margin-bottom: 0; /* 消除默认底部间距 */
}
.dialog-content-container {
padding: 10px;
border: 1px solid #d9d9d9;
}
.pagination-container {
margin-top: 20px;
text-align: center;
}
.g-dialog .el-dialog__header {
background-color: #409EFF;
padding: 15px 20px;
}
.g-dialog .el-dialog__title {
color: white;
font-weight: bold;
}
.g-dialog .el-dialog__headerbtn .el-dialog__close {
color: white;
}
</style>