Browse Source

1,优化冗余代码。
2,修复redmine分配的bug,未发现的bug

shaun-sheep 5 years ago
parent
commit
8687e67bad

+ 4 - 8
src/components/echarts/reportDoughnut.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width:100%;height:100%;textAlign:center;" :id="id">
+  <div style="width:100%;height:100%;text-align:center;" :id="id">
   </div>
 </template>
 <script>
@@ -21,16 +21,11 @@ export default {
     },
     text: {
       type: String,
-      default: function () {
-        return []
-      }
     },
     type: {},
     name: "",
     sum: ""
   },
-  created(){
-  },
   data() {
     return {
       myCharts: null
@@ -106,13 +101,14 @@ export default {
         }
       }
       this.myCharts = echarts.init(document.getElementById(this.id))
+      console.log(this.id,'----id-')
       this.myCharts.setOption(options)
     }
   },
   watch: {
-    renderData: {
+    'renderData': {
       deep: true,
-      handler: function () {
+      handler(n,o) {
         this.drawDoughnut()
       }
     }

+ 3 - 3
src/views/ledger/report/index.vue

@@ -39,7 +39,7 @@
         <span class="contain-title">设备<i>{{`(${equipCount?equipCount:"0"})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="equipment.length">
           <div class="show-content" v-for="(item,index) in equipment" :key="index">
-            <data-origin :id="'origin' + index" :renderData="item"></data-origin>
+            <data-origin :id="'origin1' + index" :renderData="item"></data-origin>
           </div>
         </div>
       </div>
@@ -78,8 +78,8 @@
         <span class="contain-title">竖井<i>{{`(${shaftCount?shaftCount:'0'})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="shaft.length">
           <div class="show-content" v-for="(item,index) in shaft" :key="index">
-            <datafan :id="'origin' + shaft" :renderData="item" v-if="!item.needCountT"></datafan>
-            <data-origin :id="'origin' + item + index" :renderData="item" v-else></data-origin>
+            <datafan :id="'origin2' + shaft" :renderData="item" v-if="!item.needCountT"></datafan>
+            <data-origin :id="'origin2' + item + index" :renderData="item" v-else></data-origin>
           </div>
         </div>
       </div>

+ 1 - 9
src/views/relation/overview/index.vue

@@ -7,7 +7,6 @@
         :content="content"
         :source="source"
         :TableVisibleMoreLoading="TableVisibleMoreLoading"
-        @template="templateDown"
         @calcSpecial="calcSpecial"
         @openComputed="openComputed"
         @RelationType="RelationType"
@@ -85,8 +84,7 @@
         ],
         loading: false,
         source: [],//源端数据
-        ops: [],
-        currentRelationTypeName: '',//当前点击图片的RelationTypeName
+        currentRelationTypeName: '',//当前点击卡片的RelationTypeName
         TableVisibleMoreLoading: false,
       }
     },
@@ -165,11 +163,7 @@
             projectId: this.projectId
           }
         }
-        // businessSpaceAll(param, res => {
-        //
-        // })
         businessSpaceAll(param).then(res=> {
-          console.log(param,'param===')
           if(res.data.Result === 'failure') {
             this.$message({
               message: '计算失败',
@@ -179,8 +173,6 @@
           this.init()
         })
       },
-      templateDown() { //下载模板
-      },
       calcSpecial(relation) {
         this.currentRelationTypeName = relation.RelationTypeName
         if (relation.IsSource) { //配置云末端