Kaynağa Gözat

饼图支持切换实心和空心俩种样式

qianming 4 yıl önce
ebeveyn
işleme
d9148126c5

+ 3 - 3
report-ui/src/views/report/bigscreen/designer/tools.js

@@ -3709,10 +3709,10 @@ const widgetTools = [
           required: false,
           placeholder: '',
           selectOptions: [
-            {code: '50%', name: '实心饼图'},
-            {code: ["40%", "70%"], name: '空心饼图'},
+            {code: 'shixin', name: '实心饼图'},
+            {code: 'kongxin', name: '空心饼图'},
           ],
-          value: '50%'
+          value: 'shixin'
         },
         [
           {

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

@@ -94,7 +94,11 @@ export default {
     },
     // 饼图样式
     setOptionsPiechartStyle(){
-      this.options.series[0]['radius'] = this.optionsSetup.piechartStyle
+      if (this.optionsSetup.piechartStyle == "shixin") {
+        this.options.series[0]['radius'] = "50%"
+      }else if (this.optionsSetup.piechartStyle == "kongxin"){
+        this.options.series[0]['radius'] = ["40%", "70%"]
+      }else {}
     },
     // 标题设置
     setOptionsTitle() {