浏览代码

Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType

zhangyu 4 年之前
父节点
当前提交
21b85c5595
共有 2 个文件被更改,包括 376 次插入371 次删除
  1. 1 1
      src/components/relation/overview/CardList.vue
  2. 375 370
      src/components/relation/overview/Modal/RelationMaintain.vue

+ 1 - 1
src/components/relation/overview/CardList.vue

@@ -100,7 +100,7 @@
                   <span
                     v-show="relation.computationalState !== 3  && relation.computingTime">最后一次计算时间 {{relation.computingTime}}</span>
                   <el-tooltip
-                    :content="relation.computationalState === 2 ? '关系变更,重新计算':'启动计算'"
+                    :content="relation.computationalState === 2 ? '关系变更,重新计算':'启动计算'"
                     placement="top"
                   >
                     <el-badge

+ 375 - 370
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -2,33 +2,33 @@
   <div class="relation-maintain">
     <!--计算无需配置源末端的关系时提示-->
     <el-dialog
-        :title="values.title"
-        :visible.sync="dialogTableVisible"
+      :title="values.title"
+      :visible.sync="dialogTableVisible"
     >
-      <span class="font-big">{{values.autoComputed}}</span>
+      <span class="font-big">{{ values.autoComputed }}</span>
       <footer
-          slot="footer"
-          class="dialog-footer "
+        slot="footer"
+        class="dialog-footer "
       >
-        <el-button @click="dialogTableVisible = false">{{values.cancel}}</el-button>
+        <el-button @click="dialogTableVisible = false">{{ values.cancel }}</el-button>
         <el-button
-            type="primary"
-            @click="promptly"
-        >{{values.promptly}}
+          type="primary"
+          @click="promptly"
+        >{{ values.promptly }}
         </el-button>
       </footer>
     </el-dialog>
     <!-- 计算需配置源末端的关系且已配置时提示-->
     <el-dialog
-        :title="values.title"
-        :visible.sync="dialogTableVisibleMore"
+      :title="values.title"
+      :visible.sync="dialogTableVisibleMore"
     >
       <div
-          v-loading="TableVisibleMoreLoading"
-          style="overflow:hidden"
+        v-loading="TableVisibleMoreLoading"
+        style="overflow:hidden"
       >
-        <p class="font-big">{{values.existComputed}}</p>
-        <p class="exist-title">{{values.existTitle}}</p>
+        <p class="font-big">{{ values.existComputed }}</p>
+        <p class="exist-title">{{ values.existTitle }}</p>
         <el-row :gutter="20" style="margin-bottom: 20px">
           <el-col :span="12">
             <p>源端设备类:</p>
@@ -70,11 +70,11 @@
           class="dialog-footer "
           style="float: right"
         >
-          <el-button @click="dialogTableVisibleMore = false">{{values.cancel}}</el-button>
+          <el-button @click="dialogTableVisibleMore = false">{{ values.cancel }}</el-button>
           <el-button
             type="primary"
             @click="computedUpdate"
-          >{{values.promptly}}
+          >{{ values.promptly }}
           </el-button>
         </footer>
       </div>
@@ -83,7 +83,7 @@
       :title="values.title"
       :visible.sync="dialogEquipment"
     >
-      <h4>{{values.equipmentSetting}}</h4>
+      <h4>{{ values.equipmentSetting }}</h4>
       <el-row :gutter="20">
         <el-col :span="12">
           <p>源端设备类:</p>
@@ -121,116 +121,116 @@
         slot="footer"
         class="dialog-footer"
       >
-        <el-button @click="dialogEquipment = false">{{values.cancel}}</el-button>
+        <el-button @click="dialogEquipment = false">{{ values.cancel }}</el-button>
 
         <el-button
           type="primary"
           @click="handleAddSource"
           :disabled="disabled"
-        >{{values.preservation}}
+        >{{ values.preservation }}
         </el-button>
       </footer>
     </el-dialog>
     <!--手动编辑:提示引导-->
     <el-dialog
