forked from github/dataease
Merge pull request #4049 from dataease/pr@dev@refactor_panel-tips
refactor(仪表板): 增加仪表板取消发布时提示等信息
This commit is contained in:
commit
63421f7a3b
@ -1932,6 +1932,7 @@ export default {
|
|||||||
back_parent: 'Back to previous'
|
back_parent: 'Back to previous'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
unpublished_tips: 'After unpublishing, the panel cannot be viewed. Are you sure you want to cancel publishing? ',
|
||||||
position_adjust_component: 'Position adjust',
|
position_adjust_component: 'Position adjust',
|
||||||
active_font_size: 'Selected font size',
|
active_font_size: 'Selected font size',
|
||||||
carousel: 'Carousel',
|
carousel: 'Carousel',
|
||||||
|
@ -1926,6 +1926,7 @@ export default {
|
|||||||
back_parent: '返回上一級'
|
back_parent: '返回上一級'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
unpublished_tips: '取消發布後,該儀表板不能被查看。確定要取消發布?',
|
||||||
position_adjust_component: '位置調整',
|
position_adjust_component: '位置調整',
|
||||||
active_font_size: '选中字體大小',
|
active_font_size: '选中字體大小',
|
||||||
carousel: '輪播',
|
carousel: '輪播',
|
||||||
|
@ -1926,6 +1926,7 @@ export default {
|
|||||||
back_parent: '返回上一级'
|
back_parent: '返回上一级'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
unpublished_tips: '取消发布后,该仪表板不能被查看。确定要取消发布?',
|
||||||
position_adjust_component: '位置调整',
|
position_adjust_component: '位置调整',
|
||||||
active_font_size: '选中字体大小',
|
active_font_size: '选中字体大小',
|
||||||
carousel: '轮播',
|
carousel: '轮播',
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
style="border-bottom: 1px solid;border-bottom-color:#E6E6E6;"
|
style="border-bottom: 1px solid;border-bottom-color:#E6E6E6;"
|
||||||
>
|
>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%;">
|
||||||
<share-head />
|
<share-head/>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row
|
<el-row
|
||||||
@ -45,7 +45,7 @@
|
|||||||
width="400"
|
width="400"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<panel-detail-info />
|
<panel-detail-info/>
|
||||||
<i
|
<i
|
||||||
slot="reference"
|
slot="reference"
|
||||||
class="el-icon-warning icon-class"
|
class="el-icon-warning icon-class"
|
||||||
@ -340,8 +340,10 @@ import { dataURLToBlob, getNowCanvasComponentData } from '@/components/canvas/ut
|
|||||||
import { findResourceAsBase64 } from '@/api/staticResource/staticResource'
|
import { findResourceAsBase64 } from '@/api/staticResource/staticResource'
|
||||||
import PanelDetailInfo from '@/views/panel/list/common/PanelDetailInfo'
|
import PanelDetailInfo from '@/views/panel/list/common/PanelDetailInfo'
|
||||||
import AppExportForm from '@/views/panel/list/AppExportForm'
|
import AppExportForm from '@/views/panel/list/AppExportForm'
|
||||||
|
import msgCfm from '@/components/msgCfm/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [msgCfm],
|
||||||
name: 'PanelViewShow',
|
name: 'PanelViewShow',
|
||||||
components: { AppExportForm, PanelDetailInfo, Preview, SaveToTemplate, PDFPreExport, ShareHead },
|
components: { AppExportForm, PanelDetailInfo, Preview, SaveToTemplate, PDFPreExport, ShareHead },
|
||||||
props: {
|
props: {
|
||||||
@ -700,10 +702,18 @@ export default {
|
|||||||
},
|
},
|
||||||
changePublishState() {
|
changePublishState() {
|
||||||
if (this.panelInfo.status === 'publish') {
|
if (this.panelInfo.status === 'publish') {
|
||||||
this.panelInfo.status = 'unpublished'
|
const options = {
|
||||||
|
title: this.$t('panel.unpublished_tips'),
|
||||||
|
type: 'primary',
|
||||||
|
cb: () => this.updatePublishStatus('unpublished')
|
||||||
|
}
|
||||||
|
this.handlerConfirm(options, this.$t('commons.confirm'))
|
||||||
} else {
|
} else {
|
||||||
this.panelInfo.status = 'publish'
|
this.updatePublishStatus('publish')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
updatePublishStatus(newStatus) {
|
||||||
|
this.panelInfo.status = newStatus
|
||||||
updatePanelStatus(this.panelInfo.id, { 'status': this.panelInfo.status })
|
updatePanelStatus(this.panelInfo.id, { 'status': this.panelInfo.status })
|
||||||
this.$emit('editPanelBashInfo', {
|
this.$emit('editPanelBashInfo', {
|
||||||
'operation': 'status',
|
'operation': 'status',
|
||||||
|
Loading…
Reference in New Issue
Block a user