瀏覽代碼

Merge branch 'dev'

zhangyu 5 年之前
父節點
當前提交
5b86fa9091
共有 3 個文件被更改,包括 14 次插入10 次删除
  1. 1 1
      src/api/relation/api.js
  2. 12 9
      src/components/relation/overview/CardList.vue
  3. 1 0
      src/views/relation/overview/index.vue

+ 1 - 1
src/api/relation/api.js

@@ -77,7 +77,7 @@ export function businessSpaceAll(param) {
   let ProjectId = localStorage.getItem("projectId")
   return fetch({
     method: 'POST',
-    url: `/api/datacenter/relation-calc/${relation_type}${zone_type ? +'/' + zone_type : ''}`,
+    url: `/api/datacenter/relation-calc/${relation_type}?objectTypes=${zone_type ? '/' +zone_type : ''}`,
     data: proId,
     headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
   })

+ 12 - 9
src/components/relation/overview/CardList.vue

@@ -222,15 +222,19 @@
       },
       computed(relation) {
         this.isComputed = relation // 当前要计算的对象
-        this.$emit('calcSpecial', relation)
-        if (relation.IsSource) {
-          this.values.existComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
-          this.$refs.maintain.dialogTableVisibleMore = true
-          this.$refs.maintain.showCascader()
-
+        if(relation.RelationType) {
+          this.$emit('calcSpecial', relation)
+          if (relation.IsSource) {
+            this.values.existComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
+            this.$refs.maintain.dialogTableVisibleMore = true
+            this.$refs.maintain.showCascader()
+          } else {
+            this.values.autoComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
+            this.$refs.maintain.dialogTableVisible = true
+          }
         } else {
-          this.values.autoComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
-          this.$refs.maintain.dialogTableVisible = true
+          this.$message.warning("设计中")
+          return false
         }
       },
       equipment() {
@@ -255,7 +259,6 @@
             this.$message.warning("设计中")
             return false
           }
-
         }
         this.ManualMaintenance = relation
       },

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

@@ -169,6 +169,7 @@
         //
         // })
         businessSpaceAll(param).then(res=> {
+          console.log(param,'param===')
           if(res.data.Result === 'failure') {
             this.$message({
               message: '计算失败',