-        :title="values.title"
-        :visible.sync="dialogManualTip"
+      :title="values.title"
+      :visible.sync="dialogManualTip"
     >
-      <p class="font-big">{{values.tips}}</p>
+      <p class="font-big">{{ values.tips }}</p>
       <p
-          class="font-big"
-          v-for="item in values.device"
-      >{{item}}</p>
+        class="font-big"
+        v-for="item in values.device"
+      >{{ item }}</p>
       <footer
-          slot="footer"
-          class="dialog-footer "
+        slot="footer"
+        class="dialog-footer "
       >
-        <el-button @click="dialogManualTip = false">{{values.confirm}}
+        <el-button @click="dialogManualTip = false">{{ values.confirm }}
         </el-button>
       </footer>
     </el-dialog>
     <!--手动编辑:手动维护-->
     <el-dialog
-        :title="values.title"
-        :visible.sync="dialogManualOption"
+      :title="values.title"
+      :visible.sync="dialogManualOption"
     >
-      <p class="option-tip">{{values.optionTips}}</p>
+      <p class="option-tip">{{ values.optionTips }}</p>
       <el-row :span="24">
         <el-col :span="8">
           <p>
             <i class="iconfont icon-doc-line"/>
-            {{values.currentNum}} 0
+            {{ values.currentNum }} 0
           </p>
 
           <a :href="downloadProject('excel')">
             <el-button
-                type="primary"
-                class="mt-10"
+              type="primary"
+              class="mt-10"
             >
-              {{values.download}}
+              {{ values.download }}
             </el-button>
           </a>
         </el-col>
         <el-col :span="10">
-          {{values.lastTime}}
+          {{ values.lastTime }}
         </el-col>
       </el-row>
       <el-upload
-          class="upload-demo"
-          drag
-          action="/api/datacenter/graphic/import"
-          multiple
-          :show-file-list='false'
-          name="file"
-          :headers="headers"
-          :data="dataId"
-          :on-progress="progress"
-          :on-success="success"
-          :on-error="error"
-
-
-          accept="xlsx,xls"
+        class="upload-demo"
+        drag
+        action="/api/datacenter/graphic/import"
+        multiple
+        :show-file-list='false'
+        name="file"
+        :headers="headers"
+        :data="dataId"
+        :on-progress="progress"
+        :on-success="success"
+        :on-error="error"
+
+
+        accept="xlsx,xls"
       >
         <i class="el-icon-upload"/>
         <div
-            class="el-upload__text"
-            v-html="values.uploadTxt"
+          class="el-upload__text"
+          v-html="values.uploadTxt"
         />
-        <div class="upload__tip danger" slot="tip">{{ values.uploadTips}}</div>
+        <div class="upload__tip danger" slot="tip">{{ values.uploadTips }}</div>
       </el-upload>
     </el-dialog>
     <!--手动编辑:手动维护.process结束-->
     <el-dialog
-        :title="values.title"
-        :visible.sync="dialogProcess"
+      :title="values.title"
+      :visible.sync="dialogProcess"
     >
       <div class="block">
         <el-timeline>
           <el-timeline-item
-              v-for="(activity, index) in activities"
-              :key="index"
-              :icon="activity.icon"
-              :type="activity.type"
-              :color="activity.color"
-              :size="activity.size"
+            v-for="(activity, index) in activities"
+            :key="index"
+            :icon="activity.icon"
+            :type="activity.type"
+            :color="activity.color"
+            :size="activity.size"
           >
-            {{activity.content}}
+            {{ activity.content }}
           </el-timeline-item>
         </el-timeline>
       </div>
       <!--            下载报告-->
       <a :href="downloadProject('report')">
-        <el-button>{{values.downloadFile}}</el-button>
+        <el-button>{{ values.downloadFile }}</el-button>
       </a>
       <footer
-          slot="footer"
-          class="dialog-footer "
+        slot="footer"
+        class="dialog-footer "
       >
-        <el-button @click="errBack">{{values.back}}</el-button>
+        <el-button @click="errBack">{{ values.back }}</el-button>
         <el-button
