Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
ruoyi
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
范晓龙
ruoyi
Commits
d6668d7e
提交
d6668d7e
authored
6月 21, 2025
作者:
Administrator
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
先提上去,回去改
上级
d0acd5f5
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
50 行增加
和
9 行删除
+50
-9
add.html
...-admin/src/main/resources/templates/system/major/add.html
+43
-9
edit.html
...admin/src/main/resources/templates/system/major/edit.html
+7
-0
没有找到文件。
ruoyi-admin/src/main/resources/templates/system/major/add.html
浏览文件 @
d6668d7e
...
...
@@ -11,6 +11,22 @@
position
:
relative
;
font-size
:
large
;
}
.radio-group
{
display
:
flex
;
gap
:
15px
;
align-items
:
center
;
}
.radio-inline
{
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
;
}
.radio-inline
input
[
type
=
"radio"
]
{
margin-right
:
5px
;
}
</style>
</head>
<body
class=
"white-bg"
>
...
...
@@ -245,6 +261,19 @@
<div
class=
"modal-body"
>
<form
id=
"contentForm"
>
<div
class=
"form-group"
>
<label>
是否高亮显示:
</label>
<div
class=
"radio-group"
>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"highlight"
id=
"highlightYes"
value=
"1"
>
<span
class=
"label-text"
>
是
</span>
</label>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"highlight"
id=
"highlightNo"
value=
"0"
checked
>
<span
class=
"label-text"
>
否
</span>
</label>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"contentTitle"
>
标题:
</label>
<input
type=
"text"
class=
"form-control"
id=
"contentTitle"
required
/>
</div>
...
...
@@ -432,7 +461,7 @@
var
$item
=
$
(
this
);
var
title
=
$item
.
find
(
'strong'
).
text
();
var
body
=
$item
.
find
(
'.content-body'
).
html
();
contents
.
push
({
title
:
title
,
content
:
body
});
contents
.
push
({
title
:
title
,
content
:
body
,
highlight
:
highlight
});
});
$
.
operate
.
save
(
prefix
+
"/add"
,
$
(
'#form-major-add'
).
serialize
()
+
"&schoolId="
+
$
(
"#schoolId"
)[
0
].
value
+
...
...
@@ -467,6 +496,7 @@
};
function
saveContent
()
{
var
highlight
=
$
(
'input[name="highlight"]:checked'
).
val
();
// 获取选中值
var
title
=
$
(
'#contentTitle'
).
val
();
var
content
=
tempEditor
.
getContent
();
...
...
@@ -501,20 +531,27 @@
$
(
'#contentList'
).
append
(
html
);
}
// 清空表单
$
(
'#contentTitle'
).
val
(
''
);
tempEditor
.
setContent
(
''
);
$
(
'#contentModal'
).
modal
(
'hide'
);
}
// 清空表单
$
(
'#contentTitle'
).
val
(
''
);
tempEditor
.
setContent
(
''
);
$
(
'#contentModal'
).
modal
(
'hide'
);
}
function
editContent
(
id
)
{
var
container
=
$
(
`.well[data-id='
${
id
}
']`
);
var
oldTitle
=
container
.
find
(
'strong'
).
text
();
var
oldContent
=
container
.
find
(
'.content-body'
).
html
();
var
oldHighlight
=
container
.
data
(
'highlight'
);
// 假设存储了高亮状态
// 填充模态框
$
(
'#contentTitle'
).
val
(
oldTitle
);
tempEditor
.
setContent
(
oldContent
);
// 回填单选框状态
if
(
oldHighlight
===
"1"
)
{
$
(
'#highlightYes'
).
prop
(
'checked'
,
true
);
}
else
{
$
(
'#highlightNo'
).
prop
(
'checked'
,
true
);
}
// 绑定保存事件,带更新逻辑
$
(
'#contentModal'
).
data
(
'editId'
,
id
);
// 存储当前编辑的 ID
...
...
@@ -526,8 +563,6 @@
$
(
`.well[data-id='
${
id
}
']`
).
remove
();
}
}
</script>
</body>
</html>
\ No newline at end of file
ruoyi-admin/src/main/resources/templates/system/major/edit.html
浏览文件 @
d6668d7e
...
...
@@ -240,6 +240,13 @@
<!-- 内联编辑区域(初始隐藏) -->
<div
id=
"editContentArea"
style=
"display: none;"
>
<div
class=
"form-group"
>
<label
for=
"highlight"
>
是否高亮显示:
</label>
<select
id=
"highlight"
class=
"form-control select2-multiple"
>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<div
class=
"col-sm-8"
>
<input
type=
"text"
class=
"form-control"
id=
"contentTitle"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论