Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
019d9053
提交
019d9053
authored
7月 07, 2026
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 添加状态过滤器到班级、专业、学期和课程列表
上级
ea02d53e
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
88 行增加
和
76 行删除
+88
-76
Protocol.vue
src/components/base/Protocol.vue
+3
-3
api.ts
src/modules/admin/class/api.ts
+1
-1
List.vue
src/modules/admin/class/views/List.vue
+5
-2
api.ts
src/modules/admin/pro/api.ts
+1
-1
List.vue
src/modules/admin/pro/views/List.vue
+7
-2
api.ts
src/modules/admin/semester/api.ts
+1
-1
List.vue
src/modules/admin/semester/views/List.vue
+4
-1
api.ts
src/modules/course/my/api.ts
+2
-2
List.vue
src/modules/course/my/views/List.vue
+8
-0
List.vue
src/modules/resource/courseware/views/List.vue
+2
-2
Update.vue
src/modules/resource/courseware/views/Update.vue
+13
-15
List.vue
src/modules/resource/lessonplan/views/List.vue
+2
-2
Update.vue
src/modules/resource/lessonplan/views/Update.vue
+13
-15
List.vue
src/modules/resource/other/views/List.vue
+2
-2
Update.vue
src/modules/resource/other/views/Update.vue
+14
-17
List.vue
src/modules/resource/video/views/List.vue
+2
-2
Update.vue
src/modules/resource/video/views/Update.vue
+8
-8
没有找到文件。
src/components/base/Protocol.vue
浏览文件 @
019d9053
...
...
@@ -2,14 +2,14 @@
import
PreviewFiles
from
'./PreviewFiles.vue'
let
dialogVisible
=
ref
(
false
)
const
protocol
=
ref
(
fals
e
)
const
protocol
=
ref
(
tru
e
)
const
prop
=
defineProps
({
select
:
Boolean
select
:
Boolean
,
})
const
item
=
{
url
:
'/center_resource/紫荆教育用户入驻及网络教学资源协议.docx'
url
:
'/center_resource/紫荆教育用户入驻及网络教学资源协议.docx'
,
}
const
emit
=
defineEmits
([
'change'
])
...
...
src/modules/admin/class/api.ts
浏览文件 @
019d9053
import
httpRequest
from
'@/utils/axios'
// 获取班级列表
export
function
getClassList
(
params
?:
{
name
?:
string
;
organ_id
?:
string
;
page
?:
string
;
'per-page'
?:
string
})
{
export
function
getClassList
(
params
?:
{
name
?:
string
;
organ_id
?:
string
;
status
?:
string
;
page
?:
string
;
'per-page'
?:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/learning/class/list'
,
{
params
})
}
// 添加班级
...
...
src/modules/admin/class/views/List.vue
浏览文件 @
019d9053
<
script
setup
lang=
"ts"
>
import
{
ElMessage
}
from
'element-plus'
import
{
useProjectList
}
from
'@/composables/useGetProjectList'
import
{
useMapStore
}
from
'@/stores/map'
import
AddClass
from
'../components/AddClass.vue'
import
ClassStudents
from
'../components/ClassStudents.vue'
...
...
@@ -10,6 +11,7 @@ import { getClassList, updateClass } from '../api'
import
ImportClass
from
'../components/ImportClass.vue'
const
departmentList
:
any
=
useProjectList
(
''
,
'79806610719731712'
).
departmentList
const
store
=
useMapStore
()
// 判断当前用户是不是超级管理员
const
user
=
useUserStore
().
roles
...
...
@@ -23,10 +25,11 @@ const isShowClassStuDialog = ref(false)
const
isRelatingDialog
=
ref
(
false
)
const
listOptions
=
computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getClassList
,
params
:
{
name
:
''
,
organ_id
:
''
}
},
remote
:
{
httpRequest
:
getClassList
,
params
:
{
name
:
''
,
organ_id
:
''
,
status
:
''
}
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'班级名称:'
,
placeholder
:
'班级名称'
},
{
type
:
'select'
,
prop
:
'organ_id'
,
slots
:
'filter-department'
}
{
type
:
'select'
,
prop
:
'organ_id'
,
slots
:
'filter-department'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
)
},
],
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
align
:
'center'
},
...
...
src/modules/admin/pro/api.ts
浏览文件 @
019d9053
import
httpRequest
from
'@/utils/axios'
// 获取专业列表
export
function
getProList
(
params
?:
{
name
?:
string
;
page
?:
string
;
'per-page'
?:
string
})
{
export
function
getProList
(
params
?:
{
name
?:
string
;
status
?:
string
;
page
?:
string
;
'per-page'
?:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/backend/specialty/list'
,
{
params
})
}
// 创建专业
...
...
src/modules/admin/pro/views/List.vue
浏览文件 @
019d9053
<
script
setup
lang=
"ts"
>
import
{
ElMessage
}
from
'element-plus'
import
{
getProList
,
updatePro
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useUserStore
}
from
'@/stores/user'
import
AddPro
from
'../components/AddPro.vue'
import
ImportPro
from
'../components/ImportPro.vue'
// 判断当前用户是不是超级管理员
const
user
=
useUserStore
().
roles
const
isAdmin
=
!!
user
.
find
((
item
:
any
)
=>
item
.
name
===
'超级管理员'
)
const
store
=
useMapStore
()
const
appList
=
ref
()
const
title
=
ref
(
''
)
const
id
=
ref
(
''
)
...
...
@@ -14,8 +16,11 @@ const isEdit = ref('')
const
isShowProDialog
=
ref
(
false
)
const
listOptions
=
computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getProList
,
params
:
{
name
:
''
}
},
filters
:
[{
type
:
'input'
,
prop
:
'name'
,
label
:
'专业名称:'
,
placeholder
:
'专业名称'
}],
remote
:
{
httpRequest
:
getProList
,
params
:
{
name
:
''
,
status
:
''
}
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'专业名称:'
,
placeholder
:
'专业名称'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
)
},
],
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
align
:
'center'
},
{
label
:
'专业代码'
,
prop
:
'code'
,
align
:
'center'
},
...
...
src/modules/admin/semester/api.ts
浏览文件 @
019d9053
import
httpRequest
from
'@/utils/axios'
// 获取学期列表
export
function
getSemList
(
params
?:
{
name
?:
string
;
organ_id
?:
string
;
page
?:
number
;
page_size
?:
number
})
{
export
function
getSemList
(
params
?:
{
name
?:
string
;
organ_id
?:
string
;
status
?:
string
;
page
?:
number
;
page_size
?:
number
})
{
return
httpRequest
.
get
(
'/api/resource/v1/learning/semester/list'
,
{
params
})
}
...
...
src/modules/admin/semester/views/List.vue
浏览文件 @
019d9053
...
...
@@ -2,11 +2,13 @@
import
{
useUserStore
}
from
'@/stores/user'
import
{
ElMessage
}
from
'element-plus'
import
{
useProjectList
}
from
'@/composables/useGetProjectList'
import
{
useMapStore
}
from
'@/stores/map'
import
AddSemester
from
'../components/AddSemester.vue'
import
SemesterCourse
from
'../components/SemesterCourse.vue'
import
ImportSemester
from
'../components/ImportSemester.vue'
import
{
getSemList
,
updateSem
}
from
'../api'
const
departmentList
:
any
=
useProjectList
(
''
,
'79806610719731712'
).
departmentList
const
store
=
useMapStore
()
// 判断当前用户是不是超级管理员
const
user
=
useUserStore
().
roles
const
isAdmin
=
!!
user
.
find
((
item
:
any
)
=>
item
.
name
===
'超级管理员'
)
...
...
@@ -18,10 +20,11 @@ const isShowAddSemDialog = ref(false)
const
isShowSemCourseDialog
=
ref
(
false
)
const
listOptions
=
computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getSemList
,
params
:
{
name
:
''
,
organ_id
:
''
}
},
remote
:
{
httpRequest
:
getSemList
,
params
:
{
name
:
''
,
organ_id
:
''
,
status
:
''
}
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'学期名称:'
,
placeholder
:
'学期名称'
},
{
type
:
'select'
,
prop
:
'organ_id'
,
slots
:
'filter-department'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
)
},
],
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
align
:
'center'
},
...
...
src/modules/course/my/api.ts
浏览文件 @
019d9053
...
...
@@ -21,6 +21,7 @@ export function getVideoDetails(params: { id: string }) {
// 获取课程列表
export
function
getCourseList
(
params
:
{
tab
:
string
status
?:
string
name
?:
string
authorized
?:
string
page
?:
number
...
...
@@ -129,4 +130,4 @@ export function importTag(data: { course_id: string; file: any }) {
return
httpRequest
.
post
(
'/api/resource/v1/course/course/tag-import'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
\ No newline at end of file
}
src/modules/course/my/views/List.vue
浏览文件 @
019d9053
...
...
@@ -4,6 +4,7 @@ import { getCourseList } from '../api'
import
CardListItem
from
'../components/CardListItem.vue'
import
{
PictureFilled
}
from
'@element-plus/icons-vue'
import
{
useProjectList
}
from
'@/composables/useGetProjectList'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useUserStore
}
from
'@/stores/user'
// 统计资源数据整合
...
...
@@ -12,6 +13,7 @@ import Statistics from '../components/Statistics.vue'
// 判断当前用户是不是超级管理员
const
user
=
useUserStore
().
roles
const
isAdmin
=
!!
user
.
find
((
item
:
any
)
=>
item
.
name
===
'超级管理员'
)
const
store
=
useMapStore
()
// 筛选部门列表
const
departmentList
:
any
=
useProjectList
(
''
,
'79806610719731712'
).
departmentList
...
...
@@ -63,6 +65,12 @@ const listOptions = computed(() => {
prop
:
'authorized'
,
slots
:
'filter-department'
,
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
),
},
],
columns
,
}
...
...
src/modules/resource/courseware/views/List.vue
浏览文件 @
019d9053
...
...
@@ -69,14 +69,14 @@ const listOptions = computed(() => {
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
},
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
),
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'authorized'
,
slots
:
'filter-department'
,
...
...
src/modules/resource/courseware/views/Update.vue
浏览文件 @
019d9053
...
...
@@ -25,7 +25,7 @@ const form: any = reactive({
knowledge_points
:
''
,
url
:
''
,
type
:
''
,
size
:
''
size
:
''
,
})
// 编辑数据回显
...
...
@@ -35,8 +35,8 @@ if (isUpdate.value) {
form
.
file
=
[
{
name
:
res
.
data
.
name
,
url
:
res
.
data
.
url
}
url
:
res
.
data
.
url
,
}
,
]
})
}
...
...
@@ -46,22 +46,22 @@ let { list: selectTree }: any = useGetCategoryList()
const
defaultProps
=
{
children
:
'children'
,
label
:
'category_name'
,
value
:
'id'
value
:
'id'
,
}
// 监听文件上传
watch
(
()
=>
form
.
file
,
value
=>
{
(
value
)
=>
{
form
.
name
=
value
[
0
]?.
name
.
slice
(
0
,
value
[
0
]?.
name
.
lastIndexOf
(
'.'
))
||
''
}
}
,
)
// 表单验证
const
rules
=
{
name
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}],
classification
:
[{
required
:
true
,
message
:
'请选择分类'
,
trigger
:
'change'
}],
file
:
[{
required
:
true
,
message
:
''
}]
file
:
[{
required
:
true
,
message
:
''
}]
,
}
// 新建编辑表单提交
const
ruleFormRef
=
ref
<
FormInstance
>
()
...
...
@@ -71,7 +71,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if
(
!
formEl
)
return
if
(
!
submitFlag
)
return
submitFlag
=
false
await
formEl
.
validate
(
valid
=>
{
await
formEl
.
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
!
protocol
.
value
)
{
submitFlag
=
true
...
...
@@ -106,7 +106,7 @@ const updateResources = (params: any) => {
ElMessage
({
message
:
'更新成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/courseware'
path
:
'/resource/courseware'
,
})
},
1000
)
}
else
{
...
...
@@ -126,7 +126,7 @@ const createResources = (params: any) => {
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/courseware'
path
:
'/resource/courseware'
,
})
},
1000
)
}
else
{
...
...
@@ -139,7 +139,7 @@ const createResources = (params: any) => {
}
// 协议
const
protocol
=
ref
(
fals
e
)
const
protocol
=
ref
(
tru
e
)
const
changeProtocol
=
(
data
:
any
)
=>
{
protocol
.
value
=
data
.
value
...
...
@@ -173,8 +173,7 @@ const changeProtocol = (data: any) => {
:data=
"selectTree"
placeholder=
"请选择课件分类"
node-key=
"id"
:default-expanded-keys=
"selectTree.length ? [selectTree[0]?.id] : []"
/>
:default-expanded-keys=
"selectTree.length ? [selectTree[0]?.id] : []"
/>
</el-form-item>
<el-form-item
label=
" 知识点:"
>
<el-input
...
...
@@ -182,8 +181,7 @@ const changeProtocol = (data: any) => {
maxlength=
"100"
v-model=
"form.knowledge_points"
:rows=
"2"
type=
"textarea"
/>
type=
"textarea"
/>
</el-form-item>
</el-form>
<div
class=
"protocol-box"
>
...
...
src/modules/resource/lessonplan/views/List.vue
浏览文件 @
019d9053
...
...
@@ -69,14 +69,14 @@ const listOptions = computed(() => {
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
},
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
),
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'authorized'
,
slots
:
'filter-department'
,
...
...
src/modules/resource/lessonplan/views/Update.vue
浏览文件 @
019d9053
...
...
@@ -25,7 +25,7 @@ const form: any = reactive({
knowledge_points
:
''
,
url
:
''
,
type
:
''
,
size
:
''
size
:
''
,
})
// 编辑数据回显
...
...
@@ -35,8 +35,8 @@ if (isUpdate.value) {
form
.
file
=
[
{
name
:
res
.
data
.
name
,
url
:
res
.
data
.
url
}
url
:
res
.
data
.
url
,
}
,
]
})
}
...
...
@@ -46,24 +46,24 @@ let { list: selectTree }: any = useGetCategoryList()
const
defaultProps
=
{
children
:
'children'
,
label
:
'category_name'
,
value
:
'id'
value
:
'id'
,
}
// 监听文件上传
watch
(
()
=>
form
.
file
,
value
=>
{
(
value
)
=>
{
if
(
value
[
0
]?.
name
.
lastIndexOf
(
'.'
)
!=
-
1
)
{
form
.
name
=
value
[
0
]?.
name
.
slice
(
0
,
value
[
0
]?.
name
.
lastIndexOf
(
'.'
))
||
''
}
}
}
,
)
// 表单验证
const
rules
=
{
name
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}],
classification
:
[{
required
:
true
,
message
:
'请选择分类'
,
trigger
:
'change'
}],
file
:
[{
required
:
true
,
message
:
''
}]
file
:
[{
required
:
true
,
message
:
''
}]
,
}
// 新建编辑表单提交
const
ruleFormRef
=
ref
<
FormInstance
>
()
...
...
@@ -72,7 +72,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if
(
!
submitFlag
)
return
submitFlag
=
false
if
(
!
formEl
)
return
await
formEl
.
validate
(
valid
=>
{
await
formEl
.
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
!
protocol
.
value
)
{
submitFlag
=
true
...
...
@@ -107,7 +107,7 @@ const updateResources = (params: any) => {
ElMessage
({
message
:
'更新成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/lessonplan'
path
:
'/resource/lessonplan'
,
})
},
1000
)
}
else
{
...
...
@@ -127,7 +127,7 @@ const createResources = (params: any) => {
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/lessonplan'
path
:
'/resource/lessonplan'
,
})
},
1000
)
}
else
{
...
...
@@ -140,7 +140,7 @@ const createResources = (params: any) => {
}
// 协议
const
protocol
=
ref
(
fals
e
)
const
protocol
=
ref
(
tru
e
)
const
changeProtocol
=
(
data
:
any
)
=>
{
protocol
.
value
=
data
.
value
...
...
@@ -173,8 +173,7 @@ const changeProtocol = (data: any) => {
v-model=
"form.classification"
:data=
"selectTree"
node-key=
"id"
:default-expanded-keys=
"selectTree.length ? [selectTree[0]?.id] : []"
/>
:default-expanded-keys=
"selectTree.length ? [selectTree[0]?.id] : []"
/>
</el-form-item>
<el-form-item
label=
" 知识点:"
>
<el-input
...
...
@@ -182,8 +181,7 @@ const changeProtocol = (data: any) => {
maxlength=
"100"
v-model=
"form.knowledge_points"
:rows=
"2"
type=
"textarea"
/>
type=
"textarea"
/>
</el-form-item>
</el-form>
<div
class=
"protocol-box"
>
...
...
src/modules/resource/other/views/List.vue
浏览文件 @
019d9053
...
...
@@ -70,14 +70,14 @@ const listOptions = computed(() => {
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
},
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
),
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'authorized'
,
slots
:
'filter-department'
,
...
...
src/modules/resource/other/views/Update.vue
浏览文件 @
019d9053
...
...
@@ -25,7 +25,7 @@ const form: any = reactive({
knowledge_points
:
''
,
url
:
''
,
type
:
''
,
size
:
''
size
:
''
,
})
// 编辑数据回显
...
...
@@ -35,8 +35,8 @@ if (isUpdate.value) {
form
.
file
=
[
{
name
:
res
.
data
.
name
,
url
:
res
.
data
.
url
}
url
:
res
.
data
.
url
,
}
,
]
})
}
...
...
@@ -46,26 +46,26 @@ let { list: selectTree }: any = useGetCategoryList()
const
defaultProps
=
{
children
:
'children'
,
label
:
'category_name'
,
value
:
'id'
value
:
'id'
,
}
// 监听文件上传
watch
(
()
=>
form
.
file
,
value
=>
{
(
value
)
=>
{
if
(
value
[
0
]?.
name
.
includes
(
'.'
))
{
form
.
name
=
value
[
0
]?.
name
.
slice
(
0
,
value
[
0
]?.
name
.
lastIndexOf
(
'.'
))
}
else
{
form
.
name
=
value
[
0
]?.
name
||
''
}
}
}
,
)
// 表单验证
const
rules
=
{
name
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}],
classification
:
[{
required
:
true
,
message
:
'请选择分类'
,
trigger
:
'change'
}],
file
:
[{
required
:
true
,
message
:
''
}]
file
:
[{
required
:
true
,
message
:
''
}]
,
}
// 新建编辑表单提交
const
ruleFormRef
=
ref
<
FormInstance
>
()
...
...
@@ -74,7 +74,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if
(
!
submitFlag
)
return
submitFlag
=
false
if
(
!
formEl
)
return
await
formEl
.
validate
(
valid
=>
{
await
formEl
.
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
!
protocol
.
value
)
{
submitFlag
=
true
...
...
@@ -109,7 +109,7 @@ const updateResources = (params: any) => {
ElMessage
({
message
:
'更新成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/other'
path
:
'/resource/other'
,
})
},
1000
)
}
else
{
...
...
@@ -129,7 +129,7 @@ const createResources = (params: any) => {
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/other'
path
:
'/resource/other'
,
})
},
1000
)
}
else
{
...
...
@@ -142,7 +142,7 @@ const createResources = (params: any) => {
}
// 协议
const
protocol
=
ref
(
fals
e
)
const
protocol
=
ref
(
tru
e
)
const
changeProtocol
=
(
data
:
any
)
=>
{
protocol
.
value
=
data
.
value
...
...
@@ -159,8 +159,7 @@ const changeProtocol = (data: any) => {
<AppUpload
accept=
".doc,.docx,.xls,.xlsx,.pdf,.ppt,.pptx,.mp3,.mp4,.png,.jpeg,.jpg,.rar,.zip"
:limit=
"1"
v-model=
"form.file"
></AppUpload>
v-model=
"form.file"
></AppUpload>
<div
class=
"upload-btn"
>
本地文件
</div>
</div>
</div>
...
...
@@ -180,8 +179,7 @@ const changeProtocol = (data: any) => {
style=
"width: 100%"
v-model=
"form.classification"
:data=
"selectTree"
:default-expanded-keys=
"selectTree.length ? [selectTree[0]?.id] : []"
/>
:default-expanded-keys=
"selectTree.length ? [selectTree[0]?.id] : []"
/>
</el-form-item>
<el-form-item
label=
" 知识点:"
>
<el-input
...
...
@@ -189,8 +187,7 @@ const changeProtocol = (data: any) => {
maxlength=
"100"
v-model=
"form.knowledge_points"
:rows=
"2"
type=
"textarea"
/>
type=
"textarea"
/>
</el-form-item>
</el-form>
<div
class=
"protocol-box"
>
...
...
src/modules/resource/video/views/List.vue
浏览文件 @
019d9053
...
...
@@ -69,14 +69,14 @@ const listOptions = computed(() => {
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
},
},
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'状态:'
,
options
:
store
.
getMapValuesByKey
(
'system_status'
),
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
},
{
prop
:
'authorized'
,
slots
:
'filter-department'
,
...
...
src/modules/resource/video/views/Update.vue
浏览文件 @
019d9053
...
...
@@ -32,13 +32,13 @@ let { list: selectTree }: any = useGetCategoryList()
const
defaultProps
=
{
children
:
'children'
,
label
:
'category_name'
,
value
:
'id'
value
:
'id'
,
}
// 视频封面图轮播
const
swiperCovers
=
ref
<
{
id
:
string
;
url
:
string
}[][]
>
([[]])
// 获取封面
getCoverList
().
then
(
res
=>
{
getCoverList
().
then
(
(
res
)
=>
{
const
filtersData
=
res
.
data
.
list
.
filter
((
i
:
any
)
=>
i
.
type
===
'1'
)
let
index
=
0
while
(
index
<
filtersData
.
length
)
{
...
...
@@ -61,13 +61,13 @@ const swiperItemHandle = (url: string) => {
// form表单
let
form
=
reactive
({
data
:
{
name
:
''
,
source
:
'2'
,
classification
:
''
,
knowledge_points
:
''
,
cover
:
''
,
source_id
:
''
,
size
:
0
}
data
:
{
name
:
''
,
source
:
'2'
,
classification
:
''
,
knowledge_points
:
''
,
cover
:
''
,
source_id
:
''
,
size
:
0
}
,
})
// 表单验证
const
rules
=
{
name
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}],
classification
:
[{
required
:
true
,
message
:
'请选择分类'
,
trigger
:
'change'
}],
source_id
:
[{
required
:
true
,
message
:
''
}]
source_id
:
[{
required
:
true
,
message
:
''
}]
,
}
const
ruleFormRef
=
ref
<
FormInstance
>
()
let
submitFlag
=
true
...
...
@@ -75,7 +75,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if
(
!
submitFlag
)
return
submitFlag
=
false
if
(
!
formEl
)
return
await
formEl
.
validate
(
valid
=>
{
await
formEl
.
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
!
protocol
.
value
)
{
submitFlag
=
true
...
...
@@ -103,7 +103,7 @@ const updateResources = () => {
ElMessage
({
message
:
'更新成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/video'
path
:
'/resource/video'
,
})
},
1000
)
}
else
{
...
...
@@ -123,7 +123,7 @@ const createResources = () => {
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
setTimeout
(()
=>
{
router
.
push
({
path
:
'/resource/video'
path
:
'/resource/video'
,
})
},
1000
)
}
else
{
...
...
@@ -136,7 +136,7 @@ const createResources = () => {
}
// 协议勾选
const
protocol
=
ref
(
fals
e
)
const
protocol
=
ref
(
tru
e
)
// 上传视频成功
const
uploadVideo
=
(
data
:
any
)
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论