qianlishi hace 4 años
padre
commit
e22c093ce2

+ 0 - 2
report-ui/src/views/report/bigscreen/designer/widget/widgetFunnel.vue

@@ -37,10 +37,8 @@ export default {
             type: "funnel",
             left: "10%",
             top: 60,
-            // x2: 80,
             bottom: 60,
             width: "80%",
-            // height: {totalHeight} - y - y2,
             min: 0,
             max: 100,
             minSize: "0%",

+ 39 - 30
report-ui/src/views/report/bigscreen/designer/widget/widgetHref.vue

@@ -5,65 +5,74 @@
  * @Last Modified time: 2021-3-13 11:04:24
  !-->
 <template>
-  <a :href="styleColor.linkAdress" :style="styleColor" :target="styleColor.jumpMode">{{ styleColor.text }}</a>
+  <a
+    :href="styleColor.linkAdress"
+    :style="styleColor"
+    :target="styleColor.jumpMode"
+    >{{ styleColor.text }}</a
+  >
 </template>
 
 <script>
 export default {
-  name: 'WidgetHref',
+  name: "WidgetHref",
   components: {},
   props: {
     value: Object,
-    ispreview: Boolean,
+    ispreview: Boolean
   },
   data() {
     return {
-      options: {},
-    }
+      options: {}
+    };
   },
   computed: {
     transStyle() {
-      return this.objToOne(this.options)
+      return this.objToOne(this.options);
     },
     styleColor() {
       return {
-        position: this.ispreview ? 'absolute' : 'static',
-        color: this.transStyle.color || '#fff',
-        'font-weight': this.transStyle.fontWeight || '600',
-        text: this.transStyle.text || '超链接',
-        'font-size': this.transStyle.fontSize + 'px' || '12px',
-        'letter-spacing': this.transStyle.letterSpacing + 'em',
+        position: this.ispreview ? "absolute" : "static",
+        color: this.transStyle.color || "#fff",
+        "font-weight": this.transStyle.fontWeight || "600",
+        text: this.transStyle.text || "超链接",
+        "font-size": this.transStyle.fontSize + "px" || "12px",
+        "letter-spacing": this.transStyle.letterSpacing + "em",
         background: this.transStyle.background,
-        'text-align': this.transStyle.textAlign,
-        display: this.transStyle.hideLayer == undefined ? 'block' : this.transStyle.hideLayer ? 'none' : 'block',
-        width: this.transStyle.width + 'px',
-        height: this.transStyle.height + 'px',
-        left: this.transStyle.left + 'px',
-        top: this.transStyle.top + 'px',
-        right: this.transStyle.right + 'px',
-
+        "text-align": this.transStyle.textAlign,
+        display:
+          this.transStyle.hideLayer == undefined
+            ? "block"
+            : this.transStyle.hideLayer
+            ? "none"
+            : "block",
+        width: this.transStyle.width + "px",
+        height: this.transStyle.height + "px",
+        left: this.transStyle.left + "px",
+        top: this.transStyle.top + "px",
+        right: this.transStyle.right + "px",
         linkAdress: this.transStyle.linkAdress,
-        jumpMode: this.transStyle.jumpMode == 'other' ? '_blank' : '_self',
-      }
-    },
+        jumpMode: this.transStyle.jumpMode == "other" ? "_blank" : "_self"
+      };
+    }
   },
   watch: {
     value: {
       handler(val) {
-        this.options = val
+        this.options = val;
       },
-      deep: true,
-    },
+      deep: true
+    }
   },
   mounted() {
-    this.options = this.value
+    this.options = this.value;
   },
-  methods: {},
-}
+  methods: {}
+};
 </script>
 
 <style scoped lang="scss">
