fix:bug修复

main
liu.tao3 1 year ago
parent 13dee714a3
commit 7df9e4293b

@ -2,7 +2,7 @@
<div>
<el-dialog
:close-on-click-modal="false"
:title="title ? '编辑大屏' : '新大屏'"
:title="title ? '编辑大屏' : '新大屏'"
:visible.sync="formVisible"
:append-to-body="true"
class="bs-dialog-wrap bs-el-dialog"

@ -94,7 +94,7 @@ export default {
return this.config.fitMode || this.stateFitMode
},
fitSelector () {
return this.config.fitSelector
return this.config.fitSelector
},
pageLoading () {
return this.$store.state.bigScreen.pageLoading
@ -307,7 +307,7 @@ export default {
let overflowX = 'auto'
let overflowY = 'auto'
// ,
if (this.fitMode === 'auto') {
if (pageConfig.fitMode === 'auto') {
const scaleW = this.innerWidth / w
const scaleH = this.innerHeight / h
scaleX = Math.min(scaleW, scaleH)
@ -318,9 +318,9 @@ export default {
}
//
if (this.fitMode === 'fitWidth') {
if (pageConfig.fitMode === 'fitWidth') {
scaleX = this.innerWidth / w
//
//
if (this.innerHeight > h) {
translate = `${((this.innerWidth - w) / 2) / scaleX}px, ${((this.innerHeight - h) / 2) / scaleY}px`
} else {
@ -330,7 +330,7 @@ export default {
}
//
if (this.fitMode === 'fitHeight') {
if (pageConfig.fitMode === 'fitHeight') {
scaleY = this.innerHeight / h
//
if (this.innerWidth > w) {
@ -342,7 +342,7 @@ export default {
}
//
if (this.fitMode === 'cover') {
if (pageConfig.fitMode === 'cover') {
scaleX = this.innerWidth / w
scaleY = this.innerHeight / h
translate = `${((this.innerWidth - w) / 2) / scaleX}px, ${((this.innerHeight - h) / 2) / scaleY}px`

@ -2,7 +2,7 @@
<div>
<el-dialog
:close-on-click-modal="false"
:title="title ? '编辑组件' : '新组件'"
:title="title ? '编辑组件' : '新组件'"
:visible.sync="formVisible"
:append-to-body="true"
class="bs-dialog-wrap bs-el-dialog"
@ -30,7 +30,7 @@
/>
</el-form-item>
<el-form-item
v-if="type === 'bizComponent'"
v-if="type === 'bizComponent'&&!title"
label="组件类型"
>
<el-select
@ -151,7 +151,7 @@ export default {
BizList: [
{
label: 'echarts组件',
value: 'echarts'
value: 'echart'
}, {
label: 'g2Plot组件',
value: 'g2plot'

@ -8,6 +8,9 @@ export function getScreenInfo (code) {
export function saveScreen(data) {
data.chartList.forEach((item) => {
if (item.type == 'customComponent') {
const a = JSON.parse(item.option)
a[a.dataKey] = []
item.option=JSON.stringify(a)
item.setting=item.setting.map((x) => {
const {field,value,...obj}=x
return {field,value}

Loading…
Cancel
Save