Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rs-admin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
翟畅
rs-admin
Commits
754d8b06
提交
754d8b06
authored
4月 23, 2024
作者:
翟畅
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zc推荐内容展示、删除目录、资源修改激活状态
上级
37cf94b9
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
106 行增加
和
12 行删除
+106
-12
author.js
src/api/resource/author.js
+9
-0
index.vue
src/layout/components/Sidebar/index.vue
+0
-2
index.vue
src/views/resource_manage/annex_module/index.vue
+3
-1
index.vue
src/views/resource_manage/paperbook_module/index.vue
+3
-0
index.vue
src/views/resource_manage/picture_module/index.vue
+3
-1
content.vue
src/views/resource_manage/recommendedContent/content.vue
+85
-8
index.vue
src/views/resource_manage/video_module/index.vue
+3
-0
没有找到文件。
src/api/resource/author.js
浏览文件 @
754d8b06
...
...
@@ -160,3 +160,12 @@ export function authorPreviewBookList(params) { //作者预览相关著作
})
}
export
function
editActivationStatusAPI
(
data
)
{
//推荐内容--资源是否需激活
return
request
({
url
:
`
${
requestPath
.
resource
}
/resource/batch/update/activation`
,
method
:
'post'
,
data
})
}
src/layout/components/Sidebar/index.vue
浏览文件 @
754d8b06
...
...
@@ -85,8 +85,6 @@ export default {
case
'11'
:
this
.
$route
.
meta
.
activeMenu
=
'/resource_manage/audio_book'
break
;
}
console
.
log
(
this
.
$route
.
meta
.
activeMenu
,
'$route.meta.activeMenu'
)
console
.
log
(
this
.
activeMenu
,
'activeMenu'
)
}
},
watch
:{
...
...
src/views/resource_manage/annex_module/index.vue
浏览文件 @
754d8b06
...
...
@@ -260,7 +260,9 @@ import store from '@/store'
}
})
},
0
)
},
activated
(){
this
.
getList
()
},
methods
:
{
lockTags
(){
...
...
src/views/resource_manage/paperbook_module/index.vue
浏览文件 @
754d8b06
...
...
@@ -304,6 +304,9 @@ import QRCode from "qrcodejs2";
})
},
0
)
},
activated
(){
this
.
getList
()
},
methods
:
{
lockTags
(){
let
view
=
this
.
$store
.
state
.
tagsView
.
visitedViews
.
find
(
item
=>
{
...
...
src/views/resource_manage/picture_module/index.vue
浏览文件 @
754d8b06
...
...
@@ -250,7 +250,9 @@ import searchDia from "@/components/dialog/searchTips";
}
})
},
0
)
},
activated
(){
this
.
getList
()
},
methods
:
{
lockTags
(){
...
...
src/views/resource_manage/recommendedContent/content.vue
浏览文件 @
754d8b06
...
...
@@ -11,6 +11,9 @@
@
node-click=
"handleNodeClick"
>
<span
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span
:class=
"currentCode == data.code?'selectNodeStyle':'normalNodeStyle'"
:title=
"node.label"
>
{{
node
.
label
}}
</span>
<span>
<i
class=
"el-icon-delete"
@
click=
"removeCatalog(node, data)"
v-if=
"node.label != '所有目录'"
></i>
</span>
</span>
</el-tree>
</div>
...
...
@@ -20,7 +23,7 @@
<div
class=
"back_box"
@
click=
"goBack()"
v-if=
"this.$route.query.id"
>
<img
src=
"@/assets/img/common/back.png"
><span>
返回
</span>
</div>
<el-button
class=
"mr10"
size=
"small"
type=
'primary'
v-for=
"(item,index) in topBtn"
:key=
"index"
@
click=
"handleBtn(item.url)"
>
{{
item
.
name
}}
</el-button>
<el-button
class=
"mr10"
size=
"small"
type=
'primary'
v-for=
"(item,index) in topBtn"
:key=
"index"
@
click=
"handleBtn(item.url)"
v-if=
"(item.url != 'editActivateBtn' || activation == 1)"
>
{{
item
.
name
}}
</el-button>
</div>
<el-table
ref=
"table"
class=
"table_box"
v-loading=
"listLoading"
:data=
"dataList"
style=
"width: 100%"
size=
"mini"
@
selection-change=
"selectionChange"
highlight-current-row
@
filter-change=
"filterChange"
>
<el-table-column
type=
"selection"
ref=
"selectionCheckbox"
width=
"50"
align=
"center"
></el-table-column>
...
...
@@ -49,6 +52,12 @@
<span
v-if=
"scope.row.resourceType == 12"
>
附件
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"activation"
label=
"是否需激活"
align=
"center"
min-width=
"10%"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.activation == '2'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"18%"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"small"
v-for=
"(item,index) in lineBtn"
@
click=
"handleBtn(item.url,scope.row)"
v-if=
"(item.url != 'removeLine' || scope.row.status == 0) && (item.url != 'videoPlayingLine' || scope.row.resourceType == 5)"
:key=
"index"
>
{{
item
.
name
}}
</el-button>
...
...
@@ -113,12 +122,25 @@
<el-button
@
click=
"videoPlayingDialog = false"
>
关 闭
</el-button>
</span>
</el-dialog>
<!-- 批量修改需激活状态 -->
<el-dialog
title=
"修改需激活状态"
:visible
.
sync=
"editActivateDialog"
width=
"450px"
@
open=
"openActivateDialog()"
>
<span
style=
"padding-right:30px;"
>
是否需激活:
</span>
<el-radio-group
v-model=
"activateStatus"
>
<el-radio
:label=
"'1'"
>
是
</el-radio>
<el-radio
:label=
"'2'"
>
否
</el-radio>
</el-radio-group>
<div
slot=
"footer"
class=
"dialog-footer"
align=
"center"
>
<el-button
@
click=
"editActivateDialog = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"activateSubmit"
>
确定
</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<
script
>
import
{
recommendListAPI
,
authorUpdateSortAPI
,
authorUpdateCodeAPI
,
authorRecDelAPI
,
getAllModulesAPI
}
from
'@/api/resource/author'
import
{
recommendListAPI
,
authorUpdateSortAPI
,
authorUpdateCodeAPI
,
authorRecDelAPI
,
getAllModulesAPI
,
deleteModuleAPI
,
editActivationStatusAPI
}
from
'@/api/resource/author'
import
{
confirm
}
from
'@/utils/function'
import
{
getSelectionIds
}
from
'@/filters/getIds'
import
{
sortValidate
}
from
'@/utils/validate'
...
...
@@ -153,7 +175,7 @@ export default {
resourceType
:
''
,
pageNum
:
1
,
pageSize
:
50
,
code
:
null
,
code
:
'1'
,
},
updateRelationForm
:{
ids
:[]
...
...
@@ -179,7 +201,7 @@ export default {
},
moduleData
:
[],
catalogValue
:
null
,
currentCode
:
null
,
currentCode
:
'1'
,
moduleIsShow
:
'所有目录'
,
defaultProps
:
{
children
:
'list'
,
...
...
@@ -195,6 +217,8 @@ export default {
editCatalogDialog
:
null
,
videoPlayingDialog
:
false
,
videoLinkData
:{},
editActivateDialog
:
false
,
activateStatus
:
'1'
,
}
},
created
()
{
...
...
@@ -233,9 +257,8 @@ export default {
this
.
$router
.
go
(
0
)
},
handleNodeClick
(
data
)
{
console
.
log
(
data
,
'00000'
)
this
.
currentCode
=
data
.
code
this
.
listQuery
.
code
=
data
.
code
this
.
currentCode
=
data
.
code
?
data
.
code
:
'1'
this
.
listQuery
.
code
=
data
.
code
?
data
.
code
:
'1'
this
.
moduleIsShow
=
data
.
showName
this
.
getList
()
},
...
...
@@ -318,9 +341,48 @@ export default {
'videoPlayingLine'
:()
=>
{
this
.
videoPlayingNow
(
item
)
},
'editActivateBtn'
:()
=>
{
this
.
editActivateEvent
()
},
}
status
[
btnName
]()
},
openActivateDialog
(){
this
.
activateStatus
=
'1'
},
// 修改激活状态
editActivateEvent
(){
if
(
this
.
activation
==
1
){
if
(
this
.
isExist
(
this
.
chooiceList
))
{
//至少选中一条
this
.
editActivateDialog
=
true
}
}
else
{
this
.
$message
.
warning
(
'该图书为需激活状态时才支持此功能'
)
}
},
activateSubmit
(){
this
.
chooiceList
.
forEach
((
item
,
index
)
=>
{
item
.
id
=
item
.
id
.
toString
()
})
let
ids
=
getSelectionIds
(
this
.
chooiceList
)
let
phyId
=
this
.
$route
.
query
.
id
let
code
=
this
.
catalogValue
let
data
=
{
ids
:
ids
,
activation
:
this
.
activateStatus
,
phyBookId
:
phyId
,
}
editActivationStatusAPI
(
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
0
){
this
.
$message
.
success
(
'修改激活状态成功'
)
this
.
editActivateDialog
=
false
this
.
getList
()
}
else
{
this
.
$message
.
error
(
'修改激活状态失败'
)
this
.
editActivateDialog
=
false
}
})
},
videoPlayingNow
(
item
){
if
(
item
.
path
){
this
.
videoLinkData
=
item
...
...
@@ -505,7 +567,21 @@ export default {
this
.
listQuery
.
pageNum
=
val
this
.
getList
()
},
removeCatalog
(
node
,
data
)
{
confirm
.
apply
(
this
,[
'该目录及子目录都会被删除,并且该目录下关联的相关资源均会被删除,确定要删除吗?'
]).
then
(()
=>
{
let
dataNow
=
data
.
code
.
toString
()
deleteModuleAPI
(
dataNow
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
){
this
.
$message
.
success
(
'删除成功'
);
this
.
getAllModule
()
this
.
$emit
(
'saveContent'
)
this
.
$emit
(
'close'
)
}
else
{
this
.
$message
.
error
(
res
.
data
.
msg
);
}
})
});
},
}
}
</
script
>
...
...
@@ -586,6 +662,7 @@ export default {
width
:
79%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
flex-wrap
:
nowrap
;
overflow
:
hidden
;
}
...
...
src/views/resource_manage/video_module/index.vue
浏览文件 @
754d8b06
...
...
@@ -269,6 +269,9 @@ export default {
})
},
0
)
},
activated
(){
this
.
getList
()
},
methods
:
{
lockTags
(){
let
view
=
this
.
$store
.
state
.
tagsView
.
visitedViews
.
find
(
item
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论