-a{
+a {
   width: 100%;
   height: 100%;
   overflow: hidden;

+ 0 - 6
report-ui/src/views/report/bigscreen/designer/widget/widgetImage.vue

@@ -9,12 +9,6 @@
   </div>
 </template>
 <script>
-// http://pic.ik123.com/uploads/allimg/190813/12-1ZQ3095508.jpg
-// http://pic.ik123.com/uploads/allimg/190813/12-1ZQ3095500.jpg
-// http://pic.ik123.com/uploads/allimg/190813/12-1ZQ3095502.jpg
-// http://pic.ik123.com/uploads/allimg/190813/12-1ZQ3095503.jpg
-// http://pic.ik123.com/uploads/allimg/190813/12-1ZQ3095504.jpg
-// http://pic.ik123.com/uploads/allimg/190813/12-1ZQ3095506.jpg
 export default {
   name: "WidgetImage",
   components: {},

+ 0 - 1
report-ui/src/views/report/bigscreen/designer/widget/widgetLinechart.vue

@@ -126,7 +126,6 @@ export default {
         fontWeight: optionsCollapse.subTextFontWeight,
         fontSize: optionsCollapse.subTextFontSize
       };
-
       this.options.title = title;
     },
     // X轴设置

+ 35 - 38
report-ui/src/views/report/bigscreen/designer/widget/widgetMarquee.vue

@@ -1,64 +1,65 @@
 <template>
   <div class="text" :style="styleColor">
-    <marquee behavior="" :direction="styleColor.direction">{{ styleColor.text }}</marquee>
+    <marquee behavior="" :direction="styleColor.direction">{{
+      styleColor.text
+    }}</marquee>
   </div>
 </template>
 
 <script>
 export default {
-  name: 'WidgetMarquee',
+  name: "WidgetMarquee",
   components: {},
   props: {
     value: Object,
-    ispreview: Boolean,
+    ispreview: Boolean
   },
   data() {
     return {
-      options: {},
-    }
+      options: {}
+    };
   },
   computed: {
     transStyle() {
-      return this.objToOne(this.options)
+      return this.objToOne(this.options);
     },
     styleColor() {
       return {
-        position: this.ispreview ? 'absolute' : 'static',
+        position: this.ispreview ? "absolute" : "static",
         color: this.transStyle.color,
-        'font-weight': this.transStyle.fontWeight,
+        "font-weight": this.transStyle.fontWeight,
         text: this.transStyle.text,
-        'font-size': this.transStyle.fontSize + 'px',
-        'letter-spacing': this.transStyle.letterSpacing + 'em',
+        "font-size": this.transStyle.fontSize + "px",
+        "letter-spacing": this.transStyle.letterSpacing + "em",
         background: this.transStyle.background,
-        'text-align': this.transStyle.textAlign,
-        width: this.transStyle.width + 'px',
-        height: this.transStyle.height + 'px',
-        left: this.transStyle.left + 'px',
-        top: this.transStyle.top + 'px',
-        right: this.transStyle.right + 'px',
-
+        "text-align": this.transStyle.textAlign,
+        width: this.transStyle.width + "px",
+        height: this.transStyle.height + "px",
+        left: this.transStyle.left + "px",
+        top: this.transStyle.top + "px",
+        right: this.transStyle.right + "px",
         marqueeSet: this.transStyle.marqueeSet,
-        styleColor: this.transStyle.marqueeQuit,
-      }
+        styleColor: this.transStyle.marqueeQuit
+      };
     },
     isBehavior() {
-      return this.styleColor.marqueeSet ? 'start()' : 'stop()'
-    },
+      return this.styleColor.marqueeSet ? "start()" : "stop()";
+    }
   },
   watch: {
     value: {
       handler(val) {
-        this.options = val
-        this.optionsData = val.data
-        this.setOptionsData()
+        this.options = val;
+        this.optionsData = val.data;
+        this.setOptionsData();
       },
-      deep: true,
-    },
+      deep: true
+    }
   },
   mounted() {
-    this.options = this.value
-    this.optionsData = this.value.data
-    this.setOptionsData()
+    this.options = this.value;
+    this.optionsData = this.value.data;
+    this.setOptionsData();
   },
   methods: {
     // 数据解析
@@ -66,13 +67,9 @@ export default {
       const optionsData = this.optionsData; // 数据类型 静态 or 动态
       optionsData.dataType == "staticData"
         ? this.staticDataFn(optionsData.staticData)
-        : this.dynamicDataFn(
-        optionsData.dynamicData,
-        optionsData.refreshTime
-        );
-    },
-    staticDataFn(val) {
+        : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
     },
+    staticDataFn(val) {},
     dynamicDataFn(val, refreshTime) {
       if (!val) return;
       if (this.ispreview) {
@@ -87,12 +84,12 @@ export default {
     getEchartData(val) {
       const data = this.queryEchartsData(val);
       data.then(res => {
-        this.styleColor.text = res[0].value
+        this.styleColor.text = res[0].value;
         this.$forceUpdate();
       });
     }
-  },
-}
+  }
+};
 </script>
 
 <style scoped lang="scss">

