liu.tao3 1 rok pred
rodič
commit
7df9e4293b

+ 1 - 1
data-room-ui/packages/BigScreenList/EditForm.vue

@@ -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"

+ 6 - 6
data-room-ui/packages/BigScreenRun/index.vue

@@ -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`

+ 3 - 3
data-room-ui/packages/ComponentList/EditForm.vue

@@ -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'

+ 3 - 0
data-room-ui/packages/js/api/bigScreenApi.js

@@ -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}