Merge branch 'master' of github.com:gcpaas/DataRoom

main
zhu.yawen 1 year ago
commit 0ac94c72fb

@ -59,6 +59,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label="开启磁吸">
<el-switch
v-model="currentSnap"
class="bs-el-switch"
active-color="#007aff"
:active-value="30"
:inactive-value="3"
@change="snapHandler"
/>
</el-form-item>
<el-form-item label="主题">
<el-select
v-model="form.customTheme"
@ -304,6 +314,14 @@ export default {
pageInfo: state => state.bigScreen.pageInfo,
config: state => state.bigScreen.activeItemConfig
}),
currentSnap: {
get () {
// return this.snap
return this.$store.state.bigScreen.snapTolerance
},
set (val) {
}
},
isPreview () {
return (this.$route.path === window?.BS_CONFIG?.routers?.previewUrl) || (this.$route.path === '/big-screen/preview')
},
@ -361,7 +379,8 @@ export default {
'changeLayout',
'changeChartKey',
'changeRefreshConfig',
'changePageInfo'
'changePageInfo',
'snapChange'
]),
//
changeTheme (theme) {
@ -465,6 +484,10 @@ export default {
},
timerEmptyState () {
return this.pageInfo.chartList.every(chart => chart.dataSource?.businessKey === '' && chart.type !== 'marquee')
},
snapHandler (val) {
// this.$emit('changeSnap', val)
this.snapChange(val)
}
}
}

@ -41,6 +41,24 @@ const setting = [
},
/** 样式配置 **/
// 图表 graph
{
label: '标签文本来源',
// 设置组件类型
type: 'select',
// 字段
field: 'label_content',
// 对应options中的字段
optionField: 'label.content',
value: '{value}',
tabName: 'custom',
options: [
{ label: '维度', value: '{name}' },
{ label: '指标', value: '{value}' }
],
step: 0.1,
max: 1,
groupName: 'graph'
},
{
label: '标签位置',
// 设置组件类型

@ -41,6 +41,24 @@ const setting = [
},
/** 样式配置 **/
// 图表 graph
{
label: '标签文本来源',
// 设置组件类型
type: 'select',
// 字段
field: 'label_content',
// 对应options中的字段
optionField: 'label.content',
value: '{value}',
tabName: 'custom',
options: [
{ label: '维度', value: '{name}' },
{ label: '指标', value: '{value}' }
],
step: 0.1,
max: 1,
groupName: 'graph'
},
{
label: '标签位置',
// 设置组件类型

@ -34,7 +34,7 @@
:debug="false"
:is-conflict-check="false"
:snap="true"
:snap-tolerance="2"
:snap-tolerance="snapTolerance"
:style="{
zIndex: chart.z || 0,
}"
@ -128,7 +128,8 @@ export default {
hoverCode: (state) => state.bigScreen.hoverCode,
themeJson: (state) => state.bigScreen.pageInfo.pageConfig.themeJson,
isInit: (state) => !state.bigScreen.pageLoading,
scale: (state) => state.bigScreen.zoom / 100
scale: (state) => state.bigScreen.zoom / 100,
snapTolerance: (state) => state.bigScreen.snapTolerance
})
},
watch: {

@ -385,6 +385,10 @@ export default {
// 清空数据集库
emptyComputedDatas (state) {
state.computedDatas = {}
},
// 修改磁吸状态
snapChange (state, snap) {
state.snapTolerance = snap
}
}
function deldataset (state, type, codes) {

@ -68,7 +68,9 @@ export const defaultData = {
// 页面上所有组件的数据集的数据信息
dataset: {},
// 页面上所有组件的数据集的数据信息
computedDatas: {}
computedDatas: {},
// 是否开启磁吸
snapTolerance: 3
}
export default () => ({

Loading…
Cancel
Save