refactor(仪表板): 增加公共链接操作按钮控制选项#11631

This commit is contained in:
wangjiahao 2024-09-05 10:36:09 +08:00
parent 4eff1fa370
commit 7da6e356db
7 changed files with 43 additions and 2 deletions

View File

@ -16,7 +16,7 @@
@back-to-top="backToTop"
/>
<link-opt-bar
v-if="canvasId==='canvas-main'"
v-if="linkOptBarShow"
ref="link-opt-bar"
:terminal="terminal"
:canvas-style-data="canvasStyleData"
@ -382,6 +382,9 @@ export default {
}
},
computed: {
linkOptBarShow() {
return this.canvasId==='canvas-main' && this.canvasStyleData.showPublicLinkButton
},
screenShotStatues() {
return this.exporting || this.screenShot || this.backScreenShot
},

View File

@ -94,6 +94,7 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
componentStyle.refreshUnit = (componentStyle.refreshUnit || 'minute')
componentStyle.refreshViewEnable = (componentStyle.refreshViewEnable === undefined ? true : componentStyle.refreshViewEnable)
componentStyle.refreshBrowserEnable = (componentStyle.refreshBrowserEnable || false)
componentStyle.showPublicLinkButton = (componentStyle.showPublicLinkButton === undefined ? true : componentStyle.showPublicLinkButton)
componentStyle.refreshBrowserTime = (componentStyle.refreshBrowserTime || 5)
componentStyle.aidedDesign = (componentStyle.aidedDesign || deepCopy(AIDED_DESIGN))
componentStyle.pdfPageLine = (componentStyle.pdfPageLine || deepCopy(PAGE_LINE_DESIGN))

View File

@ -2399,7 +2399,9 @@ export default {
theme_color_light: 'Light',
refresh_frequency: 'Refresh Frequency',
refresh_browser_frequency: 'Refresh Browser',
public_link_button_show: 'Show Public Link Button',
refresh_browser_tips: 'Only public links are effective',
public_link_button_tips: 'Only public links are effective',
card_color_matching: 'Card Color Matching',
table_color_matching: 'Table Color Matching',
background_color: 'Background Color',

View File

@ -2392,7 +2392,9 @@ export default {
theme_color_light: '淺色',
refresh_frequency: '刷新頻率',
refresh_browser_frequency: '瀏覽器刷新',
public_link_button_show: '顯示公共鏈接操作按鈕',
refresh_browser_tips: '僅公共鏈接生效',
public_link_button_tips: '僅公共鏈接生效',
card_color_matching: '卡片配色',
table_color_matching: '表格配色',
background_color: '背景顏色',

View File

@ -2393,7 +2393,9 @@ export default {
theme_color_light: '浅色',
refresh_frequency: '刷新频率',
refresh_browser_frequency: '浏览器刷新',
public_link_button_show: '显示公共链接操作按钮',
refresh_browser_tips: '仅公共链接生效',
public_link_button_tips: '仅公共链接生效',
card_color_matching: '卡片配色',
table_color_matching: '表格配色',
background_color: '背景颜色',

View File

@ -82,6 +82,7 @@ export const CANVAS_STYLE = {
refreshUnit: 'minute', // 仪表板刷新时间带外 默认 分钟
refreshTime: 5, // 仪表板刷新时间 默认5分钟
refreshBrowserEnable: false, // 开启视图刷新(默认关闭)
showPublicLinkButton: true, // 开启公共链接按钮(默认开启)
refreshBrowserTime: 5, // 仪表板刷新时间 默认5分钟(浏览器刷新仅保留分钟)
themeId: 'system_1', // 当前所选主题ID 默认系统主题1
chartInfo: PANEL_CHART_INFO

View File

@ -126,7 +126,7 @@
</el-input>
</el-row>
</el-row>
<el-row class="margin-top20 margin-bottom20">
<el-row class="margin-top20">
<el-row class="custom-item-text-row">
<span class="custom-item-text bl">
{{ $t('panel.panel_view_result_show') }}
@ -182,6 +182,36 @@
</el-row>
</el-row>
</el-row>
<el-row class="margin-top20 margin-bottom20">
<el-row class="custom-item-text-row">
<span class="custom-item-text el-input-refresh-browser-inner bl">
<el-checkbox
v-model="overallSettingForm.showPublicLinkButton"
class="el-input-refresh-browser"
@change="themeChange"
>{{ $t('panel.public_link_button_show') }}
</el-checkbox>
<span class="custom-item-text bl">
<span>
<el-tooltip
class="item"
effect="dark"
placement="bottom"
>
<div slot="content">
{{ $t('panel.public_link_button_tips') }}
</div>
<i
class="el-icon-info"
style="cursor: pointer;"
/>
</el-tooltip>
</span>
</span>
</span>
</el-row>
</el-row>
</el-col>
</div>
</template>