Sfoglia il codice sorgente

Merge branch 'optimize' of github.com:gcpaas/DataRoom into optimize

wu.jian2 1 anno fa
parent
commit
c93bee6377

+ 2 - 0
data-room-ui/packages/BasicComponents/DigitalFlop/index.vue

@@ -14,6 +14,7 @@
           'background-color': option.bgColor,
           'font-size': option.fontSize + 'px',
           'min-width': option.width + 'px',
+          'height': option.height + 'px',
           color: option.color,
           'border-radius': option.borderRadius + 'px',
           'font-weight': option.fontWeight,
@@ -149,6 +150,7 @@ export default {
       justify-content: center;
       align-items: center;
       border: 1px solid rgba(131, 191, 246, 0);
+      overflow: hidden;
     }
   }
 }

+ 2 - 1
data-room-ui/packages/BasicComponents/DigitalFlop/settingConfig.js

@@ -47,7 +47,8 @@ const customConfig = {
     slotRight: '',
     marginRight: 20,
     numberDigits: 5,
-    placeHolder: '0'
+    placeHolder: '0',
+    height: 125
   }
 }
 export const dataConfig = {

+ 1 - 1
data-room-ui/packages/BasicComponents/HorizontalLine/index.vue

@@ -8,7 +8,7 @@
       class="custom-border-box"
       :style="{
         height: lineHeight + 'px',
-        opacity: opacity / 100,
+        opacity: opacity,
         'background-image': `linear-gradient(to right, ${
           gradientColor0 ? gradientColor0 : gradientColor1
         } , ${gradientColor1 ? gradientColor1 : gradientColor0})`

+ 7 - 5
data-room-ui/packages/BasicComponents/HorizontalLine/setting.vue

@@ -57,12 +57,14 @@
               label="不透明度"
               label-width="100px"
             >
-              <el-slider
+              <el-input-number
                 v-model="config.customize.opacity"
-                class="bs-slider bs-el-input-number"
-                :min="0"
-                :max="100"
-                show-input
+                class="bs-el-input-number db-el-input-number"
+                placeholder="请输入不透明度"
+                :min="0.01"
+                :max="1"
+                :precision="2"
+                :step="0.01"
               />
             </el-form-item>
           </div>

+ 22 - 13
data-room-ui/packages/BasicComponents/Input/index.vue

@@ -48,26 +48,33 @@ export default {
   data () {
     return { }
   },
+  watch: {
+    'config.customize.value': {
+      handler (val) {
+        this.$store.commit('bigScreen/changeActiveItemConfig', { ...this.config, customize: { ...this.config.customize, value: this.config.customize.value } })
+      }
+    }
+  },
   mounted () {
     this.chartInit()
-    this.updateComponent()
+    // this.changeStyle()
   },
   methods: {
-    updateComponent () {
-      const input = document.querySelector(`#el-input-${this.config.code}`)
+    changeStyle (config) {
+      const input = document.querySelector(`#el-input-${config.code}`)
 
       // const inputIcon = input.querySelector(`.${this.config.customize.icon.name}`)
-      input.style.backgroundColor = this.config.customize.backgroundStyle.backgroundColor
-      input.style.fontSize = this.config.customize.inputStyle.fontSize + 'px'
-      input.style.color = this.config.customize.inputStyle.color
-      input.style.borderColor = this.config.customize.borderStyle.borderColor
-      input.style.borderWidth = this.config.customize.borderStyle.borderWidth + 'px'
-      input.style.borderStyle = this.config.customize.borderStyle.borderStyle
-      input.style.borderRadius = this.config.customize.borderStyle.borderRadius + 'px'
+      input.style.backgroundColor = config.customize.backgroundStyle.backgroundColor
+      input.style.fontSize = config.customize.inputStyle.fontSize + 'px'
+      input.style.color = config.customize.inputStyle.color
+      input.style.borderColor = config.customize.borderStyle.borderColor
+      input.style.borderWidth = config.customize.borderStyle.borderWidth + 'px'
+      input.style.borderStyle = config.customize.borderStyle.borderStyle
+      input.style.borderRadius = config.customize.borderStyle.borderRadius + 'px'
       // inputIcon.style.fontSize = this.config.customize.inputStyle.fontSize + 'px'
-      if (this.config.customize.icon.name) {
-        const inputIcon = document.querySelector(`.${this.config.customize.icon.name}`)
-        inputIcon.style.fontSize = this.config.customize.inputStyle.fontSize + 'px'
+      if (config.customize.icon.name) {
+        const inputIcon = document.querySelector(`.${config.customize.icon.name}`)
+        inputIcon.style.fontSize = config.customize.inputStyle.fontSize + 'px'
       }
     }
   }
@@ -96,6 +103,8 @@ export default {
     ::v-deep .el-input__inner {
       height: 100%;
       width: 100%;
+      background-color:#151a26;
+      border: 1px solid #DCDFE6;
     }
   }
 

+ 9 - 6
data-room-ui/packages/BasicComponents/Texts/setting.vue

@@ -13,8 +13,8 @@
       :rules="rules"
       class="bs-el-form"
     >
-      <SettingTitle>基础</SettingTitle>
-      <div class="lc-field-body">
+      <SettingTitle>标题</SettingTitle>
+      <div class="bs-setting-wrap">
         <el-form-item
           label="标题"
           label-width="100px"
@@ -26,6 +26,13 @@
             clearable
           />
         </el-form-item>
+      </div>
+      <SettingTitle>位置</SettingTitle>
+      <div class="lc-field-body">
+        <PosWhSetting :config="config" />
+      </div>
+      <SettingTitle>基础</SettingTitle>
+      <div class="lc-field-body">
         <el-form-item
           label="标题字体大小"
           label-width="100px"
@@ -52,10 +59,6 @@
         </el-form-item>
         <TextGradient v-model="config.customize.color" />
       </div>
-      <SettingTitle>位置</SettingTitle>
-      <div class="lc-field-body">
-        <PosWhSetting :config="config" />
-      </div>
     </el-form>
   </div>
 </template>

+ 1 - 1
data-room-ui/packages/BasicComponents/VerticalLine/index.vue

@@ -8,7 +8,7 @@
       class="custom-border-box"
       :style="{
         width: width + 'px',
-        opacity: opacity / 100,
+        opacity: opacity,
         'background-image': `linear-gradient(to bottom, ${
           gradientColor0 ? gradientColor0 : gradientColor1
         } , ${gradientColor1 ? gradientColor1 : gradientColor0})`

+ 7 - 5
data-room-ui/packages/BasicComponents/VerticalLine/setting.vue

@@ -57,12 +57,14 @@
             label="不透明度"
             label-width="100px"
           >
-            <el-slider
+            <el-input-number
               v-model="config.customize.opacity"
-              class="bs-slider bs-el-input-number"
-              :min="0"
-              :max="100"
-              show-input
+              class="bs-el-input-number db-el-input-number"
+              placeholder="请输入不透明度"
+              :min="0.01"
+              :max="1"
+              :precision="2"
+              :step="0.01"
             />
           </el-form-item>
         </div>

+ 4 - 1
data-room-ui/packages/BasicComponents/Video/index.vue

@@ -79,7 +79,10 @@ export default {
   mounted () {},
   methods: {
     // 由于静态组件没有混入公共函数,所以需要定义一个changeStyle方法,以免报错
-    changeStyle () {
+    changeStyle (config) {
+      this.videoOptions.sources.type = config.customize.videoType
+      this.videoOptions.sources.type = config.customize.videoUrl
+      this.videoOptions.poster = config.customize.posterUrl
     }
   }
 }

+ 7 - 7
data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue

@@ -231,15 +231,15 @@ export default {
       // 1、原数组,2、修改后的数组只包含custom,3、合并的时候xy的配置必须放在最前面
       handler (val) {
         const setList = [].concat(...val.map(item => item.list))
-        const newSetList =  [...this.config.setting,...setList]
-        let newArr = []; //存新数组
-        let hash={}
-        newArr=  newSetList.reduce(function (acc, cru,index) {
-          if (!hash[cru['field']]) {
-            hash[cru['field']] = { index: index }
+        const newSetList = [...this.config.setting, ...setList]
+        let newArr = [] // 存新数组
+        const hash = {}
+        newArr = newSetList.reduce(function (acc, cru, index) {
+          if (!hash[cru.field]) {
+            hash[cru.field] = { index: index }
             acc.push(cru)
           } else {
-            acc.splice(hash[cru['field']]['index'], 1, cru)
+            acc.splice(hash[cru.field].index, 1, cru)
           }
           return acc
         }, [])