+ 0 - 1
report-ui/src/views/report/bigscreen/designer/widget/widgetPiechart.vue

@@ -109,7 +109,6 @@ export default {
         fontWeight: optionsCollapse.subTextFontWeight,
         fontSize: optionsCollapse.subTextFontSize
       };
-
       this.options.title = title;
     },
     // 数值设定

+ 0 - 1
report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue

@@ -132,7 +132,6 @@ export default {
         : this.handlerDymaicData(tableData.dynamicData, tableData.refreshTime);
     },
     handlerStaticData(data) {
-      console.log(data);
       this.list = data;
     },
     handlerDymaicData(data, refreshTime) {

+ 6 - 11
report-ui/src/views/report/bigscreen/designer/widget/widgetText.vue

@@ -48,16 +48,16 @@ export default {
     value: {
       handler(val) {
         this.options = val;
-        this.optionsData = val.data
-        this.setOptionsData()
+        this.optionsData = val.data;
+        this.setOptionsData();
       },
       deep: true
     }
   },
   mounted() {
     this.options = this.value;
-    this.optionsData = this.value.data
-    this.setOptionsData()
+    this.optionsData = this.value.data;
+    this.setOptionsData();
   },
   methods: {
     // 数据解析
@@ -65,12 +65,7 @@ export default {
       const optionsData = this.optionsData; // 数据类型 静态 or 动态
       optionsData.dataType == "staticData"
         ? this.staticDataFn(optionsData.staticData)
-        : this.dynamicDataFn(
-        optionsData.dynamicData,
-        optionsData.refreshTime
-        );
-    },
-    staticDataFn(val) {
+        : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
     },
     dynamicDataFn(val, refreshTime) {
       if (!val) return;
@@ -86,7 +81,7 @@ export default {
     getEchartData(val) {
       const data = this.queryEchartsData(val);
       data.then(res => {
-        this.styleColor.text = res[0].value
+        this.styleColor.text = res[0].value;
         this.$forceUpdate();
       });
     }

+ 23 - 22
report-ui/src/views/report/bigscreen/designer/widget/widgetVideo.vue

@@ -1,50 +1,51 @@
 <template>
-  <video :style="styleColor" :src="styleColor.videoAdress" controls="controls">您的浏览器不支持 video 标签。</video>
+  <video :style="styleColor" :src="styleColor.videoAdress" controls="controls">
+    您的浏览器不支持 video 标签。
+  </video>
 </template>
 
 <script>
-// https://www.w3school.com.cn//i/movie.ogg
 export default {
-  name: 'WidgetVideo',
+  name: "WidgetVideo",
   components: {},
   props: {
     value: Object,
-    ispreview: Boolean,
+    ispreview: Boolean
   },
   data() {
     return {
-      options: {},
-    }
+      options: {}
+    };
   },
   computed: {
     transStyle() {
-      return this.objToOne(this.options)
+      return this.objToOne(this.options);
     },
     styleColor() {
       return {
-        position: this.ispreview ? 'absolute' : 'static',
-        width: this.transStyle.width + 'px',
-        height: this.transStyle.height + 'px',
-        left: this.transStyle.left + 'px',
-        top: this.transStyle.top + 'px',
-        right: this.transStyle.right + 'px',
-        videoAdress: this.transStyle.videoAdress,
-      }
-    },
+        position: this.ispreview ? "absolute" : "static",
+        width: this.transStyle.width + "px",
+        height: this.transStyle.height + "px",
+        left: this.transStyle.left + "px",
+        top: this.transStyle.top + "px",
+        right: this.transStyle.right + "px",
+        videoAdress: this.transStyle.videoAdress
+      };
+    }
   },
   watch: {
     value: {
       handler(val) {
-        this.options = val
+        this.options = val;
       },
-      deep: true,
-    },
+      deep: true
+    }
   },
   mounted() {
-    this.options = this.value
+    this.options = this.value;
   },
-  methods: {},
-}
+  methods: {}
+};
 </script>
 
 <style scoped lang="scss">