Browse Source

error: pathspec '2' did not match any file(s) known to git

shaun-sheep 5 years ago
parent
commit
d7a83638f8

+ 136 - 135
config/index.js

@@ -5,150 +5,151 @@
 const path = require('path')
 
 module.exports = {
-    dev: {
-        // Paths
-        assetsSubDirectory: 'static',
-        assetsPublicPath: '/',
-        proxyTable: {
-            '/admin': {
-                target: 'http://192.168.20.235:8080',
-                changeOrigin: true,
-                pathRewrite: {
-                    "^/admin": "/"
-                }
-            },
-            '/api': {
-                target: 'http://192.168.20.235:8080',
-                changeOrigin: true,
-                pathRewrite: {
-                    "^/api": "/"
-                }
-            },
-            '/data-platform-3': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/business-space': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/pointconfig': {
-                // 目标 API 地址
-                target: 'http://192.168.20.235:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/venders-dp': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/venders': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/ScanBuilding': {
-                // 目标 API 地址
-                target: 'http://192.168.20.235:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/image-service': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/godhand': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/modelapi': {
-                target: 'http://192.168.20.225:8082',
-                // target: 'http://192.168.20.218:8082',//景灏
-                changeOrigin: true,
-                pathRewrite: {
-                    "^/modelapi": "/"
-                }
-            },
-        },
+  dev: {
+    // Paths
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
+    proxyTable: {
+      '/admin': {
+        target: 'http://192.168.20.235:8080',
+        changeOrigin: true,
+        pathRewrite: {
+          "^/admin": "/"
+        }
+      },
+      '/api': {
+        // target: 'http://192.168.20.235:8080',
+        target: 'http://192.168.20.234:8080',
+        changeOrigin: true,
+        pathRewrite: {
+          "^/api": "/"
+        }
+      },
+      '/data-platform-3': {
+        // 目标 API 地址
+        target: 'http://192.168.20.225:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/business-space': {
+        // 目标 API 地址
+        target: 'http://192.168.20.225:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/pointconfig': {
+        // 目标 API 地址
+        target: 'http://192.168.20.235:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/venders-dp': {
+        // 目标 API 地址
+        target: 'http://192.168.20.225:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/venders': {
+        // 目标 API 地址
+        target: 'http://192.168.20.225:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/ScanBuilding': {
+        // 目标 API 地址
+        target: 'http://192.168.20.235:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/image-service': {
+        // 目标 API 地址
+        target: 'http://192.168.20.225:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/godhand': {
+        // 目标 API 地址
+        target: 'http://192.168.20.225:8080/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
+      '/modelapi': {
+        target: 'http://192.168.20.225:8082',
+        // target: 'http://192.168.20.218:8082',//景灏
+        changeOrigin: true,
+        pathRewrite: {
+          "^/modelapi": "/"
+        }
+      },
+    },
 
-        // Various Dev Server settings
-        host: '0.0.0.0', // can be overwritten by process.env.HOST
-        port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
-        autoOpenBrowser: false,
-        errorOverlay: true,
-        notifyOnErrors: true,
-        poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
+    // Various Dev Server settings
+    host: '0.0.0.0', // can be overwritten by process.env.HOST
+    port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+    autoOpenBrowser: false,
+    errorOverlay: true,
+    notifyOnErrors: true,
+    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
 
-        /**
-         * Source Maps
-         */
+    /**
+     * Source Maps
+     */
 
-        // https://webpack.js.org/configuration/devtool/#development
-        devtool: 'cheap-module-eval-source-map',
+    // https://webpack.js.org/configuration/devtool/#development
+    devtool: 'cheap-module-eval-source-map',
 
-        // If you have problems debugging vue-files in devtools,
-        // set this to false - it *may* help
-        // https://vue-loader.vuejs.org/en/options.html#cachebusting
-        cacheBusting: true,
+    // If you have problems debugging vue-files in devtools,
+    // set this to false - it *may* help
+    // https://vue-loader.vuejs.org/en/options.html#cachebusting
+    cacheBusting: true,
 
-        cssSourceMap: true
-    },
+    cssSourceMap: true
+  },
 
-    build: {
-        // Template for index.html
-        index: path.resolve(__dirname, '../dist/index.html'),
+  build: {
+    // Template for index.html
+    index: path.resolve(__dirname, '../dist/index.html'),
 
-        // Paths
-        assetsRoot: path.resolve(__dirname, '../dist'),
-        assetsSubDirectory: 'static',
-        assetsPublicPath: '/',
+    // Paths
+    assetsRoot: path.resolve(__dirname, '../dist'),
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
 
-        /**
-         * Source Maps
-         */
+    /**
+     * Source Maps
+     */
 
-        productionSourceMap: true,
-        // https://webpack.js.org/configuration/devtool/#production
-        devtool: '#source-map',
+    productionSourceMap: true,
+    // https://webpack.js.org/configuration/devtool/#production
+    devtool: '#source-map',
 
-        // Gzip off by default as many popular static hosts such as
-        // Surge or Netlify already gzip all static assets for you.
-        // Before setting to `true`, make sure to:
-        // npm install --save-dev compression-webpack-plugin
-        productionGzip: false,
-        productionGzipExtensions: ['js', 'css'],
+    // Gzip off by default as many popular static hosts such as
+    // Surge or Netlify already gzip all static assets for you.
+    // Before setting to `true`, make sure to:
+    // npm install --save-dev compression-webpack-plugin
+    productionGzip: false,
+    productionGzipExtensions: ['js', 'css'],
 
-        // Run the build command with an extra argument to
-        // View the bundle analyzer report after build finishes:
-        // `npm run build --report`
-        // Set to `true` or `false` to always turn it on or off
-        bundleAnalyzerReport: process.env.npm_config_report
-    }
+    // Run the build command with an extra argument to
+    // View the bundle analyzer report after build finishes:
+    // `npm run build --report`
+    // Set to `true` or `false` to always turn it on or off
+    bundleAnalyzerReport: process.env.npm_config_report
+  }
 }

+ 50 - 42
src/api/relation/api.js

@@ -5,82 +5,90 @@ import storage from '@/framework/utils/storage'
 
 //查询总览
 export function graphic(param, success) {
-    let url = '/api/datacenter/graphic/page-query'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/datacenter/graphic/overview'
+  httpUtil.postJson(url, param, success)
 }
 
 // 查询总览数量
 export function graphicNumber(param, success) {
-    let url = '/api/datacenter/graphic/query-count'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/datacenter/graphic/query-count'
+  httpUtil.postJson(url, param, success)
 
 }
 
 //导入excel
 export function graphicUpload(param, success) {
-    let url = '/api/datacenter/graphic/import'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/datacenter/graphic/import'
+  httpUtil.postJson(url, param, success)
 }
 
 // 下载报告
 export function reportDownload(param, success) {
-    let url = '/api/datacenter/graphic/report-downloads'
-    httpUtil.getJson(url, param, success)
+  let url = '/api/datacenter/graphic/report-downloads'
+  httpUtil.getJson(url, param, success)
 }
 
 // 下载模板
 export function templateDownloads(param, success) {
-    let url = '/api/datacenter/graphic/template-downloads'
-    httpUtil.getJson(url, param, success)
+  let url = '/api/datacenter/graphic/template-downloads'
+  httpUtil.getJson(url, param, success)
 }
 
 
 //    建筑下的业务空间
 export function buildSpace(param, success) {
-    let url = '/api/datacenter/calc_building/space'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/datacenter/calc_building/space'
+  httpUtil.postJson(url, param, success)
 }
 
 
 // 管网系统设备分块 1
 export function calcSpecial(param, success) {
-    let url = ` /api/datacenter/calc_special/sys-block?Domain=${param.Domain}&SystemName=${param.SystemName}`
-    httpUtil.postJson(url, param, success)
+  let url = ` /api/datacenter/calc_special/sys-block?Domain=${param.Domain}&SystemName=${param.SystemName}`
+  httpUtil.postJson(url, param, success)
 }
 
 
 //    获取源末端 2
 export function blockQuery(param, success) {
-    let url = '/api/datacenter/graphic/connected-block-query'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/datacenter/graphic/connected-block-query'
+  httpUtil.postJson(url, param, success)
 }
 
 
 // 覆盖源末端 3
 export function blockSource(param, success) {
-    let url = '/api/datacenter/graphic/replace-connected-block-source'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/datacenter/graphic/replace-connected-block-source'
+  httpUtil.postJson(url, param, success)
 }
 
 //    管网系统确定流向 4
 export function sysDirection(param, success) {
-    let buildId = param.BuildingId ? `BuildingId=${param.BuildingId}&` : ''
-    let url = `/api/datacenter/calc_special/sys-direction?BlockId=${param.BlockId}&${buildId}Domain=${param.Domain}&SystemName=${param.SystemName}&isSource=${param.isSource}`
-    httpUtil.postJson(url, param, success)
+  let buildId = param.BuildingId ? `BuildingId=${param.BuildingId}&` : ''
+  let url = `/api/datacenter/calc_special/sys-direction?BlockId=${param.BlockId}&${buildId}Domain=${param.Domain}&SystemName=${param.SystemName}&isSource=${param.isSource}`
+  httpUtil.postJson(url, param, success)
+}
+
+//************************无需配置源末端关系计算15种********************************//
+// 建筑下的业务空间
+export function businessSpaceAll(param, success) {
+  let {sclc_url, zone_time, proId} = param
+  let url = `/api/datacenter/relation-calc/${sclc_url}${zone_time ? +'/' + zone_time : ''}`
+  httpUtil.postJson(url, proId, success)
 }
 
 //************************数据转换********************************//
 
 // 项目化字典-统计数量
 export function dictCount(param, success) {
-    let url = '/api/equip-component/dict-custom/project-dict-count'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/equip-component/dict-custom/project-dict-count'
+  httpUtil.postJson(url, param, success)
 }
 
 // 项目化字典-需补充转换规则数量
 export function dictSwitchCount(param, success) {
-    let url = '/api/equip-component/dict-custom/project-dict-switch-count'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/equip-component/dict-custom/project-dict-switch-count'
+  httpUtil.postJson(url, param, success)
 }
 
 //项目化字典 - 内容
@@ -90,37 +98,37 @@ export function dictSwitchCount(param, success) {
 // }
 
 export function dectInfo(param) {
-    let data = param
-    let userName = storage.get("user_name")
-    let ProjectId = localStorage.getItem("projectId")
-    return fetch({
-        method: 'POST',
-        url: `/api/equip-component/dict-custom/project-dict-info`,
-        data,
-        headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
-    })
+  let data = param
+  let userName = storage.get("user_name")
+  let ProjectId = localStorage.getItem("projectId")
+  return fetch({
+    method: 'POST',
+    url: `/api/equip-component/dict-custom/project-dict-info`,
+    data,
+    headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
+  })
 }
 
 //数据中心-物理世界数据转换
 export function dictDataCenter(param, success) {
-    let url = '/api/equip-component/dict-custom/project-dict-datacenter'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/equip-component/dict-custom/project-dict-datacenter'
+  httpUtil.postJson(url, param, success)
 }
 
 //物理世界-数据中心数据转换
 export function dictDataPlatFrom(param, success) {
-    let url = '/api/equip-component/dict-custom/project-dict-dataplatfrom'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/equip-component/dict-custom/project-dict-dataplatfrom'
+  httpUtil.postJson(url, param, success)
 }
 
 // 同步设备
 export function createEquip(param, success) {
-    let url = `/api/dataplatform-sync/project-sync/create-equip?projectId=${param.projectId}`
-    httpUtil.postJson(url, {}, success)
+  let url = `/api/dataplatform-sync/project-sync/create-equip?projectId=${param.projectId}`
+  httpUtil.postJson(url, {}, success)
 }
 
 //更新自定义自定脚本
 export function dictUpdate(param, success) {
-    let url = '/api/equip-component/dict-custom/update'
-    httpUtil.postJson(url, param, success)
+  let url = '/api/equip-component/dict-custom/update'
+  httpUtil.postJson(url, param, success)
 }

+ 21 - 21
src/api/scan/fetch.js

@@ -4,38 +4,38 @@ import vueAxios from 'vue-axios'
 import { Message } from 'element-ui';
 
 Vue.use(vueAxios, axios)
-    //创建实例
+//创建实例
 
 const service = axios.create({
-    timeout: 3000000, //请求时间超出
-    withCredentials: true, //是否跨站点访问控制请求
+  timeout: 3000000, //请求时间超出
+  withCredentials: true, //是否跨站点访问控制请求
 })
 
 //request拦截
 service.interceptors.request.use(config => {
-    return config
+  return config
 }, error => {
-    console.log(error)
-    Promise.reject(error)
+  console.log(error)
+  Promise.reject(error)
 })
 
 //response拦截器
 service.interceptors.response.use(
-    response => {
-        // let resp = response.data;
-        // let result = resp.result || resp.Result
-        return response
-        // if (result == 'success' || result == 'Success') {
-        //     return response
-        // } else {
-        //     let msg = resp.message ? resp.message : resp.ResultMsg? resp.ResultMsg: resp.Message;
-        //     Message.error({ message: msg });
-        // }        
-    },
-    error => {
-        console.log('err' + error)
-        return Promise.reject(error)
-    }
+  response => {
+    // let resp = response.data;
+    // let result = resp.result || resp.Result
+    return response
+    // if (result == 'success' || result == 'Success') {
+    //     return response
+    // } else {
+    //     let msg = resp.message ? resp.message : resp.ResultMsg? resp.ResultMsg: resp.Message;
+    //     Message.error({ message: msg });
+    // }
+  },
+  error => {
+    console.log('err' + error)
+    return Promise.reject(error)
+  }
 )
 
 export default service

+ 40 - 40
src/api/scan/httpUtil.js

@@ -3,52 +3,52 @@ import fetch from './fetch'
 import storage from '@/framework/utils/storage'
 
 function successResponse(vm, response, success, failed) {
-    let resp = response.data;
-    let result = resp.result ? resp.result : resp.Result;
-    if (result === 'success') {
-        if (success) {
-            success(resp);
-        }
-    } else {
-        let msg = resp.message ? resp.message : resp.ResultMsg || resp.resultMsg || resp.Message;
-        Message.error({ message: msg });
-        if (failed) {
-            failed(resp);
-        }
+  let resp = response.data;
+  let result = resp.result ? resp.result : resp.Result;
+  if (result === 'success') {
+    if (success) {
+      success(resp);
     }
+  } else {
+    let msg = resp.message ? resp.message : resp.ResultMsg || resp.resultMsg || resp.Message;
+    Message.error({ message: msg });
+    if (failed) {
+      failed(resp);
+    }
+  }
 
 }
 
 function errorResponse(vm, response, err) {
-    let json = JSON.parse(JSON.stringify(response))
-    console.error(response)
-    if (json.response) {
-        Message.error({ message: `接口:${json.response.config.url}请求错误,错误状态为:${json.response.status}` })
-    } else {
-        console.error(vm, response, err)
-        Message.error({ message: '请求错误' });
-    }
+  let json = JSON.parse(JSON.stringify(response))
+  console.error(response)
+  if (json.response) {
+    Message.error({ message: `接口:${json.response.config.url}请求错误,错误状态为:${json.response.status}` })
+  } else {
+    console.error(vm, response, err)
+    Message.error({ message: '请求错误' });
+  }
 }
 
 export default {
-    getJson: function(url, data, success, failed, err) {
-        let ProjectId = localStorage.getItem("projectId")
-        let userName = storage.get("user_name")
-        let vm = this;
-        fetch({ url: url, method: 'get', params: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName}}).then((response) => {
-            successResponse(vm, response, success, failed)
-        }).catch(error => {
-            errorResponse(vm, error, err);
-        });
-    },
-    postJson: function(url, data, success, failed, err) {
-        let ProjectId = localStorage.getItem("projectId")
-        let userName = storage.get("user_name")
-        let vm = this;
-        fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
-            successResponse(vm, response, success, failed)
-        }).catch(error => {
-            errorResponse(vm, error, err);
-        });
-    }
+  getJson: function(url, data, success, failed, err) {
+    let ProjectId = localStorage.getItem("projectId")
+    let userName = storage.get("user_name")
+    let vm = this;
+    fetch({ url: url, method: 'get', params: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName}}).then((response) => {
+      successResponse(vm, response, success, failed)
+    }).catch(error => {
+      errorResponse(vm, error, err);
+    });
+  },
+  postJson: function(url, data, success, failed, err) {
+    let ProjectId = localStorage.getItem("projectId")
+    let userName = storage.get("user_name")
+    let vm = this;
+    fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
+      successResponse(vm, response, success, failed)
+    }).catch(error => {
+      errorResponse(vm, error, err);
+    });
+  }
 }

File diff suppressed because it is too large
+ 744 - 744
src/api/scan/request.js


+ 270 - 270
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -1,287 +1,287 @@
 <template>
-    <div class="detail-box">
-        <el-scrollbar style="height:100%;">
-            <div class="attribute-detail detail-item">
-                <el-form :model="detail" label-width="150px">
-                    <el-form-item label="设备基本信息"></el-form-item>
-                    <el-form-item label="任务创建时间:">{{ detail.CreateTime || '--' }}</el-form-item>
-                    <el-form-item label="任务当前状态:">{{ detail.TaskState || '--' }}</el-form-item>
-                    <el-form-item label="任务执行方案:">{{
-                        detail.ScanScheme?detail.ScanScheme.SchemeName?detail.ScanScheme.SchemeName:'--':'--' }}
-                    </el-form-item>
-                    <el-form-item label="设备类:">{{
-                        detail.EquipCategory?detail.EquipCategory.EquipName?detail.EquipCategory.EquipName:'--':'--' }}
-                    </el-form-item>
-                    <el-form-item label="全局名称:">{{ detail.EquipName || '--' }}</el-form-item>
-                    <el-form-item label="设备本地名称:">{{ detail.EquipLocalName || '--' }}</el-form-item>
-                    <el-form-item label="设备本地编码:">{{ detail.EquipLocalID || '--' }}</el-form-item>
-                    <el-form-item label="设计图纸中编码:">{{ detail.CadId || '--' }}</el-form-item>
-                    <el-form-item label="安装位置:">{{ detail.InstallLocation || '--' }}</el-form-item>
-                    <el-form-item label="生产厂家:">{{ detail.Manufacturer || '--' }}</el-form-item>
-                    <el-form-item label="型号:">{{ detail.Specification || '--' }}</el-form-item>
-                    <el-form-item label="供应商:">{{ detail.Supplier || '--' }}</el-form-item>
-                    <el-form-item label="包含部件:">
-                        <div v-if="detail.Component && detail.Component.length">
-                            <p v-for="(item, index) in detail.Component?detail.Component:[]" :key="index"
-                               show-overflow-tooltip>
-                                {{ item.EquipName }}
-                            </p>
-                        </div>
-                        <div v-else>--</div>
-                    </el-form-item>
-                </el-form>
+  <div class="detail-box">
+    <el-scrollbar style="height:100%;">
+      <div class="attribute-detail detail-item">
+        <el-form :model="detail" label-width="150px">
+          <el-form-item label="设备基本信息"></el-form-item>
+          <el-form-item label="任务创建时间:">{{ detail.CreateTime || '--' }}</el-form-item>
+          <el-form-item label="任务当前状态:">{{ detail.TaskState || '--' }}</el-form-item>
+          <el-form-item label="任务执行方案:">{{
+            detail.ScanScheme?detail.ScanScheme.SchemeName?detail.ScanScheme.SchemeName:'--':'--' }}
+          </el-form-item>
+          <el-form-item label="设备类:">{{
+            detail.EquipCategory?detail.EquipCategory.EquipName?detail.EquipCategory.EquipName:'--':'--' }}
+          </el-form-item>
+          <el-form-item label="全局名称:">{{ detail.EquipName || '--' }}</el-form-item>
+          <el-form-item label="设备本地名称:">{{ detail.EquipLocalName || '--' }}</el-form-item>
+          <el-form-item label="设备本地编码:">{{ detail.EquipLocalID || '--' }}</el-form-item>
+          <el-form-item label="设计图纸中编码:">{{ detail.CadId || '--' }}</el-form-item>
+          <el-form-item label="安装位置:">{{ detail.InstallLocation || '--' }}</el-form-item>
+          <el-form-item label="生产厂家:">{{ detail.Manufacturer || '--' }}</el-form-item>
+          <el-form-item label="型号:">{{ detail.Specification || '--' }}</el-form-item>
+          <el-form-item label="供应商:">{{ detail.Supplier || '--' }}</el-form-item>
+          <el-form-item label="包含部件:">
+            <div v-if="detail.Component && detail.Component.length">
+              <p v-for="(item, index) in detail.Component?detail.Component:[]" :key="index"
+                 show-overflow-tooltip>
+                {{ item.EquipName }}
+              </p>
             </div>
-            <div class="implement-detail detail-item" v-if="detail.TaskState === '未找到'">
-                <el-form :model="detail" label-width="150px">
-                    <el-form-item label="执行任务人:">{{ detail.WorkerName || '--' }}</el-form-item>
-                    <el-form-item label="执行时间:">{{ detail.ProcessTime || '--' }}</el-form-item>
-                    <el-form-item label="未找到对象信息"></el-form-item>
-                    <el-form-item label="设备信息:" v-if="!detail.isComponent">{{ detail.EquipLocalName || detail.EquipName
-                        ||'--' }}
-                    </el-form-item>
-                    <el-form-item label="部件信息:" v-else>
-                        <div v-if="detail.Component && detail.Component.length">
-                            <p v-for="item in detail.Component?detail.Component:[]" :key="item.TaskId"
-                               show-overflow-tooltip>
-                                {{ item.EquipLocalName || item.EquipName }}
-                            </p>
-                        </div>
-                        <div v-else>--</div>
-                    </el-form-item>
-                    <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
-                        <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList"
-                             :key="item.Key">
-                            4 <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
-                                   style="width:100%;" :alt="item.Name">
-                        </div>
-                    </el-form-item>
-                    <el-form-item label="资产照片:" v-show="imgList && imgList.length">
-                        <div class="img-item">
-                            <div class="demo-image__preview">
-                                <el-image style="width:100%;" v-for="item in imgList"
-                                          :key="item.Key" :title="item.Name"
-                                          @click="nowUrl = item.Key"
-                                          :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}&width=400`"
-                                          :preview-src-list="srcList">
-                                </el-image>
-                            </div>
-                        </div>
-                    </el-form-item>
-                    <el-form-item label="现场视频:" v-show="videoList && videoList.length">
-                        <video controls style="width:100%;" v-for="item in videoList" :key="item.Key"
-                               :title="item.Name">
-                            <source :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
-                                    type="video/mp4">
-                            您的浏览器不支持 HTML5 video ,暂无法播放。
-                        </video>
-                    </el-form-item>
-                    <el-form-item label="备注信息:">{{ detail.Note || '--' }}</el-form-item>
-                </el-form>
+            <div v-else>--</div>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="implement-detail detail-item" v-if="detail.TaskState === '未找到'">
+        <el-form :model="detail" label-width="150px">
+          <el-form-item label="执行任务人:">{{ detail.WorkerName || '--' }}</el-form-item>
+          <el-form-item label="执行时间:">{{ detail.ProcessTime || '--' }}</el-form-item>
+          <el-form-item label="未找到对象信息"></el-form-item>
+          <el-form-item label="设备信息:" v-if="!detail.isComponent">{{ detail.EquipLocalName || detail.EquipName
+            ||'--' }}
+          </el-form-item>
+          <el-form-item label="部件信息:" v-else>
+            <div v-if="detail.Component && detail.Component.length">
+              <p v-for="item in detail.Component?detail.Component:[]" :key="item.TaskId"
+                 show-overflow-tooltip>
+                {{ item.EquipLocalName || item.EquipName }}
+              </p>
             </div>
-            <div class="operation-detail detail-item" v-if="detail.TaskState === '未找到'">
-                <el-form>
-                    <el-form-item label="操作信息:"></el-form-item>
-                    <div class="block">
-                        <el-timeline>
-                            <el-timeline-item
-                                placement="top"
-                                v-for="(item,index) in arr"
-                                :key="index"
-                                :timestamp="item.timestamp"
-                            >
-                                <el-card>
-                                    <small>{{item.content}}</small>
-                                    <p>{{item.title}}</p>
-                                    <img
-                                        v-for="isImg in item.imgs"
-                                        :key="isImg.Key"
-                                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.Key}`">
-
-                                    <video controls style="width:100%;" v-for="v in videoList" :key="index"
-                                           :title="v.Name">
-                                        <source
-                                            :src="`/image-service/common/image_get?systemId=dataPlatform&key=${v.Key}`"
-                                            type="video/mp4">
-                                        您的浏览器不支持 HTML5 video ,暂无法播放。
-                                    </video>
-                                </el-card>
-                            </el-timeline-item>
-                        </el-timeline>
-                    </div>
-                </el-form>
+            <div v-else>--</div>
+          </el-form-item>
+          <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
+            <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList"
+                 :key="item.Key">
+              4 <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
+                     style="width:100%;" :alt="item.Name">
+            </div>
+          </el-form-item>
+          <el-form-item label="资产照片:" v-show="imgList && imgList.length">
+            <div class="img-item">
+              <div class="demo-image__preview">
+                <el-image style="width:100%;" v-for="item in imgList"
+                          :key="item.Key" :title="item.Name"
+                          @click="nowUrl = item.Key"
+                          :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}&width=400`"
+                          :preview-src-list="srcList">
+                </el-image>
+              </div>
             </div>
-        </el-scrollbar>
-        <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
-            一张图
-        </el-dialog>
-    </div>
+          </el-form-item>
+          <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+            <video controls style="width:100%;" v-for="item in videoList" :key="item.Key"
+                   :title="item.Name">
+              <source :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
+                      type="video/mp4">
+              您的浏览器不支持 HTML5 video ,暂无法播放。
+            </video>
+          </el-form-item>
+          <el-form-item label="备注信息:">{{ detail.Note || '--' }}</el-form-item>
+        </el-form>
+      </div>
+      <div class="operation-detail detail-item" v-if="detail.TaskState === '未找到'">
+        <el-form>
+          <el-form-item label="操作信息:"></el-form-item>
+          <div class="block">
+            <el-timeline>
+              <el-timeline-item
+                  placement="top"
+                  v-for="(item,index) in arr"
+                  :key="index"
+                  :timestamp="item.timestamp"
+              >
+                <el-card>
+                  <small>{{item.content}}</small>
+                  <p>{{item.title}}</p>
+                  <img
+                      v-for="isImg in item.imgs"
+                      :key="isImg.Key"
+                      :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.Key}`">
+
+                  <video controls style="width:100%;" v-for="v in videoList" :key="index"
+                         :title="v.Name">
+                    <source
+                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${v.Key}`"
+                        type="video/mp4">
+                    您的浏览器不支持 HTML5 video ,暂无法播放。
+                  </video>
+                </el-card>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </el-form>
+      </div>
+    </el-scrollbar>
+    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
+      一张图
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import {mapGetters} from "vuex"
-
-    export default {
-        components: {},
-        created() {
-            let {ConfirmTime, PositivePhotoTime, QrCodeTime, NameplateTime, SidePhotoTime, VideoTime, EquipProblemTime, EquipProblem, TaskPicList} = this.detail;
-            let arr = []
-            QrCodeTime && arr.push({
-                timestamp: QrCodeTime,
-                time: new Date(QrCodeTime).getTime(),
-                content: '黏贴二维码',
-                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('带二维码的设备近景照片'))
-            })
-            PositivePhotoTime && arr.push({
-                timestamp: PositivePhotoTime,
-                time: new Date(PositivePhotoTime).getTime(),
-                content: '拍摄正面照片',
-                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('设备正面照片'))
-            })
-            NameplateTime && arr.push({
-                timestamp: NameplateTime,
-                time: new Date(NameplateTime).getTime(),
-                content: '拍摄铭牌照片',
-                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('铭牌照片'))
-            })
-            SidePhotoTime && arr.push({
-                timestamp: SidePhotoTime,
-                time: new Date(SidePhotoTime).getTime(),
-                content: '拍摄侧面照片',
-                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('设备左侧照片' || '设备右侧照片'))
-            })
-            VideoTime && arr.push({
-                timestamp: VideoTime,
-                time: new Date(VideoTime).getTime(),
-                content: '拍摄30s视频',
-                videoList: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('视频资料'))
-            })
-            EquipProblemTime && arr.push({
-                timestamp: EquipProblemTime,
-                time: new Date(EquipProblemTime).getTime(),
-                content: '记录设备问题',
-                title: EquipProblem
-            })
-            ConfirmTime && arr.push({
-                timestamp: ConfirmTime,
-                time: new Date(ConfirmTime).getTime(),
-                content: '确认信息',
-                title: '已确认的设备信息'
-            })
-            this.arr = arr.map(i => ({...i})).sort((a, b) => b.time - a.time)
-        },
-        computed: {
-            ...mapGetters("layout", ["projectId"]),
-            notFoundList() {
-                if (this.detail && this.detail.Component && this.detail.Component.length) {//是否存在部件
-                    let index = this.detail.Component.findIndex(item => {
-                        return item.TaskState == -1
-                    })
-                    if (index != -1) {//部件中存在未找到的对象
-                        this.detail.isComponent = true
-                        return this.detail.Component[index].TaskPicList ? this.detail.Component[index].TaskPicList : []
-                    } else {//部件全部找到
-                        this.detail.isComponent = false
-                        return this.detail.TaskPicList ? this.detail.TaskPicList : []
-                    }
-                } else {
-                    this.detail.isComponent = false
-                    if (this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length) {
-                        return this.detail.TaskPicList
-                    } else {
-                        return []
-                    }
-                }
-            },
-            panoramaList() {
-                if (this.notFoundList && this.notFoundList.length) {
-                    return this.notFoundList.filter(item => {
-                        return item.Type == 'panorama'
-                    })
-                } else {
-                    return []
-                }
-            },
-            imgList() {
-                if (this.notFoundList && this.notFoundList.length) {
-                    return this.notFoundList.filter(item => {
-                        return item.Type == 'image'
-                    })
-                } else {
-                    return []
-                }
-            },
-            videoList() {
-                if (this.notFoundList && this.notFoundList.length) {
-                    return this.notFoundList.filter(item => {
-                        return item.Type == 'video'
-                    })
-                } else {
-                    return []
-                }
-            },
-            srcList() {
-                let nowIndex = this.imgList.findIndex(item => {
-                    return item.Key == this.nowUrl
-                })
-                let index = nowIndex >= 1 ? nowIndex : 0;
-                let tempArr1 = this.imgList.slice(0, index);
-                let tempArr2 = this.imgList.slice(index, this.imgList.length);
+  import {mapGetters} from "vuex"
 
-                let res = tempArr2.concat(tempArr1).map(item => {
-                    return `/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`
-                });
-                return res;
-            }
-        },
-        props: {
-            detail: Object
-        },
-        data() {
-            return {
-                dialogVisible: false,//全景图弹出框
-                nowUrl: '',//当前正在显示的图
-                arr: [],
-            };
-        },
-        methods: {},
-        watch: {
-            'detail.TaskId'() {
-                console.log(this.detail)
-            }
+  export default {
+    components: {},
+    created() {
+      let {ConfirmTime, PositivePhotoTime, QrCodeTime, NameplateTime, SidePhotoTime, VideoTime, EquipProblemTime, EquipProblem, TaskPicList} = this.detail;
+      let arr = []
+      QrCodeTime && arr.push({
+        timestamp: QrCodeTime,
+        time: new Date(QrCodeTime).getTime(),
+        content: '黏贴二维码',
+        imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('带二维码的设备近景照片'))
+      })
+      PositivePhotoTime && arr.push({
+        timestamp: PositivePhotoTime,
+        time: new Date(PositivePhotoTime).getTime(),
+        content: '拍摄正面照片',
+        imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('设备正面照片'))
+      })
+      NameplateTime && arr.push({
+        timestamp: NameplateTime,
+        time: new Date(NameplateTime).getTime(),
+        content: '拍摄铭牌照片',
+        imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('铭牌照片'))
+      })
+      SidePhotoTime && arr.push({
+        timestamp: SidePhotoTime,
+        time: new Date(SidePhotoTime).getTime(),
+        content: '拍摄侧面照片',
+        imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('设备左侧照片' || '设备右侧照片'))
+      })
+      VideoTime && arr.push({
+        timestamp: VideoTime,
+        time: new Date(VideoTime).getTime(),
+        content: '拍摄30s视频',
+        videoList: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('视频资料'))
+      })
+      EquipProblemTime && arr.push({
+        timestamp: EquipProblemTime,
+        time: new Date(EquipProblemTime).getTime(),
+        content: '记录设备问题',
+        title: EquipProblem
+      })
+      ConfirmTime && arr.push({
+        timestamp: ConfirmTime,
+        time: new Date(ConfirmTime).getTime(),
+        content: '确认信息',
+        title: '已确认的设备信息'
+      })
+      this.arr = arr.map(i => ({...i})).sort((a, b) => b.time - a.time)
+    },
+    computed: {
+      ...mapGetters("layout", ["projectId"]),
+      notFoundList() {
+        if (this.detail && this.detail.Component && this.detail.Component.length) {//是否存在部件
+          let index = this.detail.Component.findIndex(item => {
+            return item.TaskState == -1
+          })
+          if (index != -1) {//部件中存在未找到的对象
+            this.detail.isComponent = true
+            return this.detail.Component[index].TaskPicList ? this.detail.Component[index].TaskPicList : []
+          } else {//部件全部找到
+            this.detail.isComponent = false
+            return this.detail.TaskPicList ? this.detail.TaskPicList : []
+          }
+        } else {
+          this.detail.isComponent = false
+          if (this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length) {
+            return this.detail.TaskPicList
+          } else {
+            return []
+          }
+        }
+      },
+      panoramaList() {
+        if (this.notFoundList && this.notFoundList.length) {
+          return this.notFoundList.filter(item => {
+            return item.Type == 'panorama'
+          })
+        } else {
+          return []
+        }
+      },
+      imgList() {
+        if (this.notFoundList && this.notFoundList.length) {
+          return this.notFoundList.filter(item => {
+            return item.Type == 'image'
+          })
+        } else {
+          return []
+        }
+      },
+      videoList() {
+        if (this.notFoundList && this.notFoundList.length) {
+          return this.notFoundList.filter(item => {
+            return item.Type == 'video'
+          })
+        } else {
+          return []
         }
-    };
+      },
+      srcList() {
+        let nowIndex = this.imgList.findIndex(item => {
+          return item.Key == this.nowUrl
+        })
+        let index = nowIndex >= 1 ? nowIndex : 0;
+        let tempArr1 = this.imgList.slice(0, index);
+        let tempArr2 = this.imgList.slice(index, this.imgList.length);
+
+        let res = tempArr2.concat(tempArr1).map(item => {
+          return `/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`
+        });
+        return res;
+      }
+    },
+    props: {
+      detail: Object
+    },
+    data() {
+      return {
+        dialogVisible: false,//全景图弹出框
+        nowUrl: '',//当前正在显示的图
+        arr: [],
+      };
+    },
+    methods: {},
+    watch: {
+      'detail.TaskId'() {
+        console.log(this.detail)
+      }
+    }
+  };
 </script>
 <style lang="less" scoped>
-    .detail-box {
-        width: 100%;
-        height: 100%;
-        box-sizing: border-box;
+  .detail-box {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
 
-        /deep/ .el-scrollbar__wrap {
-            overflow-x: hidden;
-        }
+    /deep/ .el-scrollbar__wrap {
+      overflow-x: hidden;
+    }
 
-        /deep/ .el-icon-circle-close {
-            color: white;
-        }
+    /deep/ .el-icon-circle-close {
+      color: white;
+    }
 
-        /deep/ .el-form-item__content {
-            text-overflow: ellipsis;
-            overflow: hidden;
-        }
+    /deep/ .el-form-item__content {
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
 
-        .detail-item {
-            width: calc(100% - 30px);
-            margin: 15px 15px 10px;
-            padding: 10px;
-            box-sizing: border-box;
-            border-left: 1px solid #eee;
-            box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
-        }
+    .detail-item {
+      width: calc(100% - 30px);
+      margin: 15px 15px 10px;
+      padding: 10px;
+      box-sizing: border-box;
+      border-left: 1px solid #eee;
+      box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+    }
 
-        .img-item {
-            position: relative;
-            cursor: pointer;
-        }
-}
+    .img-item {
+      position: relative;
+      cursor: pointer;
+    }
+  }
 </style>

+ 325 - 319
src/components/relation/overview/CardList.vue

@@ -1,359 +1,365 @@
 <template>
-    <div>
-        <div
-            :key="index"
-            v-for="(item,index) in content"
-        >
-            <p class="slave-relation-title">{{item.GraphTypeName}}</p>
-            <section
-                :key="child.GraphTypeId"
-                class="container"
-                v-for="(child,childIndex) in item.ChildGraphicTypeList"
+  <div>
+    <div
+        :key="index"
+        v-for="(item,index) in content"
+    >
+      <p class="slave-relation-title">{{item.GraphTypeName}}</p>
+      <section
+          :key="child.GraphTypeId"
+          class="container"
+          v-for="(child,childIndex) in item.ChildGraphicTypeList"
+      >
+        <p class="relation-text">
+          {{child.GraphTypeName}}
+          <span class="pic-code">图类型编码:{{child.GraphTypeCode}}</span>
+          <el-tooltip
+              :content="child.Note"
+              placement="top">
+            <i
+                @click="explain"
+                class="icon-shuoming iconfont"
+            />
+          </el-tooltip>
+        </p>
+
+        <el-row :gutter="24">
+          <el-col
+              :key="relation.Id"
+              :span="8"
+              v-for="(relation,relIndex) in child.RelationTypeProjectList"
+          >
+            <el-card
+                class="card"
+                shadow="hover"
+                style="position: relative;"
             >
-                <p class="relation-text">
-                    {{child.GraphTypeName}}
-                    <span class="pic-code">图类型编码:{{child.GraphTypeCode}}</span>
-                    <el-tooltip
-                        :content="child.Note"
-                        placement="top">
-                        <i
-                            @click="explain"
-                            class="icon-shuoming iconfont"
-                        />
-                    </el-tooltip>
-                </p>
+              <!-- border:none-->
+              <!--<div class="mask"></div>-->
+              <p class="relation-title">
+                {{relation.RelationTypeName}}
+                <span class="asc">边类型编码:{{relation.RelationTypeCode}}</span>
+                <el-tooltip
+                    :content="relation.Note"
+                    placement="top"
+                    style="z-index: 3;position:relative;"
+                >
+                  <i class="iconfont icon-warn icon"/>
+                </el-tooltip>
+              </p>
+              <article>
+                <el-col
+                    :span="13"
+                    class="main-object "
+                >
+                  <p class="object">主要连接对象</p>
+                  <p class="group">{{relation.ConneObject}}</p>
+                </el-col>
+                <el-col
+                    :span="1"
+                    class="main-object ">&nbsp;
+                </el-col>
+                <el-col
+                    :span="10"
+                    class="main-object"
+                >
+                  <p class="line-number">连接数量</p>
+                  <p class="line-number">{{relation.count}}</p>
+                </el-col>
+              </article>
+              <p class="last-computed">
+                <span v-show="relation.ComputationalState === 3 || relation.ComputationalState === 4">关系计算中...</span>
+                <span v-show="relation.ComputationalState === 5">计算失败</span>
+                <span v-show="relation.ComputingTime">最后一次计算时间 {{relation.ComputingTime}}</span>
+                <el-tooltip
+                    content="启动计算"
+                    placement="top"
+                >
+                  <el-badge
+                      class="item float-right"
+                      :is-dot="relation.ComputationalState === 2"
+                  >
+                    <el-button
+                        @click="computed(relation)"
+                        :disabled="!relation.IsSource && !relation.IsAutomatic"
+                        circle
+                        type="primary"
+                        plain
+                        icon="iconfont icon-changyongtubiao-mianxing-"
 
-                <el-row :gutter="24">
-                    <el-col
-                        :key="relation.Id"
-                        :span="8"
-                        v-for="(relation,relIndex) in child.RelationTypeProjectList"
                     >
-                        <el-card
-                            class="card"
-                            shadow="hover"
-                            style="position: relative;"
-                        >
-                            <!-- border:none-->
-                            <!--<div class="mask"></div>-->
-                            <p class="relation-title">
-                                {{relation.RelationTypeName}}
-                                <span class="asc">边类型编码:{{relation.RelationTypeCode}}</span>
-                                <el-tooltip
-                                    :content="relation.Note"
-                                    placement="top"
-                                    style="z-index: 3;position:relative;"
-                                >
-                                    <i class="iconfont icon-warn icon"/>
-                                </el-tooltip>
-                            </p>
-                            <article>
-                                <el-col
-                                    :span="13"
-                                    class="main-object "
-                                >
-                                    <p class="object">主要连接对象</p>
-                                    <p class="group">{{relation.ConneObject}}</p>
-                                </el-col>
-                                <el-col
-                                    :span="1"
-                                    class="main-object ">&nbsp;
-                                </el-col>
-                                <el-col
-                                    :span="10"
-                                    class="main-object"
-                                >
-                                    <p class="line-number">连接数量</p>
-                                    <p class="line-number">{{relation.count}}</p>
-                                </el-col>
-                            </article>
-                            <p class="last-computed">
-                                <span v-show="relation.ComputationalState === 3 || relation.ComputationalState === 4">关系计算中...</span>
-                                <span v-show="relation.ComputationalState === 5">计算失败</span>
-                                <span v-show="relation.ComputingTime">最后一次计算时间 {{relation.ComputingTime}}</span>
-                                <el-tooltip
-                                    content="启动计算"
-                                    placement="top"
-                                >
-                                    <el-badge
-                                        class="item float-right"
-                                        :is-dot="relation.ComputationalState === 2"
-                                    >
-                                        <el-button
-                                            @click="computed(relation)"
-                                            circle
-                                            type="primary"
-                                            plain
-                                            icon="iconfont icon-changyongtubiao-mianxing-"
-
-                                        >
-                                            <!--style="background: #000;color: #fff"-->
-                                        </el-button>
-                                    </el-badge>
-                                </el-tooltip>
-                                <el-tooltip
-                                    content="手动编辑"
-                                    placement="top"
-                                >
-                                    <el-button
-                                        :disabled="relation.Manual === 1"
-                                        :style="{'border':(relation.Manual=== 1? '1px solid #DCDFE6' :'')}"
-                                        @click="manual(relation)"
-                                        circle
-                                        class="float-right"
-                                        type="primary"
-                                        plain
-                                        icon="iconfont icon-bianji"
-                                    >
-                                    </el-button>
+                      <!--style="background: #000;color: #fff"-->
+                    </el-button>
+                  </el-badge>
+                </el-tooltip>
+                <el-tooltip
+                    content="手动编辑"
+                    placement="top"
+                >
+                  <el-button
+                      :disabled="relation.Manual === 1"
+                      :style="{'border':(relation.Manual=== 1? '1px solid #DCDFE6' :'')}"
+                      @click="manual(relation)"
+                      circle
+                      class="float-right"
+                      type="primary"
+                      plain
+                      icon="iconfont icon-bianji"
+                  >
+                  </el-button>
 
-                                </el-tooltip>
-                                <el-tooltip
-                                    content="设定设备对象源/末端"
-                                    placement="top"
-                                    v-if="relation.IsSource"
-                                >
-                                    <el-button
-                                        @click="equipment"
-                                        type="primary"
-                                        plain
-                                        circle
-                                        class="float-right"
-                                        icon="iconfont icon-23 "
-                                        style="transform: rotate(90deg);"
-                                    >
-                                    </el-button>
-                                </el-tooltip>
-                            </p>
-                        </el-card>
-                    </el-col>
-                </el-row>
-            </section>
-        </div>
-        <RelationMaintain
-            :values="values"
-            :source="source"
-            ref="maintain"
-            :isComputed="isComputed"
-            :TableVisibleMoreLoading="TableVisibleMoreLoading"
-            @template="templateDown"
-            @openComputed="openComputed"
-        />
+                </el-tooltip>
+                <el-tooltip
+                    content="设定设备对象源/末端"
+                    placement="top"
+                    v-if="relation.IsSource"
+                >
+                  <el-button
+                      @click="equipment"
+                      type="primary"
+                      plain
+                      circle
+                      class="float-right"
+                      icon="iconfont icon-23 "
+                      style="transform: rotate(90deg);"
+                  >
+                  </el-button>
+                </el-tooltip>
+              </p>
+            </el-card>
+          </el-col>
+        </el-row>
+      </section>
     </div>
+    <RelationMaintain
+        :values="values"
+        :source="source"
+        ref="maintain"
+        :isComputed="isComputed"
+        :TableVisibleMoreLoading="TableVisibleMoreLoading"
+        @template="templateDown"
+        @openComputed="openComputed"
+        @CalcUrl="CalcUrl"
+    />
+  </div>
 
 </template>
 
 <script>
-    import RelationMaintain from './Modal/RelationMaintain'
+  import RelationMaintain from './Modal/RelationMaintain'
 
-    export default {
-        name: "cardList",
-        props: {
-            content: Array,
-            source: Array,
-            TableVisibleMoreLoading: Boolean
+  export default {
+    name: "cardList",
+    props: {
+      content: Array,
+      source: Array,
+      TableVisibleMoreLoading: Boolean
+    },
+    data() {
+      return {
+        values: {
+          title: '关系维护',
+          cancel: '取消',
+          confirm: '确定',
+          back: '返回',
+          promptly: '立即计算',
+          placeholder: '请选择',
+          download: '下载模板(含数据)',
+          done: '完成',
+          underDesign: '高级配置页面正在设计中。。。',
+          autoComputed: '根据现有数据自动计算',
+          existComputed: '根据现有数据自动计算',
+          existTitle: '计算方向使用的源端和末端如下:',
+          originEquipment: '源端设备类:',
+          endEquipment: '末端设备类:',
+          device: '', //提示引导内容
+          tips: '', //请前往以下功能页面维护
+          optionTips: '', //请下载最新最新 xxxx 数据进行手动维护
+          currentNum: '当前关系数量:',
+          lastTime: '', //最后更新时间为
+          uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
+          uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
+          inHand: '数据文件处理中...',
+          dataFailed: '数据文件验证失败',
+          allUpdateSuccess: 'xxxx全部更新成功',
+          portionUpdateSuccess: ' xxxx关系部分更新成功',
+          downloadFile: ' 下载报告文件'
         },
-        data() {
-            return {
-                values: {
-                    title: '关系维护',
-                    cancel: '取消',
-                    confirm: '确定',
-                    back: '返回',
-                    promptly: '立即计算',
-                    placeholder: '请选择',
-                    download: '下载模板(含数据)',
-                    done: '完成',
-                    underDesign: '高级配置页面正在设计中。。。',
-                    autoComputed: '根据现有数据自动计算',
-                    existComputed: '根据现有数据自动计算',
-                    existTitle: '计算方向使用的源端和末端如下:',
-                    originEquipment: '源端设备类:',
-                    endEquipment: '末端设备类:',
-                    device: '', //提示引导内容
-                    tips: '', //请前往以下功能页面维护
-                    optionTips: '', //请下载最新最新 xxxx 数据进行手动维护
-                    currentNum: '当前关系数量:',
-                    lastTime: '', //最后更新时间为
-                    uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
-                    uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
-                    inHand: '数据文件处理中...',
-                    dataFailed: '数据文件验证失败',
-                    allUpdateSuccess: 'xxxx全部更新成功',
-                    portionUpdateSuccess: ' xxxx关系部分更新成功',
-                    downloadFile: ' 下载报告文件'
-                },
-                isComputed: {}, // 当前要计算的对象
-            }
-        },
-        computed: {},
+        isComputed: {}, // 当前要计算的对象
+      }
+    },
+    computed: {},
 
-        methods: {
-            explain() {
-                // alert('explain click')
-            },
-            computed(relation) {
-                this.isComputed = relation // 当前要计算的对象
-                this.$emit('calcSpecial', relation)
-                if (relation.IsSource) { //提示引导
-                    this.values.autoComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
-                    this.$refs.maintain.dialogTableVisible = true
-                } else {
-                    this.values.existComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
-                    this.$refs.maintain.dialogTableVisibleMore = true
+    methods: {
+      explain() {
+        // alert('explain click')
+      },
+      CalcUrl() {
+        this.$emit('CalcUrl',this.isComputed.CalcUrl, this.isComputed.ZoneTime)
 
-                }
-            },
-            equipment() {
-                this.$refs.maintain.dialogEquipment = true
-            },
-            manual(relation) {
-                let {Manual, Prompting, RelationTypeName, ComputingTime} = relation;
-                let device = Prompting && Prompting.split(','),
-                    tips= `请前往以下功能页面维护 <${RelationTypeName}>`,
-                    optionTips= `请下载最新最新 <${RelationTypeName}> 数据进行手动维护`,
-                    lastTime=`最后更新时间为 ${ComputingTime ? ComputingTime : ''}`
+      },
+      computed(relation) {
+        this.isComputed = relation // 当前要计算的对象
+        this.$emit('calcSpecial', relation)
+        if (relation.IsSource) { //提示引导
+          this.values.existComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
+          this.$refs.maintain.dialogTableVisibleMore = true
+        } else {
+          this.values.autoComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
+          this.$refs.maintain.dialogTableVisible = true
 
-                if (Manual === 2) {
-                    this.values={...this.values,device,tips}
-                    this.$refs.maintain.dialogManualTip = true
-                    }
-                if (Manual === 3) {
-                    this.values={...this.values,optionTips,lastTime}
-                    this.$refs.maintain.dialogManualOption = true
-                    }
-            },
-            templateDown() { //下载模板
-                this.$emit('template')
-            },
-            openComputed(result) {
-                this.$emit('openComputed', result)
-            }
-        },
-        components: {RelationMaintain}
-    }
+        }
+      },
+      equipment() {
+        this.$refs.maintain.dialogEquipment = true
+      },
+      manual(relation) {
+        let {Manual, Prompting, RelationTypeName, ComputingTime} = relation;
+        let device = Prompting && Prompting.split(','),
+          tips= `请前往以下功能页面维护 <${RelationTypeName}>`,
+          optionTips= `请下载最新最新 <${RelationTypeName}> 数据进行手动维护`,
+          lastTime=`最后更新时间为 ${ComputingTime ? ComputingTime : ''}`
+
+        if (Manual === 2) {
+          this.values={...this.values,device,tips}
+          this.$refs.maintain.dialogManualTip = true
+        }
+        if (Manual === 3) {
+          this.values={...this.values,optionTips,lastTime}
+          this.$refs.maintain.dialogManualOption = true
+        }
+      },
+      templateDown() { //下载模板
+        this.$emit('template')
+      },
+      openComputed(result) {
+        this.$emit('openComputed', result)
+      }
+    },
+    components: {RelationMaintain}
+  }
 </script>
 
 <style lang="less" scoped>
-    @color-text: #333;
-    @font-big: 600;
-    @font-small: 12px;
-    @font-code: #AAAAAA;
-    @pos-relative: relative;
-    @pos-absolute: absolute;
-    @pos-zero: 0;
-    @5px: 5px;
-    .slave-relation-title {
-        color: @font-code;
-        font-weight: 600;
-        border-bottom: 1px dashed @font-code;
-        padding-bottom: @5px;
-    }
+  @color-text: #333;
+  @font-big: 600;
+  @font-small: 12px;
+  @font-code: #AAAAAA;
+  @pos-relative: relative;
+  @pos-absolute: absolute;
+  @pos-zero: 0;
+  @5px: 5px;
+  .slave-relation-title {
+    color: @font-code;
+    font-weight: 600;
+    border-bottom: 1px dashed @font-code;
+    padding-bottom: @5px;
+  }
 
-    .container {
-        .el-card {
-            /*border: 1px solid #000;*/
-            margin: 10px 0;
-        }
+  .container {
+    .el-card {
+      /*border: 1px solid #000;*/
+      margin: 10px 0;
+    }
 
-        /*.el-button {*/
-        /*    border: 1px solid #000;*/
-        /*}*/
+    /*.el-button {*/
+    /*    border: 1px solid #000;*/
+    /*}*/
 
-        .relation-text {
-            overflow: hidden;
-            margin-top: 10px;
-            color: @color-text;
-            border-left: 8px solid @color-text;
-            text-indent: 10px;
-            font-weight: @font-big;
+    .relation-text {
+      overflow: hidden;
+      margin-top: 10px;
+      color: @color-text;
+      border-left: 8px solid @color-text;
+      text-indent: 10px;
+      font-weight: @font-big;
 
-            .pic-code {
-                font-size: @font-small;
-                color: @font-code;
-                margin-left: @5px;
-                font-weight: 400;
-            }
-        }
+      .pic-code {
+        font-size: @font-small;
+        color: @font-code;
+        margin-left: @5px;
+        font-weight: 400;
+      }
+    }
 
-        .card {
-            position: @pos-relative;
+    .card {
+      position: @pos-relative;
 
-            .mask {
-                background: rgba(255, 255, 255, .6);
-                position: @pos-absolute;
-                top: @pos-zero;
-                left: @pos-zero;
-                right: @pos-zero;
-                bottom: @pos-zero;
-                user-select: none;
-                z-index: 2
-            }
-        }
+      .mask {
+        background: rgba(255, 255, 255, .6);
+        position: @pos-absolute;
+        top: @pos-zero;
+        left: @pos-zero;
+        right: @pos-zero;
+        bottom: @pos-zero;
+        user-select: none;
+        z-index: 2
+      }
+    }
 
-        .relation-title {
-            font-size: 20px;
-            font-weight: @font-big;
+    .relation-title {
+      font-size: 20px;
+      font-weight: @font-big;
 
-            .asc {
-                font-size: @font-small;
-                color: @font-code;
-            }
+      .asc {
+        font-size: @font-small;
+        color: @font-code;
+      }
 
-            .icon {
-                display: block;
-                float: right;
-                color: #555;
-                font-size: 18px;
-            }
-        }
+      .icon {
+        display: block;
+        float: right;
+        color: #555;
+        font-size: 18px;
+      }
+    }
 
-        .main-object {
-            margin: 15px 0;
-            padding-left: 0 !important;
+    .main-object {
+      margin: 15px 0;
+      padding-left: 0 !important;
 
-            &:nth-child(even) {
-                border-left: 1px solid @font-code;
-                margin-top: 27px;
-            }
+      &:nth-child(even) {
+        border-left: 1px solid @font-code;
+        margin-top: 27px;
+      }
 
-            .object {
-                font-size: @font-small;
-                color: @font-code;
-                font-weight: @font-big;
-            }
+      .object {
+        font-size: @font-small;
+        color: @font-code;
+        font-weight: @font-big;
+      }
 
-            .group {
-                color: @color-text;
-                font-weight: @font-big;
-            }
+      .group {
+        color: @color-text;
+        font-weight: @font-big;
+      }
 
-            .line-number {
-                font-size: @font-small;
-                color: @font-code;
-                font-weight: @font-big;
-            }
-        }
+      .line-number {
+        font-size: @font-small;
+        color: @font-code;
+        font-weight: @font-big;
+      }
+    }
 
 
-        article {
-            overflow: hidden;
-        }
+    article {
+      overflow: hidden;
+    }
 
-        .last-computed {
-            overflow: hidden;
-            color: @font-code;
+    .last-computed {
+      overflow: hidden;
+      color: @font-code;
 
-            .float-right {
-                float: right;
-                margin-left: @5px;
-            }
+      .float-right {
+        float: right;
+        margin-left: @5px;
+      }
 
-            /deep/ .is-dot {
-                margin-top: 7px;
-                margin-right: @5px;
-            }
+      /deep/ .is-dot {
+        margin-top: 7px;
+        margin-right: @5px;
+      }
 
-        }
     }
+  }
 </style>

+ 382 - 366
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -1,397 +1,413 @@
 <template>
-    <div class="relation-maintain">
-        <!--计算无需配置源末端的关系时提示-->
-        <el-dialog
-            :title="values.title"
-            :visible.sync="dialogTableVisible"
+  <div class="relation-maintain">
+    <!--计算无需配置源末端的关系时提示-->
+    <el-dialog
+        :title="values.title"
+        :visible.sync="dialogTableVisible"
+    >
+      <span class="font-big">{{values.autoComputed}}</span>
+      <footer
+          slot="footer"
+          class="dialog-footer "
+      >
+        <el-button @click="dialogTableVisible = false">{{values.cancel}}</el-button>
+        <el-button
+            type="primary"
+            @click="promptly"
+        >{{values.promptly}}
+        </el-button>
+      </footer>
+    </el-dialog>
+    <!-- 计算需配置源末端的关系且已配置时提示-->
+    <el-dialog
+        :title="values.title"
+        :visible.sync="dialogTableVisibleMore"
+    >
+      <div
+          v-loading="TableVisibleMoreLoading"
+          style="overflow:hidden"
+      >
+        <p class="font-big">{{values.existComputed}}</p>
+        <p class="exist-title">{{values.existTitle}}</p>
+        <el-row :span="24">
+          <el-col :span="8">
+            <span class="demonstration">{{values.originEquipment}}</span>
+            <el-cascader
+                :options="newOptions"
+                :key="isResouceShow"
+                v-model="ops"
+                :props="props"
+                @change="sourceOptions"
+                collapse-tags
+                clearable
+            />
+          </el-col>
+          <el-col :span="8">
+            <span class="demonstration">{{values.endEquipment}}</span>
+            <!--                                                    v-model="filterOps"
+            -->
+            <el-cascader
+                :options="disOptions"
+                :props="props"
+                collapse-tags
+                clearable
+            />
+          </el-col>
+        </el-row>
+        <footer
+            slot="footer"
+            class="dialog-footer "
+            style="float: right"
         >
-            <span class="font-big">{{values.autoComputed}}</span>
-            <footer
-                slot="footer"
-                class="dialog-footer "
+          <el-button @click="dialogTableVisibleMore = false">{{values.cancel}}</el-button>
+          <el-button
+              type="primary"
+              @click="computedUpdate"
+          >{{values.promptly}}
+          </el-button>
+        </footer>
+      </div>
+    </el-dialog>
+    <!--设定设备对象源/末端-->
+    <el-dialog
+        :title="values.title"
+        :visible.sync="dialogEquipment"
+    >
+      <span class="font-big">{{values.underDesign}}</span>
+      <footer
+          slot="footer"
+          class="dialog-footer"
+      >
+        <el-button
+            type="primary"
+            @click="dialogEquipment = false"
+        >{{values.confirm}}
+        </el-button>
+      </footer>
+    </el-dialog>
+    <!--手动编辑:提示引导-->
+    <el-dialog
+        :title="values.title"
+        :visible.sync="dialogManualTip"
+    >
+      <p class="font-big">{{values.tips}}</p>
+      <p
+          class="font-big"
+          v-for="item in values.device"
+      >{{item}}</p>
+      <footer
+          slot="footer"
+          class="dialog-footer "
+      >
+        <el-button @click="dialogManualTip = false">{{values.confirm}}
+        </el-button>
+      </footer>
+    </el-dialog>
+    <!--手动编辑:手动维护-->
+    <el-dialog
+        :title="values.title"
+        :visible.sync="dialogManualOption"
+    >
+      <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
+          </p>
+          <a href="/api/datacenter/graphic/template-downloads">
+            <el-button
+                type="primary"
+                class="mt-10"
             >
-                <el-button @click="dialogTableVisible = false">{{values.cancel}}</el-button>
-                <el-button
-                    type="primary"
-                    @click="promptly"
-                >{{values.promptly}}
-                </el-button>
-            </footer>
-        </el-dialog>
-        <!-- 计算需配置源末端的关系且已配置时提示-->
-        <el-dialog
-            :title="values.title"
-            :visible.sync="dialogTableVisibleMore"
-        >
-            <div
-                v-loading="TableVisibleMoreLoading"
-                style="overflow:hidden"
-            >
-                <p class="font-big">{{values.existComputed}}</p>
-                <p class="exist-title">{{values.existTitle}}</p>
-                <el-row :span="24">
-                    <el-col :span="8">
-                        <span class="demonstration">{{values.originEquipment}}</span>
-                        <el-cascader
-                            :options="newOptions"
-                            :key="isResouceShow"
-                            v-model="ops"
-                            :props="props"
-                            @change="sourceOptions"
-                            collapse-tags
-                            clearable
-                        />
-                    </el-col>
-                    <el-col :span="8">
-                        <span class="demonstration">{{values.endEquipment}}</span>
-<!--                                                    v-model="filterOps"
--->
-                        <el-cascader
-                            :options="disOptions"
-                            :props="props"
-                            collapse-tags
-                            clearable
-                        />
-                    </el-col>
-                </el-row>
-                <footer
-                    slot="footer"
-                    class="dialog-footer "
-                    style="float: right"
-                >
-                    <el-button @click="dialogTableVisibleMore = false">{{values.cancel}}</el-button>
-                    <el-button
-                        type="primary"
-                        @click="computedUpdate"
-                    >{{values.promptly}}
-                    </el-button>
-                </footer>
-            </div>
-        </el-dialog>
-        <!--设定设备对象源/末端-->
-        <el-dialog
-            :title="values.title"
-            :visible.sync="dialogEquipment"
-        >
-            <span class="font-big">{{values.underDesign}}</span>
-            <footer
-                slot="footer"
-                class="dialog-footer"
-            >
-                <el-button
-                    type="primary"
-                    @click="dialogEquipment = false"
-                >{{values.confirm}}
-                </el-button>
-            </footer>
-        </el-dialog>
-        <!--手动编辑:提示引导-->
-        <el-dialog
-            :title="values.title"
-            :visible.sync="dialogManualTip"
-        >
-            <p class="font-big">{{values.tips}}</p>
-            <p
-                class="font-big"
-                v-for="item in values.device"
-            >{{item}}</p>
-            <footer
-                slot="footer"
-                class="dialog-footer "
-            >
-                <el-button @click="dialogManualTip = false">{{values.confirm}}
-                </el-button>
-            </footer>
-        </el-dialog>
-        <!--手动编辑:手动维护-->
-        <el-dialog
-            :title="values.title"
-            :visible.sync="dialogManualOption"
-        >
-            <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
-                    </p>
-                    <a href="/api/datacenter/graphic/template-downloads">
-                    <el-button
-                        type="primary"
-                        class="mt-10"
-                    >
-                        {{values.download}}
-                    </el-button>
-                    </a>
-                </el-col>
-                <el-col :span="10">
-                    {{values.lastTime}}
-                </el-col>
-            </el-row>
-            <el-upload
-                class="upload-demo"
-                drag
-                action="/api/datacenter/graphic/import"
-                multiple
-                name="fileName"
-                :before-upload="beforeUpload"
-                :on-progress="progress"
-                :on-success="success"
-                :on-error="error"
-            >
-                <i class="el-icon-upload"/>
-                <div
-                    class="el-upload__text"
-                    v-html="values.uploadTxt"
-                />
-                <div class="upload__tip danger" slot="tip">{{ values.uploadTips}}</div>
-            </el-upload>
-        </el-dialog>
-        <!--手动编辑:手动维护.process结束-->
-        <el-dialog
-            :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"
-                    >
-                        {{activity.content}}
-                    </el-timeline-item>
-                </el-timeline>
-            </div>
-<!--            下载报告-->
-            <a href="/api/datacenter//graphic/report-downloads">
-                <el-button>{{values.downloadFile}}</el-button>
-            </a>
-            <footer
-                slot="footer"
-                class="dialog-footer "
-            >
-                <el-button @click="errBack">{{values.back}}</el-button>
-                <el-button
-                    type="primary"
-                    @click="finish"
-                >{{values.done}}
-                </el-button>
-            </footer>
-        </el-dialog>
-    </div>
+              {{values.download}}
+            </el-button>
+          </a>
+        </el-col>
+        <el-col :span="10">
+          {{values.lastTime}}
+        </el-col>
+      </el-row>
+      <el-upload
+          class="upload-demo"
+          drag
+          action="/api/datacenter/graphic/import"
+          multiple
+          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"
+        />
+        <div class="upload__tip danger" slot="tip">{{ values.uploadTips}}</div>
+      </el-upload>
+    </el-dialog>
+    <!--手动编辑:手动维护.process结束-->
+    <el-dialog
+        :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"
+          >
+            {{activity.content}}
+          </el-timeline-item>
+        </el-timeline>
+      </div>
+      <!--            下载报告-->
+      <a href="/api/datacenter//graphic/report-downloads">
+        <el-button>{{values.downloadFile}}</el-button>
+      </a>
+      <footer
+          slot="footer"
+          class="dialog-footer "
+      >
+        <el-button @click="errBack">{{values.back}}</el-button>
+        <el-button
+            type="primary"
+            @click="finish"
+        >{{values.done}}
+        </el-button>
+      </footer>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+  import {mapGetters} from 'vuex'
+  import storage from '@/framework/utils/storage'
 
-    export default {
-        name: "RelationMaintain",
-        props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading'],
-        created() {
+  export default {
+    name: "RelationMaintain",
+    props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading'],
+    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',
+    },
+    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: [],//获取后台数据,重新组合,添加唯一标识和源端标识
-                isResouceShow: 0,
-                result: [],//最终传给后台的数据
-                ops: [],//第一个选择器model
-                filterOps: [],//为清空第二个选择器
-            }
-        },
-        computed:{
-            fileHeaders() {
-                return  {'Content-Type': 'multipart/form-data'}
-            },
-            newOptions() {
-                ++this.isResouceShow
-                let allList = []
-                this.deepCopy(this.source).forEach(item => allList.push(...item.Items))
-                this.list = allList.map((item, index) => {
-                    item = {
-                        ...item,
-                        lId: index
-                    }
-                    item.Items.map(i => {
-                        i.lId = i.Id + i.BlockId //添加唯一标识
-                        i.Source = true //判断源末端
-                        return i
-                    })
-                    return item
-                })
-                this.ops = this.list
-                return this.list
-            },
-            //    末端数据添加disabled
-            disOptions() {
-                let arr = this.deepCopy(this.list).map(item => {
-                    item.Items.map(i => {
-                        if (this.idArr.includes(i.lId)) {
-                            i.disabled = true
-                        }
-                        return i
-                    })
-                    return item
-                })
-                this.filterOps = arr
-                return arr
+        }, // 级联
+        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: [],//获取后台数据,重新组合,添加唯一标识和源端标识
+        isResouceShow: 0,
+        result: [],//最终传给后台的数据
+        ops: [],//第一个选择器model
+        filterOps: [],//为清空第二个选择器
+      }
+    },
+    computed:{
+      ...mapGetters('layout', ['projectId']),
+      fileHeaders() {
+        return  {'Content-Type': 'multipart/form-data'}
+      },
+      headers() {
+        return {
+          'ProjectId': this.projectId,
+          'Comming': 'adm' ,
+          'Account': storage.get("user_name")
+        }
+      },
+      dataId() {
+        return {
+          projectId:this.projectId
+        }
+      },
+      newOptions() {
+        ++this.isResouceShow
+        let allList = []
+        this.deepCopy(this.source).forEach(item => allList.push(...item.Items))
+        this.list = allList.map((item, index) => {
+          item = {
+            ...item,
+            lId: index
+          }
+          item.Items.map(i => {
+            i.lId = i.Id + i.BlockId //添加唯一标识
+            i.Source = true //判断源末端
+            return i
+          })
+          return item
+        })
+        this.ops = this.list
+        return this.list
+      },
+      //    末端数据添加disabled
+      disOptions() {
+        let arr = this.deepCopy(this.list).map(item => {
+          item.Items.map(i => {
+            if (this.idArr.includes(i.lId)) {
+              i.disabled = true
             }
+            return i
+          })
+          return item
+        })
+        this.filterOps = arr
+        return arr
+      }
 
-        },
-        methods: {
-            deepCopy(obj) {
-                return JSON.parse(JSON.stringify(obj))
-            },
-            progress(event, file, fileList) {
-                // console.log(event.file, fileList)
-            },
-            success(event, file, fileList) {
-                this.dialogManualOption = true
-                this.dialogProcess = true
-                console.log(event.file, fileList,' file success')
+    },
+    methods: {
+      deepCopy(obj) {
+        return JSON.parse(JSON.stringify(obj))
+      },
+      progress(event, file, fileList) {
+        // console.log(event.file, fileList)
+      },
+      success(event, file, fileList) {
+        this.dialogManualOption = true
+        this.dialogProcess = true
+        console.log(event,file, fileList,' file success')
 
-            },
-            error(event, file, fileList) {
-                this.dialogManualOption = true
-                this.dialogProcess = true
-                console.log(event.file, fileList)
+      },
+      error(event, file, fileList) {
+        this.dialogManualOption = true
+        this.dialogProcess = true
+        console.log(event,file, fileList)
 
-            },
-            errBack() {
-                this.dialogProcess = false
-            },
-            finish() {
-                this.dialogProcess = false
-                this.dialogManualOption = false
-            },
-            templateDownload() {
-                this.$emit('template')
-            },
-            promptly() {
-                console.log(this.isComputed, 'child isComputed')
-                this.dialogTableVisible = false
-            },
-            sourceOptions(val) {
-                //把所有id组装到一个数组
-                this.idArr = val.map(item => item[1])
-                //提取后台二级数据
-                this.secondary = []
-                this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
-                //最终过滤
-                let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
-                //    组合成接口需要的数据格式
-                let result = []
-                filterList.forEach(item => {
-                    let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Source, SourceId, Type, Statistics} = item
-                    result.push({
-                        BlockId,
-                        BuildingId,
-                        Domain,
-                        // Id,
-                        MepSystemType,
-                        ProjectId,
-                        Source,
-                        SourceId,
-                        SourceType: Type,
-                        Statistics
-                    })
-                })
-                this.result = result
+      },
+      errBack() {
+        this.dialogProcess = false
+      },
+      finish() {
+        this.dialogProcess = false
+        this.dialogManualOption = false
+      },
+      templateDownload() {
+        this.$emit('template')
+      },
+      promptly() {
+        if(this.isComputed.IsAutomatic && !this.isComputed.IsSource) { //需要自动计算并且不需要配置云末端
+          console.log(this.isComputed.CalcUrl,'this.isComputed.CalcUrl')
+          this.$emit('CalcUrl',this.isComputed.CalcUrl, this.isComputed.ZoneTime)
 
-            },
-            computedUpdate() {
-                if (!this.result.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '请选择源端设备类',
-                        type: 'warning'
-                    });
-                    return false
-                } else {
-                    this.$emit('openComputed', this.result)
-                    this.dialogTableVisibleMore = false
+        }
+        this.dialogTableVisible = false
+      },
+      sourceOptions(val) {
+        //把所有id组装到一个数组
+        this.idArr = val.map(item => item[1])
+        //提取后台二级数据
+        this.secondary = []
+        this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
+        //最终过滤
+        let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
+        //    组合成接口需要的数据格式
+        let result = []
+        filterList.forEach(item => {
+          let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Source, SourceId, Type, Statistics} = item
+          result.push({
+            BlockId,
+            BuildingId,
+            Domain,
+            // Id,
+            MepSystemType,
+            ProjectId,
+            Source,
+            SourceId,
+            SourceType: Type,
+            Statistics
+          })
+        })
+        this.result = result
 
-                }
-            },
-            beforeUpload(file) {
-                let fd = new FormData()
-                fd.append('files',file)
+      },
+      computedUpdate() {
+        if (!this.result.length) {
+          this.$message({
+            showClose: true,
+            message: '请选择源端设备类',
+            type: 'warning'
+          });
+          return false
+        } else {
+          this.$emit('openComputed', this.result)
+          this.dialogTableVisibleMore = false
 
-            }
         }
+      },
     }
+  }
 </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>

+ 29 - 29
src/store/index.js

@@ -8,35 +8,35 @@ Vue.use(Vuex)
 const KEY_LAST_ROUTE = 'last_route'
 
 export default new Vuex.Store({
-    state: {
-        flag: 'sagacloud-admin',
-        ssoToken: null,
-        lastRoute: null
-    },
-    getters: {
-        flag: state => state.flag,
-        ssoToken: state => state.ssoToken,
-        lastRoute: state => {
-            if (!state.lastRoute) {
-                let lastRoute = storage.get(KEY_LAST_ROUTE)
-                if (lastRoute) {
-                    state.lastRoute = lastRoute
-                }
-            }
-            return state.lastRoute
+  state: {
+    flag: 'sagacloud-admin',
+    ssoToken: null,
+    lastRoute: null
+  },
+  getters: {
+    flag: state => state.flag,
+    ssoToken: state => state.ssoToken,
+    lastRoute: state => {
+      if (!state.lastRoute) {
+        let lastRoute = storage.get(KEY_LAST_ROUTE)
+        if (lastRoute) {
+          state.lastRoute = lastRoute
         }
-    },
-    mutations: {
-        setSsoToken: (state, val) => (state.ssoToken = val),
-        setLastRoute: (state, val) => {
-            state.lastRoute = val
-            storage.set(KEY_LAST_ROUTE, val)
-        }
-    },
-    actions: {},
-    modules: {
-        layout,
-        project,
-        alarm
+      }
+      return state.lastRoute
+    }
+  },
+  mutations: {
+    setSsoToken: (state, val) => (state.ssoToken = val),
+    setLastRoute: (state, val) => {
+      state.lastRoute = val
+      storage.set(KEY_LAST_ROUTE, val)
     }
+  },
+  actions: {},
+  modules: {
+    layout,
+    project,
+    alarm
+  }
 })

+ 1 - 1
src/views/relation/data/index.vue

@@ -150,11 +150,11 @@
             }
             return item
           })
+          arrList.sort((a, b) => a.title.localeCompare(b.title))
           return arrList
         } else {
           return []
         }
-
       },
       resetTransformation() {
         this.isDisabled = true

+ 243 - 224
src/views/relation/overview/index.vue

@@ -1,241 +1,260 @@
 <template>
-    <div
-        style="overflow-x: hidden"
-        v-loading="loading"
-    >
-        <cardList
-            :content="content"
-            :source="source"
-            :TableVisibleMoreLoading="TableVisibleMoreLoading"
-            @template="templateDown"
-            @calcSpecial="calcSpecial"
-            @openComputed="openComputed"
-        />
-    </div>
+  <div
+      style="overflow-x: hidden"
+      v-loading="loading"
+  >
+    <cardList
+        :content="content"
+        :source="source"
+        :TableVisibleMoreLoading="TableVisibleMoreLoading"
+        @template="templateDown"
+        @calcSpecial="calcSpecial"
+        @openComputed="openComputed"
+        @CalcUrl="CalcUrl"
+    />
+  </div>
 </template>
 
 <script>
-    import CardList from "@/components/relation/Overview/CardList"
-    import {
-        blockQuery,
-        blockSource,
-        calcSpecial,
-        graphic,
-        graphicNumber,
-        sysDirection
-    } from "../../../api/relation/api";
-    import {mapGetters} from 'vuex'
+  import CardList from "@/components/relation/Overview/CardList"
+  import {
+    blockQuery,
+    blockSource,
+    businessSpaceAll,
+    calcSpecial,
+    graphic,
+    graphicNumber,
+    sysDirection
+  } from "../../../api/relation/api";
+  import {mapGetters} from 'vuex'
 
-    export default {
-        data() {
-            return {
-                content: [
-                    // {
-                    //     GraphTypeId: '3535436',//大分类id
-                    //     GraphTypeName: '架构从属关系',//大分类名称
-                    //     GraphTypeCode: '',//大分类编码
-                    //     Note: '',//说明
-                    //     ParentId: '',//父id
-                    //     ChildGraphicTypeList: [
-                    //         {
-                    //             GraphTypeId: '234534543',//图类型id
-                    //             GraphTypeName: '建筑从属关系',//图类型名称
-                    //             GraphTypeCode: 'ksaajdk',//图类型编码
-                    //             Note: '显示数字字典excel中的xxx',//说明
-                    //             ParentId: '3535436',//父id,GraphTypeId
-                    //             RelationTypeProjectList: [
-                    //                 {
-                    //                     Id: '23445433534',
-                    //                     RelationTypeName: '项目下的建筑体',//关系类型名称
-                    //                     RelationTypeCode: 'Pj2Bd',//关系类型编码
-                    //                     GraphicId: 'ksaajdk',//图类型编码
-                    //                     Note: '边类型说明(待补充)',//说明
-                    //                     ConneObject: '项目→建筑体',//连接对象
-                    //                     IsSource: true,//是否需要配置源末端
-                    //                     IsAutomatic: true,//是否自动计算类型
-                    //                     Manual: 2,//123选一个手动计算类型1禁用2提示引导3手动维护
-                    //                     Prompting: '【设备台账】,【系统台账】',//提示信息
-                    //                     ProjectId: 'Pj1245',//项目id
-                    //                     ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
-                    //                     ComputationalState: 1,//计算状态
-                    //                 },
-                    //             ]
-                    //         },
-                    //     ]
-                    // },
-                ],
-                countNumber: [
-                    //     {
-                    //     "GraphTypeId": "3243215",
-                    //     "GraphTypeName": "从属关系",
-                    //     "GraphTypeCode": "ksaajdk",
-                    //     "RelationTypeProjectList": [
-                    //         {
-                    //             "Id": "f3bed766a5ba45868d3a744fb8aaa0c8",
-                    //             "RelationTypeName": "项目下的建筑体",
-                    //             "RelationTypeCode": "关系类型编码",
-                    //             "GraphicCode": "图类型code",
-                    //             "ProjectId": "Pj5432532",
-                    //             "count": "123"
-                    //         },
-                    //         {
-                    //             "Id": "6b4c9f042d344eb99dd64e8e444ad2b0",
-                    //             "RelationTypeName": "项目下的建筑体",
-                    //             "RelationTypeCode": "关系类型编码",
-                    //             "GraphicCode": "图类型code",
-                    //             "ProjectId": "Pj5432532",
-                    //             "count": "456"
-                    //         },
-                    //         {
-                    //             "Id": "305170f91eae4bf991be9284e80a9cf4",
-                    //             "RelationTypeName": "项目下的建筑体",
-                    //             "RelationTypeCode": "关系类型编码",
-                    //             "GraphicCode": "图类型code",
-                    //             "ProjectId": "Pj5432532",
-                    //             "count": "789"
-                    //         },
-                    //         {
-                    //             "Id": "cd7a30cf0f2548a99d4dc99a7948c0db",
-                    //             "RelationTypeName": "项目下的建筑体",
-                    //             "RelationTypeCode": "关系类型编码",
-                    //             "GraphicCode": "图类型code",
-                    //             "ProjectId": "Pj5432532",
-                    //             "count": "321"
-                    //         }
-                    //     ]
-                    // }
-                ],
-                loading: false,
-                source: [],//源端数据
-                currentRelationTypeName: '',//当前点击图片的RelationTypeName
-                TableVisibleMoreLoading: false,
-            }
-        },
-        created() {
-            this.init()
-
-        },
-        computed: {
-            ...mapGetters('layout', ['projectId'])
-        },
-        mounted() {
-        },
-        components: {CardList},
-        methods: {
-            init() {
-                this.loading = true
-                let data = {
-                    "Cascade": [{
-                        "Cascade": [{
-                            "Filters": `projectId = '${this.projectId}'`,
-                            "Name": "relationTypeProjectList"
-                        }],
-                        "Filters": " not parentId isnull",
-                        "Name": "childGraphicTypeList"
-                    }],
-                    "Filters": " parentId isnull ",
-                    "PageNumber": 1,
-                    "PageSize": 1000
-                }
-                let dataNumber = {
-                    projectId: this.projectId
-                }
-                graphic(data, res => {
-
-                    graphicNumber(dataNumber, resCount => {
-                        this.countNumber = resCount.Content
-                        this.loading = false
-                        this.transform(res.Content, this.countNumber)
-                        this.content = res.Content
-                    })
-                })
+  export default {
+    data() {
+      return {
+        content: [
+          // {
+          //     GraphTypeId: '3535436',//大分类id
+          //     GraphTypeName: '架构从属关系',//大分类名称
+          //     GraphTypeCode: '',//大分类编码
+          //     Note: '',//说明
+          //     ParentId: '',//父id
+          //     ChildGraphicTypeList: [
+          //         {
+          //             GraphTypeId: '234534543',//图类型id
+          //             GraphTypeName: '建筑从属关系',//图类型名称
+          //             GraphTypeCode: 'ksaajdk',//图类型编码
+          //             Note: '显示数字字典excel中的xxx',//说明
+          //             ParentId: '3535436',//父id,GraphTypeId
+          //             RelationTypeProjectList: [
+          //                 {
+          //                     Id: '23445433534',
+          //                     RelationTypeName: '项目下的建筑体',//关系类型名称
+          //                     RelationTypeCode: 'Pj2Bd',//关系类型编码
+          //                     GraphicId: 'ksaajdk',//图类型编码
+          //                     Note: '边类型说明(待补充)',//说明
+          //                     ConneObject: '项目→建筑体',//连接对象
+          //                     IsSource: true,//是否需要配置源末端
+          //                     IsAutomatic: true,//是否自动计算类型
+          //                     Manual: 2,//123选一个手动计算类型1禁用2提示引导3手动维护
+          //                     Prompting: '【设备台账】,【系统台账】',//提示信息
+          //                     ProjectId: 'Pj1245',//项目id
+          //                     ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
+          //                     ComputationalState: 1,//计算状态
+          //                 },
+          //             ]
+          //         },
+          //     ]
+          // },
+        ],
+        countNumber: [
+          //     {
+          //     "GraphTypeId": "3243215",
+          //     "GraphTypeName": "从属关系",
+          //     "GraphTypeCode": "ksaajdk",
+          //     "RelationTypeProjectList": [
+          //         {
+          //             "Id": "f3bed766a5ba45868d3a744fb8aaa0c8",
+          //             "RelationTypeName": "项目下的建筑体",
+          //             "RelationTypeCode": "关系类型编码",
+          //             "GraphicCode": "图类型code",
+          //             "ProjectId": "Pj5432532",
+          //             "count": "123"
+          //         },
+          //         {
+          //             "Id": "6b4c9f042d344eb99dd64e8e444ad2b0",
+          //             "RelationTypeName": "项目下的建筑体",
+          //             "RelationTypeCode": "关系类型编码",
+          //             "GraphicCode": "图类型code",
+          //             "ProjectId": "Pj5432532",
+          //             "count": "456"
+          //         },
+          //         {
+          //             "Id": "305170f91eae4bf991be9284e80a9cf4",
+          //             "RelationTypeName": "项目下的建筑体",
+          //             "RelationTypeCode": "关系类型编码",
+          //             "GraphicCode": "图类型code",
+          //             "ProjectId": "Pj5432532",
+          //             "count": "789"
+          //         },
+          //         {
+          //             "Id": "cd7a30cf0f2548a99d4dc99a7948c0db",
+          //             "RelationTypeName": "项目下的建筑体",
+          //             "RelationTypeCode": "关系类型编码",
+          //             "GraphicCode": "图类型code",
+          //             "ProjectId": "Pj5432532",
+          //             "count": "321"
+          //         }
+          //     ]
+          // }
+        ],
+        loading: false,
+        source: [],//源端数据
+        currentRelationTypeName: '',//当前点击图片的RelationTypeName
+        TableVisibleMoreLoading: false,
+      }
+    },
+    created() {
+      this.init()
 
+    },
+    watch: {
+      projectId() {
+        this.init()
+      }
+    },
+    computed: {
+      ...mapGetters('layout', ['projectId'])
+    },
+    mounted() {
+    },
+    components: {CardList},
+    methods: {
+      init() {
+        this.loading = true
+        // let data = {
+        //     "Cascade": [{
+        //         "Cascade": [{
+        //             "Filters": `projectId = '${this.projectId}'`,
+        //             "Name": "relationTypeProjectList"
+        //         }],
+        //         "Filters": " not parentId isnull",
+        //         "Name": "childGraphicTypeList"
+        //     }],
+        //     "Filters": " parentId isnull ",
+        //     "PageNumber": 1,
+        //     "PageSize": 1000
+        // }
+        let dataNumber = {
+          projectId: this.projectId
+        }
+        graphic(dataNumber, res => {
 
-            },
-            transform(list1, list2) {
-                let countInfo = {} // { GraphTypeName: { Id: count } }
-                list2.forEach(item => {
-                    countInfo[item.GraphTypeName] = countInfo[item.GraphTypeName] || {}
-                    let rList = item.RelationTypeProjectList
-                    rList.forEach(r => {
-                        countInfo[item.GraphTypeName][r.Id] = r.Count
-                    })
-                })
-                let changeList = []
-                list1.forEach(item => {
-                    // 这里保存的是引用
-                    if (item.ChildGraphicTypeList) {
-                        changeList.push(...item.ChildGraphicTypeList)
-                    }
-                })
-                changeList.length && changeList.forEach(item => {
-                    let name = item.GraphTypeName
-                    let rList = item.RelationTypeProjectList
-                    rList.forEach(r => {
-                        r.count = countInfo[name][r.Id]
-                    })
-                })
+          graphicNumber(dataNumber, resCount => {
+            this.countNumber = resCount.Content
+            this.loading = false
+            this.transform(res.Content, this.countNumber)
+            this.content = res.Content
+          })
+        })
 
 
-            },
-            templateDown() { //下载模板
-            },
-            calcSpecial(relation) {
-                this.TableVisibleMoreLoading = true//可能会很慢,加loading
-                this.currentRelationTypeName = relation.RelationTypeName
-                let param = {
-                    BuildingId: '',
-                    Domain: 'DomainPiping',
-                    ProjectId: this.projectId,
-                    SystemName: relation.RelationTypeName
-                }
-                calcSpecial(param, res => {
-                    let data = {
-                        projectId: this.projectId,
-                    }
-                    blockQuery(data, res => {
-                        //    获取源端数据
-                        this.TableVisibleMoreLoading = false
-                        this.source = res.Content
-                    })
-                })
-            },
+      },
+      transform(list1, list2) {
+        let countInfo = {} // { GraphTypeName: { Id: count } }
+        list2.forEach(item => {
+          countInfo[item.GraphTypeName] = countInfo[item.GraphTypeName] || {}
+          let rList = item.RelationTypeProjectList
+          rList.forEach(r => {
+            countInfo[item.GraphTypeName][r.Id] = r.Count
+          })
+        })
+        let changeList = []
+        list1.forEach(item => {
+          // 这里保存的是引用
+          if (item.ChildGraphicTypeList) {
+            changeList.push(...item.ChildGraphicTypeList)
+          }
+        })
+        changeList.length && changeList.forEach(item => {
+          let name = item.GraphTypeName
+          let rList = item.RelationTypeProjectList
+          rList.forEach(r => {
+            r.count = countInfo[name][r.Id]
+          })
+        })
+      },
+      CalcUrl(sclc_url,zone_time) {
+        let param = {
+          sclc_url,
+          zone_time,
+          proId: {
+            projectId: this.projectId
+          }
+        }
+        businessSpaceAll(param, res => {
+        })
+      },
+      templateDown() { //下载模板
+      },
+      calcSpecial(relation) {
+        this.currentRelationTypeName = relation.RelationTypeName
+        if (relation.IsSource) { //配置云末端
+          this.TableVisibleMoreLoading = true//可能会很慢,加loading
+          let param = {
+            BuildingId: '',
+            Domain: 'DomainPiping',
+            ProjectId: this.projectId,
+            SystemName: relation.RelationTypeName
+          }
+          calcSpecial(param, res => {
 
-            openComputed(result) {
-                let param = {
-                    // BuildingId: '',
-                    Domain: 'DomainPiping',
-                    MepSystemType: '冷冻水供水管',
-                    ProjectId: this.projectId,
-                    SourceList: result
-                }
-                blockSource(param, res => { //覆盖源端数据
-                    //确定流向
-                    result.forEach(i => {
-                        let {BlockId, BuildingId, Domain, Source} = i
-                        this.DataSorting(
-                            BlockId,
-                            BuildingId,
-                            Domain,
-                            Source,
-                        )
-                    })
-                })
-            },
-            DataSorting(BlockId, BuildingId, Domain, isSource) {
-                let param = {
-                    BlockId,
-                    Domain,
-                    isSource,
-                    BuildingId,
-                    SystemName: this.currentRelationTypeName
-                }
-                sysDirection(param, res => {
-                })
+            let data = {
+              projectId: this.projectId,
             }
+            blockQuery(data, res => {
+              //    获取源端数据
+              this.TableVisibleMoreLoading = false
+              this.source = res.Content
+            })
+          })
+        }
+      },
 
+      openComputed(result) {
+        let param = {
+          // BuildingId: '',
+          Domain: 'DomainPiping',
+          MepSystemType: '冷冻水供水管',
+          ProjectId: this.projectId,
+          SourceList: result
         }
+        blockSource(param, res => { //覆盖源端数据
+          //确定流向
+          result.forEach(i => {
+            let {BlockId, BuildingId, Domain, Source} = i
+            this.DataSorting(
+              BlockId,
+              BuildingId,
+              Domain,
+              Source,
+            )
+          })
+        })
+      },
+      DataSorting(BlockId, BuildingId, Domain, isSource) {
+        let param = {
+          BlockId,
+          Domain,
+          isSource,
+          BuildingId,
+          SystemName: this.currentRelationTypeName
+        }
+        sysDirection(param, res => {
+        })
+      }
+
     }
+  }
 </script>
 <style lang="less" scoped>