-            type="primary"
-            @click="finish"
-        >{{values.done}}
+          type="primary"
+          @click="finish"
+        >{{ values.done }}
         </el-button>
       </footer>
     </el-dialog>
@@ -238,341 +238,346 @@
 </template>
 
 <script>
-  import {mapGetters} from 'vuex'
-  import storage from '@/framework/utils/storage'
-  import {addSource, calcSpecial, sourceQuery} from "@/api/relation/api";
-  import deviceList from "@/data/deviceList.js"
-
-  export default {
-    name: "RelationMaintain",
-    props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading', 'ManualMaintenance'],
-    created() {
-    },
-    mounted() {
+import {mapGetters} from 'vuex'
+import storage from '@/framework/utils/storage'
+import {addSource, calcSpecial, sourceQuery} from "@/api/relation/api";
+import deviceList from "@/data/deviceList.js"
+
+export default {
+  name: "RelationMaintain",
+  props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading', 'ManualMaintenance'],
+  created() {
+  },
+  mounted() {
+
+  },
+  data() {
+    return {
+      dialogTableVisible: false,
+      dialogTableVisibleMore: false,
+      dialogEquipment: false,
+      dialogManualTip: false,
+      dialogManualOption: false,
+      dialogProcess: false,
+      originEquipment: [],
+      endEquipment: [],
+      props: {
+        multiple: true,
+        label: 'FamilyName',
+        value: 'lId',
+        children: 'Items',
+
+      },
+      activities: [{
+        content: '数据文件处理中..',
+        size: 'large',
+        type: 'primary',
+        icon: 'el-icon-check',
+        color: '#0bbd87'
+      }, {
+        content: '数据处理成功',
+        color: '#0bbd87',
+        icon: 'el-icon-check',
+        size: 'large',
+        type: 'primary',
+      }],
+      vals: [],
+      val: [],
+      idArr: [],//存储所有选择的id
+      secondary: [],//单独存储二级数据
+      list: [],//获取后台数据,重新组合,添加唯一标识和源端标识
+      resultOrigin: [],//最终传给后台的源端数据
+      resultEnd: [],//最终传给后台的末端数据
+      ops: [],
+      filterOps: [],//为清空第二个选择器
+      isResouceShow: 0,
+      RelationTypeName: '',//卡片名称
+      value: [],
+      oraginOption: [],
+      endValue: [],
+      endOption: [],
+      setValue: [],
+      setOriginOption: [],
+      setEndValue: [],
+      setEndOptions: [],
+      disabled: false
+    }
+  },
 
+  computed: {
+    ...mapGetters('layout', ['projectId']),
+    headers() {
+      return {
+        'ProjectId': this.projectId,
+        'Comming': 'adm',
+        'Account': storage.get("user_name")
+      }
     },
-    data() {
+    dataId() {
       return {
-        dialogTableVisible: false,
-        dialogTableVisibleMore: false,
-        dialogEquipment: false,
-        dialogManualTip: false,
-        dialogManualOption: false,
-        dialogProcess: false,
-        originEquipment: [],
-        endEquipment: [],
-        props: {
-          multiple: true,
-          label: 'FamilyName',
-          value: 'lId',
-          children: 'Items',
-
-        },
-        activities: [{
-          content: '数据文件处理中..',
-          size: 'large',
-          type: 'primary',
-          icon: 'el-icon-check',
-          color: '#0bbd87'
-        }, {
-          content: '数据处理成功',
-          color: '#0bbd87',
-          icon: 'el-icon-check',
-          size: 'large',
-          type: 'primary',
-        }],
-        vals: [],
-        val: [],
-        idArr: [],//存储所有选择的id
-        secondary: [],//单独存储二级数据
-        list: [],//获取后台数据,重新组合,添加唯一标识和源端标识
-        resultOrigin: [],//最终传给后台的源端数据
-        resultEnd: [],//最终传给后台的末端数据
-        ops: [],
-        filterOps: [],//为清空第二个选择器
-        isResouceShow: 0,
-        RelationTypeName: '',//卡片名称
-        value: [],
-        oraginOption: [],
-        endValue: [],
-        endOption: [],
-        setValue: [],
-        setOriginOption: [],
-        setEndValue: [],
-        setEndOptions: [],
-        disabled: false
+        relType: this.ManualMaintenance.RelationType || '',
+        zoneType: this.ManualMaintenance.ZoneType || '',
+        projectId: this.projectId
       }
     },
-
-    computed: {
-      ...mapGetters('layout', ['projectId']),
-      headers() {
-        return {
-          'ProjectId': this.projectId,
-          'Comming': 'adm',
-          'Account': storage.get("user_name")
-        }
-      },
-      dataId() {
-        return {
-          relType: this.ManualMaintenance.RelationType || '',
-          zoneType: this.ManualMaintenance.ZoneType || '',
-          projectId: this.projectId
-        }
-      },
-      disOptions() {
-        let arr = this.list.length && this.deepCopy(this.list).map(item => {
-          item.Items.length && item.Items.map(i => {
-            if (this.idArr.includes(i.lId)) {
-              i.disabled = true
-            }
-            return i
-          })
-          return item
+    disOptions() {
+      let arr = this.list.length && this.deepCopy(this.list).map(item => {
+        item.Items.length && item.Items.map(i => {
+          if (this.idArr.includes(i.lId)) {
+            i.disabled = true
+          }
+          return i
         })
-        this.filterOps = arr
-        return arr
-      },
+        return item
+      })
+      this.filterOps = arr
+      return arr
     },
-    methods: {
-      deepCopy(obj) {
-        return JSON.parse(JSON.stringify(obj))
-      },
-      //查询原末端回显数据
-      handleSourceQuery() {
-        let param = {
-          filters: `projectId='${this.projectId}';calcName='${this.RelationTypeName}'`
-        }
-        sourceQuery(param, res => {
-          this.value = []
-          this.setValue = []
-          res.content && res.content.forEach(({sourceType}) => this.value.push(sourceType))
-          //启动计算
-          res.content && res.content.forEach(({sourceType}) => this.setValue.push(sourceType))
-          // this.setOriginOption = this.oraginOption.forEach(i => this.setValue.includes(i.value))
-          this.changeVal(this.value)
-          this.setValue && this.handleSetValue()
-        })
-      },
-      dialogEquipmentOpen(relation) { //设定源末端
-        this.RelationTypeName = relation.relationTypeName
-        this.oraginOption = deviceList[relation.relationTypeName] && deviceList[relation.relationTypeName].filter(i => i.select)
-        this.data = deviceList[relation.relationTypeName]
-        this.disabled = this.data != undefined ? false : true
-        // console.log(this.data, relation.RelationTypeName)
-        this.dialogEquipment = true
+  },
+  methods: {
+    deepCopy(obj) {
+      return JSON.parse(JSON.stringify(obj))
+    },
+    //查询原末端回显数据
+    handleSourceQuery() {
+      let param = {
+        filters: `projectId='${this.projectId}';calcName='${this.RelationTypeName}'`
+      }
+      sourceQuery(param, res => {
+        this.value = []
+        this.setValue = []
+        res.content && res.content.forEach(({sourceType}) => this.value.push(sourceType))
+        //启动计算
+        res.content && res.content.forEach(({sourceType}) => this.setValue.push(sourceType))
+        // this.setOriginOption = this.oraginOption.forEach(i => this.setValue.includes(i.value))
+        this.changeVal(this.value)
+        this.setValue && this.handleSetValue()
+      })
+    },
+    dialogEquipmentOpen(relation) { //设定源末端
+      this.RelationTypeName = relation.relationTypeName
+      this.oraginOption = deviceList[relation.relationTypeName] && deviceList[relation.relationTypeName].filter(i => i.select)
+      this.data = deviceList[relation.relationTypeName]
+      this.disabled = this.data != undefined ? false : true
+      // console.log(this.data, relation.RelationTypeName)
+      this.dialogEquipment = true
 
-      },
-      changeVal(val) {
-        //  末端展示数据
-        this.endOption = this.data && this.data.filter(i => !val.includes(i.value))
-        //  启动计算末端展示数据
-        // this.setEndOptions = this.data && this.data.filter(i => !val.includes(i.value))
-
-        this.sourceList = []
-        val.forEach(i => this.sourceList.push({
-          sourceType: i,
-          projectId: this.projectId,
-          calcName: this.RelationTypeName
-        }))
-      },
+    },
+    changeVal(val) {
+      //  末端展示数据
+      this.endOption = this.data && this.data.filter(i => !val.includes(i.value))
+      //  启动计算末端展示数据
+      // this.setEndOptions = this.data && this.data.filter(i => !val.includes(i.value))
+
+      this.sourceList = []
+      val.forEach(i => this.sourceList.push({
+        sourceType: i,
+        projectId: this.projectId,
+        calcName: this.RelationTypeName
+      }))
+    },
 
-      handleAddSource() { //保存设备类
-        debugger
-        console.log(this.sourceList)
-        if (this.sourceList.length) {
-          let params = {
-            content: this.sourceList
-          }
-          return
-          addSource(params, res => {
-            this.$message.success('保存成功')
-          })
+    handleAddSource() { //保存设备类
+      let params = {}
+      if (this.sourceList.length) {
+        params = {
+          content: this.sourceList
         }
 
-        this.dialogEquipment = false
-      },
-      // showCascader() {
-      //   ++this.isResouceShow
-      //   let copy = this.deepCopy(this.source)
-      //   copy.forEach(item => {
-      //     item.Items.forEach(child => {
-      //       child.lId = this.list.length
-      //       this.list.push(child)
-      //       child.Items.forEach(i => {
-      //         i.lId = i.Id + i.BlockId
-      //         i.IsSource == true && this.ops.push([child.lId, i.lId])
-      //         i.IsSource == false && this.filterOps.push([child.lId, i.lId])
-      //       })
-      //     })
-      //   })
-      // },
-      showCascader(relation) {
-        this.RelationTypeName = relation.relationTypeName
+      } else {
+        params = {
+          content: [{
+            projectId: this.projectId,
+            calcName: this.RelationTypeName
+          }]
+        }
+      }
+      addSource(params, res => {
+        this.$message.success('保存成功')
+      })
+      this.dialogEquipment = false
+    },
+    // showCascader() {
+    //   ++this.isResouceShow
+    //   let copy = this.deepCopy(this.source)
+    //   copy.forEach(item => {
+    //     item.Items.forEach(child => {
+    //       child.lId = this.list.length
+    //       this.list.push(child)
+    //       child.Items.forEach(i => {
+    //         i.lId = i.Id + i.BlockId
+    //         i.IsSource == true && this.ops.push([child.lId, i.lId])
+    //         i.IsSource == false && this.filterOps.push([child.lId, i.lId])
+    //       })
+    //     })
+    //   })
+    // },
+    showCascader(relation) {
+      this.RelationTypeName = relation.relationTypeName
 
 
-      },
-      handleSetValue() {
-        let device = deviceList[this.RelationTypeName]
-        this.setOriginOption = device && device.filter(i => this.setValue.includes(i.value))
-        this.setEndOptions = device && device.filter(i => !this.setValue.includes(i.value))
-      },
-      downloadProject(str) {
-        let relType = this.ManualMaintenance.RelationType ? `&relType=${this.ManualMaintenance.RelationType}` : ''
-        let zoneType = this.ManualMaintenance.ZoneType ? `&zoneType=${this.ManualMaintenance.ZoneType}` : null
-        let url;
-        if (str === 'excel') {
-          relType = this.ManualMaintenance.RelationType ? `&relType=${this.ManualMaintenance.RelationType}` : ''
-          // url = `/api/datacenter/graphic/export?code=对象ID${relType}${zoneType}`
-          if (zoneType) {
-            url = `/api/datacenter/graphic/export?projectId=${this.projectId}${relType}${zoneType}&code=对象ID`
-
-          } else {
-            url = `/api/datacenter/graphic/export?projectId=${this.projectId}${relType}&code=对象ID`
-          }
+    },
+    handleSetValue() {
+      let device = deviceList[this.RelationTypeName]
+      this.setOriginOption = device && device.filter(i => this.setValue.includes(i.value))
+      this.setEndOptions = device && device.filter(i => !this.setValue.includes(i.value))
+    },
+    downloadProject(str) {
+      let relType = this.ManualMaintenance.RelationType ? `&relType=${this.ManualMaintenance.RelationType}` : ''
+      let zoneType = this.ManualMaintenance.ZoneType ? `&zoneType=${this.ManualMaintenance.ZoneType}` : null
+      let url;
+      if (str === 'excel') {
+        relType = this.ManualMaintenance.RelationType ? `&relType=${this.ManualMaintenance.RelationType}` : ''
+        // url = `/api/datacenter/graphic/export?code=对象ID${relType}${zoneType}`
+        if (zoneType) {
+          url = `/api/datacenter/graphic/export?projectId=${this.projectId}${relType}${zoneType}&code=对象ID`
+
         } else {
-          url = `/api/datacenter/graphic/report-downloads?projectId=${this.projectId}${relType}${zoneType}`
+          url = `/api/datacenter/graphic/export?projectId=${this.projectId}${relType}&code=对象ID`
         }
-        return url
-      },
-      progress(event, file, fileList) {
-        // console.log(event.file, fileList)
-      },
-      success(event, file, fileList) {
-        this.dialogManualOption = true
-        this.dialogProcess = true
+      } else {
+        url = `/api/datacenter/graphic/report-downloads?projectId=${this.projectId}${relType}${zoneType}`
+      }
+      return url
+    },
+    progress(event, file, fileList) {
+      // console.log(event.file, fileList)
+    },
+    success(event, file, fileList) {
+      this.dialogManualOption = true
+      this.dialogProcess = true
 
-      },
-      error(event, file, fileList) {
-        this.dialogManualOption = true
-        this.dialogProcess = true
+    },
+    error(event, file, fileList) {
+      this.dialogManualOption = true
+      this.dialogProcess = true
 
-      },
-      errBack() {
-        this.dialogProcess = false
-      },
-      finish() {
-        this.dialogProcess = false
-        this.dialogManualOption = false
-      },
+    },
+    errBack() {
+      this.dialogProcess = false
+    },
+    finish() {
+      this.dialogProcess = false
+      this.dialogManualOption = false
+    },
 
-      promptly() {
+    promptly() {
 
-        if (this.isComputed.automatic && !this.isComputed.source) { //需要自动计算并且不需要配置云末端
-          this.$emit('RelationType', this.isComputed.RelationType, this.isComputed.ZoneType)
-        }
-        this.dialogTableVisible = false
-      },
-      sourceOptions(val) {
-        // this.ops = val
-        this.idArr = val.map(item => item[1])
-        this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
-        let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
-        //接口需要的数据格式
-        filterList.forEach(item => {
-          let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
-          this.resultOrigin.push({
-            BlockId,
-            BuildingId,
-            Domain,
-            // Id,
-            MepSystemType,
-            ProjectId,
-            Source: true,
-            SourceId: Id,
-            SourceType: Type,
-            Statistics
-          })
-        })
-      },
-      endOptions(val) {
-        this.idArr = val.map(item => item[1])
-        this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
-        let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
-        //接口需要的数据格式
-        filterList.forEach(item => {
-          let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
-          this.resultEnd.push({
-            BlockId,
-            BuildingId,
-            Domain,
-            // Id,
-            MepSystemType,
-            ProjectId,
-            Source: false,
-            SourceId: Id,
-            SourceType: Type,
-            Statistics
-          })
+      if (this.isComputed.automatic && !this.isComputed.source) { //需要自动计算并且不需要配置云末端
+        this.$emit('RelationType', this.isComputed.RelationType, this.isComputed.ZoneType)
+      }
+      this.dialogTableVisible = false
+    },
+    sourceOptions(val) {
+      // this.ops = val
+      this.idArr = val.map(item => item[1])
+      this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
+      let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
+      //接口需要的数据格式
+      filterList.forEach(item => {
+        let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
+        this.resultOrigin.push({
+          BlockId,
+          BuildingId,
+          Domain,
+          // Id,
+          MepSystemType,
+          ProjectId,
+          Source: true,
+          SourceId: Id,
+          SourceType: Type,
+          Statistics
         })
-      },
-      computedUpdate() {
-        // if (!this.resultOrigin.length && !this.ops.length) {
-        //   this.$message({
-        //     showClose: true,
-        //     message: '请选择源端设备类',
-        //     type: 'warning'
-        //   });
-        //   return false
-        // } else {
-        //   if (this.resultOrigin.length || this.resultEnd.length) {
-        //     this.resultOrigin.push(...this.resultEnd)
-        //     this.$emit('openComputed', this.resultOrigin)
-        //   }
-        //   this.dialogTableVisibleMore = false
-        //
-        // }
-        // this.resultOrigin.push(...this.resultEnd)
-        // this.$emit('openComputed', this.resultOrigin)
-        this.dialogTableVisibleMore = false
-        let params = {
-          projectId: this.projectId,
-          relationType: this.isComputed.relationType
-        }
-        calcSpecial(params, res => {
-          this.$message.success('计算成功')
+      })
+    },
+    endOptions(val) {
+      this.idArr = val.map(item => item[1])
+      this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
+      let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
+      //接口需要的数据格式
+      filterList.forEach(item => {
+        let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
+        this.resultEnd.push({
+          BlockId,
+          BuildingId,
+          Domain,
+          // Id,
+          MepSystemType,
+          ProjectId,
+          Source: false,
+          SourceId: Id,
+          SourceType: Type,
+          Statistics
         })
+      })
+    },
+    computedUpdate() {
+      // if (!this.resultOrigin.length && !this.ops.length) {
+      //   this.$message({
+      //     showClose: true,
+      //     message: '请选择源端设备类',
+      //     type: 'warning'
+      //   });
+      //   return false
+      // } else {
+      //   if (this.resultOrigin.length || this.resultEnd.length) {
+      //     this.resultOrigin.push(...this.resultEnd)
+      //     this.$emit('openComputed', this.resultOrigin)
+      //   }
+      //   this.dialogTableVisibleMore = false
+      //
+      // }
+      // this.resultOrigin.push(...this.resultEnd)
+      // this.$emit('openComputed', this.resultOrigin)
+      this.dialogTableVisibleMore = false
+      let params = {
+        projectId: this.projectId,
+        relationType: this.isComputed.relationType
+      }
+      calcSpecial(params, res => {
+        this.$message.success('计算成功')
+      })
 
-      },
-    }
+    },
   }
+}
 </script>
 
 <style scoped lang="less">
-  .relation-maintain {
-    .mt-10 {
-      margin-top: 10px;
-    }
+.relation-maintain {
+  .mt-10 {
+    margin-top: 10px;
+  }
 
-    .danger {
-      color: #d9001b;
-    }
+  .danger {
+    color: #d9001b;
+  }
 
-    .font-big {
-      font-weight: 600;
-    }
+  .font-big {
+    font-weight: 600;
+  }
 
 
-    .exist-title {
-      font-size: 12px;
-      color: #AAAAAA;
-    }
+  .exist-title {
+    font-size: 12px;
+    color: #AAAAAA;
+  }
 
-    .option-tip {
-      font-size: 18px;
-      font-weight: 600;
-    }
+  .option-tip {
+    font-size: 18px;
+    font-weight: 600;
+  }
 
-    .upload-demo {
-      margin: 20px 0;
+  .upload-demo {
+    margin: 20px 0;
 
-    }
+  }
 
-    /deep/ .el-upload-dragger {
-      width: 600px;
-      margin: 0 auto;
-    }
+  /deep/ .el-upload-dragger {
+    width: 600px;
+    margin: 0 auto;
   }
+}
 </style>