Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
3d6a2df1
提交
3d6a2df1
编写于
4月 19, 2022
作者:
changdi.hao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:一键置顶和置底
上级
021ecc00
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
47 行增加
和
6 行删除
+47
-6
create-component.vue
src/views/education/create-component.vue
+47
-6
未找到文件。
src/views/education/create-component.vue
浏览文件 @
3d6a2df1
...
...
@@ -207,7 +207,7 @@
:label=
"'模块' + parseInt(index + 1)"
:name=
"'' + parseInt(index + 1)"
>
<div>
<div
v-if=
"(index + 1) == firstTab"
>
<el-form
ref=
"moduleForm"
:model=
"item"
...
...
@@ -299,7 +299,7 @@
<div
class=
"template-content"
>
<div
class=
"template-content-div"
>
<div
class=
"title"
>
{{
item1
.
name
}}
{{
index1
+
1
}}
.
{{
item1
.
name
}}
<!--
<span
v-if=
"newfieldDisabled(item)"
>
-->
<span>
变更顺序:
...
...
@@ -498,6 +498,7 @@
:key=
"index3"
>
<el-col
:span=
"10"
class=
"item-icon"
>
<span
v-if=
"item1.type == 3 || item1.type == 4 || item1.type == 5"
class=
"sort-icon"
>
{{index3 + 1}})
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"课程名称"
>
<el-input
...
...
@@ -518,7 +519,8 @@
style=
"color: #449284"
></i>
<i
class=
"el-icon-caret-bottom"
v-if=
"index3 != (item2.partContentModelList.length-1)"
class=
"el-icon-bottom"
@
click=
"
sortCourseDown(
index,
...
...
@@ -530,7 +532,8 @@
style=
"font-size: 17px"
></i>
<i
class=
"el-icon-caret-top"
v-if=
"index3"
class=
"el-icon-top"
@
click=
"
sortCourseUp(
index,
...
...
@@ -557,7 +560,8 @@
style=
"color: red"
></i>
<i
class=
"el-icon-caret-bottom"
v-if=
"index3 != (item2.partContentModelList.length-1)"
class=
"el-icon-bottom"
@
click=
"
sortCourseDown(
index,
...
...
@@ -569,7 +573,8 @@
style=
"font-size: 17px"
></i>
<i
class=
"el-icon-caret-top"
v-if=
"index3"
class=
"el-icon-top"
@
click=
"
sortCourseUp(
index,
...
...
@@ -1738,6 +1743,36 @@ export default {
}
},
// 课程排序-置顶
sortCourseUp
(
index
,
index1flag
,
index2
,
index3
)
{
let
index1
=
index1flag
+
(
this
.
pageNo
-
1
)
*
this
.
pageSize
;
// 不是第一个元素,才可能上移
if
(
index3
>
0
)
{
let
item
=
vm
.
componentList
.
moduleModelList
[
index
].
templetModelList
[
index1
].
partModelList
[
index2
].
partContentModelList
.
splice
(
index3
,
1
)[
0
];
vm
.
componentList
.
moduleModelList
[
index
].
templetModelList
[
index1
].
partModelList
[
index2
].
partContentModelList
.
splice
(
0
,
0
,
item
);
vm
.
$forceUpdate
();
}
},
// 课程排序-置底部
sortCourseDown
(
index
,
index1flag
,
index2
,
index3
)
{
let
index1
=
index1flag
+
(
this
.
pageNo
-
1
)
*
this
.
pageSize
;
let
pLength
=
vm
.
componentList
.
moduleModelList
[
index
].
templetModelList
[
index1
].
partModelList
[
index2
].
partContentModelList
.
length
-
1
;
if
(
index3
<=
pLength
&&
pLength
>
0
)
{
let
item
=
vm
.
componentList
.
moduleModelList
[
index
].
templetModelList
[
index1
].
partModelList
[
index2
].
partContentModelList
.
splice
(
index3
,
1
)[
0
];
vm
.
componentList
.
moduleModelList
[
index
].
templetModelList
[
index1
].
partModelList
[
index2
].
partContentModelList
.
splice
(
parseInt
(
pLength
),
0
,
item
);
vm
.
$forceUpdate
();
}
},
// 添加多个课程
addMatterCourse
(
index
,
index1flag
,
index2
)
{
console
.
log
(
index
,
index1flag
,
index2
);
...
...
@@ -2310,6 +2345,12 @@ export default {
}
.item-icon
{
position
:
relative
;
span
.sort-icon
{
position
:
absolute
;
left
:
20px
;
top
:
12px
;
font-size
:
14px
;
}
span
.require
{
position
:
absolute
;
left
:
37px
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录