Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
5fafcd61
Unverified
提交
5fafcd61
authored
12月 09, 2021
作者:
fit2cloud-chenyw
提交者:
GitHub
12月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1419 from dataease/pr@dev@mobile_star_status
feat: 移动端收藏状态
上级
46bac176
142ff835
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
29 行增加
和
6 行删除
+29
-6
StoreApi.java
.../main/java/io/dataease/controller/panel/api/StoreApi.java
+7
-2
StoreServer.java
...java/io/dataease/controller/panel/server/StoreServer.java
+5
-0
StoreService.java
...src/main/java/io/dataease/service/panel/StoreService.java
+7
-0
enshrine.js
frontend/src/api/panel/enshrine.js
+7
-0
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+3
-4
没有找到文件。
backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java
浏览文件 @
5fafcd61
...
@@ -32,7 +32,12 @@ public interface StoreApi {
...
@@ -32,7 +32,12 @@ public interface StoreApi {
@ApiOperation
(
"移除收藏"
)
@ApiOperation
(
"移除收藏"
)
@PostMapping
(
"/remove/{storeId}"
)
@PostMapping
(
"/remove/{panelId}"
)
void
remove
(
@PathVariable
(
"storeId"
)
String
storeId
);
void
remove
(
@PathVariable
(
"panelId"
)
String
panelId
);
@ApiOperation
(
"收藏状态"
)
@PostMapping
(
"/status/{id}"
)
Boolean
hasStar
(
@PathVariable
(
"id"
)
String
id
);
}
}
backend/src/main/java/io/dataease/controller/panel/server/StoreServer.java
浏览文件 @
5fafcd61
...
@@ -29,4 +29,9 @@ public class StoreServer implements StoreApi {
...
@@ -29,4 +29,9 @@ public class StoreServer implements StoreApi {
public
void
remove
(
String
panelId
)
{
public
void
remove
(
String
panelId
)
{
storeService
.
removeByPanelId
(
panelId
);
storeService
.
removeByPanelId
(
panelId
);
}
}
@Override
public
Boolean
hasStar
(
String
id
)
{
return
storeService
.
count
(
id
)
>
0L
;
}
}
}
backend/src/main/java/io/dataease/service/panel/StoreService.java
浏览文件 @
5fafcd61
...
@@ -53,4 +53,11 @@ public class StoreService {
...
@@ -53,4 +53,11 @@ public class StoreService {
return
extPanelStoreMapper
.
query
(
example
);
return
extPanelStoreMapper
.
query
(
example
);
}
}
public
Long
count
(
String
panelId
)
{
PanelStoreExample
example
=
new
PanelStoreExample
();
example
.
createCriteria
().
andUserIdEqualTo
(
AuthUtils
.
getUser
().
getUserId
()).
andPanelGroupIdEqualTo
(
panelId
);
return
panelStoreMapper
.
countByExample
(
example
);
}
}
}
frontend/src/api/panel/enshrine.js
浏览文件 @
5fafcd61
...
@@ -25,3 +25,10 @@ export function enshrineList(data) {
...
@@ -25,3 +25,10 @@ export function enshrineList(data) {
})
})
}
}
export
function
starStatus
(
panelId
)
{
return
request
({
url
:
'/api/store/status/'
+
panelId
,
method
:
'post'
,
loading
:
true
})
}
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
5fafcd61
...
@@ -125,7 +125,7 @@ import SaveToTemplate from '@/views/panel/list/SaveToTemplate'
...
@@ -125,7 +125,7 @@ import SaveToTemplate from '@/views/panel/list/SaveToTemplate'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
import
html2canvas
from
'html2canvasde'
import
html2canvas
from
'html2canvasde'
import
FileSaver
from
'file-saver'
import
FileSaver
from
'file-saver'
import
{
enshrineList
,
saveEnshrine
,
deleteEnshrine
}
from
'@/api/panel/enshrine'
import
{
starStatus
,
saveEnshrine
,
deleteEnshrine
}
from
'@/api/panel/enshrine'
import
bus
from
'@/utils/bus'
import
bus
from
'@/utils/bus'
import
{
queryAll
}
from
'@/api/panel/pdfTemplate'
import
{
queryAll
}
from
'@/api/panel/pdfTemplate'
import
ShareHead
from
'@/views/panel/GrantAuth/ShareHead'
import
ShareHead
from
'@/views/panel/GrantAuth/ShareHead'
...
@@ -294,9 +294,8 @@ export default {
...
@@ -294,9 +294,8 @@ export default {
})
})
},
},
initHasStar
()
{
initHasStar
()
{
const
param
=
{}
starStatus
(
this
.
panelInfo
.
id
).
then
(
res
=>
{
enshrineList
(
param
).
then
(
res
=>
{
this
.
hasStar
=
res
.
data
this
.
hasStar
=
res
.
data
&&
res
.
data
.
some
(
item
=>
item
.
panelGroupId
===
this
.
panelInfo
.
id
)
})
})
},
},
refreshStarList
(
isStar
)
{
refreshStarList
(
isStar
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论