瀏覽代碼

Merge branch 'dev' of http://39.106.8.246:3003/web/ibms into dev

haojianlong 5 年之前
父節點
當前提交
a0976b3b3c
共有 2 個文件被更改,包括 841 次插入657 次删除
  1. 93 74
      src/components/ledger/report/dataorigin.vue
  2. 748 583
      src/views/ledger/report/index.vue

+ 93 - 74
src/components/ledger/report/dataorigin.vue

@@ -1,101 +1,120 @@
 <template>
 <template>
-  <div class="saga-fill">
+  <div :class="filterClass ? 'saga-fill reset-fill':'saga-fill'">
     <div class="mess-view">
     <div class="mess-view">
       <el-tooltip class="item" effect="dark" :content="renderData.tips" placement="bottom-start">
       <el-tooltip class="item" effect="dark" :content="renderData.tips" placement="bottom-start">
-        <i class="el-icon-info"><span>{{renderData.title}}</span></i>
+        <i :class="renderData.title ? 'el-icon-info':''"><span>{{renderData.title}}</span></i>
       </el-tooltip>
       </el-tooltip>
     </div>
     </div>
     <div class="doughnut-view">
     <div class="doughnut-view">
-      <report-doughnut v-if="renderData.needCountO || renderData.needCountT" type="type" width="200" height="200" :sum="renderData.sum"
+      <report-doughnut
-        :name="renderData.title" :renderData="echartsData" :id="id" :text="renderData.text">
+          v-if="renderData.needCountO || renderData.needCountT"
+          type="type"
+          width="200"
+          height="200"
+          :sum="renderData.sum"
+          :name="renderData.title"
+          :renderData="echartsData"
+          :id="id"
+          :text="renderData.text">
       </report-doughnut>
       </report-doughnut>
     </div>
     </div>
+    <p style="text-align: center">{{renderData.val}}</p>
     <slot></slot>
     <slot></slot>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import reportDoughnut from "@/components/echarts/reportDoughnut"
+  import reportDoughnut from "@/components/echarts/reportDoughnut"
-export default {
-  name: "dataOrgin",
-  components: {
-    reportDoughnut
-  },
-  props: {
-    id: {
-      type: String,
-      default: function createRandomId() {
-        return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
-      }
-    },
-    renderData: {
-      type: Object,
-      default: function () {
-        return {
 
 
+  export default {
+    name: "dataOrgin",
+    components: {
+      reportDoughnut
+    },
+    props: {
+      id: {
+        type: String,
+        default: function createRandomId() {
+          return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
         }
         }
+      },
+      renderData: {
+        type: Object,
+        default: function () {
+          return {}
+        }
+      },
+      filterClass: String
+    },
+    data() {
+      return {
+        echartsData: []
       }
       }
-    }
+    },
-  },
+    created() {
-  data() {
+      this.changeData()
-    return {
+    },
-      echartsData: []
+    mounted() {
-    }
+    },
-  },
+    methods: {
-  created() {
+      changeData() {
-    this.changeData()
+        this.echartsData = [
-  },
+          {
-  mounted() { },
+            name: this.renderData.contentValueO + this.renderData.needCountO,
-  methods: {
+            value: this.renderData.needCountO
-    changeData() {
+          },
-      this.echartsData = [
+          {
-        {
+            name: this.renderData.contentValueT + this.renderData.needCountT,
-          name: this.renderData.contentValueO + this.renderData.needCountO,
+            value: this.renderData.needCountT
-          value: this.renderData.needCountO
+          },
-        },
+        ]
-        {
+      }
-          name: this.renderData.contentValueT + this.renderData.needCountT,
+    },
-          value: this.renderData.needCountT
+    watch: {
-        },
+      renderData: {
-      ]
+        deep: true,
-    }
+        handler: function () {
-  },
+          this.changeData()
-  watch: {
+        }
-    renderData: {
-      deep: true,
-      handler: function () {
-        this.changeData()
       }
       }
     }
     }
   }
   }
-}
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
-.mess-view {
+
-  box-sizing: border-box;
+  .mess-view {
-  border-bottom: 1px solid #ddd;
+    box-sizing: border-box;
-  padding: 10px 20px 10px 15px;
+    border-bottom: 1px solid #ddd;
-  .saga-title {
+    padding: 10px 20px 10px 15px;
-    font-size: 14px;
+
-    color: #333;
+    .saga-title {
-    font-weight: 600;
+      font-size: 14px;
-    line-height: 14px;
+      color: #333;
+      font-weight: 600;
+      line-height: 14px;
+    }
+
+    i {
+      span {
+        padding-left: 6px;
+      }
+    }
   }
   }
-  i {
+
-    span {
+  .saga-fill {
-      padding-left: 6px;
+    width: 345px;
+    // height: 220px;
+    .doughnut-view {
+      height: 165px;
+      width: 100%;
+      padding: 0 5px;
+      box-sizing: border-box;
     }
     }
   }
   }
-}
+  .reset-fill{
-.saga-fill {
+    background: #fff;
-  width: 345px;
+    width: 353px;
-  // height: 220px;
+
-  .doughnut-view {
-    height: 165px;
-    width: 100%;
-    padding: 0 5px;
-    box-sizing: border-box;
   }
   }
-}
 </style>
 </style>

File diff suppressed because it is too large
+ 748 - 583
src/views/ledger/report/index.vue