forked from github/dataease
feat: 仪表板支持发布功能
This commit is contained in:
parent
866a840dc5
commit
bd5409b8d4
@ -4,6 +4,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|||||||
import io.dataease.auth.annotation.DePermission;
|
import io.dataease.auth.annotation.DePermission;
|
||||||
import io.dataease.auth.annotation.DePermissionProxy;
|
import io.dataease.auth.annotation.DePermissionProxy;
|
||||||
import io.dataease.auth.annotation.DePermissions;
|
import io.dataease.auth.annotation.DePermissions;
|
||||||
|
import io.dataease.controller.request.panel.PanelGroupBaseInfoRequest;
|
||||||
import io.dataease.plugins.common.base.domain.PanelGroup;
|
import io.dataease.plugins.common.base.domain.PanelGroup;
|
||||||
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
|
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
|
||||||
import io.dataease.commons.constants.DePermissionType;
|
import io.dataease.commons.constants.DePermissionType;
|
||||||
@ -110,5 +111,12 @@ public class PanelGroupController {
|
|||||||
panelGroupService.exportPanelViewDetails(request,response);
|
panelGroupService.exportPanelViewDetails(request,response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("更新仪表板状态")
|
||||||
|
@PostMapping("/updatePanelStatus/{panelId}")
|
||||||
|
@I18n
|
||||||
|
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE)
|
||||||
|
public void updatePanelStatus(@PathVariable String panelId,@RequestBody PanelGroupBaseInfoRequest request){
|
||||||
|
panelGroupService.updatePanelStatus(panelId,request);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
package io.dataease.controller.request.panel;
|
||||||
|
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Author: wangjiahao
|
||||||
|
* Date: 2022/5/16
|
||||||
|
* Description:
|
||||||
|
*/
|
||||||
|
public class PanelGroupBaseInfoRequest extends PanelGroup {
|
||||||
|
|
||||||
|
}
|
@ -15,6 +15,8 @@ public class PanelGroupRequest extends PanelGroupDTO {
|
|||||||
private String sort;
|
private String sort;
|
||||||
@ApiModelProperty("用户ID")
|
@ApiModelProperty("用户ID")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@ApiModelProperty("是否是超级管理员")
|
||||||
|
private Boolean isAdmin;
|
||||||
@ApiModelProperty("操作类型")
|
@ApiModelProperty("操作类型")
|
||||||
private String optType;
|
private String optType;
|
||||||
@ApiModelProperty("新建来源")
|
@ApiModelProperty("新建来源")
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
panel_group.`name` AS label,
|
panel_group.`name` AS label,
|
||||||
panel_group.`source`,
|
panel_group.`source`,
|
||||||
panel_group.`panel_type`,
|
panel_group.`panel_type`,
|
||||||
|
panel_group.`status`,
|
||||||
sourcePanelGroup.`mobile_layout`,
|
sourcePanelGroup.`mobile_layout`,
|
||||||
sourcePanelGroup.`name` as source_panel_name,
|
sourcePanelGroup.`name` as source_panel_name,
|
||||||
authInfo.privileges as `privileges`
|
authInfo.privileges as `privileges`
|
||||||
@ -90,6 +91,9 @@
|
|||||||
<if test="level != null">
|
<if test="level != null">
|
||||||
and panel_group.level = #{level}
|
and panel_group.level = #{level}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isAdmin != null and !isAdmin">
|
||||||
|
and (panel_group.node_type='folder' or (panel_group.node_type='panel' and panel_group.`status`='publish') or (panel_group.node_type='panel' and panel_group.`status`='unpublished' and authInfo.privileges like '%manage%') )
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY CONVERT(panel_group.name using gbk)
|
ORDER BY CONVERT(panel_group.name using gbk)
|
||||||
</select>
|
</select>
|
||||||
@ -107,6 +111,7 @@
|
|||||||
panel_group.`name` AS label,
|
panel_group.`name` AS label,
|
||||||
panel_group.`node_type`,
|
panel_group.`node_type`,
|
||||||
panel_group.`mobile_layout`,
|
panel_group.`mobile_layout`,
|
||||||
|
panel_group.`status`,
|
||||||
(case when ISNULL(defaultPanelGroup.id) then false else true end) is_default,
|
(case when ISNULL(defaultPanelGroup.id) then false else true end) is_default,
|
||||||
defaultPanelGroup.id as default_panel_id,
|
defaultPanelGroup.id as default_panel_id,
|
||||||
defaultPanelGroup.`name` as default_panel_name,
|
defaultPanelGroup.`name` as default_panel_name,
|
||||||
@ -165,6 +170,9 @@
|
|||||||
<if test="level != null">
|
<if test="level != null">
|
||||||
and panel_group.level = #{level}
|
and panel_group.level = #{level}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isAdmin != null and !isAdmin">
|
||||||
|
and (panel_group.node_type='folder' or (panel_group.node_type='panel' and panel_group.`status`='publish') or (panel_group.node_type='panel' and panel_group.`status`='unpublished' and authInfo.privileges like '%manage%') )
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY panel_group.node_type desc, CONVERT(panel_group.name using gbk)
|
ORDER BY panel_group.node_type desc, CONVERT(panel_group.name using gbk)
|
||||||
</select>
|
</select>
|
||||||
|
@ -8,6 +8,7 @@ import io.dataease.commons.utils.LogUtil;
|
|||||||
import io.dataease.commons.utils.TreeUtils;
|
import io.dataease.commons.utils.TreeUtils;
|
||||||
import io.dataease.controller.request.authModel.VAuthModelRequest;
|
import io.dataease.controller.request.authModel.VAuthModelRequest;
|
||||||
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
||||||
|
import io.dataease.controller.request.panel.PanelGroupBaseInfoRequest;
|
||||||
import io.dataease.controller.request.panel.PanelGroupRequest;
|
import io.dataease.controller.request.panel.PanelGroupRequest;
|
||||||
import io.dataease.controller.request.panel.PanelViewDetailsRequest;
|
import io.dataease.controller.request.panel.PanelViewDetailsRequest;
|
||||||
import io.dataease.dto.PanelGroupExtendDataDTO;
|
import io.dataease.dto.PanelGroupExtendDataDTO;
|
||||||
@ -101,6 +102,7 @@ public class PanelGroupService {
|
|||||||
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
||||||
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
||||||
panelGroupRequest.setUserId(userId);
|
panelGroupRequest.setUserId(userId);
|
||||||
|
panelGroupRequest.setIsAdmin(AuthUtils.getUser().getIsAdmin());
|
||||||
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupList(panelGroupRequest);
|
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupList(panelGroupRequest);
|
||||||
return TreeUtils.mergeTree(panelGroupDTOList, "panel_list");
|
return TreeUtils.mergeTree(panelGroupDTOList, "panel_list");
|
||||||
}
|
}
|
||||||
@ -108,6 +110,7 @@ public class PanelGroupService {
|
|||||||
public List<PanelGroupDTO> defaultTree(PanelGroupRequest panelGroupRequest) {
|
public List<PanelGroupDTO> defaultTree(PanelGroupRequest panelGroupRequest) {
|
||||||
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
||||||
panelGroupRequest.setUserId(userId);
|
panelGroupRequest.setUserId(userId);
|
||||||
|
panelGroupRequest.setIsAdmin(AuthUtils.getUser().getIsAdmin());
|
||||||
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupListDefault(panelGroupRequest);
|
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupListDefault(panelGroupRequest);
|
||||||
return TreeUtils.mergeTree(panelGroupDTOList, "default_panel");
|
return TreeUtils.mergeTree(panelGroupDTOList, "default_panel");
|
||||||
}
|
}
|
||||||
@ -527,4 +530,13 @@ public class PanelGroupService {
|
|||||||
DataEaseException.throwException(e);
|
DataEaseException.throwException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updatePanelStatus(String panelId,PanelGroupBaseInfoRequest request){
|
||||||
|
Assert.notNull(request.getStatus(),"status can not be null");
|
||||||
|
Assert.notNull(panelId,"panelId can not be null");
|
||||||
|
PanelGroupWithBLOBs panelGroup = new PanelGroupWithBLOBs();
|
||||||
|
panelGroup.setId(panelId);
|
||||||
|
panelGroup.setStatus(request.getStatus());
|
||||||
|
panelGroupMapper.updateByPrimaryKeySelective(panelGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
2
backend/src/main/resources/db/migration/V35__1.11.sql
Normal file
2
backend/src/main/resources/db/migration/V35__1.11.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE `panel_group`
|
||||||
|
ADD COLUMN `status` varchar(255) NULL DEFAULT 'publish' COMMENT '1.publish--发布 2.unpublished--未发布' AFTER `mobile_layout`;
|
@ -157,6 +157,10 @@
|
|||||||
<appender-ref ref="console"/>
|
<appender-ref ref="console"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
|
<logger name="io.dataease.ext" level="${logger.sql.level}">
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</logger>
|
||||||
|
|
||||||
<logger name="io.dataease.Application" additivity="false" level="${logger.level:INFO}">
|
<logger name="io.dataease.Application" additivity="false" level="${logger.level:INFO}">
|
||||||
<appender-ref ref="infoAsyncAppender"/>
|
<appender-ref ref="infoAsyncAppender"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
@ -143,7 +143,8 @@ export function initPanelData(panelId, callback) {
|
|||||||
id: response.data.id,
|
id: response.data.id,
|
||||||
name: response.data.name,
|
name: response.data.name,
|
||||||
privileges: response.data.privileges,
|
privileges: response.data.privileges,
|
||||||
sourcePanelName: response.data.sourcePanelName
|
sourcePanelName: response.data.sourcePanelName,
|
||||||
|
status: response.data.status
|
||||||
})
|
})
|
||||||
// 刷新联动信息
|
// 刷新联动信息
|
||||||
getPanelAllLinkageInfo(panelId).then(rsp => {
|
getPanelAllLinkageInfo(panelId).then(rsp => {
|
||||||
@ -199,3 +200,12 @@ export function exportDetails(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updatePanelStatus(panelId, param) {
|
||||||
|
return request({
|
||||||
|
url: '/panel/group/updatePanelStatus/' + panelId,
|
||||||
|
method: 'post',
|
||||||
|
loading: false,
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -131,6 +131,8 @@ export default {
|
|||||||
default_login: 'Normal'
|
default_login: 'Normal'
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
|
publish: 'publish',
|
||||||
|
unpublished: 'unpublished',
|
||||||
default_pwd: 'Default Pwd',
|
default_pwd: 'Default Pwd',
|
||||||
stop: 'Stop',
|
stop: 'Stop',
|
||||||
first_login_tips: 'Please change the initial password',
|
first_login_tips: 'Please change the initial password',
|
||||||
|
@ -131,6 +131,8 @@ export default {
|
|||||||
default_login: '普通登錄'
|
default_login: '普通登錄'
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
|
publish: '发布',
|
||||||
|
unpublished: '取消发布',
|
||||||
default_pwd: '初始密碼',
|
default_pwd: '初始密碼',
|
||||||
stop: '停止',
|
stop: '停止',
|
||||||
first_login_tips: '您使用的是初始密碼,記得修改密碼哦',
|
first_login_tips: '您使用的是初始密碼,記得修改密碼哦',
|
||||||
|
@ -131,6 +131,8 @@ export default {
|
|||||||
default_login: '普通登录'
|
default_login: '普通登录'
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
|
publish: '发布',
|
||||||
|
unpublished: '取消发布',
|
||||||
default_pwd: '初始密码',
|
default_pwd: '初始密码',
|
||||||
stop: '停止',
|
stop: '停止',
|
||||||
first_login_tips: '您使用的是初始密码,记得修改密码哦',
|
first_login_tips: '您使用的是初始密码,记得修改密码哦',
|
||||||
|
@ -54,6 +54,24 @@
|
|||||||
<div class="content unicode" style="display: block;">
|
<div class="content unicode" style="display: block;">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">下架</div>
|
||||||
|
<div class="code-name">&#xe6e5;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">上架</div>
|
||||||
|
<div class="code-name">&#xe6e6;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">发布</div>
|
||||||
|
<div class="code-name">&#xe71f;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">批量操作</div>
|
<div class="name">批量操作</div>
|
||||||
@ -570,9 +588,9 @@
|
|||||||
<pre><code class="language-css"
|
<pre><code class="language-css"
|
||||||
>@font-face {
|
>@font-face {
|
||||||
font-family: 'iconfont';
|
font-family: 'iconfont';
|
||||||
src: url('iconfont.woff2?t=1651808824317') format('woff2'),
|
src: url('iconfont.woff2?t=1652670008819') format('woff2'),
|
||||||
url('iconfont.woff?t=1651808824317') format('woff'),
|
url('iconfont.woff?t=1652670008819') format('woff'),
|
||||||
url('iconfont.ttf?t=1651808824317') format('truetype');
|
url('iconfont.ttf?t=1652670008819') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
@ -598,6 +616,33 @@
|
|||||||
<div class="content font-class">
|
<div class="content font-class">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-unpublish"></span>
|
||||||
|
<div class="name">
|
||||||
|
下架
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-unpublish
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-publish"></span>
|
||||||
|
<div class="name">
|
||||||
|
上架
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-publish
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-fabu"></span>
|
||||||
|
<div class="name">
|
||||||
|
发布
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-fabu
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-piliang-copy"></span>
|
<span class="icon iconfont icon-piliang-copy"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@ -1372,6 +1417,30 @@
|
|||||||
<div class="content symbol">
|
<div class="content symbol">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-unpublish"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">下架</div>
|
||||||
|
<div class="code-name">#icon-unpublish</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-publish"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">上架</div>
|
||||||
|
<div class="code-name">#icon-publish</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-fabu"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">发布</div>
|
||||||
|
<div class="code-name">#icon-fabu</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-piliang-copy"></use>
|
<use xlink:href="#icon-piliang-copy"></use>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2459092 */
|
font-family: "iconfont"; /* Project id 2459092 */
|
||||||
src: url('iconfont.woff2?t=1651808824317') format('woff2'),
|
src: url('iconfont.woff2?t=1652670008819') format('woff2'),
|
||||||
url('iconfont.woff?t=1651808824317') format('woff'),
|
url('iconfont.woff?t=1652670008819') format('woff'),
|
||||||
url('iconfont.ttf?t=1651808824317') format('truetype');
|
url('iconfont.ttf?t=1652670008819') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -13,6 +13,18 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-unpublish:before {
|
||||||
|
content: "\e6e5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-publish:before {
|
||||||
|
content: "\e6e6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-fabu:before {
|
||||||
|
content: "\e71f";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-piliang-copy:before {
|
.icon-piliang-copy:before {
|
||||||
content: "\e61b";
|
content: "\e61b";
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -5,6 +5,27 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "1236927",
|
||||||
|
"name": "下架",
|
||||||
|
"font_class": "unpublish",
|
||||||
|
"unicode": "e6e5",
|
||||||
|
"unicode_decimal": 59109
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1236928",
|
||||||
|
"name": "上架",
|
||||||
|
"font_class": "publish",
|
||||||
|
"unicode": "e6e6",
|
||||||
|
"unicode_decimal": 59110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "4933307",
|
||||||
|
"name": "发布",
|
||||||
|
"font_class": "fabu",
|
||||||
|
"unicode": "e71f",
|
||||||
|
"unicode_decimal": 59167
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "5807789",
|
"icon_id": "5807789",
|
||||||
"name": "批量操作",
|
"name": "批量操作",
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -23,12 +23,20 @@
|
|||||||
<span v-if="panelInfo.sourcePanelName" style="color: green;font-size: 12px">({{ $t('panel.source_panel_name') }}:{{ panelInfo.sourcePanelName }})</span>
|
<span v-if="panelInfo.sourcePanelName" style="color: green;font-size: 12px">({{ $t('panel.source_panel_name') }}:{{ panelInfo.sourcePanelName }})</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
||||||
<span v-if="hasDataPermission('manage',panelInfo.privileges)&&activeTab==='PanelList'&&!panelInfo.sourcePanelName" style="float: right;margin-right: 10px">
|
<span v-if="hasDataPermission('manage',panelInfo.privileges)&&activeTab==='PanelList'&&!panelInfo.sourcePanelName" style="float: right;margin-right: 10px">
|
||||||
<el-button size="mini" type="primary" @click="editPanel">
|
<el-button size="mini" type="primary" @click="editPanel">
|
||||||
{{ $t('commons.edit') }}
|
{{ $t('commons.edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<span v-if="hasDataPermission('manage',panelInfo.privileges)&&activeTab==='PanelList'&&!panelInfo.sourcePanelName" style="float: right;margin-right: 10px">
|
||||||
|
<el-button size="mini" type="primary" @click="changePublishState">
|
||||||
|
<span v-if="panelInfo.status==='publish'">{{ $t('commons.unpublished') }}</span>
|
||||||
|
<span v-if="panelInfo.status!=='publish'">{{ $t('commons.publish') }}</span>
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
|
||||||
<span v-if="hasDataPermission('export',panelInfo.privileges)" style="float: right;margin-right: 10px">
|
<span v-if="hasDataPermission('export',panelInfo.privileges)" style="float: right;margin-right: 10px">
|
||||||
<el-tooltip :content="$t('panel.save_to_panel')">
|
<el-tooltip :content="$t('panel.save_to_panel')">
|
||||||
<el-button class="el-icon-folder-checked" size="mini" circle @click="saveToTemplate" />
|
<el-button class="el-icon-folder-checked" size="mini" circle @click="saveToTemplate" />
|
||||||
@ -136,7 +144,7 @@ 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'
|
||||||
import { initPanelData } from '@/api/panel/panel'
|
import { initPanelData, updatePanelStatus } from '@/api/panel/panel'
|
||||||
import { proxyInitPanelData } from '@/api/panel/shareProxy'
|
import { proxyInitPanelData } from '@/api/panel/shareProxy'
|
||||||
import { dataURLToBlob } from '@/components/canvas/utils/utils'
|
import { dataURLToBlob } from '@/components/canvas/utils/utils'
|
||||||
import { findResourceAsBase64, readFile } from '@/api/staticResource/staticResource'
|
import { findResourceAsBase64, readFile } from '@/api/staticResource/staticResource'
|
||||||
@ -420,6 +428,14 @@ export default {
|
|||||||
const param = { userId: this.shareUserId }
|
const param = { userId: this.shareUserId }
|
||||||
proxyInitPanelData(this.panelInfo.id, param, null)
|
proxyInitPanelData(this.panelInfo.id, param, null)
|
||||||
} else { initPanelData(this.panelInfo.id) }
|
} else { initPanelData(this.panelInfo.id) }
|
||||||
|
},
|
||||||
|
changePublishState() {
|
||||||
|
if (this.panelInfo.status === 'publish') {
|
||||||
|
this.panelInfo.status = 'unpublished'
|
||||||
|
} else {
|
||||||
|
this.panelInfo.status = 'publish'
|
||||||
|
}
|
||||||
|
updatePanelStatus(this.panelInfo.id, { 'status': this.panelInfo.status })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,6 @@ export function starStatus(panelId) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
loading: true
|
loading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user