fix(仪表板): 在第三方平台内禁止使用新Tab预览以及全屏预览功能

This commit is contained in:
fit2cloud-chenyw 2023-01-04 17:23:18 +08:00
parent 1afb4fee91
commit f284d43e18
2 changed files with 21 additions and 9 deletions

View File

@ -71,7 +71,10 @@
@click="redo" @click="redo"
/> />
</el-tooltip> </el-tooltip>
<el-tooltip :content="$t('panel.fullscreen_preview')"> <el-tooltip
v-if="!isOtherPlatform"
:content="$t('panel.fullscreen_preview')"
>
<svg-icon <svg-icon
icon-class="icon_magnify_outlined" icon-class="icon_magnify_outlined"
class="toolbar-icon-active icon16" class="toolbar-icon-active icon16"
@ -235,7 +238,7 @@ import { panelUpdate, removePanelCache, saveCache } from '@/api/panel/panel'
import { getPanelAllLinkageInfo, saveLinkage } from '@/api/panel/linkage' import { getPanelAllLinkageInfo, saveLinkage } from '@/api/panel/linkage'
import bus from '@/utils/bus' import bus from '@/utils/bus'
import { queryPanelJumpInfo } from '@/api/panel/linkJump' import { queryPanelJumpInfo } from '@/api/panel/linkJump'
import { inOtherPlatform } from '@/utils/index'
export default { export default {
name: 'Toolbar', name: 'Toolbar',
props: { props: {
@ -274,6 +277,9 @@ export default {
editControlButton() { editControlButton() {
return this.linkageSettingStatus || this.mobileLayoutStatus return this.linkageSettingStatus || this.mobileLayoutStatus
}, },
isOtherPlatform() {
return inOtherPlatform()
},
...mapState([ ...mapState([
'componentData', 'componentData',
'canvasStyleData', 'canvasStyleData',

View File

@ -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
@ -76,7 +76,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-outline icon-class" class="el-icon-warning-outline icon-class"
@ -98,7 +98,10 @@
</de-btn> </de-btn>
</span> </span>
<span v-if="showType !== 1" style="float: right;margin-right: 10px"> <span
v-if="showType !== 1"
style="float: right;margin-right: 10px"
>
<de-btn <de-btn
secondary secondary
@click="share" @click="share"
@ -108,7 +111,7 @@
</span> </span>
<span <span
v-if="panelInfo.status==='publish'" v-if="panelInfo.status==='publish' && !isOtherPlatform"
style="float: right;margin-right: 10px" style="float: right;margin-right: 10px"
> >
<de-btn <de-btn
@ -141,7 +144,7 @@
class="de-card-dropdown" class="de-card-dropdown"
> >
<el-dropdown-item <el-dropdown-item
v-if="panelInfo.status==='publish'" v-if="panelInfo.status==='publish' && !isOtherPlatform"
@click.native="newTab" @click.native="newTab"
> >
<svg-icon <svg-icon
@ -181,8 +184,8 @@
</el-dropdown-item> </el-dropdown-item>
<el-dropdown <el-dropdown
style="width: 100%"
v-if="hasDataPermission('export',panelInfo.privileges)&&panelInfo.status==='publish'" v-if="hasDataPermission('export',panelInfo.privileges)&&panelInfo.status==='publish'"
style="width: 100%"
trigger="hover" trigger="hover"
placement="right-start" placement="right-start"
> >
@ -388,7 +391,7 @@ import PanelDetailInfo from '@/views/panel/list/common/PanelDetailInfo'
import AppExportForm from '@/views/panel/list/AppExportForm' import AppExportForm from '@/views/panel/list/AppExportForm'
import GrantAuth from '../grantAuth' import GrantAuth from '../grantAuth'
import msgCfm from '@/components/msgCfm/index' import msgCfm from '@/components/msgCfm/index'
import { inOtherPlatform } from '@/utils/index'
export default { export default {
name: 'PanelViewShow', name: 'PanelViewShow',
components: { AppExportForm, PanelDetailInfo, Preview, SaveToTemplate, PDFPreExport, ShareHead, GrantAuth }, components: { AppExportForm, PanelDetailInfo, Preview, SaveToTemplate, PDFPreExport, ShareHead, GrantAuth },
@ -446,6 +449,9 @@ export default {
panelInfo() { panelInfo() {
return this.$store.state.panel.panelInfo return this.$store.state.panel.panelInfo
}, },
isOtherPlatform() {
return inOtherPlatform()
},
...mapState([ ...mapState([
'componentData', 'componentData',
'canvasStyleData', 'canvasStyleData',